From c3aedb9ae73d308f4ce9776647b4c5e6360bfa85 Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:27:08 +0100 Subject: [PATCH 01/72] # Conflicts: # CHANGELOG.md # app/schemas/com.nextcloud.client.database.NextcloudDatabase/66.json # app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java # app/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt # app/src/main/res/values-b+en+001/strings.xml # app/src/main/res/values-bg-rBG/strings.xml # app/src/main/res/values-cs-rCZ/strings.xml # app/src/main/res/values-da/strings.xml # app/src/main/res/values-de/strings.xml # app/src/main/res/values-es/strings.xml # app/src/main/res/values-fr/strings.xml # app/src/main/res/values-hu-rHU/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-tr/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rHK/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml Signed-off-by: batpio --- app/build.gradle | 2 +- .../65.json | 1118 ----------------- .../client/SyncedFoldersActivityIT.java | 1 + .../java/com/owncloud/android/AbstractIT.java | 7 + .../android/utils/SyncedFolderUtilsTest.kt | 2 + .../database/entity/SyncedFolderEntity.kt | 2 + .../nextcloud/client/di/ComponentsModule.java | 4 + .../nextcloud/client/jobs/FilesSyncWork.kt | 4 +- .../datamodel/FilesystemDataProvider.java | 9 +- .../android/datamodel/SyncedFolder.java | 13 + .../datamodel/SyncedFolderDisplayItem.java | 4 + .../datamodel/SyncedFolderProvider.java | 4 + .../com/owncloud/android/db/ProviderMeta.java | 1 + .../ui/activity/SyncedFoldersActivity.kt | 9 + .../dialog/DurationPickerDialogFragment.java | 159 +++ ...SyncedFolderPreferencesDialogFragment.java | 60 + .../dialog/parcel/SyncedFolderParcelable.java | 12 + .../com/owncloud/android/utils/TimeUtils.java | 42 + app/src/main/res/layout/duration_picker.xml | 85 ++ .../layout/synced_folders_settings_layout.xml | 30 + app/src/main/res/values/strings.xml | 10 + .../activity/SyncedFoldersActivityTest.java | 1 + .../android/en-US/changelogs/30230051.txt | 8 + .../android/en-US/changelogs/30230052.txt | 9 + .../android/en-US/changelogs/30230090.txt | 9 + scripts/analysis/analysis-wrapper.sh | 2 +- scripts/analysis/getBranchName.sh | 4 +- 27 files changed, 485 insertions(+), 1126 deletions(-) delete mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json create mode 100644 app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java create mode 100644 app/src/main/java/com/owncloud/android/utils/TimeUtils.java create mode 100644 app/src/main/res/layout/duration_picker.xml create mode 100644 fastlane/metadata/android/en-US/changelogs/30230051.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/30230052.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/30230090.txt diff --git a/app/build.gradle b/app/build.gradle index bc3185599fbb..04f9c26cb159 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,7 +60,7 @@ configurations.configureEach { def versionMajor = 3 def versionMinor = 24 def versionPatch = 0 -def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable +def versionBuild = 90 // 0-50=Alpha / 51-98=RC / 90-99=stable def ndkEnv = new HashMap() diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json deleted file mode 100644 index cba9c61eda96..000000000000 --- a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json +++ /dev/null @@ -1,1118 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 65, - "identityHash": "1aa68e80a3cb0006ef54981abad692a9", - "entities": [ - { - "tableName": "arbitrary_data", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "cloudId", - "columnName": "cloud_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "capabilities", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "accountName", - "columnName": "account", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "versionMajor", - "columnName": "version_mayor", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionMinor", - "columnName": "version_minor", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionMicro", - "columnName": "version_micro", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionString", - "columnName": "version_string", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "versionEditor", - "columnName": "version_edition", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "extendedSupport", - "columnName": "extended_support", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "corePollinterval", - "columnName": "core_pollinterval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingApiEnabled", - "columnName": "sharing_api_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicEnabled", - "columnName": "sharing_public_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicPasswordEnforced", - "columnName": "sharing_public_password_enforced", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateEnabled", - "columnName": "sharing_public_expire_date_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateDays", - "columnName": "sharing_public_expire_date_days", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateEnforced", - "columnName": "sharing_public_expire_date_enforced", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicSendMail", - "columnName": "sharing_public_send_mail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicUpload", - "columnName": "sharing_public_upload", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingUserSendMail", - "columnName": "sharing_user_send_mail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingResharing", - "columnName": "sharing_resharing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingFederationOutgoing", - "columnName": "sharing_federation_outgoing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingFederationIncoming", - "columnName": "sharing_federation_incoming", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesBigfilechunking", - "columnName": "files_bigfilechunking", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesUndelete", - "columnName": "files_undelete", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesVersioning", - "columnName": "files_versioning", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "externalLinks", - "columnName": "external_links", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverName", - "columnName": "server_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverColor", - "columnName": "server_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverTextColor", - "columnName": "server_text_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverElementColor", - "columnName": "server_element_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverSlogan", - "columnName": "server_slogan", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverLogo", - "columnName": "server_logo", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverBackgroundUrl", - "columnName": "background_url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "endToEndEncryption", - "columnName": "end_to_end_encryption", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "activity", - "columnName": "activity", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverBackgroundDefault", - "columnName": "background_default", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverBackgroundPlain", - "columnName": "background_plain", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocument", - "columnName": "richdocument", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentMimetypeList", - "columnName": "richdocument_mimetype_list", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "richdocumentDirectEditing", - "columnName": "richdocument_direct_editing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentTemplates", - "columnName": "richdocument_direct_templates", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentOptionalMimetypeList", - "columnName": "richdocument_optional_mimetype_list", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharingPublicAskForOptionalPassword", - "columnName": "sharing_public_ask_for_optional_password", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentProductName", - "columnName": "richdocument_product_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "directEditingEtag", - "columnName": "direct_editing_etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "userStatus", - "columnName": "user_status", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "userStatusSupportsEmoji", - "columnName": "user_status_supports_emoji", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etag", - "columnName": "etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filesLockingVersion", - "columnName": "files_locking_version", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "external_links", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "iconUrl", - "columnName": "icon_url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "url", - "columnName": "url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "redirect", - "columnName": "redirect", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "filelist", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "encryptedName", - "columnName": "encrypted_filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "path", - "columnName": "path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pathDecrypted", - "columnName": "path_decrypted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "parent", - "columnName": "parent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "creation", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "modified", - "columnName": "modified", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "contentType", - "columnName": "content_type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "contentLength", - "columnName": "content_length", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "storagePath", - "columnName": "media_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountOwner", - "columnName": "file_owner", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lastSyncDate", - "columnName": "last_sync_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lastSyncDateForData", - "columnName": "last_sync_date_for_data", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "modifiedAtLastSyncForData", - "columnName": "modified_at_last_sync_for_data", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etag", - "columnName": "etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "etagOnServer", - "columnName": "etag_on_server", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharedViaLink", - "columnName": "share_by_link", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "permissions", - "columnName": "permissions", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remoteId", - "columnName": "remote_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "updateThumbnail", - "columnName": "update_thumbnail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isDownloading", - "columnName": "is_downloading", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "favorite", - "columnName": "favorite", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isEncrypted", - "columnName": "is_encrypted", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etagInConflict", - "columnName": "etag_in_conflict", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharedWithSharee", - "columnName": "shared_via_users", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "mountType", - "columnName": "mount_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "hasPreview", - "columnName": "has_preview", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unreadCommentsCount", - "columnName": "unread_comments_count", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "ownerId", - "columnName": "owner_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "ownerDisplayName", - "columnName": "owner_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharees", - "columnName": "sharees", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "richWorkspace", - "columnName": "rich_workspace", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "metadataSize", - "columnName": "metadata_size", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "locked", - "columnName": "locked", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockType", - "columnName": "lock_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockOwner", - "columnName": "lock_owner", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockOwnerDisplayName", - "columnName": "lock_owner_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockOwnerEditor", - "columnName": "lock_owner_editor", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockTimestamp", - "columnName": "lock_timestamp", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockTimeout", - "columnName": "lock_timeout", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockToken", - "columnName": "lock_token", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "filesystem", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileIsFolder", - "columnName": "is_folder", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileFoundRecently", - "columnName": "found_at", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileSentForUpload", - "columnName": "upload_triggered", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "syncedFolderId", - "columnName": "syncedfolder_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "crc32", - "columnName": "crc32", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileModified", - "columnName": "modified_at", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "ocshares", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileSource", - "columnName": "file_source", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "itemSource", - "columnName": "item_source", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareType", - "columnName": "share_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareWith", - "columnName": "shate_with", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "path", - "columnName": "path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "permissions", - "columnName": "permissions", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharedDate", - "columnName": "shared_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "expirationDate", - "columnName": "expiration_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "token", - "columnName": "token", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shareWithDisplayName", - "columnName": "shared_with_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDirectory", - "columnName": "is_directory", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "userId", - "columnName": "user_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "idRemoteShared", - "columnName": "id_remote_shared", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "accountOwner", - "columnName": "owner_share", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isPasswordProtected", - "columnName": "is_password_protected", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hideDownload", - "columnName": "hide_download", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareLink", - "columnName": "share_link", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shareLabel", - "columnName": "share_label", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "synced_folders", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `type` INTEGER, `hidden` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remotePath", - "columnName": "remote_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "wifiOnly", - "columnName": "wifi_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "chargingOnly", - "columnName": "charging_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "existing", - "columnName": "existing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "enabled", - "columnName": "enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "enabledTimestampMs", - "columnName": "enabled_timestamp_ms", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "subfolderByDate", - "columnName": "subfolder_by_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "account", - "columnName": "account", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploadAction", - "columnName": "upload_option", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "nameCollisionPolicy", - "columnName": "name_collision_policy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "hidden", - "columnName": "hidden", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "list_of_uploads", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remotePath", - "columnName": "remote_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountName", - "columnName": "account_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileSize", - "columnName": "file_size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localBehaviour", - "columnName": "local_behaviour", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "uploadTime", - "columnName": "upload_time", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "nameCollisionPolicy", - "columnName": "name_collision_policy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isCreateRemoteFolder", - "columnName": "is_create_remote_folder", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "uploadEndTimestamp", - "columnName": "upload_end_timestamp", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lastResult", - "columnName": "last_result", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isWhileChargingOnly", - "columnName": "is_while_charging_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isWifiOnly", - "columnName": "is_wifi_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "createdBy", - "columnName": "created_by", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folderUnlockToken", - "columnName": "folder_unlock_token", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "virtual", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "ocFileId", - "columnName": "ocfile_id", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1aa68e80a3cb0006ef54981abad692a9')" - ] - } -} \ No newline at end of file diff --git a/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java b/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java index d10a0f314465..4c20b0ebb8d5 100644 --- a/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java +++ b/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java @@ -68,6 +68,7 @@ public void testSyncedFolderDialog() { "test@https://nextcloud.localhost", 0, 0, + 0, true, 1000, "Name", diff --git a/app/src/androidTest/java/com/owncloud/android/AbstractIT.java b/app/src/androidTest/java/com/owncloud/android/AbstractIT.java index 2be8c335b605..d89735f3f8df 100644 --- a/app/src/androidTest/java/com/owncloud/android/AbstractIT.java +++ b/app/src/androidTest/java/com/owncloud/android/AbstractIT.java @@ -56,6 +56,7 @@ import java.io.InputStream; import java.util.Collection; import java.util.Objects; +import java.util.concurrent.TimeUnit; import androidx.annotation.NonNull; import androidx.fragment.app.DialogFragment; @@ -253,6 +254,10 @@ protected static File getDummyFile(String name) throws IOException { } public static File createFile(String name, int iteration) throws IOException { + return createFile(name, iteration, TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())); + } + + public static File createFile(String name, int iteration, long modificationTimestamp) throws IOException { File file = new File(FileStorageUtils.getTemporalPath(account.name) + File.separator + name); if (!file.getParentFile().exists()) { assertTrue(file.getParentFile().mkdirs()); @@ -268,6 +273,8 @@ public static File createFile(String name, int iteration) throws IOException { writer.flush(); writer.close(); + file.setLastModified(modificationTimestamp); + return file; } diff --git a/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt index d71e6687d401..60b8d6a4e20b 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt @@ -182,6 +182,7 @@ class SyncedFolderUtilsTest : AbstractIT() { account.name, 1, 1, + 0, true, 0L, MediaFolderType.IMAGE, @@ -204,6 +205,7 @@ class SyncedFolderUtilsTest : AbstractIT() { account.name, 1, 1, + 0, true, 0L, MediaFolderType.IMAGE, diff --git a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt index ed19f105d32e..39dd8f5e48b9 100644 --- a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt +++ b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt @@ -54,6 +54,8 @@ data class SyncedFolderEntity( val uploadAction: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY) val nameCollisionPolicy: Int?, + @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS) + val uploadDelayTimeMs: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_TYPE) val type: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_HIDDEN) diff --git a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java index eccfd6296ce9..d59d4d9ebda3 100644 --- a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java +++ b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java @@ -83,6 +83,7 @@ import com.owncloud.android.ui.dialog.ConfirmationDialogFragment; import com.owncloud.android.ui.dialog.ConflictsResolveDialog; import com.owncloud.android.ui.dialog.CreateFolderDialogFragment; +import com.owncloud.android.ui.dialog.DurationPickerDialogFragment; import com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment; import com.owncloud.android.ui.dialog.IndeterminateProgressDialog; import com.owncloud.android.ui.dialog.LoadingDialog; @@ -442,6 +443,9 @@ abstract class ComponentsModule { @ContributesAndroidInjector abstract SyncFileNotEnoughSpaceDialogFragment syncFileNotEnoughSpaceDialogFragment(); + @ContributesAndroidInjector + abstract DurationPickerDialogFragment durationPickerFragment(); + @ContributesAndroidInjector abstract DashboardWidgetConfigurationActivity dashboardWidgetConfigurationActivity(); diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 34105ba5afe3..2219d517015a 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -141,7 +141,8 @@ class FilesSyncWork( } val paths = filesystemDataProvider.getFilesForUpload( syncedFolder.localPath, - syncedFolder.id.toString() + syncedFolder.id.toString(), + syncedFolder.uploadDelayTimeMs ) if (paths.size == 0) { @@ -261,4 +262,5 @@ class FilesSyncWork( else -> FileUploader.LOCAL_BEHAVIOUR_FORGET } } + } diff --git a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java index 9e91738bb962..470e0f0885b9 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java @@ -74,19 +74,22 @@ public void updateFilesystemFileAsSentForUpload(String path, String syncedFolder ); } - public Set getFilesForUpload(String localPath, String syncedFolderId) { + public Set getFilesForUpload(String localPath, String syncedFolderId, long uploadDelayTimeMs) { Set localPathsToUpload = new HashSet<>(); String likeParam = localPath + "%"; + long olderThanParam = (System.currentTimeMillis() - uploadDelayTimeMs) / 1000; + Cursor cursor = contentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_FILESYSTEM, null, ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH + " LIKE ? and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID + " = ? and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ?", - new String[]{likeParam, syncedFolderId, "0", "0"}, + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_MODIFIED + " <= ?", + new String[]{likeParam, syncedFolderId, "0", "0", Long.toString(olderThanParam)}, null); if (cursor != null) { diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java index 282d0a0ef485..68ece41971e0 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java @@ -40,6 +40,7 @@ public class SyncedFolder implements Serializable, Cloneable { private boolean chargingOnly; private boolean existing; private boolean subfolderByDate; + private long uploadDelayTimeMs; private String account; private int uploadAction; private int nameCollisionPolicy; @@ -74,6 +75,7 @@ public SyncedFolder(String localPath, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, MediaFolderType type, @@ -88,6 +90,7 @@ public SyncedFolder(String localPath, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, @@ -109,6 +112,7 @@ protected SyncedFolder(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, MediaFolderType type, @@ -123,6 +127,7 @@ protected SyncedFolder(long id, this.account = account; this.uploadAction = uploadAction; this.nameCollisionPolicy = nameCollisionPolicy; + this.uploadDelayTimeMs = uploadDelayTimeMs; this.setEnabled(enabled, timestampMs); this.type = type; this.hidden = hidden; @@ -188,6 +193,10 @@ public NameCollisionPolicy getNameCollisionPolicy() { return NameCollisionPolicy.deserialize(nameCollisionPolicy); } + public long getUploadDelayTimeMs() { + return uploadDelayTimeMs; + } + public boolean isEnabled() { return this.enabled; } @@ -244,6 +253,10 @@ public void setNameCollisionPolicy(int nameCollisionPolicy) { this.nameCollisionPolicy = nameCollisionPolicy; } + public void setUploadDelayTimeMs(long uploadDelayTimeMs) { + this.uploadDelayTimeMs = uploadDelayTimeMs; + } + public void setType(MediaFolderType type) { this.type = type; } diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java index e0d52834328d..7006dd9abb6c 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java @@ -61,6 +61,7 @@ public SyncedFolderDisplayItem(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, List filePaths, @@ -78,6 +79,7 @@ public SyncedFolderDisplayItem(long id, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, @@ -97,6 +99,7 @@ public SyncedFolderDisplayItem(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, String folderName, @@ -112,6 +115,7 @@ public SyncedFolderDisplayItem(long id, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java index 8e15733f2a0f..5b3ab7bb8bf3 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java @@ -346,6 +346,8 @@ private SyncedFolder createSyncedFolderFromCursor(Cursor cursor) { ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_EXISTING)) == 1; boolean subfolderByDate = cursor.getInt(cursor.getColumnIndexOrThrow( ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_SUBFOLDER_BY_DATE)) == 1; + long uploadDelayTimeMs = cursor.getLong(cursor.getColumnIndexOrThrow( + ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS)); String accountName = cursor.getString(cursor.getColumnIndexOrThrow( ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ACCOUNT)); int uploadAction = cursor.getInt(cursor.getColumnIndexOrThrow( @@ -371,6 +373,7 @@ private SyncedFolder createSyncedFolderFromCursor(Cursor cursor) { accountName, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, enabledTimestampMs, type, @@ -396,6 +399,7 @@ private ContentValues createContentValuesFromSyncedFolder(SyncedFolder syncedFol cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ENABLED, syncedFolder.isEnabled()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ENABLED_TIMESTAMP_MS, syncedFolder.getEnabledTimestampMs()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_SUBFOLDER_BY_DATE, syncedFolder.isSubfolderByDate()); + cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS, syncedFolder.getUploadDelayTimeMs()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ACCOUNT, syncedFolder.getAccount()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_ACTION, syncedFolder.getUploadAction()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY, diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index cf4246ea2716..7327ff1f4300 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -286,6 +286,7 @@ static public class ProviderTableMeta implements BaseColumns { public static final String SYNCED_FOLDER_ACCOUNT = "account"; public static final String SYNCED_FOLDER_UPLOAD_ACTION = "upload_option"; public static final String SYNCED_FOLDER_NAME_COLLISION_POLICY = "name_collision_policy"; + public static final String SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS = "upload_delay_time_ms"; public static final String SYNCED_FOLDER_HIDDEN = "hidden"; // Columns of external links table diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index 2bf076902764..1ce76d1ac090 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -393,6 +393,7 @@ class SyncedFoldersActivity : syncedFolder.account, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicyInt, + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled, clock.currentTime, filePaths, @@ -422,6 +423,7 @@ class SyncedFoldersActivity : syncedFolder.account, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicyInt, + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled, clock.currentTime, mediaFolder.filePaths, @@ -450,6 +452,7 @@ class SyncedFoldersActivity : account.name, FileUploader.LOCAL_BEHAVIOUR_FORGET, NameCollisionPolicy.ASK_USER.serialize(), + 0, false, clock.currentTime, mediaFolder.filePaths, @@ -543,6 +546,7 @@ class SyncedFoldersActivity : account.name, FileUploader.LOCAL_BEHAVIOUR_FORGET, NameCollisionPolicy.ASK_USER.serialize(), + 0, false, clock.currentTime, null, @@ -652,6 +656,7 @@ class SyncedFoldersActivity : syncedFolder.account, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicy.serialize(), + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled, clock.currentTime, File(syncedFolder.localPath).name, @@ -673,6 +678,7 @@ class SyncedFoldersActivity : syncedFolder.isSubfolderByDate, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicy.serialize(), + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled ) saveOrUpdateSyncedFolder(item) @@ -739,6 +745,7 @@ class SyncedFoldersActivity : * @param subfolderByDate created sub folders * @param uploadAction upload action * @param nameCollisionPolicy what to do on name collision + * @param uploadDelayTimeMs delay * @param enabled is sync enabled */ @Suppress("LongParameterList") @@ -753,6 +760,7 @@ class SyncedFoldersActivity : subfolderByDate: Boolean, uploadAction: Int, nameCollisionPolicy: Int, + uploadDelayTimeMs: Long, enabled: Boolean ) { item.id = id @@ -764,6 +772,7 @@ class SyncedFoldersActivity : item.isSubfolderByDate = subfolderByDate item.uploadAction = uploadAction item.setNameCollisionPolicy(nameCollisionPolicy) + item.uploadDelayTimeMs = uploadDelayTimeMs item.setEnabled(enabled, clock.currentTime) } diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java new file mode 100644 index 000000000000..76aabdd16aa6 --- /dev/null +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -0,0 +1,159 @@ +package com.owncloud.android.ui.dialog; + +import android.app.Activity; +import android.app.Dialog; +import android.os.Bundle; +import android.view.View; +import android.widget.NumberPicker; +import android.widget.TextView; + +import com.google.android.material.dialog.MaterialAlertDialogBuilder; +import com.nextcloud.client.di.Injectable; +import com.owncloud.android.R; +import com.owncloud.android.databinding.DurationPickerBinding; +import com.owncloud.android.utils.TimeUtils; +import com.owncloud.android.utils.theme.ViewThemeUtils; + +import java.util.concurrent.TimeUnit; + +import javax.inject.Inject; + +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + +import static com.owncloud.android.utils.TimeUtils.getDurationParts; + +public class DurationPickerDialogFragment extends DialogFragment implements Injectable { + + public static final String DURATION = "DURATION"; + public static final String DIALOG_TITLE = "TITLE"; + public static final String HINT_MESSAGE = "HINT"; + + @Inject ViewThemeUtils viewThemeUtils; + + private NumberPicker daysPicker; + private NumberPicker hoursPicker; + private NumberPicker minutesPicker; + + private TextView hint; + + private DurationPickerBinding binding; + + public Listener resultListener; + + public static DurationPickerDialogFragment newInstance(long duration, String title, String hintMessage) { + Bundle args = new Bundle(); + args.putLong(DURATION, duration); + args.putString(HINT_MESSAGE, hintMessage); + args.putString(DIALOG_TITLE, title); + + DurationPickerDialogFragment dialogFragment = new DurationPickerDialogFragment(); + dialogFragment.setArguments(args); + dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog); + + return dialogFragment; + } + + public void setListener(Listener listener) { + resultListener = listener; + } + + @Override + public void onStart() { + super.onStart(); + + AlertDialog alertDialog = (AlertDialog) getDialog(); + + viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), + alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)); + } + + @Override + public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putLong(DURATION, getDuration()); + } + + @Override + public Dialog onCreateDialog(Bundle savedState) { + binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); + + daysPicker = binding.daysPicker; + hoursPicker = binding.hoursPicker; + minutesPicker = binding.minutesPicker; + + hint = binding.pickerHint; + + daysPicker.setMaxValue(30); + hoursPicker.setMaxValue(24); + minutesPicker.setMaxValue(59); + + binding.clear.setOnClickListener(view -> { + daysPicker.setValue(0); + hoursPicker.setValue(0); + minutesPicker.setValue(0); + }); + + long duration; + String hintMessage; + String dialogTitle; + if (savedState != null) { + duration = savedState.getLong(DURATION); + hintMessage = savedState.getString(HINT_MESSAGE); + dialogTitle = savedState.getString(DIALOG_TITLE); + } else { + duration = requireArguments().getLong(DURATION); + hintMessage = requireArguments().getString(HINT_MESSAGE); + dialogTitle = requireArguments().getString(DIALOG_TITLE); + } + + setDuration(duration); + setHintMessage(hintMessage); + + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); + builder.setTitle(dialogTitle); + builder.setView(binding.getRoot()); + builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { + if (resultListener != null) { + resultListener.onDurationPickerResult(Activity.RESULT_OK, getDuration()); + } + }); + builder.setNegativeButton(R.string.common_cancel, (dialog, whichButton) -> { + if (resultListener != null) { + resultListener.onDurationPickerResult(Activity.RESULT_CANCELED, 0); + } + }); + + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.getRoot().getContext(), builder); + + return builder.create(); + } + + @Override + public void onDestroyView() { + super.onDestroyView(); + binding = null; + } + + private long getDuration() { + return TimeUnit.DAYS.toMillis(daysPicker.getValue()) + + TimeUnit.HOURS.toMillis(hoursPicker.getValue()) + + TimeUnit.MINUTES.toMillis(minutesPicker.getValue()); + } + + private void setDuration(long duration) { + TimeUtils.DurationParts durationParts = getDurationParts(duration); + daysPicker.setValue(durationParts.getDays()); + hoursPicker.setValue(durationParts.getHours()); + minutesPicker.setValue(durationParts.getMinutes()); + } + + private void setHintMessage(String hintMessage) { + hint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); + hint.setText(hintMessage); + } + + interface Listener { + void onDurationPickerResult(int resultCode, long duration); + } +} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index 5e140291ffb6..d08a5aba73d3 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -46,6 +46,7 @@ import com.owncloud.android.ui.dialog.parcel.SyncedFolderParcelable; import com.owncloud.android.utils.DisplayUtils; import com.owncloud.android.utils.FileStorageUtils; +import com.owncloud.android.utils.TimeUtils; import com.owncloud.android.utils.theme.ViewThemeUtils; import java.io.File; @@ -92,6 +93,7 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem private TextView mLocalFolderPath; private TextView mLocalFolderSummary; private TextView mRemoteFolderSummary; + private TextView mUploadDelaySummary; private SyncedFolderParcelable mSyncedFolder; private MaterialButton mCancel; @@ -191,6 +193,8 @@ private void setupDialogElements(SyncedFoldersSettingsLayoutBinding binding) { mNameCollisionPolicySummary = binding.settingInstantNameCollisionPolicySummary; + mUploadDelaySummary = binding.settingInstantUploadDelaySummary; + mCancel = binding.cancel; mSave = binding.save; @@ -232,6 +236,8 @@ private void setupDialogElements(SyncedFoldersSettingsLayoutBinding binding) { final int nameCollisionPolicyIndex = getSelectionIndexForNameCollisionPolicy(mSyncedFolder.getNameCollisionPolicy()); mNameCollisionPolicySummary.setText(mNameCollisionPolicyItemStrings[nameCollisionPolicyIndex]); + + mUploadDelaySummary.setText(getDelaySummary(mSyncedFolder.getUploadDelayTimeMs())); } /** @@ -339,6 +345,9 @@ private void setupViews(SyncedFoldersSettingsLayoutBinding binding, boolean enab binding.settingInstantNameCollisionPolicyContainer.setEnabled(enable); binding.settingInstantNameCollisionPolicyContainer.setAlpha(alpha); + binding.settingInstantUploadDelayContainer.setEnabled(enable); + binding.settingInstantUploadDelayContainer.setAlpha(alpha); + mUploadOnWifiCheckbox.setEnabled(enable); mUploadOnChargingCheckbox.setEnabled(enable); mUploadExistingCheckbox.setEnabled(enable); @@ -427,6 +436,15 @@ public void onClick(View v) { showNameCollisionPolicyDialog(); } }); + + binding.settingInstantUploadDelayContainer.setOnClickListener( + new OnClickListener() { + @Override + public void onClick(View view) { + showUploadDelayDialog(); + } + } + ); } private void showBehaviourDialog() { @@ -477,6 +495,25 @@ private void showNameCollisionPolicyDialog() { behaviourDialog.show(); } + private void showUploadDelayDialog() { + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance( + mSyncedFolder.getUploadDelayTimeMs(), + getString(R.string.pref_instant_upload_delay_dialogTitle), + getString(R.string.pref_instant_upload_delay_hint)); + + dialog.setListener(new DurationPickerDialogFragment.Listener() { + @Override + public void onDurationPickerResult(int resultCode, long duration) { + if (resultCode == Activity.RESULT_OK) { + mSyncedFolder.setUploadDelayTimeMs(duration); + mUploadDelaySummary.setText(getDelaySummary(duration)); + } + dialog.dismiss(); + } + }); + dialog.show(getParentFragmentManager(), "dialog"); + } + @Override @NonNull public Dialog onCreateDialog(Bundle savedInstanceState) { @@ -615,4 +652,27 @@ static private NameCollisionPolicy getNameCollisionPolicyForSelectionIndex(int i return NameCollisionPolicy.ASK_USER; } } + + private String getDelaySummary(long duration) { + if (duration == 0) { + return getString(R.string.pref_instant_upload_delay_disabled); + } + TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(duration); + StringBuilder durationSummary = new StringBuilder(); + if (durationParts.getDays() > 0) { + durationSummary.append(durationParts.getDays()); + durationSummary.append(getString(R.string.common_days_short)); + durationSummary.append(" "); + } + if (durationParts.getHours() > 0) { + durationSummary.append(durationParts.getHours()); + durationSummary.append(getString(R.string.common_hours_short)); + durationSummary.append(" "); + } + if (durationParts.getMinutes() > 0) { + durationSummary.append(durationParts.getMinutes()); + durationSummary.append(getString(R.string.common_minutes_short)); + } + return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim()); + } } diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/parcel/SyncedFolderParcelable.java b/app/src/main/java/com/owncloud/android/ui/dialog/parcel/SyncedFolderParcelable.java index c1385bd4b446..15bfed97d76f 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/parcel/SyncedFolderParcelable.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/parcel/SyncedFolderParcelable.java @@ -47,6 +47,7 @@ public class SyncedFolderParcelable implements Parcelable { private long id; private String account; private int section; + private long uploadDelayTimeMs; public SyncedFolderParcelable(SyncedFolderDisplayItem syncedFolderDisplayItem, int section) { id = syncedFolderDisplayItem.getId(); @@ -63,6 +64,7 @@ public SyncedFolderParcelable(SyncedFolderDisplayItem syncedFolderDisplayItem, i uploadAction = syncedFolderDisplayItem.getUploadAction(); nameCollisionPolicy = NameCollisionPolicy.deserialize( syncedFolderDisplayItem.getNameCollisionPolicyInt()); + uploadDelayTimeMs = syncedFolderDisplayItem.getUploadDelayTimeMs(); this.section = section; hidden = syncedFolderDisplayItem.isHidden(); } @@ -83,6 +85,7 @@ private SyncedFolderParcelable(Parcel read) { nameCollisionPolicy = NameCollisionPolicy.deserialize(read.readInt()); section = read.readInt(); hidden = read.readInt() != 0; + uploadDelayTimeMs = read.readLong(); } public SyncedFolderParcelable() { @@ -106,6 +109,7 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(nameCollisionPolicy.serialize()); dest.writeInt(section); dest.writeInt(hidden ? 1 : 0); + dest.writeLong(uploadDelayTimeMs); } public static final Creator CREATOR = @@ -188,6 +192,10 @@ public boolean isSubfolderByDate() { return this.subfolderByDate; } + public long getUploadDelayTimeMs() { + return uploadDelayTimeMs; + } + public Integer getUploadAction() { return this.uploadAction; } @@ -248,6 +256,10 @@ public void setSubfolderByDate(boolean subfolderByDate) { this.subfolderByDate = subfolderByDate; } + public void setUploadDelayTimeMs(long uploadDelayTimeMs) { + this.uploadDelayTimeMs = uploadDelayTimeMs; + } + public void setNameCollisionPolicy(NameCollisionPolicy nameCollisionPolicy) { this.nameCollisionPolicy = nameCollisionPolicy; } diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java new file mode 100644 index 000000000000..cdb9c4596af1 --- /dev/null +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -0,0 +1,42 @@ +package com.owncloud.android.utils; + +import java.util.concurrent.TimeUnit; + +public class TimeUtils { + + private TimeUtils() { + // utility class -> private constructor + } + + public static DurationParts getDurationParts(long duration) { + int days = (int) TimeUnit.MILLISECONDS.toDays(duration); + int hours = (int) TimeUnit.MILLISECONDS.toHours(duration) - (days * 24); + int minutes = (int) (TimeUnit.MILLISECONDS.toMinutes(duration) - (TimeUnit.MILLISECONDS.toHours(duration)* 60)); + return new DurationParts(days, hours, minutes); + } + + public static class DurationParts { + int days; + int hours; + int minutes; + + public DurationParts(int days, int hours, int minutes) { + this.days = days; + this.hours = hours; + this.minutes = minutes; + } + + public int getDays() { + return days; + } + + public int getHours() { + return hours; + } + + public int getMinutes() { + return minutes; + } + } + +} diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml new file mode 100644 index 000000000000..f778e7dab0da --- /dev/null +++ b/app/src/main/res/layout/duration_picker.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/synced_folders_settings_layout.xml b/app/src/main/res/layout/synced_folders_settings_layout.xml index 248b932d86a2..d724939f4c71 100644 --- a/app/src/main/res/layout/synced_folders_settings_layout.xml +++ b/app/src/main/res/layout/synced_folders_settings_layout.xml @@ -362,6 +362,36 @@ android:text="@string/placeholder_filename" android:textColor="?android:attr/textColorSecondary" /> + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e4ad6665caf4..ee2aca8388d5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,6 +125,10 @@ Share Skip Copy + Clear + d + h + m About Remove account Remove account %s and delete all local files?\n\nDeletion cannot be undone. @@ -476,6 +480,12 @@ What to do if the file already exists? What to do if the file already exists? + Delay file upload + Delay file upload + Due to the sync interval, the delay may increase by an additional 15 minutes. + At least %1$s + No delay + Ask me every time Rename new version Overwrite remote version diff --git a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java index 8c80b4fa2e68..e11794053d35 100644 --- a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java +++ b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java @@ -170,6 +170,7 @@ private SyncedFolderDisplayItem create(String folderName, boolean enabled) { "test@nextcloud.com", FileUploader.LOCAL_BEHAVIOUR_MOVE, NameCollisionPolicy.ASK_USER.serialize(), + 30000, enabled, System.currentTimeMillis(), new ArrayList(), diff --git a/fastlane/metadata/android/en-US/changelogs/30230051.txt b/fastlane/metadata/android/en-US/changelogs/30230051.txt new file mode 100644 index 000000000000..859e1656c1f1 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230051.txt @@ -0,0 +1,8 @@ +## 3.23.0 RC1 (November 17, 2022) + +- File actions menu redesign +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230052.txt b/fastlane/metadata/android/en-US/changelogs/30230052.txt new file mode 100644 index 000000000000..c26de0f8fbd0 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230052.txt @@ -0,0 +1,9 @@ +## 3.23.0 RC2 (November 24, 2022) + +- File actions menu redesign +- Allow adding shortcuts to Home screen (@newhinton) +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230090.txt b/fastlane/metadata/android/en-US/changelogs/30230090.txt new file mode 100644 index 000000000000..58adc269b94d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230090.txt @@ -0,0 +1,9 @@ +## 3.23.0 (December 1, 2022) + +- File actions menu redesign +- Allow adding shortcuts to Home screen (@newhinton) +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 8770f1d2401b..dca8faa8eeda 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -7,7 +7,7 @@ BUILD_NUMBER=$4 PR_NUMBER=$5 -stableBranch="master" +stableBranch="stable-3.23" repository="android" ruby scripts/analysis/lint-up.rb diff --git a/scripts/analysis/getBranchName.sh b/scripts/analysis/getBranchName.sh index b9f14834be31..e49b2ed96dc3 100755 --- a/scripts/analysis/getBranchName.sh +++ b/scripts/analysis/getBranchName.sh @@ -3,7 +3,7 @@ # $1: username, $2: password/token, $3: pull request number if [ -z $3 ] ; then - echo "master"; + echo "stable-3.23"; else - curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4 + curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"stable-3.23"' | cut -d"\"" -f4 fi From 0fd71a2d2019b908e3d4f105911915925e3323fa Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:43:40 +0100 Subject: [PATCH 02/72] Delayed synchronization Signed-off-by: batpio --- .../65.json | 1118 +++++++++++++++++ 1 file changed, 1118 insertions(+) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json new file mode 100644 index 000000000000..cba9c61eda96 --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json @@ -0,0 +1,1118 @@ +{ + "formatVersion": 1, + "database": { + "version": 65, + "identityHash": "1aa68e80a3cb0006ef54981abad692a9", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `type` INTEGER, `hidden` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1aa68e80a3cb0006ef54981abad692a9')" + ] + } +} \ No newline at end of file From 3893d8ccf88875ae68b0e1f70dcdeb98c0b55ed4 Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:51:28 +0100 Subject: [PATCH 03/72] master merge fixes Signed-off-by: batpio --- app/build.gradle | 2 +- fastlane/metadata/android/en-US/changelogs/30230051.txt | 8 -------- fastlane/metadata/android/en-US/changelogs/30230052.txt | 9 --------- fastlane/metadata/android/en-US/changelogs/30230090.txt | 9 --------- scripts/analysis/analysis-wrapper.sh | 2 +- scripts/analysis/getBranchName.sh | 4 ++-- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230051.txt delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230052.txt delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230090.txt diff --git a/app/build.gradle b/app/build.gradle index 04f9c26cb159..bc3185599fbb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,7 +60,7 @@ configurations.configureEach { def versionMajor = 3 def versionMinor = 24 def versionPatch = 0 -def versionBuild = 90 // 0-50=Alpha / 51-98=RC / 90-99=stable +def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable def ndkEnv = new HashMap() diff --git a/fastlane/metadata/android/en-US/changelogs/30230051.txt b/fastlane/metadata/android/en-US/changelogs/30230051.txt deleted file mode 100644 index 859e1656c1f1..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230051.txt +++ /dev/null @@ -1,8 +0,0 @@ -## 3.23.0 RC1 (November 17, 2022) - -- File actions menu redesign -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230052.txt b/fastlane/metadata/android/en-US/changelogs/30230052.txt deleted file mode 100644 index c26de0f8fbd0..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230052.txt +++ /dev/null @@ -1,9 +0,0 @@ -## 3.23.0 RC2 (November 24, 2022) - -- File actions menu redesign -- Allow adding shortcuts to Home screen (@newhinton) -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230090.txt b/fastlane/metadata/android/en-US/changelogs/30230090.txt deleted file mode 100644 index 58adc269b94d..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230090.txt +++ /dev/null @@ -1,9 +0,0 @@ -## 3.23.0 (December 1, 2022) - -- File actions menu redesign -- Allow adding shortcuts to Home screen (@newhinton) -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index dca8faa8eeda..8770f1d2401b 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -7,7 +7,7 @@ BUILD_NUMBER=$4 PR_NUMBER=$5 -stableBranch="stable-3.23" +stableBranch="master" repository="android" ruby scripts/analysis/lint-up.rb diff --git a/scripts/analysis/getBranchName.sh b/scripts/analysis/getBranchName.sh index e49b2ed96dc3..b9f14834be31 100755 --- a/scripts/analysis/getBranchName.sh +++ b/scripts/analysis/getBranchName.sh @@ -3,7 +3,7 @@ # $1: username, $2: password/token, $3: pull request number if [ -z $3 ] ; then - echo "stable-3.23"; + echo "master"; else - curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"stable-3.23"' | cut -d"\"" -f4 + curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4 fi From a93c3d78c3403ba83a7dfdf66a6185fd56badf3f Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:53:51 +0100 Subject: [PATCH 04/72] master merge fixes Signed-off-by: batpio --- .../androidTest/java/com/owncloud/android/AbstractIT.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/AbstractIT.java b/app/src/androidTest/java/com/owncloud/android/AbstractIT.java index d89735f3f8df..2be8c335b605 100644 --- a/app/src/androidTest/java/com/owncloud/android/AbstractIT.java +++ b/app/src/androidTest/java/com/owncloud/android/AbstractIT.java @@ -56,7 +56,6 @@ import java.io.InputStream; import java.util.Collection; import java.util.Objects; -import java.util.concurrent.TimeUnit; import androidx.annotation.NonNull; import androidx.fragment.app.DialogFragment; @@ -254,10 +253,6 @@ protected static File getDummyFile(String name) throws IOException { } public static File createFile(String name, int iteration) throws IOException { - return createFile(name, iteration, TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())); - } - - public static File createFile(String name, int iteration, long modificationTimestamp) throws IOException { File file = new File(FileStorageUtils.getTemporalPath(account.name) + File.separator + name); if (!file.getParentFile().exists()) { assertTrue(file.getParentFile().mkdirs()); @@ -273,8 +268,6 @@ public static File createFile(String name, int iteration, long modificationTimes writer.flush(); writer.close(); - file.setLastModified(modificationTimestamp); - return file; } From 28766ef9eb2868af5f5a5831ab2eb49076ce78bd Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 23:00:33 +0100 Subject: [PATCH 05/72] Licences Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragment.java | 21 +++++++++++++++++++ .../com/owncloud/android/utils/TimeUtils.java | 21 +++++++++++++++++++ app/src/main/res/layout/duration_picker.xml | 20 ++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index 76aabdd16aa6..b10aaaea0a2b 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -1,3 +1,24 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package com.owncloud.android.ui.dialog; import android.app.Activity; diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java index cdb9c4596af1..bc54a1dcdb6b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -1,3 +1,24 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package com.owncloud.android.utils; import java.util.concurrent.TimeUnit; diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index f778e7dab0da..c2340e670384 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -1,4 +1,24 @@ + Date: Tue, 20 Dec 2022 23:53:52 +0100 Subject: [PATCH 06/72] Fixes Signed-off-by: batpio --- .../DurationPickerDialogFragmentIT.java | 40 +++++++++++ .../owncloud/android/utils/TimeUtilsTest.java | 32 +++++++++ .../dialog/DurationPickerDialogFragment.java | 69 ++++++++----------- ...SyncedFolderPreferencesDialogFragment.java | 2 +- .../com/owncloud/android/utils/TimeUtils.java | 14 ++-- .../activity/SyncedFoldersActivityTest.java | 2 +- 6 files changed, 111 insertions(+), 48 deletions(-) create mode 100644 app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java create mode 100644 app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java new file mode 100644 index 000000000000..749a80dbf76d --- /dev/null +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -0,0 +1,40 @@ +package com.owncloud.android.ui.dialog; + +import com.nextcloud.client.TestActivity; +import com.owncloud.android.AbstractIT; +import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.ui.activity.FileDisplayActivity; +import com.owncloud.android.utils.ScreenshotTest; + +import org.junit.Rule; +import org.junit.Test; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.test.espresso.intent.rule.IntentsTestRule; + +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; + +public class DurationPickerDialogFragmentIT extends AbstractIT { + @Rule public IntentsTestRule testActivityRule = new IntentsTestRule<>(TestActivity.class, + true, false); + + @Test + public void showNotEnoughSpaceDialogForFolder() { + TestActivity test = testActivityRule.launchActivity(null); + FragmentManager fm = testActivityRule.getActivity().getSupportFragmentManager(); + FragmentTransaction ft = fm.beginTransaction(); + ft.addToBackStack(null); + + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), "Test", ""); + dialog.show(ft, "1"); + + getInstrumentation().waitForIdleSync(); + + screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView()); + } + +} diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java new file mode 100644 index 000000000000..cd1f58a51997 --- /dev/null +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java @@ -0,0 +1,32 @@ +package com.owncloud.android.utils; + + +import org.junit.Test; +import org.junit.runner.RunWith; + +import java.util.concurrent.TimeUnit; + +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import static java.util.concurrent.TimeUnit.DAYS; +import static java.util.concurrent.TimeUnit.HOURS; +import static java.util.concurrent.TimeUnit.MINUTES; +import static junit.framework.TestCase.assertEquals; + +@RunWith(AndroidJUnit4.class) +public class TimeUtilsTest { + + @Test + void shouldGetDurationParts() { + int days = 5; + int hours = 10; + int minutes = 30; + TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(DAYS.toMillis(days) + + HOURS.toMillis(hours) + + MINUTES.toMillis(minutes)); + + assertEquals(days, durationParts.getDays()); + assertEquals(hours, durationParts.getHours()); + assertEquals(minutes, durationParts.getMinutes()); + } +} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index b10aaaea0a2b..e8ca7642fa40 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -45,19 +45,16 @@ import static com.owncloud.android.utils.TimeUtils.getDurationParts; public class DurationPickerDialogFragment extends DialogFragment implements Injectable { + private static final int MAX_DAYS_VALUE = 30; + private static final int MAX_HOURS_VALUE = 24; + private static final int MAX_MINUTES_VALUE = 59; - public static final String DURATION = "DURATION"; - public static final String DIALOG_TITLE = "TITLE"; - public static final String HINT_MESSAGE = "HINT"; + private static final String DURATION = "DURATION"; + private static final String DIALOG_TITLE = "TITLE"; + private static final String HINT_MESSAGE = "HINT"; @Inject ViewThemeUtils viewThemeUtils; - private NumberPicker daysPicker; - private NumberPicker hoursPicker; - private NumberPicker minutesPicker; - - private TextView hint; - private DurationPickerBinding binding; public Listener resultListener; @@ -99,39 +96,27 @@ public void onSaveInstanceState(Bundle outState) { public Dialog onCreateDialog(Bundle savedState) { binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); - daysPicker = binding.daysPicker; - hoursPicker = binding.hoursPicker; - minutesPicker = binding.minutesPicker; - - hint = binding.pickerHint; - - daysPicker.setMaxValue(30); - hoursPicker.setMaxValue(24); - minutesPicker.setMaxValue(59); - - binding.clear.setOnClickListener(view -> { - daysPicker.setValue(0); - hoursPicker.setValue(0); - minutesPicker.setValue(0); - }); + setupLimits(); long duration; - String hintMessage; - String dialogTitle; if (savedState != null) { duration = savedState.getLong(DURATION); - hintMessage = savedState.getString(HINT_MESSAGE); - dialogTitle = savedState.getString(DIALOG_TITLE); } else { duration = requireArguments().getLong(DURATION); - hintMessage = requireArguments().getString(HINT_MESSAGE); - dialogTitle = requireArguments().getString(DIALOG_TITLE); } - setDuration(duration); + + String hintMessage = requireArguments().getString(HINT_MESSAGE); setHintMessage(hintMessage); + binding.clear.setOnClickListener(view -> { + binding.daysPicker.setValue(0); + binding.hoursPicker.setValue(0); + binding.minutesPicker.setValue(0); + }); + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); + String dialogTitle = requireArguments().getString(DIALOG_TITLE); builder.setTitle(dialogTitle); builder.setView(binding.getRoot()); builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { @@ -156,22 +141,28 @@ public void onDestroyView() { binding = null; } + private void setupLimits() { + binding.daysPicker.setMaxValue(MAX_DAYS_VALUE); + binding.hoursPicker.setMaxValue(MAX_HOURS_VALUE); + binding.minutesPicker.setMaxValue(MAX_MINUTES_VALUE); + } + private long getDuration() { - return TimeUnit.DAYS.toMillis(daysPicker.getValue()) + - TimeUnit.HOURS.toMillis(hoursPicker.getValue()) + - TimeUnit.MINUTES.toMillis(minutesPicker.getValue()); + return TimeUnit.DAYS.toMillis(binding.daysPicker.getValue()) + + TimeUnit.HOURS.toMillis(binding.hoursPicker.getValue()) + + TimeUnit.MINUTES.toMillis(binding.minutesPicker.getValue()); } private void setDuration(long duration) { TimeUtils.DurationParts durationParts = getDurationParts(duration); - daysPicker.setValue(durationParts.getDays()); - hoursPicker.setValue(durationParts.getHours()); - minutesPicker.setValue(durationParts.getMinutes()); + binding.daysPicker.setValue(durationParts.getDays()); + binding.hoursPicker.setValue(durationParts.getHours()); + binding.minutesPicker.setValue(durationParts.getMinutes()); } private void setHintMessage(String hintMessage) { - hint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); - hint.setText(hintMessage); + binding.pickerHint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); + binding.pickerHint.setText(hintMessage); } interface Listener { diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index d08a5aba73d3..b48a37f5a357 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -511,7 +511,7 @@ public void onDurationPickerResult(int resultCode, long duration) { dialog.dismiss(); } }); - dialog.show(getParentFragmentManager(), "dialog"); + dialog.show(getParentFragmentManager(), "UPLOAD_DELAY_PICKER_DIALOG"); } @Override diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java index bc54a1dcdb6b..f03beebffb1d 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -21,7 +21,7 @@ package com.owncloud.android.utils; -import java.util.concurrent.TimeUnit; +import static java.util.concurrent.TimeUnit.MILLISECONDS; public class TimeUtils { @@ -30,16 +30,16 @@ private TimeUtils() { } public static DurationParts getDurationParts(long duration) { - int days = (int) TimeUnit.MILLISECONDS.toDays(duration); - int hours = (int) TimeUnit.MILLISECONDS.toHours(duration) - (days * 24); - int minutes = (int) (TimeUnit.MILLISECONDS.toMinutes(duration) - (TimeUnit.MILLISECONDS.toHours(duration)* 60)); + int days = (int) MILLISECONDS.toDays(duration); + int hours = (int) MILLISECONDS.toHours(duration) - (days * 24); + int minutes = (int) (MILLISECONDS.toMinutes(duration) - (MILLISECONDS.toHours(duration) * 60)); return new DurationParts(days, hours, minutes); } public static class DurationParts { - int days; - int hours; - int minutes; + private int days; + private int hours; + private int minutes; public DurationParts(int days, int hours, int minutes) { this.days = days; diff --git a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java index e11794053d35..80bfee28efea 100644 --- a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java +++ b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java @@ -170,7 +170,7 @@ private SyncedFolderDisplayItem create(String folderName, boolean enabled) { "test@nextcloud.com", FileUploader.LOCAL_BEHAVIOUR_MOVE, NameCollisionPolicy.ASK_USER.serialize(), - 30000, + 0, enabled, System.currentTimeMillis(), new ArrayList(), From e6dfc64d7c0b5ed59f4a6b4913581307942bb840 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 21 Dec 2022 00:15:51 +0100 Subject: [PATCH 07/72] Fixes Signed-off-by: batpio --- .../ui/dialog/DurationPickerDialogFragmentIT.java | 9 +++++---- .../java/com/owncloud/android/utils/TimeUtilsTest.java | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java index 749a80dbf76d..65d5516eca3b 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -23,14 +23,15 @@ public class DurationPickerDialogFragmentIT extends AbstractIT { true, false); @Test - public void showNotEnoughSpaceDialogForFolder() { + public void showSyncDelayDurationDialog() { TestActivity test = testActivityRule.launchActivity(null); - FragmentManager fm = testActivityRule.getActivity().getSupportFragmentManager(); + FragmentManager fm = test.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.addToBackStack(null); - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), "Test", ""); - dialog.show(ft, "1"); + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), + "Dialog title", "Hint message"); + dialog.show(ft, "DURATION_DIALOG"); getInstrumentation().waitForIdleSync(); diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java index cd1f58a51997..edfd58c12fc4 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java @@ -17,13 +17,13 @@ public class TimeUtilsTest { @Test - void shouldGetDurationParts() { + public void shouldGetDurationParts() { int days = 5; int hours = 10; int minutes = 30; - TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(DAYS.toMillis(days) + - HOURS.toMillis(hours) + - MINUTES.toMillis(minutes)); + + TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts( + DAYS.toMillis(days) + HOURS.toMillis(hours) + MINUTES.toMillis(minutes)); assertEquals(days, durationParts.getDays()); assertEquals(hours, durationParts.getHours()); From 078c9d4b698aeeec29ca00a8866f395a5ab0d2cb Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 11 Jan 2023 20:43:40 +0100 Subject: [PATCH 08/72] Tuning Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragment.java | 2 -- ...SyncedFolderPreferencesDialogFragment.java | 13 +++++------- app/src/main/res/layout/duration_picker.xml | 21 +++++++++++-------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index e8ca7642fa40..df33dfca1345 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -25,8 +25,6 @@ import android.app.Dialog; import android.os.Bundle; import android.view.View; -import android.widget.NumberPicker; -import android.widget.TextView; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.nextcloud.client.di.Injectable; diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index b48a37f5a357..a98e712934a5 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -501,15 +501,12 @@ private void showUploadDelayDialog() { getString(R.string.pref_instant_upload_delay_dialogTitle), getString(R.string.pref_instant_upload_delay_hint)); - dialog.setListener(new DurationPickerDialogFragment.Listener() { - @Override - public void onDurationPickerResult(int resultCode, long duration) { - if (resultCode == Activity.RESULT_OK) { - mSyncedFolder.setUploadDelayTimeMs(duration); - mUploadDelaySummary.setText(getDelaySummary(duration)); - } - dialog.dismiss(); + dialog.setListener((resultCode, duration) -> { + if (resultCode == Activity.RESULT_OK) { + mSyncedFolder.setUploadDelayTimeMs(duration); + mUploadDelaySummary.setText(getDelaySummary(duration)); } + dialog.dismiss(); }); dialog.show(getParentFragmentManager(), "UPLOAD_DELAY_PICKER_DIALOG"); } diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index c2340e670384..4860ec6d68cf 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -91,15 +91,18 @@ app:layout_constraintStart_toStartOf="@+id/minutes_picker" app:layout_constraintVertical_bias="0.5" /> - + - + \ No newline at end of file From c09cd0d1f7d69c14b720b84f2588342d4e44f0ca Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 11 Jan 2023 20:46:09 +0100 Subject: [PATCH 09/72] Tuning Signed-off-by: batpio --- app/src/main/res/values/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ee2aca8388d5..f76353e768f4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,7 +125,6 @@ Share Skip Copy - Clear d h m From 470953179983ad5c22327d03a1b6ba6459982766 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 20:33:54 +0100 Subject: [PATCH 10/72] Merge fixes Signed-off-by: batpio --- .../68.json | 1136 +++++++++++++++++ .../DurationPickerDialogFragmentIT.java | 5 +- .../com/owncloud/android/db/ProviderMeta.java | 2 +- 3 files changed, 1138 insertions(+), 5 deletions(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/68.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/68.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/68.json new file mode 100644 index 000000000000..076fed7e045c --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/68.json @@ -0,0 +1,1136 @@ +{ + "formatVersion": 1, + "database": { + "version": 68, + "identityHash": "36de8734ee8e89dbf34b9893d4d20dec", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER, `type` INTEGER, `hidden` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '36de8734ee8e89dbf34b9893d4d20dec')" + ] + } +} \ No newline at end of file diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java index 65d5516eca3b..2ca144b356cf 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -1,10 +1,7 @@ package com.owncloud.android.ui.dialog; -import com.nextcloud.client.TestActivity; +import com.nextcloud.test.TestActivity; import com.owncloud.android.AbstractIT; -import com.owncloud.android.datamodel.OCFile; -import com.owncloud.android.ui.activity.FileDisplayActivity; -import com.owncloud.android.utils.ScreenshotTest; import org.junit.Rule; import org.junit.Test; diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index 7327ff1f4300..88608b35d3f2 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -35,7 +35,7 @@ */ public class ProviderMeta { public static final String DB_NAME = "filelist"; - public static final int DB_VERSION = 67; + public static final int DB_VERSION = 68; private ProviderMeta() { // No instance From 3efff037ddd6e8d22ab827ce7539635acbcd694a Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 21:56:01 +0100 Subject: [PATCH 11/72] Rename .java to .kt Signed-off-by: batpio --- ...kerDialogFragmentIT.java => DurationPickerDialogFragmentIT.kt} | 0 .../android/utils/{TimeUtilsTest.java => TimeUtilsTest.kt} | 0 ...nPickerDialogFragment.java => DurationPickerDialogFragment.kt} | 0 .../com/owncloud/android/utils/{TimeUtils.java => TimeUtils.kt} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename app/src/androidTest/java/com/owncloud/android/ui/dialog/{DurationPickerDialogFragmentIT.java => DurationPickerDialogFragmentIT.kt} (100%) rename app/src/androidTest/java/com/owncloud/android/utils/{TimeUtilsTest.java => TimeUtilsTest.kt} (100%) rename app/src/main/java/com/owncloud/android/ui/dialog/{DurationPickerDialogFragment.java => DurationPickerDialogFragment.kt} (100%) rename app/src/main/java/com/owncloud/android/utils/{TimeUtils.java => TimeUtils.kt} (100%) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt similarity index 100% rename from app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java rename to app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt similarity index 100% rename from app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java rename to app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt similarity index 100% rename from app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java rename to app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt similarity index 100% rename from app/src/main/java/com/owncloud/android/utils/TimeUtils.java rename to app/src/main/java/com/owncloud/android/utils/TimeUtils.kt From 174b93a03c72191c1230f215abb4b44186706677 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 21:56:02 +0100 Subject: [PATCH 12/72] New files converted to Kotlin Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 52 ++-- .../owncloud/android/utils/TimeUtilsTest.kt | 51 ++-- .../ui/dialog/DurationPickerDialogFragment.kt | 224 ++++++++---------- ...SyncedFolderPreferencesDialogFragment.java | 2 +- .../com/owncloud/android/utils/TimeUtils.kt | 49 +--- 5 files changed, 160 insertions(+), 218 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 2ca144b356cf..a78f72688694 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -1,38 +1,32 @@ -package com.owncloud.android.ui.dialog; +package com.owncloud.android.ui.dialog -import com.nextcloud.test.TestActivity; -import com.owncloud.android.AbstractIT; +import androidx.test.espresso.intent.rule.IntentsTestRule +import com.nextcloud.test.TestActivity +import com.owncloud.android.AbstractIT +import org.junit.Rule +import org.junit.Test +import java.util.concurrent.TimeUnit -import org.junit.Rule; -import org.junit.Test; +class DurationPickerDialogFragmentIT : AbstractIT() { -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -import androidx.fragment.app.FragmentManager; -import androidx.fragment.app.FragmentTransaction; -import androidx.test.espresso.intent.rule.IntentsTestRule; - -import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; - -public class DurationPickerDialogFragmentIT extends AbstractIT { - @Rule public IntentsTestRule testActivityRule = new IntentsTestRule<>(TestActivity.class, - true, false); + @get:Rule + val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false) @Test - public void showSyncDelayDurationDialog() { - TestActivity test = testActivityRule.launchActivity(null); - FragmentManager fm = test.getSupportFragmentManager(); - FragmentTransaction ft = fm.beginTransaction(); - ft.addToBackStack(null); + fun showSyncDelayDurationDialog() { + val activity = testActivityRule.launchActivity(null) - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), - "Dialog title", "Hint message"); - dialog.show(ft, "DURATION_DIALOG"); + val fm = activity.supportFragmentManager + val ft = fm.beginTransaction() + ft.addToBackStack(null) - getInstrumentation().waitForIdleSync(); + val dialog = DurationPickerDialogFragment.newInstance( + TimeUnit.HOURS.toMillis(5), + "Dialog title", "Hint message" + ) + dialog.show(ft, "DURATION_DIALOG") - screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView()); + waitForIdleSync() + screenshot(dialog.requireDialog().window!!.decorView) } - -} +} \ No newline at end of file diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index edfd58c12fc4..fb277571f0ec 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -1,32 +1,27 @@ -package com.owncloud.android.utils; +package com.owncloud.android.utils +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.owncloud.android.utils.TimeUtils.getDurationParts +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import java.util.concurrent.TimeUnit -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.util.concurrent.TimeUnit; - -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import static java.util.concurrent.TimeUnit.DAYS; -import static java.util.concurrent.TimeUnit.HOURS; -import static java.util.concurrent.TimeUnit.MINUTES; -import static junit.framework.TestCase.assertEquals; - -@RunWith(AndroidJUnit4.class) -public class TimeUtilsTest { - +@RunWith(AndroidJUnit4::class) +class TimeUtilsTest { @Test - public void shouldGetDurationParts() { - int days = 5; - int hours = 10; - int minutes = 30; - - TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts( - DAYS.toMillis(days) + HOURS.toMillis(hours) + MINUTES.toMillis(minutes)); - - assertEquals(days, durationParts.getDays()); - assertEquals(hours, durationParts.getHours()); - assertEquals(minutes, durationParts.getMinutes()); + fun shouldGetDurationParts() { + val days = 5 + val hours = 10 + val minutes = 30 + val duration = TimeUnit.DAYS.toMillis(days.toLong()) + + TimeUnit.HOURS.toMillis(hours.toLong()) + + TimeUnit.MINUTES.toMillis(minutes.toLong()) + + val durationParts = getDurationParts(duration) + + assertEquals(days, durationParts.days) + assertEquals(hours, durationParts.hours) + assertEquals(minutes, durationParts.minutes) } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index df33dfca1345..f890a6f07163 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -18,152 +18,132 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +package com.owncloud.android.ui.dialog + +import android.app.Activity +import android.app.Dialog +import android.content.DialogInterface +import android.os.Bundle +import android.view.View +import androidx.appcompat.app.AlertDialog +import androidx.fragment.app.DialogFragment +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.nextcloud.client.di.Injectable +import com.owncloud.android.R +import com.owncloud.android.databinding.DurationPickerBinding +import com.owncloud.android.utils.TimeUtils +import com.owncloud.android.utils.theme.ViewThemeUtils +import java.util.concurrent.TimeUnit +import javax.inject.Inject + +class DurationPickerDialogFragment : DialogFragment(), Injectable { + + private var _binding: DurationPickerBinding? = null + private val binding get() = _binding!! + private var resultListener: Listener? = null + + private var duration: Long + private get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + + TimeUnit.MINUTES.toMillis(binding.minutesPicker.value.toLong()) + private set(duration) { + val durationParts = TimeUtils.getDurationParts(duration) + binding.daysPicker.value = durationParts.days + binding.hoursPicker.value = durationParts.hours + binding.minutesPicker.value = durationParts.minutes + } -package com.owncloud.android.ui.dialog; - -import android.app.Activity; -import android.app.Dialog; -import android.os.Bundle; -import android.view.View; - -import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.nextcloud.client.di.Injectable; -import com.owncloud.android.R; -import com.owncloud.android.databinding.DurationPickerBinding; -import com.owncloud.android.utils.TimeUtils; -import com.owncloud.android.utils.theme.ViewThemeUtils; - -import java.util.concurrent.TimeUnit; - -import javax.inject.Inject; - -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.DialogFragment; - -import static com.owncloud.android.utils.TimeUtils.getDurationParts; - -public class DurationPickerDialogFragment extends DialogFragment implements Injectable { - private static final int MAX_DAYS_VALUE = 30; - private static final int MAX_HOURS_VALUE = 24; - private static final int MAX_MINUTES_VALUE = 59; - - private static final String DURATION = "DURATION"; - private static final String DIALOG_TITLE = "TITLE"; - private static final String HINT_MESSAGE = "HINT"; - - @Inject ViewThemeUtils viewThemeUtils; - - private DurationPickerBinding binding; - - public Listener resultListener; - - public static DurationPickerDialogFragment newInstance(long duration, String title, String hintMessage) { - Bundle args = new Bundle(); - args.putLong(DURATION, duration); - args.putString(HINT_MESSAGE, hintMessage); - args.putString(DIALOG_TITLE, title); - - DurationPickerDialogFragment dialogFragment = new DurationPickerDialogFragment(); - dialogFragment.setArguments(args); - dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog); + @Inject + lateinit var viewThemeUtils: ViewThemeUtils - return dialogFragment; + fun setListener(listener: Listener?) { + resultListener = listener } - public void setListener(Listener listener) { - resultListener = listener; + override fun onStart() { + super.onStart() + val alertDialog = dialog as AlertDialog + viewThemeUtils.platform.colorTextButtons( + alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), + alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE) + ) } - @Override - public void onStart() { - super.onStart(); - - AlertDialog alertDialog = (AlertDialog) getDialog(); - - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)); + override fun onSaveInstanceState(outState: Bundle) { + super.onSaveInstanceState(outState) + outState.putLong(DURATION, duration) } - @Override - public void onSaveInstanceState(Bundle outState) { - super.onSaveInstanceState(outState); - outState.putLong(DURATION, getDuration()); - } + override fun onCreateDialog(savedState: Bundle?): Dialog { + _binding = DurationPickerBinding.inflate(requireActivity().layoutInflater, null, false) + + setupLimits() - @Override - public Dialog onCreateDialog(Bundle savedState) { - binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); + this.duration = savedState?.getLong(DURATION) ?: requireArguments().getLong(DURATION) - setupLimits(); + setHintMessage(requireArguments().getString(HINT_MESSAGE)) - long duration; - if (savedState != null) { - duration = savedState.getLong(DURATION); - } else { - duration = requireArguments().getLong(DURATION); + binding.clear.setOnClickListener { view: View? -> + binding.daysPicker.value = 0 + binding.hoursPicker.value = 0 + binding.minutesPicker.value = 0 } - setDuration(duration); - - String hintMessage = requireArguments().getString(HINT_MESSAGE); - setHintMessage(hintMessage); - - binding.clear.setOnClickListener(view -> { - binding.daysPicker.setValue(0); - binding.hoursPicker.setValue(0); - binding.minutesPicker.setValue(0); - }); - - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); - String dialogTitle = requireArguments().getString(DIALOG_TITLE); - builder.setTitle(dialogTitle); - builder.setView(binding.getRoot()); - builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { + + val builder = MaterialAlertDialogBuilder(binding.root.context) + val dialogTitle = requireArguments().getString(DIALOG_TITLE) + builder.setTitle(dialogTitle) + builder.setView(binding.root) + builder.setPositiveButton(R.string.common_save) { dialog: DialogInterface?, whichButton: Int -> if (resultListener != null) { - resultListener.onDurationPickerResult(Activity.RESULT_OK, getDuration()); + resultListener!!.onDurationPickerResult(Activity.RESULT_OK, this.duration) } - }); - builder.setNegativeButton(R.string.common_cancel, (dialog, whichButton) -> { + } + builder.setNegativeButton(R.string.common_cancel) { dialog: DialogInterface?, whichButton: Int -> if (resultListener != null) { - resultListener.onDurationPickerResult(Activity.RESULT_CANCELED, 0); + resultListener!!.onDurationPickerResult(Activity.RESULT_CANCELED, 0) } - }); - - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.getRoot().getContext(), builder); - - return builder.create(); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - binding = null; + } + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding!!.root.context, builder) + return builder.create() } - private void setupLimits() { - binding.daysPicker.setMaxValue(MAX_DAYS_VALUE); - binding.hoursPicker.setMaxValue(MAX_HOURS_VALUE); - binding.minutesPicker.setMaxValue(MAX_MINUTES_VALUE); + override fun onDestroyView() { + super.onDestroyView() + _binding = null } - private long getDuration() { - return TimeUnit.DAYS.toMillis(binding.daysPicker.getValue()) + - TimeUnit.HOURS.toMillis(binding.hoursPicker.getValue()) + - TimeUnit.MINUTES.toMillis(binding.minutesPicker.getValue()); + private fun setupLimits() { + binding.daysPicker.maxValue = MAX_DAYS_VALUE + binding.hoursPicker.maxValue = MAX_HOURS_VALUE + binding.minutesPicker.maxValue = MAX_MINUTES_VALUE } - private void setDuration(long duration) { - TimeUtils.DurationParts durationParts = getDurationParts(duration); - binding.daysPicker.setValue(durationParts.getDays()); - binding.hoursPicker.setValue(durationParts.getHours()); - binding.minutesPicker.setValue(durationParts.getMinutes()); + private fun setHintMessage(hintMessage: String?) { + binding.pickerHint.visibility = if (hintMessage != null) View.VISIBLE else View.GONE + binding.pickerHint.text = hintMessage } - private void setHintMessage(String hintMessage) { - binding.pickerHint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); - binding.pickerHint.setText(hintMessage); + interface Listener { + fun onDurationPickerResult(resultCode: Int, duration: Long) } - interface Listener { - void onDurationPickerResult(int resultCode, long duration); + companion object { + private const val MAX_DAYS_VALUE = 30 + private const val MAX_HOURS_VALUE = 24 + private const val MAX_MINUTES_VALUE = 59 + private const val DURATION = "DURATION" + private const val DIALOG_TITLE = "TITLE" + private const val HINT_MESSAGE = "HINT" + + fun newInstance(duration: Long, title: String?, hintMessage: String?): DurationPickerDialogFragment { + val args = Bundle() + args.putLong(DURATION, duration) + args.putString(HINT_MESSAGE, hintMessage) + args.putString(DIALOG_TITLE, title) + val dialogFragment = DurationPickerDialogFragment() + dialogFragment.arguments = args + dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + return dialogFragment + } } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index a98e712934a5..bfe7d981933a 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -496,7 +496,7 @@ private void showNameCollisionPolicyDialog() { } private void showUploadDelayDialog() { - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance( + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.Companion.newInstance( mSyncedFolder.getUploadDelayTimeMs(), getString(R.string.pref_instant_upload_delay_dialogTitle), getString(R.string.pref_instant_upload_delay_hint)); diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index f03beebffb1d..dfdd43b9e15c 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -18,46 +18,19 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +package com.owncloud.android.utils -package com.owncloud.android.utils; +import java.util.concurrent.TimeUnit -import static java.util.concurrent.TimeUnit.MILLISECONDS; +object TimeUtils { -public class TimeUtils { - - private TimeUtils() { - // utility class -> private constructor - } - - public static DurationParts getDurationParts(long duration) { - int days = (int) MILLISECONDS.toDays(duration); - int hours = (int) MILLISECONDS.toHours(duration) - (days * 24); - int minutes = (int) (MILLISECONDS.toMinutes(duration) - (MILLISECONDS.toHours(duration) * 60)); - return new DurationParts(days, hours, minutes); - } - - public static class DurationParts { - private int days; - private int hours; - private int minutes; - - public DurationParts(int days, int hours, int minutes) { - this.days = days; - this.hours = hours; - this.minutes = minutes; - } - - public int getDays() { - return days; - } - - public int getHours() { - return hours; - } - - public int getMinutes() { - return minutes; - } + @JvmStatic + fun getDurationParts(duration: Long): DurationParts { + val days = TimeUnit.MILLISECONDS.toDays(duration).toInt() + val hours = TimeUnit.MILLISECONDS.toHours(duration).toInt() - days * 24 + val minutes = (TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.MILLISECONDS.toHours(duration) * 60).toInt() + return DurationParts(days, hours, minutes) } -} + class DurationParts(val days: Int, val hours: Int, val minutes: Int) +} \ No newline at end of file From 76a2964841779e35af3088a5013d5c1ea7541e90 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 22:23:51 +0100 Subject: [PATCH 13/72] CI hints fixes Signed-off-by: batpio --- .../ui/dialog/DurationPickerDialogFragmentIT.kt | 5 +++-- .../com/owncloud/android/utils/TimeUtilsTest.kt | 3 ++- .../com/nextcloud/client/jobs/FilesSyncWork.kt | 1 - .../ui/dialog/DurationPickerDialogFragment.kt | 2 +- .../SyncedFolderPreferencesDialogFragment.java | 4 ++-- .../java/com/owncloud/android/utils/TimeUtils.kt | 14 ++++++++------ 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index a78f72688694..6cb28c464f81 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -22,11 +22,12 @@ class DurationPickerDialogFragmentIT : AbstractIT() { val dialog = DurationPickerDialogFragment.newInstance( TimeUnit.HOURS.toMillis(5), - "Dialog title", "Hint message" + "Dialog title", + "Hint message" ) dialog.show(ft, "DURATION_DIALOG") waitForIdleSync() screenshot(dialog.requireDialog().window!!.decorView) } -} \ No newline at end of file +} diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index fb277571f0ec..07e0e8d951d9 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit @RunWith(AndroidJUnit4::class) class TimeUtilsTest { + @Test fun shouldGetDurationParts() { val days = 5 @@ -24,4 +25,4 @@ class TimeUtilsTest { assertEquals(hours, durationParts.hours) assertEquals(minutes, durationParts.minutes) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 2219d517015a..75dceec108ad 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -262,5 +262,4 @@ class FilesSyncWork( else -> FileUploader.LOCAL_BEHAVIOUR_FORGET } } - } diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index f890a6f07163..1b79999e08dd 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -146,4 +146,4 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { return dialogFragment } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index bfe7d981933a..06d18dcf6b04 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -659,12 +659,12 @@ private String getDelaySummary(long duration) { if (durationParts.getDays() > 0) { durationSummary.append(durationParts.getDays()); durationSummary.append(getString(R.string.common_days_short)); - durationSummary.append(" "); + durationSummary.append(' '); } if (durationParts.getHours() > 0) { durationSummary.append(durationParts.getHours()); durationSummary.append(getString(R.string.common_hours_short)); - durationSummary.append(" "); + durationSummary.append(' '); } if (durationParts.getMinutes() > 0) { durationSummary.append(durationParts.getMinutes()); diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index dfdd43b9e15c..0f60bcd4227b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -20,17 +20,19 @@ */ package com.owncloud.android.utils -import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeUnit.DAYS +import java.util.concurrent.TimeUnit.HOURS +import java.util.concurrent.TimeUnit.MILLISECONDS object TimeUtils { @JvmStatic fun getDurationParts(duration: Long): DurationParts { - val days = TimeUnit.MILLISECONDS.toDays(duration).toInt() - val hours = TimeUnit.MILLISECONDS.toHours(duration).toInt() - days * 24 - val minutes = (TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.MILLISECONDS.toHours(duration) * 60).toInt() - return DurationParts(days, hours, minutes) + val days = MILLISECONDS.toDays(duration) + val hours = MILLISECONDS.toHours(duration) - DAYS.toHours(days) + val minutes = MILLISECONDS.toMinutes(duration) - HOURS.toMinutes(MILLISECONDS.toHours(duration)) + return DurationParts(days.toInt(), hours.toInt(), minutes.toInt()) } class DurationParts(val days: Int, val hours: Int, val minutes: Int) -} \ No newline at end of file +} From d1b033f83d574068b4b7277a742d8c9621d2fae5 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 23:28:42 +0100 Subject: [PATCH 14/72] CI Fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 1b79999e08dd..b710f628c148 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -147,3 +147,4 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { } } } + From 057279085899adc3c40c80ed7595ff416b1523c7 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 23:33:26 +0100 Subject: [PATCH 15/72] CI Fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index b710f628c148..1b79999e08dd 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -147,4 +147,3 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { } } } - From 31bcf88cc8f0e079d9126a1bfc2b945a5c96448d Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 22:58:48 +0100 Subject: [PATCH 16/72] Lint fixes Signed-off-by: batpio --- .../android/ui/dialog/DurationPickerDialogFragment.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 1b79999e08dd..bb72d6281147 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -43,7 +43,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { private var resultListener: Listener? = null private var duration: Long - private get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + + get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + TimeUnit.MINUTES.toMillis(binding.minutesPicker.value.toLong()) private set(duration) { @@ -83,7 +83,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { setHintMessage(requireArguments().getString(HINT_MESSAGE)) - binding.clear.setOnClickListener { view: View? -> + binding.clear.setOnClickListener { binding.daysPicker.value = 0 binding.hoursPicker.value = 0 binding.minutesPicker.value = 0 @@ -93,17 +93,17 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { val dialogTitle = requireArguments().getString(DIALOG_TITLE) builder.setTitle(dialogTitle) builder.setView(binding.root) - builder.setPositiveButton(R.string.common_save) { dialog: DialogInterface?, whichButton: Int -> + builder.setPositiveButton(R.string.common_save) { _, _ -> if (resultListener != null) { resultListener!!.onDurationPickerResult(Activity.RESULT_OK, this.duration) } } - builder.setNegativeButton(R.string.common_cancel) { dialog: DialogInterface?, whichButton: Int -> + builder.setNegativeButton(R.string.common_cancel) { _, _ -> if (resultListener != null) { resultListener!!.onDurationPickerResult(Activity.RESULT_CANCELED, 0) } } - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding!!.root.context, builder) + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.root.context, builder) return builder.create() } From adca1d0b3960e56db02af4f3295d0248732ecee0 Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 23:02:44 +0100 Subject: [PATCH 17/72] CI fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index bb72d6281147..26b122919644 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -22,7 +22,6 @@ package com.owncloud.android.ui.dialog import android.app.Activity import android.app.Dialog -import android.content.DialogInterface import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog From fde9dcf30798b388d977cf8d048df52e51b5e383 Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 23:53:42 +0100 Subject: [PATCH 18/72] Lint fixes Signed-off-by: batpio --- app/src/main/res/layout/duration_picker.xml | 7 ++++--- app/src/main/res/layout/synced_folders_settings_layout.xml | 2 +- app/src/main/res/values/strings.xml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index 4860ec6d68cf..4a0a5a0225b0 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -49,7 +49,7 @@ diff --git a/app/src/main/res/layout/synced_folders_settings_layout.xml b/app/src/main/res/layout/synced_folders_settings_layout.xml index d724939f4c71..e659062dda14 100644 --- a/app/src/main/res/layout/synced_folders_settings_layout.xml +++ b/app/src/main/res/layout/synced_folders_settings_layout.xml @@ -389,7 +389,7 @@ android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="2" - android:text="Without delay" + android:text="@string/pref_instant_upload_delay_disabled" android:textColor="?android:attr/textColorSecondary" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f76353e768f4..ee2aca8388d5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,6 +125,7 @@ Share Skip Copy + Clear d h m From 5dc55e0318d9683960ccbbda469f11ad5ac02fe4 Mon Sep 17 00:00:00 2001 From: batpio Date: Sat, 21 Jan 2023 21:34:38 +0100 Subject: [PATCH 19/72] Screenshot test fixes Signed-off-by: batpio --- ...ldersActivityIT_testSyncedFolderDialog.png | Bin 40386 -> 42579 bytes ...FragmentIT_showSyncDelayDurationDialog.png | Bin 0 -> 10893 bytes .../dialog/DurationPickerDialogFragmentIT.kt | 7 +++++-- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png diff --git a/app/screenshots/gplay/debug/com.nextcloud.client.SyncedFoldersActivityIT_testSyncedFolderDialog.png b/app/screenshots/gplay/debug/com.nextcloud.client.SyncedFoldersActivityIT_testSyncedFolderDialog.png index ee65e13bcaec5e3581d0e07cf77efade68c9f616..588288d7d0d85d5f159c15f490e7d3d968030bad 100644 GIT binary patch delta 20029 zcmZs?byQUE+qeC-KqM59E&&Ni0qGJ%x|^Xyq=s(EEh4CNNh3%zL&Lz(CEYO~-Q6+t zz_b0ud$0R>AO2#&Vln&LdtcXi9-rfEt-CwgcQ=ac(Tj&z|NQfhha zNN1f6>p<=SAxX>Ym!}Ig!S83sammn>^BJu3RR zY!p$+Q7$o>tJ*eX_GVblM>!bg1Du`cX0fi$u&2#6_$&wLR_G(Gqc3fS>uV^nn#`6v z$k%5Z3kEuxtUu^k)5yL~}lkYaNPB{Dxi)6u>m8>`{NW;!IlD$IRS@9;o9 zeG-O(JMXn#2t7!Jc-T|y&o$*eSXFc{C@E>Y)I?8oyvk=T=J*lKzpX3-;0ZM>wtX!~ zPrN=~mPcnXV(2>P`PAV3^0x^mO5HW@gC~UI)|e(WdLs;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G2nCmNRe$_lF zeP@S`-BZKYC(Jsfg6ZVBhiVYSzs+XmNx#syy^3M_$e^gp%#BCpzs|IoX* z8fdX``*ro446XM!2H(kBZy=?(C zv|Wby8=i<#v=a+CC+)l5#qc!prRo=x{!lxE^Ew8tmAj5KBg>C5OXW%oIHC`V z>_pSMI9RNS#fQ`!bSEjBBF&{ABB^aTB!6?|{-KsD1CEG@7;r2ClMj@X5JW^oi7DWc z+9yfEVkROY)|1bDC6iF39g~2a4U<5W29qG2TazhQB$G;PE0d6v6O$d3UX$=v2^e~B Z{2x=5)-KixaAN=f002ovPDHLkV1n~3fUp1n diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png new file mode 100644 index 0000000000000000000000000000000000000000..0d327e764760ff606800294e751bed8f8648dad0 GIT binary patch literal 10893 zcmds-XH-+`*6)LLs~b@fQ6s@EY(Nl@-oZ*Q(xn7Mnt*`R&_Yn8N!v8(Akq^c(o2A- z^cJLs5JIHa5NQbz%3Z$ajB`EX-1puy-f{2!@P2y6S|ekQXU(kn%-{b%SHu%-73Q9o0_*G$K{F!=t3+B*8^ zMCwPQ`OZ|^m99|RmaI@)jXuqu5qHUw;a=VMGUN4vDi8bO&YjktIL2Qwg$Ps%d1UjV ze-jbJ@TE_Ctxx&~`G3#qKgcA@NJ%k)UWLe;oCJZUnLsxozb>G45a zAf(2>R$g9yW7w}TZTl}grx=JmT18JU-f^TjVakt_lXC=Vs3B#JXmX*rq4*8>5QI6H z9JmoYUXz5yVgoIj&D$c`VO>h6MvsG%!M=HpY?nTMe(;*M*%_|tJl<#mmVEimpNd6) z3AP+-Qigq{jdsx1^-eId;K8)Wfjlx#ZIVe<iB9H{<4Pk*-AP|>_ zPn!I;f3LNzhE$lI2d#I)0^snGQYT|W+-mv}V;A)>)Ml*IYxc**zDy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ZL0NyH``H2Y8f}q#vf!3@Ss!j$=U~f45#ZaGw-UX2b&@?OQzvUHQdJ>3gm!v#>=_Q#xfI`DE_S6EZt94<&jR->+T|LyHE zsP&#pOw9Or&5|-YXsEJk$saE<10 zFXic*$QhtI*I;scXGEub@{F0~Iua7LVb-b+&XX65f!fK3CUcImtb;a0JcJ&=cyGlO zvR?k)xV*igj@8MdXO4K%1(PVKISqPc`a@6lKF91e*~-ZI=XS7>St+w|_|D0*K4ZCm z=_Lsn-m?xB_fY1Jz~Oa_a_&*9HXrsL2px>q#}PiTAade3d{fS>f4GPCOdyz)Vh!vn z8hajN3fwCK!%qht$yAmLT$;^XqOiOEKpRcnX>PtYH|u4`VOx`RxU|>9^0O#^`CRbd zF_eEc>;DpO|7@n6(d)11?jF_>|CqJ@8=(I0bm5;n`fm~{C}92wq{sI>b7g)}4EW3x Or1n_*QQ3oMZ~g}n619B* literal 0 HcmV?d00001 diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 6cb28c464f81..fe202d2eb49d 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -5,7 +5,9 @@ import com.nextcloud.test.TestActivity import com.owncloud.android.AbstractIT import org.junit.Rule import org.junit.Test -import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeUnit.DAYS +import java.util.concurrent.TimeUnit.HOURS +import java.util.concurrent.TimeUnit.MINUTES class DurationPickerDialogFragmentIT : AbstractIT() { @@ -14,6 +16,7 @@ class DurationPickerDialogFragmentIT : AbstractIT() { @Test fun showSyncDelayDurationDialog() { + val initialDuration = DAYS.toMillis(2) + HOURS.toMillis(8) + MINUTES.toMillis(15) val activity = testActivityRule.launchActivity(null) val fm = activity.supportFragmentManager @@ -21,7 +24,7 @@ class DurationPickerDialogFragmentIT : AbstractIT() { ft.addToBackStack(null) val dialog = DurationPickerDialogFragment.newInstance( - TimeUnit.HOURS.toMillis(5), + initialDuration, "Dialog title", "Hint message" ) From afafa0ca29cef970af3268e1fcb0e026749c5438 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 26 Jan 2023 19:45:39 +0100 Subject: [PATCH 20/72] CR fixes Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 20 +++++++++++++++++++ .../owncloud/android/utils/TimeUtilsTest.kt | 20 +++++++++++++++++++ .../client/database/NextcloudDatabase.kt | 3 ++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index fe202d2eb49d..4ed2588eb87f 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -1,3 +1,23 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package com.owncloud.android.ui.dialog import androidx.test.espresso.intent.rule.IntentsTestRule diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index 07e0e8d951d9..c671058a2bd0 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -1,3 +1,23 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package com.owncloud.android.utils import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt index 770f4467a94b..aeae8bdfebb5 100644 --- a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt +++ b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt @@ -59,7 +59,8 @@ import com.owncloud.android.db.ProviderMeta version = ProviderMeta.DB_VERSION, autoMigrations = [ AutoMigration(from = 65, to = 66), - AutoMigration(from = 66, to = 67) + AutoMigration(from = 66, to = 67), + AutoMigration(from = 67, to = 68) ], exportSchema = true ) From c9b92be893dc6583c3af85381300d2ae8666d084 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 26 Jan 2023 20:16:02 +0100 Subject: [PATCH 21/72] master merge fixes Signed-off-by: batpio --- .../69.json | 1137 +++++++++++++++++ .../client/database/NextcloudDatabase.kt | 3 +- .../com/owncloud/android/db/ProviderMeta.java | 2 +- 3 files changed, 1140 insertions(+), 2 deletions(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json new file mode 100644 index 000000000000..24378ab6f79b --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json @@ -0,0 +1,1137 @@ +{ + "formatVersion": 1, + "database": { + "version": 69, + "identityHash": "a1109dc4523fc0a958b4f482e691e808", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER, `type` INTEGER, `hidden` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a1109dc4523fc0a958b4f482e691e808')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt index 1c3ae9ac8a59..8f4be9db5d92 100644 --- a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt +++ b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt @@ -61,7 +61,8 @@ import com.owncloud.android.db.ProviderMeta autoMigrations = [ AutoMigration(from = 65, to = 66), AutoMigration(from = 66, to = 67), - AutoMigration(from = 67, to = 68) + AutoMigration(from = 67, to = 68), + AutoMigration(from = 68, to = 69) ], exportSchema = true ) diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index 88608b35d3f2..67d50b9a0ba3 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -35,7 +35,7 @@ */ public class ProviderMeta { public static final String DB_NAME = "filelist"; - public static final int DB_VERSION = 68; + public static final int DB_VERSION = 69; private ProviderMeta() { // No instance From 9308b115d176e5c5ebe4cf6da6efe9de38bd3806 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 26 Jan 2023 20:27:33 +0100 Subject: [PATCH 22/72] master merge fixes Signed-off-by: batpio --- .../main/java/com/nextcloud/client/database/NextcloudDatabase.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt index 8f4be9db5d92..1cef1ddd906d 100644 --- a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt +++ b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt @@ -61,7 +61,6 @@ import com.owncloud.android.db.ProviderMeta autoMigrations = [ AutoMigration(from = 65, to = 66), AutoMigration(from = 66, to = 67), - AutoMigration(from = 67, to = 68), AutoMigration(from = 68, to = 69) ], exportSchema = true From 501d1fe489161c08c7a693f3c2e8f5cd3ad1f65e Mon Sep 17 00:00:00 2001 From: BatPio Date: Wed, 8 Mar 2023 22:24:10 +0100 Subject: [PATCH 23/72] Update app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Álvaro Brey Signed-off-by: BatPio --- .../nextcloud/client/database/entity/SyncedFolderEntity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt index 39dd8f5e48b9..7d6a3bbb9fb1 100644 --- a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt +++ b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt @@ -54,8 +54,8 @@ data class SyncedFolderEntity( val uploadAction: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY) val nameCollisionPolicy: Int?, - @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS) - val uploadDelayTimeMs: Int?, + @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS, defaultValue = "0") + val uploadDelayTimeMs: Long, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_TYPE) val type: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_HIDDEN) From a3c03c359014821305f03da1bf8e829d37a7c8d3 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 8 Mar 2023 23:00:46 +0100 Subject: [PATCH 24/72] master merge fixes Signed-off-by: batpio --- .../datamodel/FilesystemDataProvider.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java index 470e0f0885b9..023537621e01 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java @@ -33,7 +33,9 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.zip.CRC32; @@ -74,22 +76,27 @@ public void updateFilesystemFileAsSentForUpload(String path, String syncedFolder ); } - public Set getFilesForUpload(String localPath, String syncedFolderId, long uploadDelayTimeMs) { + public Set getFilesForUpload(String localPath, String syncedFolderId, long minFileAge) { Set localPathsToUpload = new HashSet<>(); + String query = ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH + " LIKE ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID + " = ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ?"; String likeParam = localPath + "%"; + List queryParams = Arrays.asList(likeParam, syncedFolderId, "0", "0"); - long olderThanParam = (System.currentTimeMillis() - uploadDelayTimeMs) / 1000; + if (minFileAge > 0) { + query += " and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_MODIFIED + " <= ?"; + long olderThanParam = (System.currentTimeMillis() - minFileAge) / 1000; + queryParams.add(Long.toString(olderThanParam)); + } Cursor cursor = contentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_FILESYSTEM, null, - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH + " LIKE ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_MODIFIED + " <= ?", - new String[]{likeParam, syncedFolderId, "0", "0", Long.toString(olderThanParam)}, + query, + queryParams.toArray(new String[0]), null); if (cursor != null) { From d0e21686ac3f96e736b38acd3d5cc0cc0e77b917 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 8 Mar 2023 23:13:20 +0100 Subject: [PATCH 25/72] fixes Signed-off-by: batpio --- .../69.json | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json index 24378ab6f79b..eb812dc6b7a7 100644 --- a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/69.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 69, - "identityHash": "a1109dc4523fc0a958b4f482e691e808", + "identityHash": "a8d449e8a08677f013768a1eb607ec78", "entities": [ { "tableName": "arbitrary_data", @@ -34,10 +34,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -342,10 +342,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -398,10 +398,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -677,10 +677,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -739,10 +739,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -873,17 +873,17 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] }, { "tableName": "synced_folders", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER, `type` INTEGER, `hidden` INTEGER)", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER)", "fields": [ { "fieldPath": "id", @@ -961,7 +961,8 @@ "fieldPath": "uploadDelayTimeMs", "columnName": "upload_delay_time_ms", "affinity": "INTEGER", - "notNull": false + "notNull": true, + "defaultValue": "0" }, { "fieldPath": "type", @@ -977,10 +978,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -1087,10 +1088,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -1119,10 +1120,10 @@ } ], "primaryKey": { + "autoGenerate": true, "columnNames": [ "_id" - ], - "autoGenerate": true + ] }, "indices": [], "foreignKeys": [] @@ -1131,7 +1132,7 @@ "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a1109dc4523fc0a958b4f482e691e808')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a8d449e8a08677f013768a1eb607ec78')" ] } } \ No newline at end of file From b6bbea7e313f9bb62b6a1848d3f29b4b1248211f Mon Sep 17 00:00:00 2001 From: batpio Date: Mon, 17 Apr 2023 22:47:10 +0200 Subject: [PATCH 26/72] synchronization fix Signed-off-by: batpio --- .../android/datamodel/FilesystemDataProvider.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java index 023537621e01..bc8edc75da47 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java @@ -24,6 +24,7 @@ import android.database.Cursor; import android.net.Uri; +import com.google.common.collect.ObjectArrays; import com.owncloud.android.db.ProviderMeta; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.utils.SyncedFolderUtils; @@ -33,9 +34,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.util.Arrays; import java.util.HashSet; -import java.util.List; import java.util.Set; import java.util.zip.CRC32; @@ -84,19 +83,19 @@ public Set getFilesForUpload(String localPath, String syncedFolderId, lo ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ?"; String likeParam = localPath + "%"; - List queryParams = Arrays.asList(likeParam, syncedFolderId, "0", "0"); + String[] queryParams = new String[]{likeParam, syncedFolderId, "0", "0"}; if (minFileAge > 0) { query += " and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_MODIFIED + " <= ?"; long olderThanParam = (System.currentTimeMillis() - minFileAge) / 1000; - queryParams.add(Long.toString(olderThanParam)); + queryParams = ObjectArrays.concat(queryParams, Long.toString(olderThanParam)); } Cursor cursor = contentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_FILESYSTEM, null, query, - queryParams.toArray(new String[0]), + queryParams, null); if (cursor != null) { From caf858f52f85b3b893863e1b4cfaf55a5eff5d7c Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 17:43:23 +0200 Subject: [PATCH 27/72] Rename .java to .kt Signed-off-by: batpio --- ...alogFragment.java => SyncedFolderPreferencesDialogFragment.kt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/src/main/java/com/owncloud/android/ui/dialog/{SyncedFolderPreferencesDialogFragment.java => SyncedFolderPreferencesDialogFragment.kt} (100%) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt similarity index 100% rename from app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java rename to app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt From 4dab2bf80287d2992d317daf7762ca9ea0df5764 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 17:43:23 +0200 Subject: [PATCH 28/72] SyncedFolderPreferencesDialogFragment migration Signed-off-by: batpio --- .../SyncedFolderPreferencesDialogFragment.kt | 879 ++++++++---------- 1 file changed, 407 insertions(+), 472 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 06d18dcf6b04..506d93ca4351 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -18,126 +18,91 @@ * You should have received a copy of the GNU Affero General Public * License along with this program. If not, see . */ -package com.owncloud.android.ui.dialog; - -import android.app.Activity; -import android.app.Dialog; -import android.content.DialogInterface; -import android.content.Intent; -import android.graphics.Typeface; -import android.os.Bundle; -import android.text.TextUtils; -import android.text.style.StyleSpan; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.TextView; - -import com.google.android.material.button.MaterialButton; -import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.nextcloud.client.di.Injectable; -import com.owncloud.android.R; -import com.owncloud.android.databinding.SyncedFoldersSettingsLayoutBinding; -import com.owncloud.android.datamodel.MediaFolderType; -import com.owncloud.android.datamodel.SyncedFolderDisplayItem; -import com.owncloud.android.files.services.NameCollisionPolicy; -import com.owncloud.android.lib.common.utils.Log_OC; -import com.owncloud.android.ui.activity.FolderPickerActivity; -import com.owncloud.android.ui.activity.UploadFilesActivity; -import com.owncloud.android.ui.dialog.parcel.SyncedFolderParcelable; -import com.owncloud.android.utils.DisplayUtils; -import com.owncloud.android.utils.FileStorageUtils; -import com.owncloud.android.utils.TimeUtils; -import com.owncloud.android.utils.theme.ViewThemeUtils; - -import java.io.File; - -import javax.inject.Inject; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.widget.AppCompatCheckBox; -import androidx.appcompat.widget.SwitchCompat; -import androidx.fragment.app.DialogFragment; - -import static com.owncloud.android.datamodel.SyncedFolderDisplayItem.UNPERSISTED_ID; -import static com.owncloud.android.ui.activity.UploadFilesActivity.REQUEST_CODE_KEY; +package com.owncloud.android.ui.dialog + +import android.app.Activity +import android.app.Dialog +import android.content.DialogInterface +import android.content.Intent +import android.graphics.Typeface +import android.os.Bundle +import android.text.TextUtils +import android.text.style.StyleSpan +import android.view.View +import android.widget.TextView +import androidx.appcompat.app.AlertDialog +import androidx.appcompat.widget.AppCompatCheckBox +import androidx.appcompat.widget.SwitchCompat +import androidx.fragment.app.DialogFragment +import com.google.android.material.button.MaterialButton +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.nextcloud.client.di.Injectable +import com.owncloud.android.R +import com.owncloud.android.databinding.SyncedFoldersSettingsLayoutBinding +import com.owncloud.android.datamodel.MediaFolderType +import com.owncloud.android.datamodel.SyncedFolder +import com.owncloud.android.datamodel.SyncedFolderDisplayItem +import com.owncloud.android.files.services.NameCollisionPolicy +import com.owncloud.android.lib.common.utils.Log_OC +import com.owncloud.android.ui.activity.FolderPickerActivity +import com.owncloud.android.ui.activity.UploadFilesActivity +import com.owncloud.android.ui.dialog.DurationPickerDialogFragment.Companion.newInstance +import com.owncloud.android.ui.dialog.parcel.SyncedFolderParcelable +import com.owncloud.android.utils.DisplayUtils +import com.owncloud.android.utils.FileStorageUtils +import com.owncloud.android.utils.TimeUtils.getDurationParts +import com.owncloud.android.utils.theme.ViewThemeUtils +import java.io.File +import javax.inject.Inject /** * Dialog to show the preferences/configuration of a synced folder allowing the user to change the different * parameters. */ -public class SyncedFolderPreferencesDialogFragment extends DialogFragment implements Injectable { - - public static final String SYNCED_FOLDER_PARCELABLE = "SyncedFolderParcelable"; - public static final int REQUEST_CODE__SELECT_REMOTE_FOLDER = 0; - public static final int REQUEST_CODE__SELECT_LOCAL_FOLDER = 1; - - private final static String TAG = SyncedFolderPreferencesDialogFragment.class.getSimpleName(); - private static final String BEHAVIOUR_DIALOG_STATE = "BEHAVIOUR_DIALOG_STATE"; - private static final String NAME_COLLISION_POLICY_DIALOG_STATE = "NAME_COLLISION_POLICY_DIALOG_STATE"; - private final static float alphaEnabled = 1.0f; - private final static float alphaDisabled = 0.7f; - - @Inject ViewThemeUtils viewThemeUtils; - - private CharSequence[] mUploadBehaviorItemStrings; - private CharSequence[] mNameCollisionPolicyItemStrings; - private SwitchCompat mEnabledSwitch; - private AppCompatCheckBox mUploadOnWifiCheckbox; - private AppCompatCheckBox mUploadOnChargingCheckbox; - private AppCompatCheckBox mUploadExistingCheckbox; - private AppCompatCheckBox mUploadUseSubfoldersCheckbox; - private TextView mUploadBehaviorSummary; - private TextView mNameCollisionPolicySummary; - private TextView mLocalFolderPath; - private TextView mLocalFolderSummary; - private TextView mRemoteFolderSummary; - private TextView mUploadDelaySummary; - - private SyncedFolderParcelable mSyncedFolder; - private MaterialButton mCancel; - private MaterialButton mSave; - private boolean behaviourDialogShown; - private boolean nameCollisionPolicyDialogShown; - private AlertDialog behaviourDialog; - private SyncedFoldersSettingsLayoutBinding binding; - - public static SyncedFolderPreferencesDialogFragment newInstance(SyncedFolderDisplayItem syncedFolder, int section) { - if (syncedFolder == null) { - throw new IllegalArgumentException("SyncedFolder is mandatory but NULL!"); +class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { + @Inject + var viewThemeUtils: ViewThemeUtils? = null + + private var mUploadBehaviorItemStrings: Array + private var mNameCollisionPolicyItemStrings: Array + private var mEnabledSwitch: SwitchCompat? = null + private var mUploadOnWifiCheckbox: AppCompatCheckBox? = null + private var mUploadOnChargingCheckbox: AppCompatCheckBox? = null + private var mUploadExistingCheckbox: AppCompatCheckBox? = null + private var mUploadUseSubfoldersCheckbox: AppCompatCheckBox? = null + private var mUploadBehaviorSummary: TextView? = null + private var mNameCollisionPolicySummary: TextView? = null + private var mLocalFolderPath: TextView? = null + private var mLocalFolderSummary: TextView? = null + private var mRemoteFolderSummary: TextView? = null + private var mUploadDelaySummary: TextView? = null + + private var mSyncedFolder: SyncedFolderParcelable? = null + private var mCancel: MaterialButton? = null + private var mSave: MaterialButton? = null + private var behaviourDialogShown = false + private var nameCollisionPolicyDialogShown = false + private var behaviourDialog: AlertDialog? = null + private var binding: SyncedFoldersSettingsLayoutBinding? = null + + override fun onAttach(activity: Activity) { + super.onAttach(activity) + require(activity is OnSyncedFolderPreferenceListener) { + ("The host activity must implement " + + OnSyncedFolderPreferenceListener::class.java.canonicalName) } - - Bundle args = new Bundle(); - args.putParcelable(SYNCED_FOLDER_PARCELABLE, new SyncedFolderParcelable(syncedFolder, section)); - - SyncedFolderPreferencesDialogFragment dialogFragment = new SyncedFolderPreferencesDialogFragment(); - dialogFragment.setArguments(args); - dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog); - - return dialogFragment; } - @Override - public void onAttach(@NonNull Activity activity) { - super.onAttach(activity); - if (!(activity instanceof OnSyncedFolderPreferenceListener)) { - throw new IllegalArgumentException("The host activity must implement " - + OnSyncedFolderPreferenceListener.class.getCanonicalName()); - } - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) // keep the state of the fragment on configuration changes - setRetainInstance(true); + retainInstance = true - binding = null; + binding = null - mSyncedFolder = getArguments().getParcelable(SYNCED_FOLDER_PARCELABLE); - mUploadBehaviorItemStrings = getResources().getTextArray(R.array.pref_behaviour_entries); - mNameCollisionPolicyItemStrings = getResources().getTextArray(R.array.pref_name_collision_policy_entries); + mSyncedFolder = arguments!!.getParcelable(SYNCED_FOLDER_PARCELABLE) + mUploadBehaviorItemStrings = resources.getTextArray(R.array.pref_behaviour_entries) + mNameCollisionPolicyItemStrings = resources.getTextArray(R.array.pref_name_collision_policy_entries) } /** @@ -145,99 +110,103 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem * * @param binding the parent binding */ - private void setupDialogElements(SyncedFoldersSettingsLayoutBinding binding) { - if (mSyncedFolder.getType().getId() > MediaFolderType.CUSTOM.getId()) { + private fun setupDialogElements(binding: SyncedFoldersSettingsLayoutBinding) { + if (mSyncedFolder!!.type.id > MediaFolderType.CUSTOM.id) { // hide local folder chooser and delete for non-custom folders - binding.localFolderContainer.setVisibility(View.GONE); - binding.delete.setVisibility(View.GONE); - } else if (mSyncedFolder.getId() <= UNPERSISTED_ID) { + binding.localFolderContainer.visibility = View.GONE + binding.delete.visibility = View.GONE + } else if (mSyncedFolder!!.id <= SyncedFolder.UNPERSISTED_ID) { // Hide delete/enabled for unpersisted custom folders - binding.delete.setVisibility(View.GONE); - binding.syncEnabled.setVisibility(View.GONE); + binding.delete.visibility = View.GONE + binding.syncEnabled.visibility = View.GONE // auto set custom folder to enabled - mSyncedFolder.setEnabled(true); + mSyncedFolder!!.isEnabled = true // switch text to create headline - binding.syncedFoldersSettingsTitle.setText(R.string.autoupload_create_new_custom_folder); + binding.syncedFoldersSettingsTitle.setText(R.string.autoupload_create_new_custom_folder) // disable save button - binding.save.setEnabled(false); + binding.save.isEnabled = false } else { - binding.localFolderContainer.setVisibility(View.GONE); + binding.localFolderContainer.visibility = View.GONE } // find/saves UI elements - mEnabledSwitch = binding.syncEnabled; - viewThemeUtils.androidx.colorSwitchCompat(mEnabledSwitch); + mEnabledSwitch = binding.syncEnabled + viewThemeUtils!!.androidx.colorSwitchCompat(mEnabledSwitch!!) - mLocalFolderPath = binding.syncedFoldersSettingsLocalFolderPath; + mLocalFolderPath = binding.syncedFoldersSettingsLocalFolderPath - mLocalFolderSummary = binding.localFolderSummary; - mRemoteFolderSummary = binding.remoteFolderSummary; + mLocalFolderSummary = binding.localFolderSummary + mRemoteFolderSummary = binding.remoteFolderSummary - mUploadOnWifiCheckbox = binding.settingInstantUploadOnWifiCheckbox; + mUploadOnWifiCheckbox = binding.settingInstantUploadOnWifiCheckbox - mUploadOnChargingCheckbox = binding.settingInstantUploadOnChargingCheckbox; + mUploadOnChargingCheckbox = binding.settingInstantUploadOnChargingCheckbox - mUploadExistingCheckbox = binding.settingInstantUploadExistingCheckbox; + mUploadExistingCheckbox = binding.settingInstantUploadExistingCheckbox - mUploadUseSubfoldersCheckbox = binding.settingInstantUploadPathUseSubfoldersCheckbox; + mUploadUseSubfoldersCheckbox = binding.settingInstantUploadPathUseSubfoldersCheckbox - viewThemeUtils.platform.themeCheckbox(mUploadOnWifiCheckbox, - mUploadOnChargingCheckbox, - mUploadExistingCheckbox, - mUploadUseSubfoldersCheckbox); + viewThemeUtils!!.platform.themeCheckbox( + mUploadOnWifiCheckbox!!, + mUploadOnChargingCheckbox!!, + mUploadExistingCheckbox!!, + mUploadUseSubfoldersCheckbox!! + ) - mUploadBehaviorSummary = binding.settingInstantBehaviourSummary; + mUploadBehaviorSummary = binding.settingInstantBehaviourSummary - mNameCollisionPolicySummary = binding.settingInstantNameCollisionPolicySummary; + mNameCollisionPolicySummary = binding.settingInstantNameCollisionPolicySummary - mUploadDelaySummary = binding.settingInstantUploadDelaySummary; + mUploadDelaySummary = binding.settingInstantUploadDelaySummary - mCancel = binding.cancel; - mSave = binding.save; + mCancel = binding.cancel + mSave = binding.save - viewThemeUtils.platform.colorTextButtons(mCancel, mSave); + viewThemeUtils!!.platform.colorTextButtons(mCancel!!, mSave!!) // Set values - setEnabled(mSyncedFolder.isEnabled()); - - if (!TextUtils.isEmpty(mSyncedFolder.getLocalPath())) { - mLocalFolderPath.setText( - DisplayUtils.createTextWithSpan( - String.format( - getString(R.string.synced_folders_preferences_folder_path), - mSyncedFolder.getLocalPath()), - mSyncedFolder.getFolderName(), - new StyleSpan(Typeface.BOLD))); - mLocalFolderSummary.setText(FileStorageUtils.pathToUserFriendlyDisplay( - mSyncedFolder.getLocalPath(), - getActivity(), - getResources())); + setEnabled(mSyncedFolder!!.isEnabled) + + if (!TextUtils.isEmpty(mSyncedFolder!!.localPath)) { + mLocalFolderPath!!.text = DisplayUtils.createTextWithSpan( + String.format( + getString(R.string.synced_folders_preferences_folder_path), + mSyncedFolder!!.localPath + ), + mSyncedFolder!!.folderName, + StyleSpan(Typeface.BOLD) + ) + mLocalFolderSummary!!.text = FileStorageUtils.pathToUserFriendlyDisplay( + mSyncedFolder!!.localPath, + activity, + resources + ) } else { - mLocalFolderSummary.setText(R.string.choose_local_folder); + mLocalFolderSummary!!.setText(R.string.choose_local_folder) } - if (!TextUtils.isEmpty(mSyncedFolder.getLocalPath())) { - mRemoteFolderSummary.setText(mSyncedFolder.getRemotePath()); + if (!TextUtils.isEmpty(mSyncedFolder!!.localPath)) { + mRemoteFolderSummary!!.text = mSyncedFolder!!.remotePath } else { - mRemoteFolderSummary.setText(R.string.choose_remote_folder); + mRemoteFolderSummary!!.setText(R.string.choose_remote_folder) } - mUploadOnWifiCheckbox.setChecked(mSyncedFolder.isWifiOnly()); - mUploadOnChargingCheckbox.setChecked(mSyncedFolder.isChargingOnly()); + mUploadOnWifiCheckbox!!.isChecked = mSyncedFolder!!.isWifiOnly + mUploadOnChargingCheckbox!!.isChecked = mSyncedFolder!!.isChargingOnly - mUploadExistingCheckbox.setChecked(mSyncedFolder.isExisting()); - mUploadUseSubfoldersCheckbox.setChecked(mSyncedFolder.isSubfolderByDate()); + mUploadExistingCheckbox!!.isChecked = mSyncedFolder!!.isExisting + mUploadUseSubfoldersCheckbox!!.isChecked = mSyncedFolder!!.isSubfolderByDate - mUploadBehaviorSummary.setText(mUploadBehaviorItemStrings[mSyncedFolder.getUploadActionInteger()]); + mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[mSyncedFolder!!.uploadActionInteger] - final int nameCollisionPolicyIndex = - getSelectionIndexForNameCollisionPolicy(mSyncedFolder.getNameCollisionPolicy()); - mNameCollisionPolicySummary.setText(mNameCollisionPolicyItemStrings[nameCollisionPolicyIndex]); + val nameCollisionPolicyIndex = + getSelectionIndexForNameCollisionPolicy(mSyncedFolder!!.nameCollisionPolicy) + mNameCollisionPolicySummary!!.text = mNameCollisionPolicyItemStrings[nameCollisionPolicyIndex] - mUploadDelaySummary.setText(getDelaySummary(mSyncedFolder.getUploadDelayTimeMs())); + mUploadDelaySummary!!.text = getDelaySummary(mSyncedFolder!!.uploadDelayTimeMs) } /** @@ -245,11 +214,11 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem * * @param enabled if enabled or disabled */ - private void setEnabled(boolean enabled) { - mSyncedFolder.setEnabled(enabled); - mEnabledSwitch.setChecked(enabled); + private fun setEnabled(enabled: Boolean) { + mSyncedFolder!!.isEnabled = enabled + mEnabledSwitch!!.isChecked = enabled - setupViews(binding, enabled); + setupViews(binding, enabled) } /** @@ -259,10 +228,10 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem * * @param path the remote path to be set */ - public void setRemoteFolderSummary(String path) { - mSyncedFolder.setRemotePath(path); - mRemoteFolderSummary.setText(path); - checkAndUpdateSaveButtonState(); + fun setRemoteFolderSummary(path: String?) { + mSyncedFolder!!.remotePath = path + mRemoteFolderSummary!!.text = path + checkAndUpdateSaveButtonState() } /** @@ -272,88 +241,89 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem * * @param path the local path to be set */ - public void setLocalFolderSummary(String path) { - mSyncedFolder.setLocalPath(path); - mLocalFolderSummary.setText(FileStorageUtils.pathToUserFriendlyDisplay(path, getActivity(), getResources())); - mLocalFolderPath.setText( - DisplayUtils.createTextWithSpan( - String.format( - getString(R.string.synced_folders_preferences_folder_path), - mSyncedFolder.getLocalPath()), - new File(mSyncedFolder.getLocalPath()).getName(), - new StyleSpan(Typeface.BOLD))); - checkAndUpdateSaveButtonState(); + fun setLocalFolderSummary(path: String?) { + mSyncedFolder!!.localPath = path + mLocalFolderSummary!!.text = FileStorageUtils.pathToUserFriendlyDisplay(path, activity, resources) + mLocalFolderPath!!.text = DisplayUtils.createTextWithSpan( + String.format( + getString(R.string.synced_folders_preferences_folder_path), + mSyncedFolder!!.localPath + ), + File(mSyncedFolder!!.localPath).name, + StyleSpan(Typeface.BOLD) + ) + checkAndUpdateSaveButtonState() } - private void checkAndUpdateSaveButtonState() { - if (mSyncedFolder.getLocalPath() != null && mSyncedFolder.getRemotePath() != null) { - binding.save.setEnabled(true); + private fun checkAndUpdateSaveButtonState() { + if (mSyncedFolder!!.localPath != null && mSyncedFolder!!.remotePath != null) { + binding!!.save.isEnabled = true } else { - binding.save.setEnabled(false); + binding!!.save.isEnabled = false } - checkWritableFolder(); + checkWritableFolder() } - private void checkWritableFolder() { - if (!mSyncedFolder.isEnabled()) { - binding.settingInstantBehaviourContainer.setEnabled(false); - binding.settingInstantBehaviourContainer.setAlpha(alphaDisabled); - return; + private fun checkWritableFolder() { + if (!mSyncedFolder!!.isEnabled) { + binding!!.settingInstantBehaviourContainer.isEnabled = false + binding!!.settingInstantBehaviourContainer.alpha = alphaDisabled + return } - if (mSyncedFolder.getLocalPath() != null && new File(mSyncedFolder.getLocalPath()).canWrite()) { - binding.settingInstantBehaviourContainer.setEnabled(true); - binding.settingInstantBehaviourContainer.setAlpha(alphaEnabled); - mUploadBehaviorSummary.setText(mUploadBehaviorItemStrings[mSyncedFolder.getUploadActionInteger()]); + if (mSyncedFolder!!.localPath != null && File(mSyncedFolder!!.localPath).canWrite()) { + binding!!.settingInstantBehaviourContainer.isEnabled = true + binding!!.settingInstantBehaviourContainer.alpha = alphaEnabled + mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[mSyncedFolder!!.uploadActionInteger] } else { - binding.settingInstantBehaviourContainer.setEnabled(false); - binding.settingInstantBehaviourContainer.setAlpha(alphaDisabled); + binding!!.settingInstantBehaviourContainer.isEnabled = false + binding!!.settingInstantBehaviourContainer.alpha = alphaDisabled - mSyncedFolder.setUploadAction( - getResources().getTextArray(R.array.pref_behaviour_entryValues)[0].toString()); + mSyncedFolder!!.setUploadAction( + resources.getTextArray(R.array.pref_behaviour_entryValues)[0].toString() + ) - mUploadBehaviorSummary.setText(R.string.auto_upload_file_behaviour_kept_in_folder); + mUploadBehaviorSummary!!.setText(R.string.auto_upload_file_behaviour_kept_in_folder) } } - private void setupViews(SyncedFoldersSettingsLayoutBinding binding, boolean enable) { - float alpha; - if (enable) { - alpha = alphaEnabled; + private fun setupViews(binding: SyncedFoldersSettingsLayoutBinding?, enable: Boolean) { + val alpha = if (enable) { + alphaEnabled } else { - alpha = alphaDisabled; + alphaDisabled } - binding.settingInstantUploadOnWifiContainer.setEnabled(enable); - binding.settingInstantUploadOnWifiContainer.setAlpha(alpha); + binding!!.settingInstantUploadOnWifiContainer.isEnabled = enable + binding.settingInstantUploadOnWifiContainer.alpha = alpha - binding.settingInstantUploadOnChargingContainer.setEnabled(enable); - binding.settingInstantUploadOnChargingContainer.setAlpha(alpha); + binding.settingInstantUploadOnChargingContainer.isEnabled = enable + binding.settingInstantUploadOnChargingContainer.alpha = alpha - binding.settingInstantUploadExistingContainer.setEnabled(enable); - binding.settingInstantUploadExistingContainer.setAlpha(alpha); + binding.settingInstantUploadExistingContainer.isEnabled = enable + binding.settingInstantUploadExistingContainer.alpha = alpha - binding.settingInstantUploadPathUseSubfoldersContainer.setEnabled(enable); - binding.settingInstantUploadPathUseSubfoldersContainer.setAlpha(alpha); + binding.settingInstantUploadPathUseSubfoldersContainer.isEnabled = enable + binding.settingInstantUploadPathUseSubfoldersContainer.alpha = alpha - binding.remoteFolderContainer.setEnabled(enable); - binding.remoteFolderContainer.setAlpha(alpha); + binding.remoteFolderContainer.isEnabled = enable + binding.remoteFolderContainer.alpha = alpha - binding.localFolderContainer.setEnabled(enable); - binding.localFolderContainer.setAlpha(alpha); + binding.localFolderContainer.isEnabled = enable + binding.localFolderContainer.alpha = alpha - binding.settingInstantNameCollisionPolicyContainer.setEnabled(enable); - binding.settingInstantNameCollisionPolicyContainer.setAlpha(alpha); + binding.settingInstantNameCollisionPolicyContainer.isEnabled = enable + binding.settingInstantNameCollisionPolicyContainer.alpha = alpha - binding.settingInstantUploadDelayContainer.setEnabled(enable); - binding.settingInstantUploadDelayContainer.setAlpha(alpha); + binding.settingInstantUploadDelayContainer.isEnabled = enable + binding.settingInstantUploadDelayContainer.alpha = alpha - mUploadOnWifiCheckbox.setEnabled(enable); - mUploadOnChargingCheckbox.setEnabled(enable); - mUploadExistingCheckbox.setEnabled(enable); - mUploadUseSubfoldersCheckbox.setEnabled(enable); + mUploadOnWifiCheckbox!!.isEnabled = enable + mUploadOnChargingCheckbox!!.isEnabled = enable + mUploadExistingCheckbox!!.isEnabled = enable + mUploadUseSubfoldersCheckbox!!.isEnabled = enable - checkWritableFolder(); + checkWritableFolder() } /** @@ -361,315 +331,280 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment implem * * @param binding the parent binding */ - private void setupListeners(SyncedFoldersSettingsLayoutBinding binding) { - mSave.setOnClickListener(new OnSyncedFolderSaveClickListener()); - mCancel.setOnClickListener(new OnSyncedFolderCancelClickListener()); - binding.delete.setOnClickListener(new OnSyncedFolderDeleteClickListener()); - - binding.settingInstantUploadOnWifiContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - mSyncedFolder.setWifiOnly(!mSyncedFolder.isWifiOnly()); - mUploadOnWifiCheckbox.toggle(); - } - }); - - binding.settingInstantUploadOnChargingContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - mSyncedFolder.setChargingOnly(!mSyncedFolder.isChargingOnly()); - mUploadOnChargingCheckbox.toggle(); - } - }); - - binding.settingInstantUploadExistingContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - mSyncedFolder.setExisting(!mSyncedFolder.isExisting()); - mUploadExistingCheckbox.toggle(); - } - }); - - binding.settingInstantUploadPathUseSubfoldersContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - mSyncedFolder.setSubfolderByDate(!mSyncedFolder.isSubfolderByDate()); - mUploadUseSubfoldersCheckbox.toggle(); - } - }); - - binding.remoteFolderContainer.setOnClickListener(v -> { - Intent action = new Intent(getActivity(), FolderPickerActivity.class); - getActivity().startActivityForResult(action, REQUEST_CODE__SELECT_REMOTE_FOLDER); - }); - - binding.localFolderContainer.setOnClickListener(v -> { - Intent action = new Intent(getActivity(), UploadFilesActivity.class); - action.putExtra(UploadFilesActivity.KEY_LOCAL_FOLDER_PICKER_MODE, true); - action.putExtra(REQUEST_CODE_KEY, REQUEST_CODE__SELECT_LOCAL_FOLDER); - getActivity().startActivityForResult(action, REQUEST_CODE__SELECT_LOCAL_FOLDER); - }); - - binding.syncEnabled.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - setEnabled(!mSyncedFolder.isEnabled()); - } - }); - - binding.settingInstantBehaviourContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - showBehaviourDialog(); - } - }); - - binding.settingInstantNameCollisionPolicyContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View v) { - showNameCollisionPolicyDialog(); - } - }); - - binding.settingInstantUploadDelayContainer.setOnClickListener( - new OnClickListener() { - @Override - public void onClick(View view) { - showUploadDelayDialog(); - } - } - ); + private fun setupListeners(binding: SyncedFoldersSettingsLayoutBinding) { + mSave!!.setOnClickListener(OnSyncedFolderSaveClickListener()) + mCancel!!.setOnClickListener(OnSyncedFolderCancelClickListener()) + binding.delete.setOnClickListener(OnSyncedFolderDeleteClickListener()) + + binding.settingInstantUploadOnWifiContainer.setOnClickListener { + mSyncedFolder!!.isWifiOnly = !mSyncedFolder!!.isWifiOnly + mUploadOnWifiCheckbox!!.toggle() + } + + binding.settingInstantUploadOnChargingContainer.setOnClickListener { + mSyncedFolder!!.isChargingOnly = !mSyncedFolder!!.isChargingOnly + mUploadOnChargingCheckbox!!.toggle() + } + + binding.settingInstantUploadExistingContainer.setOnClickListener { + mSyncedFolder!!.isExisting = !mSyncedFolder!!.isExisting + mUploadExistingCheckbox!!.toggle() + } + + binding.settingInstantUploadPathUseSubfoldersContainer.setOnClickListener { + mSyncedFolder!!.isSubfolderByDate = !mSyncedFolder!!.isSubfolderByDate + mUploadUseSubfoldersCheckbox!!.toggle() + } + + binding.remoteFolderContainer.setOnClickListener { v: View? -> + val action = Intent(activity, FolderPickerActivity::class.java) + activity!!.startActivityForResult(action, REQUEST_CODE__SELECT_REMOTE_FOLDER) + } + + binding.localFolderContainer.setOnClickListener { v: View? -> + val action = Intent(activity, UploadFilesActivity::class.java) + action.putExtra(UploadFilesActivity.KEY_LOCAL_FOLDER_PICKER_MODE, true) + action.putExtra(UploadFilesActivity.REQUEST_CODE_KEY, REQUEST_CODE__SELECT_LOCAL_FOLDER) + activity!!.startActivityForResult(action, REQUEST_CODE__SELECT_LOCAL_FOLDER) + } + + binding.syncEnabled.setOnClickListener { setEnabled(!mSyncedFolder!!.isEnabled) } + + binding.settingInstantBehaviourContainer.setOnClickListener { showBehaviourDialog() } + + binding.settingInstantNameCollisionPolicyContainer.setOnClickListener { showNameCollisionPolicyDialog() } + + binding.settingInstantUploadDelayContainer.setOnClickListener { showUploadDelayDialog() } } - private void showBehaviourDialog() { - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity()); + private fun showBehaviourDialog() { + val builder = MaterialAlertDialogBuilder(activity!!) builder.setTitle(R.string.prefs_instant_behaviour_dialogTitle) - .setSingleChoiceItems(getResources().getTextArray(R.array.pref_behaviour_entries), - mSyncedFolder.getUploadActionInteger(), - new - DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - mSyncedFolder.setUploadAction( - getResources().getTextArray( - R.array.pref_behaviour_entryValues)[which].toString()); - mUploadBehaviorSummary.setText(SyncedFolderPreferencesDialogFragment - .this.mUploadBehaviorItemStrings[which]); - behaviourDialogShown = false; - dialog.dismiss(); - } - }) - .setOnCancelListener(new DialogInterface.OnCancelListener() { - @Override - public void onCancel(DialogInterface dialog) { - behaviourDialogShown = false; - } - }); - behaviourDialogShown = true; - - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(getActivity(), builder); - - behaviourDialog = builder.create(); - behaviourDialog.show(); + .setSingleChoiceItems( + resources.getTextArray(R.array.pref_behaviour_entries), + mSyncedFolder!!.uploadActionInteger + ) { dialog, which -> + mSyncedFolder!!.setUploadAction( + resources.getTextArray( + R.array.pref_behaviour_entryValues + )[which].toString() + ) + mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[which] + behaviourDialogShown = false + dialog.dismiss() + } + .setOnCancelListener { behaviourDialogShown = false } + behaviourDialogShown = true + + viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(activity!!, builder) + + behaviourDialog = builder.create() + behaviourDialog!!.show() } - private void showNameCollisionPolicyDialog() { - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity()); + private fun showNameCollisionPolicyDialog() { + val builder = MaterialAlertDialogBuilder(activity!!) builder.setTitle(R.string.pref_instant_name_collision_policy_dialogTitle) - .setSingleChoiceItems(getResources().getTextArray(R.array.pref_name_collision_policy_entries), - getSelectionIndexForNameCollisionPolicy(mSyncedFolder.getNameCollisionPolicy()), - new OnNameCollisionDialogClickListener()) - .setOnCancelListener(dialog -> nameCollisionPolicyDialogShown = false); + .setSingleChoiceItems( + resources.getTextArray(R.array.pref_name_collision_policy_entries), + getSelectionIndexForNameCollisionPolicy(mSyncedFolder!!.nameCollisionPolicy), + OnNameCollisionDialogClickListener() + ) + .setOnCancelListener { dialog: DialogInterface? -> nameCollisionPolicyDialogShown = false } - nameCollisionPolicyDialogShown = true; + nameCollisionPolicyDialogShown = true - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(getActivity(), builder); + viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(activity!!, builder) - behaviourDialog = builder.create(); - behaviourDialog.show(); + behaviourDialog = builder.create() + behaviourDialog!!.show() } - private void showUploadDelayDialog() { - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.Companion.newInstance( - mSyncedFolder.getUploadDelayTimeMs(), + private fun showUploadDelayDialog() { + val dialog = newInstance( + mSyncedFolder!!.uploadDelayTimeMs, getString(R.string.pref_instant_upload_delay_dialogTitle), - getString(R.string.pref_instant_upload_delay_hint)); + getString(R.string.pref_instant_upload_delay_hint) + ) - dialog.setListener((resultCode, duration) -> { + dialog.setListener(DurationPickerDialogFragment.Listener { resultCode: Int, duration: Long -> if (resultCode == Activity.RESULT_OK) { - mSyncedFolder.setUploadDelayTimeMs(duration); - mUploadDelaySummary.setText(getDelaySummary(duration)); + mSyncedFolder!!.uploadDelayTimeMs = duration + mUploadDelaySummary!!.text = getDelaySummary(duration) } - dialog.dismiss(); - }); - dialog.show(getParentFragmentManager(), "UPLOAD_DELAY_PICKER_DIALOG"); + dialog.dismiss() + }) + dialog.show(parentFragmentManager, "UPLOAD_DELAY_PICKER_DIALOG") } - @Override - @NonNull - public Dialog onCreateDialog(Bundle savedInstanceState) { - Log_OC.d(TAG, "onCreateView, savedInstanceState is " + savedInstanceState); + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + Log_OC.d(TAG, "onCreateView, savedInstanceState is $savedInstanceState") - binding = SyncedFoldersSettingsLayoutBinding.inflate(requireActivity().getLayoutInflater(), null, false); + binding = SyncedFoldersSettingsLayoutBinding.inflate(requireActivity().layoutInflater, null, false) - setupDialogElements(binding); - setupListeners(binding); + setupDialogElements(binding!!) + setupListeners(binding!!) - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); - builder.setView(binding.getRoot()); + val builder = MaterialAlertDialogBuilder(binding!!.getRoot().context) + builder.setView(binding!!.getRoot()) - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.getRoot().getContext(), builder); + viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(binding!!.getRoot().context, builder) - return builder.create(); + return builder.create() } - @Override - public void onDestroyView() { - Log_OC.d(TAG, "destroy SyncedFolderPreferencesDialogFragment view"); - if (getDialog() != null && getRetainInstance()) { - getDialog().setDismissMessage(null); + override fun onDestroyView() { + Log_OC.d(TAG, "destroy SyncedFolderPreferencesDialogFragment view") + if (dialog != null && retainInstance) { + dialog!!.setDismissMessage(null) } - if (behaviourDialog != null && behaviourDialog.isShowing()) { - behaviourDialog.dismiss(); + if (behaviourDialog != null && behaviourDialog!!.isShowing) { + behaviourDialog!!.dismiss() } - super.onDestroyView(); + super.onDestroyView() } - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - outState.putBoolean(BEHAVIOUR_DIALOG_STATE, behaviourDialogShown); - outState.putBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, nameCollisionPolicyDialogShown); + override fun onSaveInstanceState(outState: Bundle) { + outState.putBoolean(BEHAVIOUR_DIALOG_STATE, behaviourDialogShown) + outState.putBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, nameCollisionPolicyDialogShown) - super.onSaveInstanceState(outState); + super.onSaveInstanceState(outState) } - @Override - public void onViewStateRestored(@Nullable Bundle savedInstanceState) { + override fun onViewStateRestored(savedInstanceState: Bundle?) { behaviourDialogShown = savedInstanceState != null && - savedInstanceState.getBoolean(BEHAVIOUR_DIALOG_STATE, false); + savedInstanceState.getBoolean(BEHAVIOUR_DIALOG_STATE, false) nameCollisionPolicyDialogShown = savedInstanceState != null && - savedInstanceState.getBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, false); + savedInstanceState.getBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, false) if (behaviourDialogShown) { - showBehaviourDialog(); + showBehaviourDialog() } if (nameCollisionPolicyDialogShown) { - showNameCollisionPolicyDialog(); + showNameCollisionPolicyDialog() } - super.onViewStateRestored(savedInstanceState); + super.onViewStateRestored(savedInstanceState) } - public interface OnSyncedFolderPreferenceListener { - void onSaveSyncedFolderPreference(SyncedFolderParcelable syncedFolder); + interface OnSyncedFolderPreferenceListener { + fun onSaveSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) - void onCancelSyncedFolderPreference(); + fun onCancelSyncedFolderPreference() - void onDeleteSyncedFolderPreference(SyncedFolderParcelable syncedFolder); + fun onDeleteSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) } - private class OnSyncedFolderSaveClickListener implements OnClickListener { - @Override - public void onClick(View v) { - dismiss(); - ((OnSyncedFolderPreferenceListener) getActivity()).onSaveSyncedFolderPreference(mSyncedFolder); + private inner class OnSyncedFolderSaveClickListener : View.OnClickListener { + override fun onClick(v: View) { + dismiss() + (activity as OnSyncedFolderPreferenceListener?)!!.onSaveSyncedFolderPreference(mSyncedFolder) } } - private class OnSyncedFolderCancelClickListener implements OnClickListener { - @Override - public void onClick(View v) { - dismiss(); - ((OnSyncedFolderPreferenceListener) getActivity()).onCancelSyncedFolderPreference(); + private inner class OnSyncedFolderCancelClickListener : View.OnClickListener { + override fun onClick(v: View) { + dismiss() + (activity as OnSyncedFolderPreferenceListener?)!!.onCancelSyncedFolderPreference() } } - private class OnSyncedFolderDeleteClickListener implements OnClickListener { - @Override - public void onClick(View v) { - dismiss(); - ((OnSyncedFolderPreferenceListener) getActivity()).onDeleteSyncedFolderPreference(mSyncedFolder); + private inner class OnSyncedFolderDeleteClickListener : View.OnClickListener { + override fun onClick(v: View) { + dismiss() + (activity as OnSyncedFolderPreferenceListener?)!!.onDeleteSyncedFolderPreference(mSyncedFolder) } } - private class OnNameCollisionDialogClickListener implements DialogInterface.OnClickListener { - @Override - public void onClick(DialogInterface dialog, int which) { - mSyncedFolder.setNameCollisionPolicy(getNameCollisionPolicyForSelectionIndex(which)); + private inner class OnNameCollisionDialogClickListener : DialogInterface.OnClickListener { + override fun onClick(dialog: DialogInterface, which: Int) { + mSyncedFolder!!.nameCollisionPolicy = + getNameCollisionPolicyForSelectionIndex(which) - mNameCollisionPolicySummary.setText( - SyncedFolderPreferencesDialogFragment.this.mNameCollisionPolicyItemStrings[which]); - nameCollisionPolicyDialogShown = false; - dialog.dismiss(); + mNameCollisionPolicySummary!!.text = mNameCollisionPolicyItemStrings[which] + nameCollisionPolicyDialogShown = false + dialog.dismiss() } } - /** - * Get index for name collision selection dialog. - * - * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME, 3 if SKIP, Otherwise: 0 - */ - static private Integer getSelectionIndexForNameCollisionPolicy(NameCollisionPolicy nameCollisionPolicy) { - switch (nameCollisionPolicy) { - case OVERWRITE: - return 1; - case RENAME: - return 2; - case CANCEL: - return 3; - case ASK_USER: - default: - return 0; + private fun getDelaySummary(duration: Long): String { + if (duration == 0L) { + return getString(R.string.pref_instant_upload_delay_disabled) } - } - - /** - * Get index for name collision selection dialog. Inverse of getSelectionIndexForNameCollisionPolicy. - * - * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2, SKIP if 3. Otherwise: ASK_USER - */ - static private NameCollisionPolicy getNameCollisionPolicyForSelectionIndex(int index) { - switch (index) { - case 1: - return NameCollisionPolicy.OVERWRITE; - case 2: - return NameCollisionPolicy.RENAME; - case 3: - return NameCollisionPolicy.CANCEL; - case 0: - default: - return NameCollisionPolicy.ASK_USER; + val durationParts = getDurationParts(duration) + val durationSummary = StringBuilder() + if (durationParts.days > 0) { + durationSummary.append(durationParts.days) + durationSummary.append(getString(R.string.common_days_short)) + durationSummary.append(' ') } + if (durationParts.hours > 0) { + durationSummary.append(durationParts.hours) + durationSummary.append(getString(R.string.common_hours_short)) + durationSummary.append(' ') + } + if (durationParts.minutes > 0) { + durationSummary.append(durationParts.minutes) + durationSummary.append(getString(R.string.common_minutes_short)) + } + return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim { it <= ' ' }) } - private String getDelaySummary(long duration) { - if (duration == 0) { - return getString(R.string.pref_instant_upload_delay_disabled); - } - TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(duration); - StringBuilder durationSummary = new StringBuilder(); - if (durationParts.getDays() > 0) { - durationSummary.append(durationParts.getDays()); - durationSummary.append(getString(R.string.common_days_short)); - durationSummary.append(' '); + companion object { + const val SYNCED_FOLDER_PARCELABLE: String = "SyncedFolderParcelable" + const val REQUEST_CODE__SELECT_REMOTE_FOLDER: Int = 0 + const val REQUEST_CODE__SELECT_LOCAL_FOLDER: Int = 1 + + private val TAG: String = SyncedFolderPreferencesDialogFragment::class.java.simpleName + private const val BEHAVIOUR_DIALOG_STATE = "BEHAVIOUR_DIALOG_STATE" + private const val NAME_COLLISION_POLICY_DIALOG_STATE = "NAME_COLLISION_POLICY_DIALOG_STATE" + private const val alphaEnabled = 1.0f + private const val alphaDisabled = 0.7f + + fun newInstance(syncedFolder: SyncedFolderDisplayItem?, section: Int): SyncedFolderPreferencesDialogFragment { + requireNotNull(syncedFolder) { "SyncedFolder is mandatory but NULL!" } + + val args = Bundle() + args.putParcelable(SYNCED_FOLDER_PARCELABLE, SyncedFolderParcelable(syncedFolder, section)) + + val dialogFragment = SyncedFolderPreferencesDialogFragment() + dialogFragment.arguments = args + dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + + return dialogFragment } - if (durationParts.getHours() > 0) { - durationSummary.append(durationParts.getHours()); - durationSummary.append(getString(R.string.common_hours_short)); - durationSummary.append(' '); + + /** + * Get index for name collision selection dialog. + * + * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME, 3 if SKIP, Otherwise: 0 + */ + private fun getSelectionIndexForNameCollisionPolicy(nameCollisionPolicy: NameCollisionPolicy): Int { + return when (nameCollisionPolicy) { + NameCollisionPolicy.OVERWRITE -> 1 + NameCollisionPolicy.RENAME -> 2 + NameCollisionPolicy.CANCEL -> 3 + NameCollisionPolicy.ASK_USER -> 0 + else -> 0 + } } - if (durationParts.getMinutes() > 0) { - durationSummary.append(durationParts.getMinutes()); - durationSummary.append(getString(R.string.common_minutes_short)); + + /** + * Get index for name collision selection dialog. Inverse of getSelectionIndexForNameCollisionPolicy. + * + * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2, SKIP if 3. Otherwise: ASK_USER + */ + private fun getNameCollisionPolicyForSelectionIndex(index: Int): NameCollisionPolicy { + return when (index) { + 1 -> NameCollisionPolicy.OVERWRITE + 2 -> NameCollisionPolicy.RENAME + 3 -> NameCollisionPolicy.CANCEL + 0 -> NameCollisionPolicy.ASK_USER + else -> NameCollisionPolicy.ASK_USER + } } - return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim()); } } From 3794f5c6d71009cb61f02f9e81735da09cad0fb7 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 18:11:06 +0200 Subject: [PATCH 29/72] SyncedFolderPreferencesDialogFragment moved dialog Signed-off-by: batpio --- .../SyncedFolderPreferencesDialogFragment.kt | 656 +++++++++--------- 1 file changed, 333 insertions(+), 323 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 506d93ca4351..011bc720ffa7 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -1,22 +1,9 @@ /* - * Nextcloud Android client application + * Nextcloud - Android Client * - * @author Andy Scherzinger - * Copyright (C) 2016 Andy Scherzinger - * Copyright (C) 2016 Nextcloud - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this program. If not, see . + * SPDX-FileCopyrightText: 2016 Andy Scherzinger + * SPDX-FileCopyrightText: 2016 Nextcloud + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.ui.dialog @@ -29,14 +16,13 @@ import android.os.Bundle import android.text.TextUtils import android.text.style.StyleSpan import android.view.View -import android.widget.TextView +import android.widget.AdapterView import androidx.appcompat.app.AlertDialog -import androidx.appcompat.widget.AppCompatCheckBox -import androidx.appcompat.widget.SwitchCompat import androidx.fragment.app.DialogFragment -import com.google.android.material.button.MaterialButton import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.nextcloud.client.di.Injectable +import com.nextcloud.client.preferences.SubFolderRule +import com.nextcloud.utils.extensions.getParcelableArgument import com.owncloud.android.R import com.owncloud.android.databinding.SyncedFoldersSettingsLayoutBinding import com.owncloud.android.datamodel.MediaFolderType @@ -46,11 +32,10 @@ import com.owncloud.android.files.services.NameCollisionPolicy import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.ui.activity.FolderPickerActivity import com.owncloud.android.ui.activity.UploadFilesActivity -import com.owncloud.android.ui.dialog.DurationPickerDialogFragment.Companion.newInstance import com.owncloud.android.ui.dialog.parcel.SyncedFolderParcelable import com.owncloud.android.utils.DisplayUtils import com.owncloud.android.utils.FileStorageUtils -import com.owncloud.android.utils.TimeUtils.getDurationParts +import com.owncloud.android.utils.TimeUtils import com.owncloud.android.utils.theme.ViewThemeUtils import java.io.File import javax.inject.Inject @@ -60,36 +45,29 @@ import javax.inject.Inject * parameters. */ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { + + @JvmField @Inject var viewThemeUtils: ViewThemeUtils? = null - private var mUploadBehaviorItemStrings: Array - private var mNameCollisionPolicyItemStrings: Array - private var mEnabledSwitch: SwitchCompat? = null - private var mUploadOnWifiCheckbox: AppCompatCheckBox? = null - private var mUploadOnChargingCheckbox: AppCompatCheckBox? = null - private var mUploadExistingCheckbox: AppCompatCheckBox? = null - private var mUploadUseSubfoldersCheckbox: AppCompatCheckBox? = null - private var mUploadBehaviorSummary: TextView? = null - private var mNameCollisionPolicySummary: TextView? = null - private var mLocalFolderPath: TextView? = null - private var mLocalFolderSummary: TextView? = null - private var mRemoteFolderSummary: TextView? = null - private var mUploadDelaySummary: TextView? = null - - private var mSyncedFolder: SyncedFolderParcelable? = null - private var mCancel: MaterialButton? = null - private var mSave: MaterialButton? = null + private lateinit var uploadBehaviorItemStrings: Array + private lateinit var nameCollisionPolicyItemStrings: Array + + private var syncedFolder: SyncedFolderParcelable? = null private var behaviourDialogShown = false private var nameCollisionPolicyDialogShown = false private var behaviourDialog: AlertDialog? = null private var binding: SyncedFoldersSettingsLayoutBinding? = null + private var isNeutralButtonActive = true + @Deprecated("Deprecated in Java") override fun onAttach(activity: Activity) { super.onAttach(activity) require(activity is OnSyncedFolderPreferenceListener) { - ("The host activity must implement " - + OnSyncedFolderPreferenceListener::class.java.canonicalName) + ( + "The host activity must implement " + + OnSyncedFolderPreferenceListener::class.java.canonicalName + ) } } @@ -97,12 +75,30 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { super.onCreate(savedInstanceState) // keep the state of the fragment on configuration changes retainInstance = true - binding = null - mSyncedFolder = arguments!!.getParcelable(SYNCED_FOLDER_PARCELABLE) - mUploadBehaviorItemStrings = resources.getTextArray(R.array.pref_behaviour_entries) - mNameCollisionPolicyItemStrings = resources.getTextArray(R.array.pref_name_collision_policy_entries) + val arguments = arguments + if (arguments != null) { + syncedFolder = arguments.getParcelableArgument(SYNCED_FOLDER_PARCELABLE, SyncedFolderParcelable::class.java) + } + + uploadBehaviorItemStrings = resources.getTextArray(R.array.pref_behaviour_entries) + nameCollisionPolicyItemStrings = resources.getTextArray(R.array.pref_name_collision_policy_entries) + } + + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + Log_OC.d(TAG, "onCreateView, savedInstanceState is $savedInstanceState") + binding = SyncedFoldersSettingsLayoutBinding.inflate(requireActivity().layoutInflater, null, false) + + setupDialogElements(binding!!) + setupListeners(binding!!) + + val builder = MaterialAlertDialogBuilder(requireContext()) + builder.setView(binding!!.getRoot()) + + viewThemeUtils?.dialog?.colorMaterialAlertDialogBackground(requireContext(), builder) + + return builder.create() } /** @@ -111,102 +107,121 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * @param binding the parent binding */ private fun setupDialogElements(binding: SyncedFoldersSettingsLayoutBinding) { - if (mSyncedFolder!!.type.id > MediaFolderType.CUSTOM.id) { + setupLayout(binding) + applyUserColor(binding) + setButtonOrder(binding) + setValuesViaSyncedFolder(binding) + } + + private fun setupLayout(binding: SyncedFoldersSettingsLayoutBinding) { + if (syncedFolder!!.type.id > MediaFolderType.CUSTOM.id) { // hide local folder chooser and delete for non-custom folders binding.localFolderContainer.visibility = View.GONE - binding.delete.visibility = View.GONE - } else if (mSyncedFolder!!.id <= SyncedFolder.UNPERSISTED_ID) { + isNeutralButtonActive = false + binding.settingInstantUploadExcludeHiddenContainer.visibility = View.GONE + } else if (syncedFolder!!.id <= SyncedFolder.UNPERSISTED_ID) { + isNeutralButtonActive = false + // Hide delete/enabled for unpersisted custom folders - binding.delete.visibility = View.GONE binding.syncEnabled.visibility = View.GONE + // Show exclude hidden checkbox when {@link MediaFolderType#CUSTOM} + binding.settingInstantUploadExcludeHiddenContainer.visibility = View.VISIBLE + // auto set custom folder to enabled - mSyncedFolder!!.isEnabled = true + syncedFolder?.isEnabled = true // switch text to create headline binding.syncedFoldersSettingsTitle.setText(R.string.autoupload_create_new_custom_folder) // disable save button - binding.save.isEnabled = false + binding.btnPositive.isEnabled = false } else { binding.localFolderContainer.visibility = View.GONE + if (MediaFolderType.CUSTOM.id == syncedFolder!!.type.id) { + // Show exclude hidden checkbox when {@link MediaFolderType#CUSTOM} + binding.settingInstantUploadExcludeHiddenContainer.visibility = View.VISIBLE + } } + } - // find/saves UI elements - mEnabledSwitch = binding.syncEnabled - viewThemeUtils!!.androidx.colorSwitchCompat(mEnabledSwitch!!) - - mLocalFolderPath = binding.syncedFoldersSettingsLocalFolderPath - - mLocalFolderSummary = binding.localFolderSummary - mRemoteFolderSummary = binding.remoteFolderSummary - - mUploadOnWifiCheckbox = binding.settingInstantUploadOnWifiCheckbox - - mUploadOnChargingCheckbox = binding.settingInstantUploadOnChargingCheckbox - - mUploadExistingCheckbox = binding.settingInstantUploadExistingCheckbox - - mUploadUseSubfoldersCheckbox = binding.settingInstantUploadPathUseSubfoldersCheckbox + private fun applyUserColor(binding: SyncedFoldersSettingsLayoutBinding) { + viewThemeUtils?.androidx?.colorSwitchCompat(binding.syncEnabled) - viewThemeUtils!!.platform.themeCheckbox( - mUploadOnWifiCheckbox!!, - mUploadOnChargingCheckbox!!, - mUploadExistingCheckbox!!, - mUploadUseSubfoldersCheckbox!! + viewThemeUtils?.platform?.themeCheckbox( + binding.settingInstantUploadOnWifiCheckbox, + binding.settingInstantUploadOnChargingCheckbox, + binding.settingInstantUploadExistingCheckbox, + binding.settingInstantUploadPathUseSubfoldersCheckbox, + binding.settingInstantUploadExcludeHiddenCheckbox ) - mUploadBehaviorSummary = binding.settingInstantBehaviourSummary - - mNameCollisionPolicySummary = binding.settingInstantNameCollisionPolicySummary - - mUploadDelaySummary = binding.settingInstantUploadDelaySummary - - mCancel = binding.cancel - mSave = binding.save - - viewThemeUtils!!.platform.colorTextButtons(mCancel!!, mSave!!) - - // Set values - setEnabled(mSyncedFolder!!.isEnabled) + viewThemeUtils?.material?.colorMaterialButtonPrimaryTonal(binding.btnPositive) + viewThemeUtils?.material?.colorMaterialButtonPrimaryBorderless(binding.btnNegative) + viewThemeUtils?.material?.colorMaterialButtonPrimaryBorderless(binding.btnNeutral) + } - if (!TextUtils.isEmpty(mSyncedFolder!!.localPath)) { - mLocalFolderPath!!.text = DisplayUtils.createTextWithSpan( - String.format( - getString(R.string.synced_folders_preferences_folder_path), - mSyncedFolder!!.localPath - ), - mSyncedFolder!!.folderName, - StyleSpan(Typeface.BOLD) - ) - mLocalFolderSummary!!.text = FileStorageUtils.pathToUserFriendlyDisplay( - mSyncedFolder!!.localPath, - activity, - resources - ) + private fun setButtonOrder(binding: SyncedFoldersSettingsLayoutBinding) { + // btnNeutral btnNegative btnPositive + if (isNeutralButtonActive) { + // Cancel Delete Save + binding.btnNeutral.setText(R.string.common_cancel) + binding.btnNegative.setText(R.string.common_delete) } else { - mLocalFolderSummary!!.setText(R.string.choose_local_folder) + // Cancel Save + binding.btnNeutral.visibility = View.GONE + binding.btnNegative.setText(R.string.common_cancel) } + } - if (!TextUtils.isEmpty(mSyncedFolder!!.localPath)) { - mRemoteFolderSummary!!.text = mSyncedFolder!!.remotePath - } else { - mRemoteFolderSummary!!.setText(R.string.choose_remote_folder) - } + private fun setValuesViaSyncedFolder(binding: SyncedFoldersSettingsLayoutBinding) { + syncedFolder?.let { + setEnabled(it.isEnabled) + + if (!TextUtils.isEmpty(it.localPath)) { + binding.syncedFoldersSettingsLocalFolderPath.text = DisplayUtils.createTextWithSpan( + String.format( + getString(R.string.synced_folders_preferences_folder_path), + it.localPath + ), + it.folderName, + StyleSpan(Typeface.BOLD) + ) + binding.localFolderSummary.text = FileStorageUtils.pathToUserFriendlyDisplay( + it.localPath, + activity, + resources + ) + } else { + binding.localFolderSummary.setText(R.string.choose_local_folder) + } - mUploadOnWifiCheckbox!!.isChecked = mSyncedFolder!!.isWifiOnly - mUploadOnChargingCheckbox!!.isChecked = mSyncedFolder!!.isChargingOnly + if (!TextUtils.isEmpty(it.localPath)) { + binding.remoteFolderSummary.text = it.remotePath + } else { + binding.remoteFolderSummary.setText(R.string.choose_remote_folder) + } - mUploadExistingCheckbox!!.isChecked = mSyncedFolder!!.isExisting - mUploadUseSubfoldersCheckbox!!.isChecked = mSyncedFolder!!.isSubfolderByDate + binding.settingInstantUploadOnWifiCheckbox.isChecked = it.isWifiOnly + binding.settingInstantUploadOnChargingCheckbox.isChecked = it.isChargingOnly + binding.settingInstantUploadExistingCheckbox.isChecked = it.isExisting + binding.settingInstantUploadPathUseSubfoldersCheckbox.isChecked = it.isSubfolderByDate + binding.settingInstantUploadExcludeHiddenCheckbox.isChecked = it.isExcludeHidden - mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[mSyncedFolder!!.uploadActionInteger] + binding.settingInstantUploadSubfolderRuleSpinner.setSelection(it.subFolderRule.ordinal) - val nameCollisionPolicyIndex = - getSelectionIndexForNameCollisionPolicy(mSyncedFolder!!.nameCollisionPolicy) - mNameCollisionPolicySummary!!.text = mNameCollisionPolicyItemStrings[nameCollisionPolicyIndex] + binding.settingInstantUploadSubfolderRuleContainer.visibility = + if (binding.settingInstantUploadPathUseSubfoldersCheckbox.isChecked) View.VISIBLE else View.GONE - mUploadDelaySummary!!.text = getDelaySummary(mSyncedFolder!!.uploadDelayTimeMs) + binding.settingInstantBehaviourSummary.text = uploadBehaviorItemStrings[it.uploadActionInteger] + val nameCollisionPolicyIndex = getSelectionIndexForNameCollisionPolicy( + it.nameCollisionPolicy + ) + binding.settingInstantNameCollisionPolicySummary.text = + nameCollisionPolicyItemStrings[nameCollisionPolicyIndex] + binding.settingInstantUploadDelaySummary.text = + getDelaySummary(it.uploadDelayTimeMs) + } } /** @@ -215,9 +230,8 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * @param enabled if enabled or disabled */ private fun setEnabled(enabled: Boolean) { - mSyncedFolder!!.isEnabled = enabled - mEnabledSwitch!!.isChecked = enabled - + syncedFolder?.isEnabled = enabled + binding?.syncEnabled?.isChecked = enabled setupViews(binding, enabled) } @@ -229,8 +243,8 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * @param path the remote path to be set */ fun setRemoteFolderSummary(path: String?) { - mSyncedFolder!!.remotePath = path - mRemoteFolderSummary!!.text = path + syncedFolder?.remotePath = path + binding?.remoteFolderSummary?.text = path checkAndUpdateSaveButtonState() } @@ -242,86 +256,77 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * @param path the local path to be set */ fun setLocalFolderSummary(path: String?) { - mSyncedFolder!!.localPath = path - mLocalFolderSummary!!.text = FileStorageUtils.pathToUserFriendlyDisplay(path, activity, resources) - mLocalFolderPath!!.text = DisplayUtils.createTextWithSpan( + syncedFolder?.localPath = path + binding?.localFolderSummary?.text = FileStorageUtils.pathToUserFriendlyDisplay(path, activity, resources) + binding?.syncedFoldersSettingsLocalFolderPath?.text = DisplayUtils.createTextWithSpan( String.format( getString(R.string.synced_folders_preferences_folder_path), - mSyncedFolder!!.localPath + syncedFolder!!.localPath ), - File(mSyncedFolder!!.localPath).name, + File(syncedFolder!!.localPath).name, StyleSpan(Typeface.BOLD) ) checkAndUpdateSaveButtonState() } private fun checkAndUpdateSaveButtonState() { - if (mSyncedFolder!!.localPath != null && mSyncedFolder!!.remotePath != null) { - binding!!.save.isEnabled = true - } else { - binding!!.save.isEnabled = false - } - + binding?.btnPositive?.isEnabled = syncedFolder!!.localPath != null && syncedFolder!!.remotePath != null checkWritableFolder() } private fun checkWritableFolder() { - if (!mSyncedFolder!!.isEnabled) { - binding!!.settingInstantBehaviourContainer.isEnabled = false - binding!!.settingInstantBehaviourContainer.alpha = alphaDisabled + if (!syncedFolder!!.isEnabled) { + binding?.settingInstantBehaviourContainer?.isEnabled = false + binding?.settingInstantBehaviourContainer?.alpha = ALPHA_DISABLED return } - - if (mSyncedFolder!!.localPath != null && File(mSyncedFolder!!.localPath).canWrite()) { - binding!!.settingInstantBehaviourContainer.isEnabled = true - binding!!.settingInstantBehaviourContainer.alpha = alphaEnabled - mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[mSyncedFolder!!.uploadActionInteger] + if (syncedFolder!!.localPath != null && File(syncedFolder!!.localPath).canWrite()) { + binding?.settingInstantBehaviourContainer?.isEnabled = true + binding?.settingInstantBehaviourContainer?.alpha = ALPHA_ENABLED + binding?.settingInstantBehaviourSummary?.text = + uploadBehaviorItemStrings[syncedFolder!!.uploadActionInteger] } else { - binding!!.settingInstantBehaviourContainer.isEnabled = false - binding!!.settingInstantBehaviourContainer.alpha = alphaDisabled - - mSyncedFolder!!.setUploadAction( + binding?.settingInstantBehaviourContainer?.isEnabled = false + binding?.settingInstantBehaviourContainer?.alpha = ALPHA_DISABLED + syncedFolder?.setUploadAction( resources.getTextArray(R.array.pref_behaviour_entryValues)[0].toString() ) - - mUploadBehaviorSummary!!.setText(R.string.auto_upload_file_behaviour_kept_in_folder) + binding?.settingInstantBehaviourSummary?.setText(R.string.auto_upload_file_behaviour_kept_in_folder) } } - private fun setupViews(binding: SyncedFoldersSettingsLayoutBinding?, enable: Boolean) { - val alpha = if (enable) { - alphaEnabled + private fun setupViews(optionalBinding: SyncedFoldersSettingsLayoutBinding?, enable: Boolean) { + val alpha: Float = if (enable) { + ALPHA_ENABLED } else { - alphaDisabled + ALPHA_DISABLED } - binding!!.settingInstantUploadOnWifiContainer.isEnabled = enable - binding.settingInstantUploadOnWifiContainer.alpha = alpha - - binding.settingInstantUploadOnChargingContainer.isEnabled = enable - binding.settingInstantUploadOnChargingContainer.alpha = alpha - - binding.settingInstantUploadExistingContainer.isEnabled = enable - binding.settingInstantUploadExistingContainer.alpha = alpha - - binding.settingInstantUploadPathUseSubfoldersContainer.isEnabled = enable - binding.settingInstantUploadPathUseSubfoldersContainer.alpha = alpha - binding.remoteFolderContainer.isEnabled = enable - binding.remoteFolderContainer.alpha = alpha - - binding.localFolderContainer.isEnabled = enable - binding.localFolderContainer.alpha = alpha - - binding.settingInstantNameCollisionPolicyContainer.isEnabled = enable - binding.settingInstantNameCollisionPolicyContainer.alpha = alpha - - binding.settingInstantUploadDelayContainer.isEnabled = enable - binding.settingInstantUploadDelayContainer.alpha = alpha - - mUploadOnWifiCheckbox!!.isEnabled = enable - mUploadOnChargingCheckbox!!.isEnabled = enable - mUploadExistingCheckbox!!.isEnabled = enable - mUploadUseSubfoldersCheckbox!!.isEnabled = enable + optionalBinding?.let { binding -> + binding.settingInstantUploadOnWifiContainer.isEnabled = enable + binding.settingInstantUploadOnWifiContainer.alpha = alpha + binding.settingInstantUploadOnChargingContainer.isEnabled = enable + binding.settingInstantUploadOnChargingContainer.alpha = alpha + binding.settingInstantUploadExistingContainer.isEnabled = enable + binding.settingInstantUploadExistingContainer.alpha = alpha + binding.settingInstantUploadPathUseSubfoldersContainer.isEnabled = enable + binding.settingInstantUploadPathUseSubfoldersContainer.alpha = alpha + binding.settingInstantUploadExcludeHiddenContainer.isEnabled = enable + binding.settingInstantUploadExcludeHiddenContainer.alpha = alpha + binding.remoteFolderContainer.isEnabled = enable + binding.remoteFolderContainer.alpha = alpha + binding.localFolderContainer.isEnabled = enable + binding.localFolderContainer.alpha = alpha + binding.settingInstantNameCollisionPolicyContainer.isEnabled = enable + binding.settingInstantNameCollisionPolicyContainer.alpha = alpha + binding.settingInstantUploadOnWifiCheckbox.isEnabled = enable + binding.settingInstantUploadOnChargingCheckbox.isEnabled = enable + binding.settingInstantUploadExistingCheckbox.isEnabled = enable + binding.settingInstantUploadPathUseSubfoldersCheckbox.isEnabled = enable + binding.settingInstantUploadExcludeHiddenCheckbox.isEnabled = enable + binding.settingInstantUploadDelayContainer.isEnabled = enable + binding.settingInstantUploadDelayContainer.alpha = alpha + } checkWritableFolder() } @@ -332,136 +337,142 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * @param binding the parent binding */ private fun setupListeners(binding: SyncedFoldersSettingsLayoutBinding) { - mSave!!.setOnClickListener(OnSyncedFolderSaveClickListener()) - mCancel!!.setOnClickListener(OnSyncedFolderCancelClickListener()) - binding.delete.setOnClickListener(OnSyncedFolderDeleteClickListener()) - - binding.settingInstantUploadOnWifiContainer.setOnClickListener { - mSyncedFolder!!.isWifiOnly = !mSyncedFolder!!.isWifiOnly - mUploadOnWifiCheckbox!!.toggle() - } - - binding.settingInstantUploadOnChargingContainer.setOnClickListener { - mSyncedFolder!!.isChargingOnly = !mSyncedFolder!!.isChargingOnly - mUploadOnChargingCheckbox!!.toggle() - } - - binding.settingInstantUploadExistingContainer.setOnClickListener { - mSyncedFolder!!.isExisting = !mSyncedFolder!!.isExisting - mUploadExistingCheckbox!!.toggle() + binding.btnPositive.setOnClickListener(OnSyncedFolderSaveClickListener()) + if (isNeutralButtonActive) { + binding.btnNeutral.setOnClickListener(OnSyncedFolderCancelClickListener()) + binding.btnNegative.setOnClickListener(OnSyncedFolderDeleteClickListener()) + } else { + binding.btnNegative.setOnClickListener(OnSyncedFolderCancelClickListener()) } - binding.settingInstantUploadPathUseSubfoldersContainer.setOnClickListener { - mSyncedFolder!!.isSubfolderByDate = !mSyncedFolder!!.isSubfolderByDate - mUploadUseSubfoldersCheckbox!!.toggle() + syncedFolder?.let { syncedFolder -> + binding.settingInstantUploadOnWifiContainer.setOnClickListener { + syncedFolder.isWifiOnly = !syncedFolder.isWifiOnly + binding.settingInstantUploadOnWifiCheckbox.toggle() + } + binding.settingInstantUploadOnChargingContainer.setOnClickListener { + syncedFolder.isChargingOnly = !syncedFolder.isChargingOnly + binding.settingInstantUploadOnChargingCheckbox.toggle() + } + binding.settingInstantUploadExistingContainer.setOnClickListener { + syncedFolder.isExisting = !syncedFolder.isExisting + binding.settingInstantUploadExistingCheckbox.toggle() + } + binding.settingInstantUploadPathUseSubfoldersContainer.setOnClickListener { + syncedFolder.isSubfolderByDate = !syncedFolder.isSubfolderByDate + binding.settingInstantUploadPathUseSubfoldersCheckbox.toggle() + + // Only allow setting subfolder rule if subfolder is allowed + if (binding.settingInstantUploadPathUseSubfoldersCheckbox.isChecked) { + binding.settingInstantUploadSubfolderRuleContainer.visibility = View.VISIBLE + } else { + binding.settingInstantUploadSubfolderRuleContainer.visibility = View.GONE + } + } + binding.settingInstantUploadExcludeHiddenContainer.setOnClickListener { + syncedFolder.isExcludeHidden = !syncedFolder.isExcludeHidden + binding.settingInstantUploadExcludeHiddenCheckbox.toggle() + } + binding.settingInstantUploadSubfolderRuleSpinner.onItemSelectedListener = + object : AdapterView.OnItemSelectedListener { + override fun onItemSelected(adapterView: AdapterView<*>?, view: View, i: Int, l: Long) { + syncedFolder.subFolderRule = SubFolderRule.values()[i] + } + + override fun onNothingSelected(adapterView: AdapterView<*>?) { + syncedFolder.subFolderRule = SubFolderRule.YEAR_MONTH + } + } + + binding.syncEnabled.setOnClickListener { setEnabled(!syncedFolder.isEnabled) } } - binding.remoteFolderContainer.setOnClickListener { v: View? -> - val action = Intent(activity, FolderPickerActivity::class.java) - activity!!.startActivityForResult(action, REQUEST_CODE__SELECT_REMOTE_FOLDER) + binding.remoteFolderContainer.setOnClickListener { + val action = Intent(activity, FolderPickerActivity::class.java).apply { + putExtra(FolderPickerActivity.EXTRA_ACTION, FolderPickerActivity.CHOOSE_LOCATION) + } + requireActivity().startActivityForResult(action, REQUEST_CODE__SELECT_REMOTE_FOLDER) } - - binding.localFolderContainer.setOnClickListener { v: View? -> + binding.localFolderContainer.setOnClickListener { val action = Intent(activity, UploadFilesActivity::class.java) action.putExtra(UploadFilesActivity.KEY_LOCAL_FOLDER_PICKER_MODE, true) action.putExtra(UploadFilesActivity.REQUEST_CODE_KEY, REQUEST_CODE__SELECT_LOCAL_FOLDER) - activity!!.startActivityForResult(action, REQUEST_CODE__SELECT_LOCAL_FOLDER) + requireActivity().startActivityForResult(action, REQUEST_CODE__SELECT_LOCAL_FOLDER) } - binding.syncEnabled.setOnClickListener { setEnabled(!mSyncedFolder!!.isEnabled) } - binding.settingInstantBehaviourContainer.setOnClickListener { showBehaviourDialog() } - binding.settingInstantNameCollisionPolicyContainer.setOnClickListener { showNameCollisionPolicyDialog() } - - binding.settingInstantUploadDelayContainer.setOnClickListener { showUploadDelayDialog() } + binding.settingInstantUploadDelayContainer.setOnClickListener( showUploadDelayDialog() ) } private fun showBehaviourDialog() { - val builder = MaterialAlertDialogBuilder(activity!!) - builder.setTitle(R.string.prefs_instant_behaviour_dialogTitle) - .setSingleChoiceItems( - resources.getTextArray(R.array.pref_behaviour_entries), - mSyncedFolder!!.uploadActionInteger - ) { dialog, which -> - mSyncedFolder!!.setUploadAction( - resources.getTextArray( - R.array.pref_behaviour_entryValues - )[which].toString() - ) - mUploadBehaviorSummary!!.text = mUploadBehaviorItemStrings[which] - behaviourDialogShown = false - dialog.dismiss() - } - .setOnCancelListener { behaviourDialogShown = false } - behaviourDialogShown = true + val builder = MaterialAlertDialogBuilder(requireActivity()) + + syncedFolder?.let { + val behaviourEntries = resources.getTextArray(R.array.pref_behaviour_entries) + val behaviourEntryValues = resources.getTextArray(R.array.pref_behaviour_entryValues) + builder.setTitle(R.string.prefs_instant_behaviour_dialogTitle) + .setSingleChoiceItems(behaviourEntries, it.uploadActionInteger) { dialog: DialogInterface, which: Int -> + it.setUploadAction(behaviourEntryValues[which].toString()) + binding?.settingInstantBehaviourSummary?.text = uploadBehaviorItemStrings[which] + behaviourDialogShown = false + dialog.dismiss() + } + .setOnCancelListener { behaviourDialogShown = false } + } - viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(activity!!, builder) + behaviourDialogShown = true + viewThemeUtils?.dialog?.colorMaterialAlertDialogBackground(requireActivity(), builder) behaviourDialog = builder.create() - behaviourDialog!!.show() + behaviourDialog?.show() } private fun showNameCollisionPolicyDialog() { - val builder = MaterialAlertDialogBuilder(activity!!) - - builder.setTitle(R.string.pref_instant_name_collision_policy_dialogTitle) - .setSingleChoiceItems( - resources.getTextArray(R.array.pref_name_collision_policy_entries), - getSelectionIndexForNameCollisionPolicy(mSyncedFolder!!.nameCollisionPolicy), - OnNameCollisionDialogClickListener() - ) - .setOnCancelListener { dialog: DialogInterface? -> nameCollisionPolicyDialogShown = false } - - nameCollisionPolicyDialogShown = true + syncedFolder?.let { + val builder = MaterialAlertDialogBuilder(requireActivity()) + builder.setTitle(R.string.pref_instant_name_collision_policy_dialogTitle) + .setSingleChoiceItems( + resources.getTextArray(R.array.pref_name_collision_policy_entries), + getSelectionIndexForNameCollisionPolicy(it.nameCollisionPolicy), + OnNameCollisionDialogClickListener() + ) + .setOnCancelListener { nameCollisionPolicyDialogShown = false } - viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(activity!!, builder) + nameCollisionPolicyDialogShown = true - behaviourDialog = builder.create() - behaviourDialog!!.show() + viewThemeUtils?.dialog?.colorMaterialAlertDialogBackground(requireActivity(), builder) + behaviourDialog = builder.create() + behaviourDialog?.show() + } } private fun showUploadDelayDialog() { - val dialog = newInstance( - mSyncedFolder!!.uploadDelayTimeMs, - getString(R.string.pref_instant_upload_delay_dialogTitle), - getString(R.string.pref_instant_upload_delay_hint) - ) - - dialog.setListener(DurationPickerDialogFragment.Listener { resultCode: Int, duration: Long -> - if (resultCode == Activity.RESULT_OK) { - mSyncedFolder!!.uploadDelayTimeMs = duration - mUploadDelaySummary!!.text = getDelaySummary(duration) - } - dialog.dismiss() - }) - dialog.show(parentFragmentManager, "UPLOAD_DELAY_PICKER_DIALOG") - } - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - Log_OC.d(TAG, "onCreateView, savedInstanceState is $savedInstanceState") - - binding = SyncedFoldersSettingsLayoutBinding.inflate(requireActivity().layoutInflater, null, false) - - setupDialogElements(binding!!) - setupListeners(binding!!) - - val builder = MaterialAlertDialogBuilder(binding!!.getRoot().context) - builder.setView(binding!!.getRoot()) - - viewThemeUtils!!.dialog.colorMaterialAlertDialogBackground(binding!!.getRoot().context, builder) + syncedFolder?.let { + val dialog = DurationPickerDialogFragment.newInstance( + it.uploadDelayTimeMs, + getString(R.string.pref_instant_upload_delay_dialogTitle), + getString(R.string.pref_instant_upload_delay_hint) + ) - return builder.create() + dialog.setListener(DurationPickerDialogFragment.Listener { resultCode: Int, duration: Long -> + if (resultCode == Activity.RESULT_OK) { + it.uploadDelayTimeMs = duration + binding?.settingInstantUploadDelaySummary?.text = getDelaySummary(duration) + } + dialog.dismiss() + }) + dialog.show(parentFragmentManager, "UPLOAD_DELAY_PICKER_DIALOG") + } } override fun onDestroyView() { Log_OC.d(TAG, "destroy SyncedFolderPreferencesDialogFragment view") if (dialog != null && retainInstance) { - dialog!!.setDismissMessage(null) + dialog?.setDismissMessage(null) } - if (behaviourDialog != null && behaviourDialog!!.isShowing) { - behaviourDialog!!.dismiss() + behaviourDialog?.dismiss() } super.onDestroyView() @@ -470,8 +481,6 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { override fun onSaveInstanceState(outState: Bundle) { outState.putBoolean(BEHAVIOUR_DIALOG_STATE, behaviourDialogShown) outState.putBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, nameCollisionPolicyDialogShown) - - super.onSaveInstanceState(outState) } override fun onViewStateRestored(savedInstanceState: Bundle?) { @@ -479,7 +488,6 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { savedInstanceState.getBoolean(BEHAVIOUR_DIALOG_STATE, false) nameCollisionPolicyDialogShown = savedInstanceState != null && savedInstanceState.getBoolean(NAME_COLLISION_POLICY_DIALOG_STATE, false) - if (behaviourDialogShown) { showBehaviourDialog() } @@ -492,89 +500,66 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { interface OnSyncedFolderPreferenceListener { fun onSaveSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) - fun onCancelSyncedFolderPreference() - fun onDeleteSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) } private inner class OnSyncedFolderSaveClickListener : View.OnClickListener { override fun onClick(v: View) { dismiss() - (activity as OnSyncedFolderPreferenceListener?)!!.onSaveSyncedFolderPreference(mSyncedFolder) + (activity as OnSyncedFolderPreferenceListener?)?.onSaveSyncedFolderPreference(syncedFolder) } } private inner class OnSyncedFolderCancelClickListener : View.OnClickListener { override fun onClick(v: View) { dismiss() - (activity as OnSyncedFolderPreferenceListener?)!!.onCancelSyncedFolderPreference() + (activity as OnSyncedFolderPreferenceListener?)?.onCancelSyncedFolderPreference() } } private inner class OnSyncedFolderDeleteClickListener : View.OnClickListener { override fun onClick(v: View) { dismiss() - (activity as OnSyncedFolderPreferenceListener?)!!.onDeleteSyncedFolderPreference(mSyncedFolder) + (activity as OnSyncedFolderPreferenceListener?)?.onDeleteSyncedFolderPreference(syncedFolder) } } private inner class OnNameCollisionDialogClickListener : DialogInterface.OnClickListener { override fun onClick(dialog: DialogInterface, which: Int) { - mSyncedFolder!!.nameCollisionPolicy = + syncedFolder!!.nameCollisionPolicy = getNameCollisionPolicyForSelectionIndex(which) - - mNameCollisionPolicySummary!!.text = mNameCollisionPolicyItemStrings[which] + binding?.settingInstantNameCollisionPolicySummary?.text = + nameCollisionPolicyItemStrings[which] nameCollisionPolicyDialogShown = false dialog.dismiss() } } - private fun getDelaySummary(duration: Long): String { - if (duration == 0L) { - return getString(R.string.pref_instant_upload_delay_disabled) - } - val durationParts = getDurationParts(duration) - val durationSummary = StringBuilder() - if (durationParts.days > 0) { - durationSummary.append(durationParts.days) - durationSummary.append(getString(R.string.common_days_short)) - durationSummary.append(' ') - } - if (durationParts.hours > 0) { - durationSummary.append(durationParts.hours) - durationSummary.append(getString(R.string.common_hours_short)) - durationSummary.append(' ') - } - if (durationParts.minutes > 0) { - durationSummary.append(durationParts.minutes) - durationSummary.append(getString(R.string.common_minutes_short)) - } - return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim { it <= ' ' }) - } - companion object { - const val SYNCED_FOLDER_PARCELABLE: String = "SyncedFolderParcelable" - const val REQUEST_CODE__SELECT_REMOTE_FOLDER: Int = 0 - const val REQUEST_CODE__SELECT_LOCAL_FOLDER: Int = 1 - - private val TAG: String = SyncedFolderPreferencesDialogFragment::class.java.simpleName + const val SYNCED_FOLDER_PARCELABLE = "SyncedFolderParcelable" + const val REQUEST_CODE__SELECT_REMOTE_FOLDER = 0 + const val REQUEST_CODE__SELECT_LOCAL_FOLDER = 1 + private val TAG = SyncedFolderPreferencesDialogFragment::class.java.simpleName private const val BEHAVIOUR_DIALOG_STATE = "BEHAVIOUR_DIALOG_STATE" private const val NAME_COLLISION_POLICY_DIALOG_STATE = "NAME_COLLISION_POLICY_DIALOG_STATE" - private const val alphaEnabled = 1.0f - private const val alphaDisabled = 0.7f + private const val ALPHA_ENABLED = 1.0f + private const val ALPHA_DISABLED = 0.7f - fun newInstance(syncedFolder: SyncedFolderDisplayItem?, section: Int): SyncedFolderPreferencesDialogFragment { - requireNotNull(syncedFolder) { "SyncedFolder is mandatory but NULL!" } - - val args = Bundle() - args.putParcelable(SYNCED_FOLDER_PARCELABLE, SyncedFolderParcelable(syncedFolder, section)) + @JvmStatic + fun newInstance(syncedFolder: SyncedFolderDisplayItem?, section: Int): SyncedFolderPreferencesDialogFragment? { + if (syncedFolder == null) { + return null + } - val dialogFragment = SyncedFolderPreferencesDialogFragment() - dialogFragment.arguments = args - dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + val args = Bundle().apply { + putParcelable(SYNCED_FOLDER_PARCELABLE, SyncedFolderParcelable(syncedFolder, section)) + } - return dialogFragment + return SyncedFolderPreferencesDialogFragment().apply { + arguments = args + setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + } } /** @@ -582,13 +567,13 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME, 3 if SKIP, Otherwise: 0 */ + @Suppress("MagicNumber") private fun getSelectionIndexForNameCollisionPolicy(nameCollisionPolicy: NameCollisionPolicy): Int { return when (nameCollisionPolicy) { NameCollisionPolicy.OVERWRITE -> 1 NameCollisionPolicy.RENAME -> 2 NameCollisionPolicy.CANCEL -> 3 NameCollisionPolicy.ASK_USER -> 0 - else -> 0 } } @@ -597,6 +582,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { * * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2, SKIP if 3. Otherwise: ASK_USER */ + @Suppress("MagicNumber") private fun getNameCollisionPolicyForSelectionIndex(index: Int): NameCollisionPolicy { return when (index) { 1 -> NameCollisionPolicy.OVERWRITE @@ -606,5 +592,29 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { else -> NameCollisionPolicy.ASK_USER } } + + @Suppress("MagicNumber") + private fun getDelaySummary(duration: Long): String { + if (duration == 0L) { + return getString(R.string.pref_instant_upload_delay_disabled) + } + val durationParts = TimeUtils.getDurationParts(duration) + val durationSummary = StringBuilder() + if (durationParts.days > 0) { + durationSummary.append(durationParts.days) + durationSummary.append(getString(R.string.common_days_short)) + durationSummary.append(' ') + } + if (durationParts.hours > 0) { + durationSummary.append(durationParts.hours) + durationSummary.append(getString(R.string.common_hours_short)) + durationSummary.append(' ') + } + if (durationParts.minutes > 0) { + durationSummary.append(durationParts.minutes) + durationSummary.append(getString(R.string.common_minutes_short)) + } + return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim { it <= ' ' }) + } } } From 847ef54acddfee82087c516a2db0ca8396a54463 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 18:45:31 +0200 Subject: [PATCH 30/72] SyncedFolderPreferencesDialogFragment moved dialog Signed-off-by: batpio --- .../82.json | 1216 +++++++++++++++++ .../SyncedFolderPreferencesDialogFragment.kt | 30 +- 2 files changed, 1233 insertions(+), 13 deletions(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/82.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/82.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/82.json new file mode 100644 index 000000000000..f8bd5c133e1a --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/82.json @@ -0,0 +1,1216 @@ +{ + "formatVersion": 1, + "database": { + "version": 82, + "identityHash": "bbda3390ca96631f46ce1566898bbd38", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `assistant` INTEGER, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `end_to_end_encryption_api_version` TEXT, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT, `groupfolders` INTEGER, `drop_account` INTEGER, `security_guard` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "assistant", + "columnName": "assistant", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionApiVersion", + "columnName": "end_to_end_encryption_api_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "groupfolders", + "columnName": "groupfolders", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "dropAccount", + "columnName": "drop_account", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "securityGuard", + "columnName": "security_guard", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `hidden` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `metadata_live_photo` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT, `tags` TEXT, `metadata_gps` TEXT, `e2e_counter` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataLivePhoto", + "columnName": "metadata_live_photo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tags", + "columnName": "tags", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataGPS", + "columnName": "metadata_gps", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "e2eCounter", + "columnName": "e2e_counter", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` TEXT, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER, `sub_folder_rule` INTEGER, `exclude_hidden` INTEGER, `last_scan_timestamp_ms` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subFolderRule", + "columnName": "sub_folder_rule", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "excludeHidden", + "columnName": "exclude_hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastScanTimestampMs", + "columnName": "last_scan_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bbda3390ca96631f46ce1566898bbd38')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 011bc720ffa7..05381a8b1090 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -9,8 +9,10 @@ package com.owncloud.android.ui.dialog import android.app.Activity import android.app.Dialog +import android.content.Context import android.content.DialogInterface import android.content.Intent +import android.content.res.Resources import android.graphics.Typeface import android.os.Bundle import android.text.TextUtils @@ -220,7 +222,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { binding.settingInstantNameCollisionPolicySummary.text = nameCollisionPolicyItemStrings[nameCollisionPolicyIndex] binding.settingInstantUploadDelaySummary.text = - getDelaySummary(it.uploadDelayTimeMs) + getDelaySummary(requireContext(), it.uploadDelayTimeMs) } } @@ -402,7 +404,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { binding.settingInstantBehaviourContainer.setOnClickListener { showBehaviourDialog() } binding.settingInstantNameCollisionPolicyContainer.setOnClickListener { showNameCollisionPolicyDialog() } - binding.settingInstantUploadDelayContainer.setOnClickListener( showUploadDelayDialog() ) + binding.settingInstantUploadDelayContainer.setOnClickListener { showUploadDelayDialog() } } private fun showBehaviourDialog() { @@ -455,12 +457,14 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { getString(R.string.pref_instant_upload_delay_hint) ) - dialog.setListener(DurationPickerDialogFragment.Listener { resultCode: Int, duration: Long -> - if (resultCode == Activity.RESULT_OK) { - it.uploadDelayTimeMs = duration - binding?.settingInstantUploadDelaySummary?.text = getDelaySummary(duration) + dialog.setListener(object: DurationPickerDialogFragment.Listener { + override fun onDurationPickerResult(resultCode: Int, duration: Long) { + if (resultCode == Activity.RESULT_OK) { + it.uploadDelayTimeMs = duration + binding?.settingInstantUploadDelaySummary?.text = getDelaySummary(requireContext(), duration) + } + dialog.dismiss() } - dialog.dismiss() }) dialog.show(parentFragmentManager, "UPLOAD_DELAY_PICKER_DIALOG") } @@ -594,27 +598,27 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { } @Suppress("MagicNumber") - private fun getDelaySummary(duration: Long): String { + private fun getDelaySummary(context: Context, duration: Long): String { if (duration == 0L) { - return getString(R.string.pref_instant_upload_delay_disabled) + return context.getString(R.string.pref_instant_upload_delay_disabled) } val durationParts = TimeUtils.getDurationParts(duration) val durationSummary = StringBuilder() if (durationParts.days > 0) { durationSummary.append(durationParts.days) - durationSummary.append(getString(R.string.common_days_short)) + durationSummary.append(context.getString(R.string.common_days_short)) durationSummary.append(' ') } if (durationParts.hours > 0) { durationSummary.append(durationParts.hours) - durationSummary.append(getString(R.string.common_hours_short)) + durationSummary.append(context.getString(R.string.common_hours_short)) durationSummary.append(' ') } if (durationParts.minutes > 0) { durationSummary.append(durationParts.minutes) - durationSummary.append(getString(R.string.common_minutes_short)) + durationSummary.append(context.getString(R.string.common_minutes_short)) } - return getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim { it <= ' ' }) + return context.getString(R.string.pref_instant_upload_delay_enabled, durationSummary.toString().trim()) } } } From a501417963b35b6015ac741d4596f12d0e312529 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 20:26:35 +0200 Subject: [PATCH 31/72] Licence update Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 13 +---------- .../owncloud/android/utils/TimeUtilsTest.kt | 13 +---------- .../ui/dialog/DurationPickerDialogFragment.kt | 18 ++++----------- .../com/owncloud/android/utils/TimeUtils.kt | 13 +---------- app/src/main/res/layout/duration_picker.xml | 23 ++++--------------- 5 files changed, 12 insertions(+), 68 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 4ed2588eb87f..12ef4e494271 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.ui.dialog diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index c671058a2bd0..6ed16de98cd9 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.utils diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 26b122919644..ee4ec7cb110a 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.ui.dialog @@ -37,10 +26,11 @@ import javax.inject.Inject class DurationPickerDialogFragment : DialogFragment(), Injectable { - private var _binding: DurationPickerBinding? = null - private val binding get() = _binding!! private var resultListener: Listener? = null + private var _binding: DurationPickerBinding? = null + val binding get() = _binding!! + private var duration: Long get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index 0f60bcd4227b..fec1f633204b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.utils diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index 4a0a5a0225b0..e4f8319b6e79 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -1,23 +1,10 @@ Date: Sun, 4 Aug 2024 20:36:56 +0200 Subject: [PATCH 32/72] CI fixes Signed-off-by: batpio --- .../com/owncloud/android/ui/activity/SyncedFoldersActivity.kt | 2 +- .../android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index 935d8bf8b878..4504b50fc249 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -706,7 +706,7 @@ class SyncedFoldersActivity : syncedFolder.isEnabled, syncedFolder.subFolderRule, syncedFolder.isExcludeHidden, - syncedFolder.uploadDelayTimeMs, + syncedFolder.uploadDelayTimeMs ) saveOrUpdateSyncedFolder(item) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 05381a8b1090..0c3c2f283963 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -12,7 +12,6 @@ import android.app.Dialog import android.content.Context import android.content.DialogInterface import android.content.Intent -import android.content.res.Resources import android.graphics.Typeface import android.os.Bundle import android.text.TextUtils @@ -457,7 +456,7 @@ class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { getString(R.string.pref_instant_upload_delay_hint) ) - dialog.setListener(object: DurationPickerDialogFragment.Listener { + dialog.setListener(object : DurationPickerDialogFragment.Listener { override fun onDurationPickerResult(resultCode: Int, duration: Long) { if (resultCode == Activity.RESULT_OK) { it.uploadDelayTimeMs = duration From 3a84661a67cf67526869b033b3c438d192b2a18b Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 21:01:38 +0200 Subject: [PATCH 33/72] Fixes Signed-off-by: batpio --- .../owncloud/android/ui/activity/SyncedFoldersActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index 4504b50fc249..e2443bf5844a 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -703,10 +703,10 @@ class SyncedFoldersActivity : syncedFolder.isSubfolderByDate, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicy.serialize(), + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled, syncedFolder.subFolderRule, - syncedFolder.isExcludeHidden, - syncedFolder.uploadDelayTimeMs + syncedFolder.isExcludeHidden ) saveOrUpdateSyncedFolder(item) @@ -792,10 +792,10 @@ class SyncedFoldersActivity : subfolderByDate: Boolean, uploadAction: Int, nameCollisionPolicy: Int, + uploadDelayTimeMs: Long, enabled: Boolean, subFolderRule: SubFolderRule, - excludeHidden: Boolean, - uploadDelayTimeMs: Long + excludeHidden: Boolean ) { item.id = id item.localPath = localPath From 56a9002b6636248885f6d6ff38fc328c9d5a1dda Mon Sep 17 00:00:00 2001 From: batpio Date: Mon, 5 Aug 2024 17:47:57 +0200 Subject: [PATCH 34/72] @Suppress("TooManyFunctions") Signed-off-by: batpio --- .../android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 0c3c2f283963..95eb9db6ca24 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -45,6 +45,7 @@ import javax.inject.Inject * Dialog to show the preferences/configuration of a synced folder allowing the user to change the different * parameters. */ +@Suppress("TooManyFunctions") class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { @JvmField From eefb03ef7738c6e8582c6c4ef673bacd98497c74 Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 3 Sep 2024 17:39:15 +0200 Subject: [PATCH 35/72] Merged with main Signed-off-by: batpio --- .../84.json | 1252 +++++++++++++++++ 1 file changed, 1252 insertions(+) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/84.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/84.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/84.json new file mode 100644 index 000000000000..7407b619fb41 --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/84.json @@ -0,0 +1,1252 @@ +{ + "formatVersion": 1, + "database": { + "version": 84, + "identityHash": "967b91305cf2b6a2708fbf20b1afd08a", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `assistant` INTEGER, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `end_to_end_encryption_api_version` TEXT, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT, `groupfolders` INTEGER, `drop_account` INTEGER, `security_guard` INTEGER, `forbidden_filename_characters` INTEGER, `forbidden_filenames` INTEGER, `forbidden_filename_extensions` INTEGER, `forbidden_filename_basenames` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "assistant", + "columnName": "assistant", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionApiVersion", + "columnName": "end_to_end_encryption_api_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "groupfolders", + "columnName": "groupfolders", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "dropAccount", + "columnName": "drop_account", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "securityGuard", + "columnName": "security_guard", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameCharacters", + "columnName": "forbidden_filename_characters", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNames", + "columnName": "forbidden_filenames", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameExtensions", + "columnName": "forbidden_filename_extensions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFilenameBaseNames", + "columnName": "forbidden_filename_basenames", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `hidden` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `metadata_live_photo` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT, `tags` TEXT, `metadata_gps` TEXT, `e2e_counter` INTEGER, `internal_two_way_sync_timestamp` INTEGER, `internal_two_way_sync_result` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataLivePhoto", + "columnName": "metadata_live_photo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tags", + "columnName": "tags", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataGPS", + "columnName": "metadata_gps", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "e2eCounter", + "columnName": "e2e_counter", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySync", + "columnName": "internal_two_way_sync_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySyncResult", + "columnName": "internal_two_way_sync_result", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` TEXT, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER, `sub_folder_rule` INTEGER, `exclude_hidden` INTEGER, `last_scan_timestamp_ms` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subFolderRule", + "columnName": "sub_folder_rule", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "excludeHidden", + "columnName": "exclude_hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastScanTimestampMs", + "columnName": "last_scan_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '967b91305cf2b6a2708fbf20b1afd08a')" + ] + } +} \ No newline at end of file From bc83af27989c926b33274c9242b2df3f20077037 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 27 Oct 2024 16:01:17 +0100 Subject: [PATCH 36/72] Merged with main Signed-off-by: batpio --- .../86.json | 1308 +++++++++++++++++ .../com/owncloud/android/db/ProviderMeta.java | 2 +- 2 files changed, 1309 insertions(+), 1 deletion(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json new file mode 100644 index 000000000000..1ef07f05b4f0 --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json @@ -0,0 +1,1308 @@ +{ + "formatVersion": 1, + "database": { + "version": 86, + "identityHash": "361bfed7935162cd5f38801e888044cd", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `assistant` INTEGER, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `end_to_end_encryption_api_version` TEXT, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT, `groupfolders` INTEGER, `drop_account` INTEGER, `security_guard` INTEGER, `forbidden_filename_characters` INTEGER, `forbidden_filenames` INTEGER, `forbidden_filename_extensions` INTEGER, `forbidden_filename_basenames` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "assistant", + "columnName": "assistant", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionApiVersion", + "columnName": "end_to_end_encryption_api_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "groupfolders", + "columnName": "groupfolders", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "dropAccount", + "columnName": "drop_account", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "securityGuard", + "columnName": "security_guard", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameCharacters", + "columnName": "forbidden_filename_characters", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNames", + "columnName": "forbidden_filenames", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameExtensions", + "columnName": "forbidden_filename_extensions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFilenameBaseNames", + "columnName": "forbidden_filename_basenames", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `hidden` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `metadata_live_photo` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT, `tags` TEXT, `metadata_gps` TEXT, `e2e_counter` INTEGER, `internal_two_way_sync_timestamp` INTEGER, `internal_two_way_sync_result` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataLivePhoto", + "columnName": "metadata_live_photo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tags", + "columnName": "tags", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataGPS", + "columnName": "metadata_gps", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "e2eCounter", + "columnName": "e2e_counter", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySync", + "columnName": "internal_two_way_sync_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySyncResult", + "columnName": "internal_two_way_sync_result", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` TEXT, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER, `sub_folder_rule` INTEGER, `exclude_hidden` INTEGER, `last_scan_timestamp_ms` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subFolderRule", + "columnName": "sub_folder_rule", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "excludeHidden", + "columnName": "exclude_hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastScanTimestampMs", + "columnName": "last_scan_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "offline_operations", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `offline_operations_parent_oc_file_id` INTEGER, `offline_operations_path` TEXT, `offline_operations_type` TEXT, `offline_operations_file_name` TEXT, `offline_operations_created_at` INTEGER, `offline_operations_modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "parentOCFileId", + "columnName": "offline_operations_parent_oc_file_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "offline_operations_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "offline_operations_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filename", + "columnName": "offline_operations_file_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "createdAt", + "columnName": "offline_operations_created_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAt", + "columnName": "offline_operations_modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '361bfed7935162cd5f38801e888044cd')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index 00e06122d27c..0d42ad4fa71f 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -25,7 +25,7 @@ */ public class ProviderMeta { public static final String DB_NAME = "filelist"; - public static final int DB_VERSION = 85; + public static final int DB_VERSION = 86; private ProviderMeta() { // No instance From 6fda157a5215a027b378bd4fe5ac6178c57eaaab Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 8 Jan 2025 20:41:13 +0100 Subject: [PATCH 37/72] Merged with main Signed-off-by: batpio --- .../java/com/nextcloud/client/jobs/FilesSyncWork.kt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index e15abd8fec25..afda48b343a2 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -218,8 +218,7 @@ class FilesSyncWork( syncedFolderProvider.updateSyncFolder(syncedFolder) } - private fun getAllFiles(path: String, minFileAge: Long): Set { - val minFileTimestamp: Long = if (minFileAge > 0) (System.currentTimeMillis() - minFileAge) else 0 + private fun getAllFiles(path: String, maxFileTimestamp: Long?): Set { return File(path).takeIf { it.exists() } ?.walkTopDown() ?.asSequence() @@ -228,7 +227,7 @@ class FilesSyncWork( file.exists() && isQualifiedFolder(file.parentFile?.path) && isFileNameQualifiedForAutoUpload(file.name) && - file.lastModified() >= minFileTimestamp + maxFileTimestamp?.let { it >= file.lastModified() } ?: true } ?.toSet() ?: emptySet() @@ -261,7 +260,13 @@ class FilesSyncWork( null } - val files = getAllFiles(syncedFolder.localPath, syncedFolder.uploadDelayTimeMs) + val maxFileTimestamp = if (syncedFolder.uploadDelayTimeMs > 0) { + System.currentTimeMillis() - syncedFolder.uploadDelayTimeMs + } else { + null + } + + val files = getAllFiles(syncedFolder.localPath, maxFileTimestamp) if (files.isEmpty()) { return } From fb2f319cd1ae7b506dadd403101311b9d8522ede Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:27:08 +0100 Subject: [PATCH 38/72] # Conflicts: # CHANGELOG.md # app/schemas/com.nextcloud.client.database.NextcloudDatabase/66.json # app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java # app/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt # app/src/main/res/values-b+en+001/strings.xml # app/src/main/res/values-bg-rBG/strings.xml # app/src/main/res/values-cs-rCZ/strings.xml # app/src/main/res/values-da/strings.xml # app/src/main/res/values-de/strings.xml # app/src/main/res/values-es/strings.xml # app/src/main/res/values-fr/strings.xml # app/src/main/res/values-hu-rHU/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-tr/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rHK/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml Signed-off-by: batpio # Conflicts: # app/src/androidTest/java/com/owncloud/android/AbstractIT.java # app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt # app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java # app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt # app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java # app/src/main/java/com/owncloud/android/ui/dialog/parcel/SyncedFolderParcelable.java --- app/build.gradle | 2 +- .../65.json | 1118 ----------------- .../client/SyncedFoldersActivityIT.java | 1 + .../android/utils/SyncedFolderUtilsTest.kt | 2 + .../database/entity/SyncedFolderEntity.kt | 2 + .../nextcloud/client/di/ComponentsModule.java | 4 + .../android/datamodel/SyncedFolder.java | 13 + .../datamodel/SyncedFolderDisplayItem.java | 4 + .../datamodel/SyncedFolderProvider.java | 4 + .../com/owncloud/android/db/ProviderMeta.java | 1 + .../dialog/DurationPickerDialogFragment.java | 159 +++ .../com/owncloud/android/utils/TimeUtils.java | 42 + app/src/main/res/layout/duration_picker.xml | 85 ++ .../layout/synced_folders_settings_layout.xml | 30 + app/src/main/res/values/strings.xml | 10 + .../activity/SyncedFoldersActivityTest.java | 1 + .../android/en-US/changelogs/30230051.txt | 8 + .../android/en-US/changelogs/30230052.txt | 9 + .../android/en-US/changelogs/30230090.txt | 9 + scripts/analysis/analysis-wrapper.sh | 2 +- scripts/analysis/getBranchName.sh | 4 +- 21 files changed, 388 insertions(+), 1122 deletions(-) delete mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json create mode 100644 app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java create mode 100644 app/src/main/java/com/owncloud/android/utils/TimeUtils.java create mode 100644 app/src/main/res/layout/duration_picker.xml create mode 100644 fastlane/metadata/android/en-US/changelogs/30230051.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/30230052.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/30230090.txt diff --git a/app/build.gradle b/app/build.gradle index 2b86b1c5334c..8994a8fd8ad7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -80,7 +80,7 @@ configurations.configureEach { def versionMajor = 3 def versionMinor = 30 def versionPatch = 0 -def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable +def versionBuild = 90 // 0-50=Alpha / 51-98=RC / 90-99=stable def ndkEnv = new HashMap() diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json deleted file mode 100644 index cba9c61eda96..000000000000 --- a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json +++ /dev/null @@ -1,1118 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 65, - "identityHash": "1aa68e80a3cb0006ef54981abad692a9", - "entities": [ - { - "tableName": "arbitrary_data", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "cloudId", - "columnName": "cloud_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "key", - "columnName": "key", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "value", - "columnName": "value", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "capabilities", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "accountName", - "columnName": "account", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "versionMajor", - "columnName": "version_mayor", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionMinor", - "columnName": "version_minor", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionMicro", - "columnName": "version_micro", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "versionString", - "columnName": "version_string", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "versionEditor", - "columnName": "version_edition", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "extendedSupport", - "columnName": "extended_support", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "corePollinterval", - "columnName": "core_pollinterval", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingApiEnabled", - "columnName": "sharing_api_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicEnabled", - "columnName": "sharing_public_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicPasswordEnforced", - "columnName": "sharing_public_password_enforced", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateEnabled", - "columnName": "sharing_public_expire_date_enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateDays", - "columnName": "sharing_public_expire_date_days", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicExpireDateEnforced", - "columnName": "sharing_public_expire_date_enforced", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicSendMail", - "columnName": "sharing_public_send_mail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingPublicUpload", - "columnName": "sharing_public_upload", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingUserSendMail", - "columnName": "sharing_user_send_mail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingResharing", - "columnName": "sharing_resharing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingFederationOutgoing", - "columnName": "sharing_federation_outgoing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharingFederationIncoming", - "columnName": "sharing_federation_incoming", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesBigfilechunking", - "columnName": "files_bigfilechunking", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesUndelete", - "columnName": "files_undelete", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "filesVersioning", - "columnName": "files_versioning", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "externalLinks", - "columnName": "external_links", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverName", - "columnName": "server_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverColor", - "columnName": "server_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverTextColor", - "columnName": "server_text_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverElementColor", - "columnName": "server_element_color", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverSlogan", - "columnName": "server_slogan", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverLogo", - "columnName": "server_logo", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "serverBackgroundUrl", - "columnName": "background_url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "endToEndEncryption", - "columnName": "end_to_end_encryption", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "activity", - "columnName": "activity", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverBackgroundDefault", - "columnName": "background_default", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "serverBackgroundPlain", - "columnName": "background_plain", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocument", - "columnName": "richdocument", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentMimetypeList", - "columnName": "richdocument_mimetype_list", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "richdocumentDirectEditing", - "columnName": "richdocument_direct_editing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentTemplates", - "columnName": "richdocument_direct_templates", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentOptionalMimetypeList", - "columnName": "richdocument_optional_mimetype_list", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharingPublicAskForOptionalPassword", - "columnName": "sharing_public_ask_for_optional_password", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "richdocumentProductName", - "columnName": "richdocument_product_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "directEditingEtag", - "columnName": "direct_editing_etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "userStatus", - "columnName": "user_status", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "userStatusSupportsEmoji", - "columnName": "user_status_supports_emoji", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etag", - "columnName": "etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filesLockingVersion", - "columnName": "files_locking_version", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "external_links", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "iconUrl", - "columnName": "icon_url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "url", - "columnName": "url", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "redirect", - "columnName": "redirect", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "filelist", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "encryptedName", - "columnName": "encrypted_filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "path", - "columnName": "path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "pathDecrypted", - "columnName": "path_decrypted", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "parent", - "columnName": "parent", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "creation", - "columnName": "created", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "modified", - "columnName": "modified", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "contentType", - "columnName": "content_type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "contentLength", - "columnName": "content_length", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "storagePath", - "columnName": "media_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountOwner", - "columnName": "file_owner", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lastSyncDate", - "columnName": "last_sync_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lastSyncDateForData", - "columnName": "last_sync_date_for_data", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "modifiedAtLastSyncForData", - "columnName": "modified_at_last_sync_for_data", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etag", - "columnName": "etag", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "etagOnServer", - "columnName": "etag_on_server", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharedViaLink", - "columnName": "share_by_link", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "permissions", - "columnName": "permissions", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remoteId", - "columnName": "remote_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "updateThumbnail", - "columnName": "update_thumbnail", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isDownloading", - "columnName": "is_downloading", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "favorite", - "columnName": "favorite", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isEncrypted", - "columnName": "is_encrypted", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "etagInConflict", - "columnName": "etag_in_conflict", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharedWithSharee", - "columnName": "shared_via_users", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "mountType", - "columnName": "mount_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "hasPreview", - "columnName": "has_preview", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "unreadCommentsCount", - "columnName": "unread_comments_count", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "ownerId", - "columnName": "owner_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "ownerDisplayName", - "columnName": "owner_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sharees", - "columnName": "sharees", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "richWorkspace", - "columnName": "rich_workspace", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "metadataSize", - "columnName": "metadata_size", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "locked", - "columnName": "locked", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockType", - "columnName": "lock_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockOwner", - "columnName": "lock_owner", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockOwnerDisplayName", - "columnName": "lock_owner_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockOwnerEditor", - "columnName": "lock_owner_editor", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "lockTimestamp", - "columnName": "lock_timestamp", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockTimeout", - "columnName": "lock_timeout", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lockToken", - "columnName": "lock_token", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "filesystem", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileIsFolder", - "columnName": "is_folder", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileFoundRecently", - "columnName": "found_at", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileSentForUpload", - "columnName": "upload_triggered", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "syncedFolderId", - "columnName": "syncedfolder_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "crc32", - "columnName": "crc32", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileModified", - "columnName": "modified_at", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "ocshares", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "fileSource", - "columnName": "file_source", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "itemSource", - "columnName": "item_source", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareType", - "columnName": "share_type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareWith", - "columnName": "shate_with", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "path", - "columnName": "path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "permissions", - "columnName": "permissions", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "sharedDate", - "columnName": "shared_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "expirationDate", - "columnName": "expiration_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "token", - "columnName": "token", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shareWithDisplayName", - "columnName": "shared_with_display_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDirectory", - "columnName": "is_directory", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "userId", - "columnName": "user_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "idRemoteShared", - "columnName": "id_remote_shared", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "accountOwner", - "columnName": "owner_share", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isPasswordProtected", - "columnName": "is_password_protected", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "note", - "columnName": "note", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "hideDownload", - "columnName": "hide_download", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "shareLink", - "columnName": "share_link", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shareLabel", - "columnName": "share_label", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "synced_folders", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `type` INTEGER, `hidden` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remotePath", - "columnName": "remote_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "wifiOnly", - "columnName": "wifi_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "chargingOnly", - "columnName": "charging_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "existing", - "columnName": "existing", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "enabled", - "columnName": "enabled", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "enabledTimestampMs", - "columnName": "enabled_timestamp_ms", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "subfolderByDate", - "columnName": "subfolder_by_date", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "account", - "columnName": "account", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "uploadAction", - "columnName": "upload_option", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "nameCollisionPolicy", - "columnName": "name_collision_policy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "hidden", - "columnName": "hidden", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "list_of_uploads", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localPath", - "columnName": "local_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "remotePath", - "columnName": "remote_path", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountName", - "columnName": "account_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "fileSize", - "columnName": "file_size", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "status", - "columnName": "status", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "localBehaviour", - "columnName": "local_behaviour", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "uploadTime", - "columnName": "upload_time", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "nameCollisionPolicy", - "columnName": "name_collision_policy", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isCreateRemoteFolder", - "columnName": "is_create_remote_folder", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "uploadEndTimestamp", - "columnName": "upload_end_timestamp", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "lastResult", - "columnName": "last_result", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isWhileChargingOnly", - "columnName": "is_while_charging_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isWifiOnly", - "columnName": "is_wifi_only", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "createdBy", - "columnName": "created_by", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "folderUnlockToken", - "columnName": "folder_unlock_token", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "virtual", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", - "fields": [ - { - "fieldPath": "id", - "columnName": "_id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "ocFileId", - "columnName": "ocfile_id", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "_id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - } - ], - "views": [], - "setupQueries": [ - "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1aa68e80a3cb0006ef54981abad692a9')" - ] - } -} \ No newline at end of file diff --git a/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java b/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java index 4bc1377a7f17..81f99095509f 100644 --- a/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java +++ b/app/src/androidTest/java/com/nextcloud/client/SyncedFoldersActivityIT.java @@ -59,6 +59,7 @@ public void testSyncedFolderDialog() { "test@https://nextcloud.localhost", 0, 0, + 0, true, 1000, "Name", diff --git a/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt index 1093ae015985..310660573ed9 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/SyncedFolderUtilsTest.kt @@ -169,6 +169,7 @@ class SyncedFolderUtilsTest : AbstractIT() { account.name, 1, 1, + 0, true, 0L, MediaFolderType.IMAGE, @@ -194,6 +195,7 @@ class SyncedFolderUtilsTest : AbstractIT() { account.name, 1, 1, + 0, true, 0L, MediaFolderType.IMAGE, diff --git a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt index bcc9d4c864d2..71342ef54c0f 100644 --- a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt +++ b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt @@ -39,6 +39,8 @@ data class SyncedFolderEntity( val uploadAction: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY) val nameCollisionPolicy: Int?, + @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS) + val uploadDelayTimeMs: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_TYPE) val type: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_HIDDEN) diff --git a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java index 277469a57375..713679215ede 100644 --- a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java +++ b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java @@ -81,6 +81,7 @@ import com.owncloud.android.ui.dialog.ConfirmationDialogFragment; import com.owncloud.android.ui.dialog.ConflictsResolveDialog; import com.owncloud.android.ui.dialog.CreateFolderDialogFragment; +import com.owncloud.android.ui.dialog.DurationPickerDialogFragment; import com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment; import com.owncloud.android.ui.dialog.IndeterminateProgressDialog; import com.owncloud.android.ui.dialog.LoadingDialog; @@ -446,6 +447,9 @@ abstract class ComponentsModule { @ContributesAndroidInjector abstract SyncFileNotEnoughSpaceDialogFragment syncFileNotEnoughSpaceDialogFragment(); + @ContributesAndroidInjector + abstract DurationPickerDialogFragment durationPickerFragment(); + @ContributesAndroidInjector abstract DashboardWidgetConfigurationActivity dashboardWidgetConfigurationActivity(); diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java index ee2cdda6a7b8..458d090088c1 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolder.java @@ -35,6 +35,7 @@ public class SyncedFolder implements Serializable, Cloneable { private boolean chargingOnly; private boolean existing; private boolean subfolderByDate; + private long uploadDelayTimeMs; private String account; private int uploadAction; private int nameCollisionPolicy; @@ -74,6 +75,7 @@ public SyncedFolder(String localPath, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, MediaFolderType type, @@ -91,6 +93,7 @@ public SyncedFolder(String localPath, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, @@ -115,6 +118,7 @@ protected SyncedFolder(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, MediaFolderType type, @@ -132,6 +136,7 @@ protected SyncedFolder(long id, this.account = account; this.uploadAction = uploadAction; this.nameCollisionPolicy = nameCollisionPolicy; + this.uploadDelayTimeMs = uploadDelayTimeMs; this.setEnabled(enabled, timestampMs); this.type = type; this.hidden = hidden; @@ -200,6 +205,10 @@ public NameCollisionPolicy getNameCollisionPolicy() { return NameCollisionPolicy.deserialize(nameCollisionPolicy); } + public long getUploadDelayTimeMs() { + return uploadDelayTimeMs; + } + public boolean isEnabled() { return this.enabled; } @@ -258,6 +267,10 @@ public void setNameCollisionPolicy(int nameCollisionPolicy) { this.nameCollisionPolicy = nameCollisionPolicy; } + public void setUploadDelayTimeMs(long uploadDelayTimeMs) { + this.uploadDelayTimeMs = uploadDelayTimeMs; + } + public void setType(MediaFolderType type) { this.type = type; } diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java index cbbf4453aadb..4cc53134e02c 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderDisplayItem.java @@ -52,6 +52,7 @@ public SyncedFolderDisplayItem(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, List filePaths, @@ -72,6 +73,7 @@ public SyncedFolderDisplayItem(long id, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, @@ -94,6 +96,7 @@ public SyncedFolderDisplayItem(long id, String account, int uploadAction, int nameCollisionPolicy, + long uploadDelayTimeMs, boolean enabled, long timestampMs, String folderName, @@ -112,6 +115,7 @@ public SyncedFolderDisplayItem(long id, account, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, timestampMs, type, diff --git a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java index 4d1442183b21..40fa757aafbc 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/SyncedFolderProvider.java @@ -368,6 +368,8 @@ private SyncedFolder createSyncedFolderFromCursor(Cursor cursor) { ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_EXISTING)) == 1; boolean subfolderByDate = cursor.getInt(cursor.getColumnIndexOrThrow( ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_SUBFOLDER_BY_DATE)) == 1; + long uploadDelayTimeMs = cursor.getLong(cursor.getColumnIndexOrThrow( + ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS)); String accountName = cursor.getString(cursor.getColumnIndexOrThrow( ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ACCOUNT)); int uploadAction = cursor.getInt(cursor.getColumnIndexOrThrow( @@ -400,6 +402,7 @@ private SyncedFolder createSyncedFolderFromCursor(Cursor cursor) { accountName, uploadAction, nameCollisionPolicy, + uploadDelayTimeMs, enabled, enabledTimestampMs, type, @@ -428,6 +431,7 @@ private ContentValues createContentValuesFromSyncedFolder(SyncedFolder syncedFol cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ENABLED, syncedFolder.isEnabled()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ENABLED_TIMESTAMP_MS, syncedFolder.getEnabledTimestampMs()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_SUBFOLDER_BY_DATE, syncedFolder.isSubfolderByDate()); + cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS, syncedFolder.getUploadDelayTimeMs()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_ACCOUNT, syncedFolder.getAccount()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_UPLOAD_ACTION, syncedFolder.getUploadAction()); cv.put(ProviderMeta.ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY, diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index 36ba052e262b..00e06122d27c 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -309,6 +309,7 @@ static public class ProviderTableMeta implements BaseColumns { public static final String SYNCED_FOLDER_ACCOUNT = "account"; public static final String SYNCED_FOLDER_UPLOAD_ACTION = "upload_option"; public static final String SYNCED_FOLDER_NAME_COLLISION_POLICY = "name_collision_policy"; + public static final String SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS = "upload_delay_time_ms"; public static final String SYNCED_FOLDER_HIDDEN = "hidden"; public static final String SYNCED_FOLDER_SUBFOLDER_RULE = "sub_folder_rule"; public static final String SYNCED_FOLDER_EXCLUDE_HIDDEN = "exclude_hidden"; diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java new file mode 100644 index 000000000000..76aabdd16aa6 --- /dev/null +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -0,0 +1,159 @@ +package com.owncloud.android.ui.dialog; + +import android.app.Activity; +import android.app.Dialog; +import android.os.Bundle; +import android.view.View; +import android.widget.NumberPicker; +import android.widget.TextView; + +import com.google.android.material.dialog.MaterialAlertDialogBuilder; +import com.nextcloud.client.di.Injectable; +import com.owncloud.android.R; +import com.owncloud.android.databinding.DurationPickerBinding; +import com.owncloud.android.utils.TimeUtils; +import com.owncloud.android.utils.theme.ViewThemeUtils; + +import java.util.concurrent.TimeUnit; + +import javax.inject.Inject; + +import androidx.appcompat.app.AlertDialog; +import androidx.fragment.app.DialogFragment; + +import static com.owncloud.android.utils.TimeUtils.getDurationParts; + +public class DurationPickerDialogFragment extends DialogFragment implements Injectable { + + public static final String DURATION = "DURATION"; + public static final String DIALOG_TITLE = "TITLE"; + public static final String HINT_MESSAGE = "HINT"; + + @Inject ViewThemeUtils viewThemeUtils; + + private NumberPicker daysPicker; + private NumberPicker hoursPicker; + private NumberPicker minutesPicker; + + private TextView hint; + + private DurationPickerBinding binding; + + public Listener resultListener; + + public static DurationPickerDialogFragment newInstance(long duration, String title, String hintMessage) { + Bundle args = new Bundle(); + args.putLong(DURATION, duration); + args.putString(HINT_MESSAGE, hintMessage); + args.putString(DIALOG_TITLE, title); + + DurationPickerDialogFragment dialogFragment = new DurationPickerDialogFragment(); + dialogFragment.setArguments(args); + dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog); + + return dialogFragment; + } + + public void setListener(Listener listener) { + resultListener = listener; + } + + @Override + public void onStart() { + super.onStart(); + + AlertDialog alertDialog = (AlertDialog) getDialog(); + + viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), + alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)); + } + + @Override + public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putLong(DURATION, getDuration()); + } + + @Override + public Dialog onCreateDialog(Bundle savedState) { + binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); + + daysPicker = binding.daysPicker; + hoursPicker = binding.hoursPicker; + minutesPicker = binding.minutesPicker; + + hint = binding.pickerHint; + + daysPicker.setMaxValue(30); + hoursPicker.setMaxValue(24); + minutesPicker.setMaxValue(59); + + binding.clear.setOnClickListener(view -> { + daysPicker.setValue(0); + hoursPicker.setValue(0); + minutesPicker.setValue(0); + }); + + long duration; + String hintMessage; + String dialogTitle; + if (savedState != null) { + duration = savedState.getLong(DURATION); + hintMessage = savedState.getString(HINT_MESSAGE); + dialogTitle = savedState.getString(DIALOG_TITLE); + } else { + duration = requireArguments().getLong(DURATION); + hintMessage = requireArguments().getString(HINT_MESSAGE); + dialogTitle = requireArguments().getString(DIALOG_TITLE); + } + + setDuration(duration); + setHintMessage(hintMessage); + + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); + builder.setTitle(dialogTitle); + builder.setView(binding.getRoot()); + builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { + if (resultListener != null) { + resultListener.onDurationPickerResult(Activity.RESULT_OK, getDuration()); + } + }); + builder.setNegativeButton(R.string.common_cancel, (dialog, whichButton) -> { + if (resultListener != null) { + resultListener.onDurationPickerResult(Activity.RESULT_CANCELED, 0); + } + }); + + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.getRoot().getContext(), builder); + + return builder.create(); + } + + @Override + public void onDestroyView() { + super.onDestroyView(); + binding = null; + } + + private long getDuration() { + return TimeUnit.DAYS.toMillis(daysPicker.getValue()) + + TimeUnit.HOURS.toMillis(hoursPicker.getValue()) + + TimeUnit.MINUTES.toMillis(minutesPicker.getValue()); + } + + private void setDuration(long duration) { + TimeUtils.DurationParts durationParts = getDurationParts(duration); + daysPicker.setValue(durationParts.getDays()); + hoursPicker.setValue(durationParts.getHours()); + minutesPicker.setValue(durationParts.getMinutes()); + } + + private void setHintMessage(String hintMessage) { + hint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); + hint.setText(hintMessage); + } + + interface Listener { + void onDurationPickerResult(int resultCode, long duration); + } +} diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java new file mode 100644 index 000000000000..cdb9c4596af1 --- /dev/null +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -0,0 +1,42 @@ +package com.owncloud.android.utils; + +import java.util.concurrent.TimeUnit; + +public class TimeUtils { + + private TimeUtils() { + // utility class -> private constructor + } + + public static DurationParts getDurationParts(long duration) { + int days = (int) TimeUnit.MILLISECONDS.toDays(duration); + int hours = (int) TimeUnit.MILLISECONDS.toHours(duration) - (days * 24); + int minutes = (int) (TimeUnit.MILLISECONDS.toMinutes(duration) - (TimeUnit.MILLISECONDS.toHours(duration)* 60)); + return new DurationParts(days, hours, minutes); + } + + public static class DurationParts { + int days; + int hours; + int minutes; + + public DurationParts(int days, int hours, int minutes) { + this.days = days; + this.hours = hours; + this.minutes = minutes; + } + + public int getDays() { + return days; + } + + public int getHours() { + return hours; + } + + public int getMinutes() { + return minutes; + } + } + +} diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml new file mode 100644 index 000000000000..f778e7dab0da --- /dev/null +++ b/app/src/main/res/layout/duration_picker.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/synced_folders_settings_layout.xml b/app/src/main/res/layout/synced_folders_settings_layout.xml index 378629b73c6e..17dcc76ed052 100644 --- a/app/src/main/res/layout/synced_folders_settings_layout.xml +++ b/app/src/main/res/layout/synced_folders_settings_layout.xml @@ -431,6 +431,36 @@ android:text="@string/placeholder_filename" android:textColor="?android:attr/textColorSecondary" /> + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4d2893ca24d2..1aba90e106da 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -217,6 +217,10 @@ Share Skip Copy + Clear + d + h + m About Remove local account Remove account from device and delete all local files @@ -611,6 +615,12 @@ What to do if the file already exists? What to do if the file already exists? + Delay file upload + Delay file upload + Due to the sync interval, the delay may increase by an additional 15 minutes. + At least %1$s + No delay + Ask me every time Rename new version Overwrite remote version diff --git a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java index bd3d18b62633..7f00bcc7deee 100644 --- a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java +++ b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java @@ -157,6 +157,7 @@ private SyncedFolderDisplayItem create(String folderName, boolean enabled) { "test@nextcloud.com", FileUploadWorker.LOCAL_BEHAVIOUR_MOVE, NameCollisionPolicy.ASK_USER.serialize(), + 30000, enabled, System.currentTimeMillis(), new ArrayList(), diff --git a/fastlane/metadata/android/en-US/changelogs/30230051.txt b/fastlane/metadata/android/en-US/changelogs/30230051.txt new file mode 100644 index 000000000000..859e1656c1f1 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230051.txt @@ -0,0 +1,8 @@ +## 3.23.0 RC1 (November 17, 2022) + +- File actions menu redesign +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230052.txt b/fastlane/metadata/android/en-US/changelogs/30230052.txt new file mode 100644 index 000000000000..c26de0f8fbd0 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230052.txt @@ -0,0 +1,9 @@ +## 3.23.0 RC2 (November 24, 2022) + +- File actions menu redesign +- Allow adding shortcuts to Home screen (@newhinton) +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230090.txt b/fastlane/metadata/android/en-US/changelogs/30230090.txt new file mode 100644 index 000000000000..58adc269b94d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/30230090.txt @@ -0,0 +1,9 @@ +## 3.23.0 (December 1, 2022) + +- File actions menu redesign +- Allow adding shortcuts to Home screen (@newhinton) +- Many bugfixes and performance optimizations + +Minimum: NC 16 Server, Android 6.0 Marshmallow + +For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 5d5f8b09d814..feceb3df2c67 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -11,7 +11,7 @@ BUILD_NUMBER=$4 PR_NUMBER=$5 -stableBranch="master" +stableBranch="stable-3.23" repository="android" ruby scripts/analysis/lint-up.rb diff --git a/scripts/analysis/getBranchName.sh b/scripts/analysis/getBranchName.sh index cdc4a236711e..f8cbccdcbfa0 100755 --- a/scripts/analysis/getBranchName.sh +++ b/scripts/analysis/getBranchName.sh @@ -7,7 +7,7 @@ # $1: username, $2: password/token, $3: pull request number if [ -z $3 ] ; then - echo "master"; + echo "stable-3.23"; else - curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4 + curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"stable-3.23"' | cut -d"\"" -f4 fi From 0ddfb8121de1794b439061208b2aba419b9f43e4 Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:43:40 +0100 Subject: [PATCH 39/72] Delayed synchronization Signed-off-by: batpio --- .../65.json | 1118 +++++++++++++++++ 1 file changed, 1118 insertions(+) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json new file mode 100644 index 000000000000..cba9c61eda96 --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/65.json @@ -0,0 +1,1118 @@ +{ + "formatVersion": 1, + "database": { + "version": 65, + "identityHash": "1aa68e80a3cb0006ef54981abad692a9", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` INTEGER, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `type` INTEGER, `hidden` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "columnNames": [ + "_id" + ], + "autoGenerate": true + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1aa68e80a3cb0006ef54981abad692a9')" + ] + } +} \ No newline at end of file From 4d34599a13d951ca6659106ab40275f5b81c0106 Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 22:51:28 +0100 Subject: [PATCH 40/72] master merge fixes Signed-off-by: batpio --- app/build.gradle | 2 +- fastlane/metadata/android/en-US/changelogs/30230051.txt | 8 -------- fastlane/metadata/android/en-US/changelogs/30230052.txt | 9 --------- fastlane/metadata/android/en-US/changelogs/30230090.txt | 9 --------- scripts/analysis/analysis-wrapper.sh | 2 +- scripts/analysis/getBranchName.sh | 4 ++-- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230051.txt delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230052.txt delete mode 100644 fastlane/metadata/android/en-US/changelogs/30230090.txt diff --git a/app/build.gradle b/app/build.gradle index 8994a8fd8ad7..2b86b1c5334c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -80,7 +80,7 @@ configurations.configureEach { def versionMajor = 3 def versionMinor = 30 def versionPatch = 0 -def versionBuild = 90 // 0-50=Alpha / 51-98=RC / 90-99=stable +def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable def ndkEnv = new HashMap() diff --git a/fastlane/metadata/android/en-US/changelogs/30230051.txt b/fastlane/metadata/android/en-US/changelogs/30230051.txt deleted file mode 100644 index 859e1656c1f1..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230051.txt +++ /dev/null @@ -1,8 +0,0 @@ -## 3.23.0 RC1 (November 17, 2022) - -- File actions menu redesign -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230052.txt b/fastlane/metadata/android/en-US/changelogs/30230052.txt deleted file mode 100644 index c26de0f8fbd0..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230052.txt +++ /dev/null @@ -1,9 +0,0 @@ -## 3.23.0 RC2 (November 24, 2022) - -- File actions menu redesign -- Allow adding shortcuts to Home screen (@newhinton) -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/fastlane/metadata/android/en-US/changelogs/30230090.txt b/fastlane/metadata/android/en-US/changelogs/30230090.txt deleted file mode 100644 index 58adc269b94d..000000000000 --- a/fastlane/metadata/android/en-US/changelogs/30230090.txt +++ /dev/null @@ -1,9 +0,0 @@ -## 3.23.0 (December 1, 2022) - -- File actions menu redesign -- Allow adding shortcuts to Home screen (@newhinton) -- Many bugfixes and performance optimizations - -Minimum: NC 16 Server, Android 6.0 Marshmallow - -For a full list, please see https://github.com/nextcloud/android/milestone/74 diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index feceb3df2c67..5d5f8b09d814 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -11,7 +11,7 @@ BUILD_NUMBER=$4 PR_NUMBER=$5 -stableBranch="stable-3.23" +stableBranch="master" repository="android" ruby scripts/analysis/lint-up.rb diff --git a/scripts/analysis/getBranchName.sh b/scripts/analysis/getBranchName.sh index f8cbccdcbfa0..cdc4a236711e 100755 --- a/scripts/analysis/getBranchName.sh +++ b/scripts/analysis/getBranchName.sh @@ -7,7 +7,7 @@ # $1: username, $2: password/token, $3: pull request number if [ -z $3 ] ; then - echo "stable-3.23"; + echo "master"; else - curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"stable-3.23"' | cut -d"\"" -f4 + curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4 fi From 31f12f729f1779c2bd40c41182ca7a507142b61a Mon Sep 17 00:00:00 2001 From: batpio Date: Tue, 20 Dec 2022 23:00:33 +0100 Subject: [PATCH 41/72] Licences Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragment.java | 21 +++++++++++++++++++ .../com/owncloud/android/utils/TimeUtils.java | 21 +++++++++++++++++++ app/src/main/res/layout/duration_picker.xml | 20 ++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index 76aabdd16aa6..b10aaaea0a2b 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -1,3 +1,24 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package com.owncloud.android.ui.dialog; import android.app.Activity; diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java index cdb9c4596af1..bc54a1dcdb6b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -1,3 +1,24 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package com.owncloud.android.utils; import java.util.concurrent.TimeUnit; diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index f778e7dab0da..c2340e670384 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -1,4 +1,24 @@ + Date: Tue, 20 Dec 2022 23:53:52 +0100 Subject: [PATCH 42/72] Fixes Signed-off-by: batpio --- .../DurationPickerDialogFragmentIT.java | 40 +++++++++++ .../owncloud/android/utils/TimeUtilsTest.java | 32 +++++++++ .../dialog/DurationPickerDialogFragment.java | 69 ++++++++----------- .../com/owncloud/android/utils/TimeUtils.java | 14 ++-- .../activity/SyncedFoldersActivityTest.java | 2 +- 5 files changed, 110 insertions(+), 47 deletions(-) create mode 100644 app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java create mode 100644 app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java new file mode 100644 index 000000000000..749a80dbf76d --- /dev/null +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -0,0 +1,40 @@ +package com.owncloud.android.ui.dialog; + +import com.nextcloud.client.TestActivity; +import com.owncloud.android.AbstractIT; +import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.ui.activity.FileDisplayActivity; +import com.owncloud.android.utils.ScreenshotTest; + +import org.junit.Rule; +import org.junit.Test; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; +import androidx.test.espresso.intent.rule.IntentsTestRule; + +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; + +public class DurationPickerDialogFragmentIT extends AbstractIT { + @Rule public IntentsTestRule testActivityRule = new IntentsTestRule<>(TestActivity.class, + true, false); + + @Test + public void showNotEnoughSpaceDialogForFolder() { + TestActivity test = testActivityRule.launchActivity(null); + FragmentManager fm = testActivityRule.getActivity().getSupportFragmentManager(); + FragmentTransaction ft = fm.beginTransaction(); + ft.addToBackStack(null); + + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), "Test", ""); + dialog.show(ft, "1"); + + getInstrumentation().waitForIdleSync(); + + screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView()); + } + +} diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java new file mode 100644 index 000000000000..cd1f58a51997 --- /dev/null +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java @@ -0,0 +1,32 @@ +package com.owncloud.android.utils; + + +import org.junit.Test; +import org.junit.runner.RunWith; + +import java.util.concurrent.TimeUnit; + +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import static java.util.concurrent.TimeUnit.DAYS; +import static java.util.concurrent.TimeUnit.HOURS; +import static java.util.concurrent.TimeUnit.MINUTES; +import static junit.framework.TestCase.assertEquals; + +@RunWith(AndroidJUnit4.class) +public class TimeUtilsTest { + + @Test + void shouldGetDurationParts() { + int days = 5; + int hours = 10; + int minutes = 30; + TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(DAYS.toMillis(days) + + HOURS.toMillis(hours) + + MINUTES.toMillis(minutes)); + + assertEquals(days, durationParts.getDays()); + assertEquals(hours, durationParts.getHours()); + assertEquals(minutes, durationParts.getMinutes()); + } +} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index b10aaaea0a2b..e8ca7642fa40 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -45,19 +45,16 @@ import static com.owncloud.android.utils.TimeUtils.getDurationParts; public class DurationPickerDialogFragment extends DialogFragment implements Injectable { + private static final int MAX_DAYS_VALUE = 30; + private static final int MAX_HOURS_VALUE = 24; + private static final int MAX_MINUTES_VALUE = 59; - public static final String DURATION = "DURATION"; - public static final String DIALOG_TITLE = "TITLE"; - public static final String HINT_MESSAGE = "HINT"; + private static final String DURATION = "DURATION"; + private static final String DIALOG_TITLE = "TITLE"; + private static final String HINT_MESSAGE = "HINT"; @Inject ViewThemeUtils viewThemeUtils; - private NumberPicker daysPicker; - private NumberPicker hoursPicker; - private NumberPicker minutesPicker; - - private TextView hint; - private DurationPickerBinding binding; public Listener resultListener; @@ -99,39 +96,27 @@ public void onSaveInstanceState(Bundle outState) { public Dialog onCreateDialog(Bundle savedState) { binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); - daysPicker = binding.daysPicker; - hoursPicker = binding.hoursPicker; - minutesPicker = binding.minutesPicker; - - hint = binding.pickerHint; - - daysPicker.setMaxValue(30); - hoursPicker.setMaxValue(24); - minutesPicker.setMaxValue(59); - - binding.clear.setOnClickListener(view -> { - daysPicker.setValue(0); - hoursPicker.setValue(0); - minutesPicker.setValue(0); - }); + setupLimits(); long duration; - String hintMessage; - String dialogTitle; if (savedState != null) { duration = savedState.getLong(DURATION); - hintMessage = savedState.getString(HINT_MESSAGE); - dialogTitle = savedState.getString(DIALOG_TITLE); } else { duration = requireArguments().getLong(DURATION); - hintMessage = requireArguments().getString(HINT_MESSAGE); - dialogTitle = requireArguments().getString(DIALOG_TITLE); } - setDuration(duration); + + String hintMessage = requireArguments().getString(HINT_MESSAGE); setHintMessage(hintMessage); + binding.clear.setOnClickListener(view -> { + binding.daysPicker.setValue(0); + binding.hoursPicker.setValue(0); + binding.minutesPicker.setValue(0); + }); + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); + String dialogTitle = requireArguments().getString(DIALOG_TITLE); builder.setTitle(dialogTitle); builder.setView(binding.getRoot()); builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { @@ -156,22 +141,28 @@ public void onDestroyView() { binding = null; } + private void setupLimits() { + binding.daysPicker.setMaxValue(MAX_DAYS_VALUE); + binding.hoursPicker.setMaxValue(MAX_HOURS_VALUE); + binding.minutesPicker.setMaxValue(MAX_MINUTES_VALUE); + } + private long getDuration() { - return TimeUnit.DAYS.toMillis(daysPicker.getValue()) + - TimeUnit.HOURS.toMillis(hoursPicker.getValue()) + - TimeUnit.MINUTES.toMillis(minutesPicker.getValue()); + return TimeUnit.DAYS.toMillis(binding.daysPicker.getValue()) + + TimeUnit.HOURS.toMillis(binding.hoursPicker.getValue()) + + TimeUnit.MINUTES.toMillis(binding.minutesPicker.getValue()); } private void setDuration(long duration) { TimeUtils.DurationParts durationParts = getDurationParts(duration); - daysPicker.setValue(durationParts.getDays()); - hoursPicker.setValue(durationParts.getHours()); - minutesPicker.setValue(durationParts.getMinutes()); + binding.daysPicker.setValue(durationParts.getDays()); + binding.hoursPicker.setValue(durationParts.getHours()); + binding.minutesPicker.setValue(durationParts.getMinutes()); } private void setHintMessage(String hintMessage) { - hint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); - hint.setText(hintMessage); + binding.pickerHint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); + binding.pickerHint.setText(hintMessage); } interface Listener { diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java index bc54a1dcdb6b..f03beebffb1d 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.java @@ -21,7 +21,7 @@ package com.owncloud.android.utils; -import java.util.concurrent.TimeUnit; +import static java.util.concurrent.TimeUnit.MILLISECONDS; public class TimeUtils { @@ -30,16 +30,16 @@ private TimeUtils() { } public static DurationParts getDurationParts(long duration) { - int days = (int) TimeUnit.MILLISECONDS.toDays(duration); - int hours = (int) TimeUnit.MILLISECONDS.toHours(duration) - (days * 24); - int minutes = (int) (TimeUnit.MILLISECONDS.toMinutes(duration) - (TimeUnit.MILLISECONDS.toHours(duration)* 60)); + int days = (int) MILLISECONDS.toDays(duration); + int hours = (int) MILLISECONDS.toHours(duration) - (days * 24); + int minutes = (int) (MILLISECONDS.toMinutes(duration) - (MILLISECONDS.toHours(duration) * 60)); return new DurationParts(days, hours, minutes); } public static class DurationParts { - int days; - int hours; - int minutes; + private int days; + private int hours; + private int minutes; public DurationParts(int days, int hours, int minutes) { this.days = days; diff --git a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java index 7f00bcc7deee..98abea05fb60 100644 --- a/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java +++ b/app/src/test/java/com/owncloud/android/ui/activity/SyncedFoldersActivityTest.java @@ -157,7 +157,7 @@ private SyncedFolderDisplayItem create(String folderName, boolean enabled) { "test@nextcloud.com", FileUploadWorker.LOCAL_BEHAVIOUR_MOVE, NameCollisionPolicy.ASK_USER.serialize(), - 30000, + 0, enabled, System.currentTimeMillis(), new ArrayList(), From d0c20357ac4cd2785779c61691d12df2fb5ae793 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 21 Dec 2022 00:15:51 +0100 Subject: [PATCH 43/72] Fixes Signed-off-by: batpio --- .../ui/dialog/DurationPickerDialogFragmentIT.java | 9 +++++---- .../java/com/owncloud/android/utils/TimeUtilsTest.java | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java index 749a80dbf76d..65d5516eca3b 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -23,14 +23,15 @@ public class DurationPickerDialogFragmentIT extends AbstractIT { true, false); @Test - public void showNotEnoughSpaceDialogForFolder() { + public void showSyncDelayDurationDialog() { TestActivity test = testActivityRule.launchActivity(null); - FragmentManager fm = testActivityRule.getActivity().getSupportFragmentManager(); + FragmentManager fm = test.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.addToBackStack(null); - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), "Test", ""); - dialog.show(ft, "1"); + DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), + "Dialog title", "Hint message"); + dialog.show(ft, "DURATION_DIALOG"); getInstrumentation().waitForIdleSync(); diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java index cd1f58a51997..edfd58c12fc4 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java @@ -17,13 +17,13 @@ public class TimeUtilsTest { @Test - void shouldGetDurationParts() { + public void shouldGetDurationParts() { int days = 5; int hours = 10; int minutes = 30; - TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts(DAYS.toMillis(days) + - HOURS.toMillis(hours) + - MINUTES.toMillis(minutes)); + + TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts( + DAYS.toMillis(days) + HOURS.toMillis(hours) + MINUTES.toMillis(minutes)); assertEquals(days, durationParts.getDays()); assertEquals(hours, durationParts.getHours()); From 73bd88ce21d2ee4b662f1c127467a63eef3df918 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 11 Jan 2023 20:43:40 +0100 Subject: [PATCH 44/72] Tuning Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragment.java | 2 -- app/src/main/res/layout/duration_picker.xml | 21 +++++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java index e8ca7642fa40..df33dfca1345 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java @@ -25,8 +25,6 @@ import android.app.Dialog; import android.os.Bundle; import android.view.View; -import android.widget.NumberPicker; -import android.widget.TextView; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.nextcloud.client.di.Injectable; diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index c2340e670384..4860ec6d68cf 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -91,15 +91,18 @@ app:layout_constraintStart_toStartOf="@+id/minutes_picker" app:layout_constraintVertical_bias="0.5" /> - + - + \ No newline at end of file From 945b61510d3e452ca1aa0d26c7dd291fe4ff9564 Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 11 Jan 2023 20:46:09 +0100 Subject: [PATCH 45/72] Tuning Signed-off-by: batpio --- app/src/main/res/values/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1aba90e106da..0565dd92a155 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -217,7 +217,6 @@ Share Skip Copy - Clear d h m From d7f3d07e156338bae28096ff8e8512ca5672d973 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 20:33:54 +0100 Subject: [PATCH 46/72] Merge fixes Signed-off-by: batpio --- .../android/ui/dialog/DurationPickerDialogFragmentIT.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java index 65d5516eca3b..2ca144b356cf 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java @@ -1,10 +1,7 @@ package com.owncloud.android.ui.dialog; -import com.nextcloud.client.TestActivity; +import com.nextcloud.test.TestActivity; import com.owncloud.android.AbstractIT; -import com.owncloud.android.datamodel.OCFile; -import com.owncloud.android.ui.activity.FileDisplayActivity; -import com.owncloud.android.utils.ScreenshotTest; import org.junit.Rule; import org.junit.Test; From 8d15e6ab17cb791dfa66d5d5f90f6d9e52418fb7 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 21:56:01 +0100 Subject: [PATCH 47/72] Rename .java to .kt Signed-off-by: batpio --- ...kerDialogFragmentIT.java => DurationPickerDialogFragmentIT.kt} | 0 .../android/utils/{TimeUtilsTest.java => TimeUtilsTest.kt} | 0 ...nPickerDialogFragment.java => DurationPickerDialogFragment.kt} | 0 .../com/owncloud/android/utils/{TimeUtils.java => TimeUtils.kt} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename app/src/androidTest/java/com/owncloud/android/ui/dialog/{DurationPickerDialogFragmentIT.java => DurationPickerDialogFragmentIT.kt} (100%) rename app/src/androidTest/java/com/owncloud/android/utils/{TimeUtilsTest.java => TimeUtilsTest.kt} (100%) rename app/src/main/java/com/owncloud/android/ui/dialog/{DurationPickerDialogFragment.java => DurationPickerDialogFragment.kt} (100%) rename app/src/main/java/com/owncloud/android/utils/{TimeUtils.java => TimeUtils.kt} (100%) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt similarity index 100% rename from app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.java rename to app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt similarity index 100% rename from app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.java rename to app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt similarity index 100% rename from app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.java rename to app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.java b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt similarity index 100% rename from app/src/main/java/com/owncloud/android/utils/TimeUtils.java rename to app/src/main/java/com/owncloud/android/utils/TimeUtils.kt From b88c97408bf063c00d211ad1f3f02aec0d036a57 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 21:56:02 +0100 Subject: [PATCH 48/72] New files converted to Kotlin Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 52 ++-- .../owncloud/android/utils/TimeUtilsTest.kt | 51 ++-- .../ui/dialog/DurationPickerDialogFragment.kt | 224 ++++++++---------- .../com/owncloud/android/utils/TimeUtils.kt | 49 +--- 4 files changed, 159 insertions(+), 217 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 2ca144b356cf..a78f72688694 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -1,38 +1,32 @@ -package com.owncloud.android.ui.dialog; +package com.owncloud.android.ui.dialog -import com.nextcloud.test.TestActivity; -import com.owncloud.android.AbstractIT; +import androidx.test.espresso.intent.rule.IntentsTestRule +import com.nextcloud.test.TestActivity +import com.owncloud.android.AbstractIT +import org.junit.Rule +import org.junit.Test +import java.util.concurrent.TimeUnit -import org.junit.Rule; -import org.junit.Test; +class DurationPickerDialogFragmentIT : AbstractIT() { -import java.util.Objects; -import java.util.concurrent.TimeUnit; - -import androidx.fragment.app.FragmentManager; -import androidx.fragment.app.FragmentTransaction; -import androidx.test.espresso.intent.rule.IntentsTestRule; - -import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; - -public class DurationPickerDialogFragmentIT extends AbstractIT { - @Rule public IntentsTestRule testActivityRule = new IntentsTestRule<>(TestActivity.class, - true, false); + @get:Rule + val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false) @Test - public void showSyncDelayDurationDialog() { - TestActivity test = testActivityRule.launchActivity(null); - FragmentManager fm = test.getSupportFragmentManager(); - FragmentTransaction ft = fm.beginTransaction(); - ft.addToBackStack(null); + fun showSyncDelayDurationDialog() { + val activity = testActivityRule.launchActivity(null) - DurationPickerDialogFragment dialog = DurationPickerDialogFragment.newInstance(TimeUnit.HOURS.toMillis(5), - "Dialog title", "Hint message"); - dialog.show(ft, "DURATION_DIALOG"); + val fm = activity.supportFragmentManager + val ft = fm.beginTransaction() + ft.addToBackStack(null) - getInstrumentation().waitForIdleSync(); + val dialog = DurationPickerDialogFragment.newInstance( + TimeUnit.HOURS.toMillis(5), + "Dialog title", "Hint message" + ) + dialog.show(ft, "DURATION_DIALOG") - screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView()); + waitForIdleSync() + screenshot(dialog.requireDialog().window!!.decorView) } - -} +} \ No newline at end of file diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index edfd58c12fc4..fb277571f0ec 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -1,32 +1,27 @@ -package com.owncloud.android.utils; +package com.owncloud.android.utils +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.owncloud.android.utils.TimeUtils.getDurationParts +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import java.util.concurrent.TimeUnit -import org.junit.Test; -import org.junit.runner.RunWith; - -import java.util.concurrent.TimeUnit; - -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import static java.util.concurrent.TimeUnit.DAYS; -import static java.util.concurrent.TimeUnit.HOURS; -import static java.util.concurrent.TimeUnit.MINUTES; -import static junit.framework.TestCase.assertEquals; - -@RunWith(AndroidJUnit4.class) -public class TimeUtilsTest { - +@RunWith(AndroidJUnit4::class) +class TimeUtilsTest { @Test - public void shouldGetDurationParts() { - int days = 5; - int hours = 10; - int minutes = 30; - - TimeUtils.DurationParts durationParts = TimeUtils.getDurationParts( - DAYS.toMillis(days) + HOURS.toMillis(hours) + MINUTES.toMillis(minutes)); - - assertEquals(days, durationParts.getDays()); - assertEquals(hours, durationParts.getHours()); - assertEquals(minutes, durationParts.getMinutes()); + fun shouldGetDurationParts() { + val days = 5 + val hours = 10 + val minutes = 30 + val duration = TimeUnit.DAYS.toMillis(days.toLong()) + + TimeUnit.HOURS.toMillis(hours.toLong()) + + TimeUnit.MINUTES.toMillis(minutes.toLong()) + + val durationParts = getDurationParts(duration) + + assertEquals(days, durationParts.days) + assertEquals(hours, durationParts.hours) + assertEquals(minutes, durationParts.minutes) } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index df33dfca1345..f890a6f07163 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -18,152 +18,132 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +package com.owncloud.android.ui.dialog + +import android.app.Activity +import android.app.Dialog +import android.content.DialogInterface +import android.os.Bundle +import android.view.View +import androidx.appcompat.app.AlertDialog +import androidx.fragment.app.DialogFragment +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.nextcloud.client.di.Injectable +import com.owncloud.android.R +import com.owncloud.android.databinding.DurationPickerBinding +import com.owncloud.android.utils.TimeUtils +import com.owncloud.android.utils.theme.ViewThemeUtils +import java.util.concurrent.TimeUnit +import javax.inject.Inject + +class DurationPickerDialogFragment : DialogFragment(), Injectable { + + private var _binding: DurationPickerBinding? = null + private val binding get() = _binding!! + private var resultListener: Listener? = null + + private var duration: Long + private get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + + TimeUnit.MINUTES.toMillis(binding.minutesPicker.value.toLong()) + private set(duration) { + val durationParts = TimeUtils.getDurationParts(duration) + binding.daysPicker.value = durationParts.days + binding.hoursPicker.value = durationParts.hours + binding.minutesPicker.value = durationParts.minutes + } -package com.owncloud.android.ui.dialog; - -import android.app.Activity; -import android.app.Dialog; -import android.os.Bundle; -import android.view.View; - -import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.nextcloud.client.di.Injectable; -import com.owncloud.android.R; -import com.owncloud.android.databinding.DurationPickerBinding; -import com.owncloud.android.utils.TimeUtils; -import com.owncloud.android.utils.theme.ViewThemeUtils; - -import java.util.concurrent.TimeUnit; - -import javax.inject.Inject; - -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.DialogFragment; - -import static com.owncloud.android.utils.TimeUtils.getDurationParts; - -public class DurationPickerDialogFragment extends DialogFragment implements Injectable { - private static final int MAX_DAYS_VALUE = 30; - private static final int MAX_HOURS_VALUE = 24; - private static final int MAX_MINUTES_VALUE = 59; - - private static final String DURATION = "DURATION"; - private static final String DIALOG_TITLE = "TITLE"; - private static final String HINT_MESSAGE = "HINT"; - - @Inject ViewThemeUtils viewThemeUtils; - - private DurationPickerBinding binding; - - public Listener resultListener; - - public static DurationPickerDialogFragment newInstance(long duration, String title, String hintMessage) { - Bundle args = new Bundle(); - args.putLong(DURATION, duration); - args.putString(HINT_MESSAGE, hintMessage); - args.putString(DIALOG_TITLE, title); - - DurationPickerDialogFragment dialogFragment = new DurationPickerDialogFragment(); - dialogFragment.setArguments(args); - dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog); + @Inject + lateinit var viewThemeUtils: ViewThemeUtils - return dialogFragment; + fun setListener(listener: Listener?) { + resultListener = listener } - public void setListener(Listener listener) { - resultListener = listener; + override fun onStart() { + super.onStart() + val alertDialog = dialog as AlertDialog + viewThemeUtils.platform.colorTextButtons( + alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), + alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE) + ) } - @Override - public void onStart() { - super.onStart(); - - AlertDialog alertDialog = (AlertDialog) getDialog(); - - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)); + override fun onSaveInstanceState(outState: Bundle) { + super.onSaveInstanceState(outState) + outState.putLong(DURATION, duration) } - @Override - public void onSaveInstanceState(Bundle outState) { - super.onSaveInstanceState(outState); - outState.putLong(DURATION, getDuration()); - } + override fun onCreateDialog(savedState: Bundle?): Dialog { + _binding = DurationPickerBinding.inflate(requireActivity().layoutInflater, null, false) + + setupLimits() - @Override - public Dialog onCreateDialog(Bundle savedState) { - binding = DurationPickerBinding.inflate(requireActivity().getLayoutInflater(), null, false); + this.duration = savedState?.getLong(DURATION) ?: requireArguments().getLong(DURATION) - setupLimits(); + setHintMessage(requireArguments().getString(HINT_MESSAGE)) - long duration; - if (savedState != null) { - duration = savedState.getLong(DURATION); - } else { - duration = requireArguments().getLong(DURATION); + binding.clear.setOnClickListener { view: View? -> + binding.daysPicker.value = 0 + binding.hoursPicker.value = 0 + binding.minutesPicker.value = 0 } - setDuration(duration); - - String hintMessage = requireArguments().getString(HINT_MESSAGE); - setHintMessage(hintMessage); - - binding.clear.setOnClickListener(view -> { - binding.daysPicker.setValue(0); - binding.hoursPicker.setValue(0); - binding.minutesPicker.setValue(0); - }); - - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.getRoot().getContext()); - String dialogTitle = requireArguments().getString(DIALOG_TITLE); - builder.setTitle(dialogTitle); - builder.setView(binding.getRoot()); - builder.setPositiveButton(R.string.common_save, (dialog, whichButton) -> { + + val builder = MaterialAlertDialogBuilder(binding.root.context) + val dialogTitle = requireArguments().getString(DIALOG_TITLE) + builder.setTitle(dialogTitle) + builder.setView(binding.root) + builder.setPositiveButton(R.string.common_save) { dialog: DialogInterface?, whichButton: Int -> if (resultListener != null) { - resultListener.onDurationPickerResult(Activity.RESULT_OK, getDuration()); + resultListener!!.onDurationPickerResult(Activity.RESULT_OK, this.duration) } - }); - builder.setNegativeButton(R.string.common_cancel, (dialog, whichButton) -> { + } + builder.setNegativeButton(R.string.common_cancel) { dialog: DialogInterface?, whichButton: Int -> if (resultListener != null) { - resultListener.onDurationPickerResult(Activity.RESULT_CANCELED, 0); + resultListener!!.onDurationPickerResult(Activity.RESULT_CANCELED, 0) } - }); - - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.getRoot().getContext(), builder); - - return builder.create(); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - binding = null; + } + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding!!.root.context, builder) + return builder.create() } - private void setupLimits() { - binding.daysPicker.setMaxValue(MAX_DAYS_VALUE); - binding.hoursPicker.setMaxValue(MAX_HOURS_VALUE); - binding.minutesPicker.setMaxValue(MAX_MINUTES_VALUE); + override fun onDestroyView() { + super.onDestroyView() + _binding = null } - private long getDuration() { - return TimeUnit.DAYS.toMillis(binding.daysPicker.getValue()) + - TimeUnit.HOURS.toMillis(binding.hoursPicker.getValue()) + - TimeUnit.MINUTES.toMillis(binding.minutesPicker.getValue()); + private fun setupLimits() { + binding.daysPicker.maxValue = MAX_DAYS_VALUE + binding.hoursPicker.maxValue = MAX_HOURS_VALUE + binding.minutesPicker.maxValue = MAX_MINUTES_VALUE } - private void setDuration(long duration) { - TimeUtils.DurationParts durationParts = getDurationParts(duration); - binding.daysPicker.setValue(durationParts.getDays()); - binding.hoursPicker.setValue(durationParts.getHours()); - binding.minutesPicker.setValue(durationParts.getMinutes()); + private fun setHintMessage(hintMessage: String?) { + binding.pickerHint.visibility = if (hintMessage != null) View.VISIBLE else View.GONE + binding.pickerHint.text = hintMessage } - private void setHintMessage(String hintMessage) { - binding.pickerHint.setVisibility(hintMessage != null ? View.VISIBLE : View.GONE); - binding.pickerHint.setText(hintMessage); + interface Listener { + fun onDurationPickerResult(resultCode: Int, duration: Long) } - interface Listener { - void onDurationPickerResult(int resultCode, long duration); + companion object { + private const val MAX_DAYS_VALUE = 30 + private const val MAX_HOURS_VALUE = 24 + private const val MAX_MINUTES_VALUE = 59 + private const val DURATION = "DURATION" + private const val DIALOG_TITLE = "TITLE" + private const val HINT_MESSAGE = "HINT" + + fun newInstance(duration: Long, title: String?, hintMessage: String?): DurationPickerDialogFragment { + val args = Bundle() + args.putLong(DURATION, duration) + args.putString(HINT_MESSAGE, hintMessage) + args.putString(DIALOG_TITLE, title) + val dialogFragment = DurationPickerDialogFragment() + dialogFragment.arguments = args + dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + return dialogFragment + } } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index f03beebffb1d..dfdd43b9e15c 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -18,46 +18,19 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +package com.owncloud.android.utils -package com.owncloud.android.utils; +import java.util.concurrent.TimeUnit -import static java.util.concurrent.TimeUnit.MILLISECONDS; +object TimeUtils { -public class TimeUtils { - - private TimeUtils() { - // utility class -> private constructor - } - - public static DurationParts getDurationParts(long duration) { - int days = (int) MILLISECONDS.toDays(duration); - int hours = (int) MILLISECONDS.toHours(duration) - (days * 24); - int minutes = (int) (MILLISECONDS.toMinutes(duration) - (MILLISECONDS.toHours(duration) * 60)); - return new DurationParts(days, hours, minutes); - } - - public static class DurationParts { - private int days; - private int hours; - private int minutes; - - public DurationParts(int days, int hours, int minutes) { - this.days = days; - this.hours = hours; - this.minutes = minutes; - } - - public int getDays() { - return days; - } - - public int getHours() { - return hours; - } - - public int getMinutes() { - return minutes; - } + @JvmStatic + fun getDurationParts(duration: Long): DurationParts { + val days = TimeUnit.MILLISECONDS.toDays(duration).toInt() + val hours = TimeUnit.MILLISECONDS.toHours(duration).toInt() - days * 24 + val minutes = (TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.MILLISECONDS.toHours(duration) * 60).toInt() + return DurationParts(days, hours, minutes) } -} + class DurationParts(val days: Int, val hours: Int, val minutes: Int) +} \ No newline at end of file From f846b29c77d166dbf0840f1be0984a11ac42f577 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 22:23:51 +0100 Subject: [PATCH 49/72] CI hints fixes Signed-off-by: batpio --- .../ui/dialog/DurationPickerDialogFragmentIT.kt | 5 +++-- .../com/owncloud/android/utils/TimeUtilsTest.kt | 3 ++- .../ui/dialog/DurationPickerDialogFragment.kt | 2 +- .../java/com/owncloud/android/utils/TimeUtils.kt | 14 ++++++++------ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index a78f72688694..6cb28c464f81 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -22,11 +22,12 @@ class DurationPickerDialogFragmentIT : AbstractIT() { val dialog = DurationPickerDialogFragment.newInstance( TimeUnit.HOURS.toMillis(5), - "Dialog title", "Hint message" + "Dialog title", + "Hint message" ) dialog.show(ft, "DURATION_DIALOG") waitForIdleSync() screenshot(dialog.requireDialog().window!!.decorView) } -} \ No newline at end of file +} diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index fb277571f0ec..07e0e8d951d9 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit @RunWith(AndroidJUnit4::class) class TimeUtilsTest { + @Test fun shouldGetDurationParts() { val days = 5 @@ -24,4 +25,4 @@ class TimeUtilsTest { assertEquals(hours, durationParts.hours) assertEquals(minutes, durationParts.minutes) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index f890a6f07163..1b79999e08dd 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -146,4 +146,4 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { return dialogFragment } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index dfdd43b9e15c..0f60bcd4227b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -20,17 +20,19 @@ */ package com.owncloud.android.utils -import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeUnit.DAYS +import java.util.concurrent.TimeUnit.HOURS +import java.util.concurrent.TimeUnit.MILLISECONDS object TimeUtils { @JvmStatic fun getDurationParts(duration: Long): DurationParts { - val days = TimeUnit.MILLISECONDS.toDays(duration).toInt() - val hours = TimeUnit.MILLISECONDS.toHours(duration).toInt() - days * 24 - val minutes = (TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.MILLISECONDS.toHours(duration) * 60).toInt() - return DurationParts(days, hours, minutes) + val days = MILLISECONDS.toDays(duration) + val hours = MILLISECONDS.toHours(duration) - DAYS.toHours(days) + val minutes = MILLISECONDS.toMinutes(duration) - HOURS.toMinutes(MILLISECONDS.toHours(duration)) + return DurationParts(days.toInt(), hours.toInt(), minutes.toInt()) } class DurationParts(val days: Int, val hours: Int, val minutes: Int) -} \ No newline at end of file +} From 345b2ae44ba7bb0a9c41feada35e8e096c08c859 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 23:28:42 +0100 Subject: [PATCH 50/72] CI Fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 1b79999e08dd..b710f628c148 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -147,3 +147,4 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { } } } + From da817ff0c7a2a18da17b365099a42b3c69e03cb0 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 19 Jan 2023 23:33:26 +0100 Subject: [PATCH 51/72] CI Fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index b710f628c148..1b79999e08dd 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -147,4 +147,3 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { } } } - From 3ba21df07144241e95f86d4a5d6c234098017a93 Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 22:58:48 +0100 Subject: [PATCH 52/72] Lint fixes Signed-off-by: batpio --- .../android/ui/dialog/DurationPickerDialogFragment.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 1b79999e08dd..bb72d6281147 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -43,7 +43,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { private var resultListener: Listener? = null private var duration: Long - private get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + + get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + TimeUnit.MINUTES.toMillis(binding.minutesPicker.value.toLong()) private set(duration) { @@ -83,7 +83,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { setHintMessage(requireArguments().getString(HINT_MESSAGE)) - binding.clear.setOnClickListener { view: View? -> + binding.clear.setOnClickListener { binding.daysPicker.value = 0 binding.hoursPicker.value = 0 binding.minutesPicker.value = 0 @@ -93,17 +93,17 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { val dialogTitle = requireArguments().getString(DIALOG_TITLE) builder.setTitle(dialogTitle) builder.setView(binding.root) - builder.setPositiveButton(R.string.common_save) { dialog: DialogInterface?, whichButton: Int -> + builder.setPositiveButton(R.string.common_save) { _, _ -> if (resultListener != null) { resultListener!!.onDurationPickerResult(Activity.RESULT_OK, this.duration) } } - builder.setNegativeButton(R.string.common_cancel) { dialog: DialogInterface?, whichButton: Int -> + builder.setNegativeButton(R.string.common_cancel) { _, _ -> if (resultListener != null) { resultListener!!.onDurationPickerResult(Activity.RESULT_CANCELED, 0) } } - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding!!.root.context, builder) + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.root.context, builder) return builder.create() } From cc16e856cf48049cab7cbcd145d3f27a16fa4447 Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 23:02:44 +0100 Subject: [PATCH 53/72] CI fixes Signed-off-by: batpio --- .../owncloud/android/ui/dialog/DurationPickerDialogFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index bb72d6281147..26b122919644 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -22,7 +22,6 @@ package com.owncloud.android.ui.dialog import android.app.Activity import android.app.Dialog -import android.content.DialogInterface import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog From d9345fdabff14a1fc9384e2730d77910fb05d96b Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 20 Jan 2023 23:53:42 +0100 Subject: [PATCH 54/72] Lint fixes Signed-off-by: batpio --- app/src/main/res/layout/duration_picker.xml | 7 ++++--- app/src/main/res/layout/synced_folders_settings_layout.xml | 2 +- app/src/main/res/values/strings.xml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index 4860ec6d68cf..4a0a5a0225b0 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -49,7 +49,7 @@ diff --git a/app/src/main/res/layout/synced_folders_settings_layout.xml b/app/src/main/res/layout/synced_folders_settings_layout.xml index 17dcc76ed052..3b40758b5ee7 100644 --- a/app/src/main/res/layout/synced_folders_settings_layout.xml +++ b/app/src/main/res/layout/synced_folders_settings_layout.xml @@ -458,7 +458,7 @@ android:layout_height="wrap_content" android:ellipsize="end" android:maxLines="2" - android:text="Without delay" + android:text="@string/pref_instant_upload_delay_disabled" android:textColor="?android:attr/textColorSecondary" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0565dd92a155..1aba90e106da 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -217,6 +217,7 @@ Share Skip Copy + Clear d h m From 07c23007f82bda2f154bf65f6e841066d70b72b9 Mon Sep 17 00:00:00 2001 From: batpio Date: Sat, 21 Jan 2023 21:34:38 +0100 Subject: [PATCH 55/72] Screenshot test fixes Signed-off-by: batpio --- ...ogFragmentIT_showSyncDelayDurationDialog.png | Bin 0 -> 10893 bytes .../ui/dialog/DurationPickerDialogFragmentIT.kt | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT_showSyncDelayDurationDialog.png new file mode 100644 index 0000000000000000000000000000000000000000..0d327e764760ff606800294e751bed8f8648dad0 GIT binary patch literal 10893 zcmds-XH-+`*6)LLs~b@fQ6s@EY(Nl@-oZ*Q(xn7Mnt*`R&_Yn8N!v8(Akq^c(o2A- z^cJLs5JIHa5NQbz%3Z$ajB`EX-1puy-f{2!@P2y6S|ekQXU(kn%-{b%SHu%-73Q9o0_*G$K{F!=t3+B*8^ zMCwPQ`OZ|^m99|RmaI@)jXuqu5qHUw;a=VMGUN4vDi8bO&YjktIL2Qwg$Ps%d1UjV ze-jbJ@TE_Ctxx&~`G3#qKgc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&bm!Gv8#_h zEGV{I9W)b`>H>rB>PRsMHoUId^9J8UuiLs+uBIL+h7h|&fYGKRXSJg0p=+Zrj^>GW5c8R-4Avc^|bi}AJ7rk zT+d~LoO{BhrZDp+m(n!vr%Ty5)a-rN65}J4g#JXU1F=j&ShZQrSytW197W=PlkFmuJO$@7_b_XAmRk89L`s>f*A+{pJ@ z>SHUtIXJeSE5nn=?I{_`-YdebCN6_f9Dc5Q-WYJNW)YZB%4w`3A9OU5&`)?mf|(g& zEa6*>bWiKZL0NyH``H2Y8f}q#vf!3@Ss!j$=U~f45#ZaGw-UX2b&@?OQzvUHQdJ>3gm!v#>=_Q#xfI`DE_S6EZt94<&jR->+T|LyHE zsP&#pOw9Or&5|-YXsEJk$saE<10 zFXic*$QhtI*I;scXGEub@{F0~Iua7LVb-b+&XX65f!fK3CUcImtb;a0JcJ&=cyGlO zvR?k)xV*igj@8MdXO4K%1(PVKISqPc`a@6lKF91e*~-ZI=XS7>St+w|_|D0*K4ZCm z=_Lsn-m?xB_fY1Jz~Oa_a_&*9HXrsL2px>q#}PiTAade3d{fS>f4GPCOdyz)Vh!vn z8hajN3fwCK!%qht$yAmLT$;^XqOiOEKpRcnX>PtYH|u4`VOx`RxU|>9^0O#^`CRbd zF_eEc>;DpO|7@n6(d)11?jF_>|CqJ@8=(I0bm5;n`fm~{C}92wq{sI>b7g)}4EW3x Or1n_*QQ3oMZ~g}n619B* literal 0 HcmV?d00001 diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 6cb28c464f81..fe202d2eb49d 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -5,7 +5,9 @@ import com.nextcloud.test.TestActivity import com.owncloud.android.AbstractIT import org.junit.Rule import org.junit.Test -import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeUnit.DAYS +import java.util.concurrent.TimeUnit.HOURS +import java.util.concurrent.TimeUnit.MINUTES class DurationPickerDialogFragmentIT : AbstractIT() { @@ -14,6 +16,7 @@ class DurationPickerDialogFragmentIT : AbstractIT() { @Test fun showSyncDelayDurationDialog() { + val initialDuration = DAYS.toMillis(2) + HOURS.toMillis(8) + MINUTES.toMillis(15) val activity = testActivityRule.launchActivity(null) val fm = activity.supportFragmentManager @@ -21,7 +24,7 @@ class DurationPickerDialogFragmentIT : AbstractIT() { ft.addToBackStack(null) val dialog = DurationPickerDialogFragment.newInstance( - TimeUnit.HOURS.toMillis(5), + initialDuration, "Dialog title", "Hint message" ) From 212240a313ea1d7258a39a8213f3bdec2091f5c5 Mon Sep 17 00:00:00 2001 From: batpio Date: Thu, 26 Jan 2023 19:45:39 +0100 Subject: [PATCH 56/72] CR fixes Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 20 +++++++++++++++++++ .../owncloud/android/utils/TimeUtilsTest.kt | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index fe202d2eb49d..4ed2588eb87f 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -1,3 +1,23 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package com.owncloud.android.ui.dialog import androidx.test.espresso.intent.rule.IntentsTestRule diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index 07e0e8d951d9..c671058a2bd0 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -1,3 +1,23 @@ +/* + * Nextcloud Android client application + * + * @author Piotr Bator + * Copyright (C) 2022 Piotr Bator + * Copyright (C) 2022 Nextcloud GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ package com.owncloud.android.utils import androidx.test.ext.junit.runners.AndroidJUnit4 From dbf48f003e8a9b0af8b0fee22264c3f9187e0f42 Mon Sep 17 00:00:00 2001 From: BatPio Date: Wed, 8 Mar 2023 22:24:10 +0100 Subject: [PATCH 57/72] Update app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Álvaro Brey Signed-off-by: BatPio --- .../nextcloud/client/database/entity/SyncedFolderEntity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt index 71342ef54c0f..a385e173adf1 100644 --- a/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt +++ b/app/src/main/java/com/nextcloud/client/database/entity/SyncedFolderEntity.kt @@ -39,8 +39,8 @@ data class SyncedFolderEntity( val uploadAction: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_NAME_COLLISION_POLICY) val nameCollisionPolicy: Int?, - @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS) - val uploadDelayTimeMs: Int?, + @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_UPLOAD_DELAY_TIME_MS, defaultValue = "0") + val uploadDelayTimeMs: Long, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_TYPE) val type: Int?, @ColumnInfo(name = ProviderTableMeta.SYNCED_FOLDER_HIDDEN) From ed7397e312bcea229d31cd9207103cbced2cbd6f Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 4 Aug 2024 20:26:35 +0200 Subject: [PATCH 58/72] Licence update Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 13 +---------- .../owncloud/android/utils/TimeUtilsTest.kt | 13 +---------- .../ui/dialog/DurationPickerDialogFragment.kt | 18 ++++----------- .../com/owncloud/android/utils/TimeUtils.kt | 13 +---------- app/src/main/res/layout/duration_picker.xml | 23 ++++--------------- 5 files changed, 12 insertions(+), 68 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 4ed2588eb87f..12ef4e494271 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.ui.dialog diff --git a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt index c671058a2bd0..6ed16de98cd9 100644 --- a/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt +++ b/app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.utils diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index 26b122919644..ee4ec7cb110a 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.ui.dialog @@ -37,10 +26,11 @@ import javax.inject.Inject class DurationPickerDialogFragment : DialogFragment(), Injectable { - private var _binding: DurationPickerBinding? = null - private val binding get() = _binding!! private var resultListener: Listener? = null + private var _binding: DurationPickerBinding? = null + val binding get() = _binding!! + private var duration: Long get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + TimeUnit.HOURS.toMillis(binding.hoursPicker.value.toLong()) + diff --git a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt index 0f60bcd4227b..fec1f633204b 100644 --- a/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt +++ b/app/src/main/java/com/owncloud/android/utils/TimeUtils.kt @@ -5,18 +5,7 @@ * Copyright (C) 2022 Piotr Bator * Copyright (C) 2022 Nextcloud GmbH * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only */ package com.owncloud.android.utils diff --git a/app/src/main/res/layout/duration_picker.xml b/app/src/main/res/layout/duration_picker.xml index 4a0a5a0225b0..e4f8319b6e79 100644 --- a/app/src/main/res/layout/duration_picker.xml +++ b/app/src/main/res/layout/duration_picker.xml @@ -1,23 +1,10 @@ Date: Sun, 4 Aug 2024 21:01:38 +0200 Subject: [PATCH 59/72] Fixes Signed-off-by: batpio --- .../com/owncloud/android/ui/activity/SyncedFoldersActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index d18c26825cb6..f3e047fda291 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -697,6 +697,7 @@ class SyncedFoldersActivity : syncedFolder.isSubfolderByDate, syncedFolder.uploadAction, syncedFolder.nameCollisionPolicy.serialize(), + syncedFolder.uploadDelayTimeMs, syncedFolder.isEnabled, syncedFolder.subFolderRule, syncedFolder.isExcludeHidden @@ -784,6 +785,7 @@ class SyncedFoldersActivity : subfolderByDate: Boolean, uploadAction: Int, nameCollisionPolicy: Int, + uploadDelayTimeMs: Long, enabled: Boolean, subFolderRule: SubFolderRule, excludeHidden: Boolean From ee71275894b812a3d5390c4dbbd0c7381e298dd3 Mon Sep 17 00:00:00 2001 From: batpio Date: Mon, 5 Aug 2024 17:47:57 +0200 Subject: [PATCH 60/72] @Suppress("TooManyFunctions") Signed-off-by: batpio --- .../android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt index 556dac4db784..3b3c07f5e418 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt @@ -43,6 +43,7 @@ import javax.inject.Inject * Dialog to show the preferences/configuration of a synced folder allowing the user to change the different * parameters. */ +@Suppress("TooManyFunctions") class SyncedFolderPreferencesDialogFragment : DialogFragment(), Injectable { @JvmField From c5d1853d55480013a239e54aefe51e3352625116 Mon Sep 17 00:00:00 2001 From: batpio Date: Sun, 27 Oct 2024 16:01:17 +0100 Subject: [PATCH 61/72] Merged with main Signed-off-by: batpio --- .../86.json | 1308 +++++++++++++++++ .../com/owncloud/android/db/ProviderMeta.java | 2 +- 2 files changed, 1309 insertions(+), 1 deletion(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json new file mode 100644 index 000000000000..1ef07f05b4f0 --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json @@ -0,0 +1,1308 @@ +{ + "formatVersion": 1, + "database": { + "version": 86, + "identityHash": "361bfed7935162cd5f38801e888044cd", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `assistant` INTEGER, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `end_to_end_encryption_api_version` TEXT, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT, `groupfolders` INTEGER, `drop_account` INTEGER, `security_guard` INTEGER, `forbidden_filename_characters` INTEGER, `forbidden_filenames` INTEGER, `forbidden_filename_extensions` INTEGER, `forbidden_filename_basenames` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "assistant", + "columnName": "assistant", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionApiVersion", + "columnName": "end_to_end_encryption_api_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "groupfolders", + "columnName": "groupfolders", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "dropAccount", + "columnName": "drop_account", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "securityGuard", + "columnName": "security_guard", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameCharacters", + "columnName": "forbidden_filename_characters", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNames", + "columnName": "forbidden_filenames", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameExtensions", + "columnName": "forbidden_filename_extensions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFilenameBaseNames", + "columnName": "forbidden_filename_basenames", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `hidden` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `metadata_live_photo` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT, `tags` TEXT, `metadata_gps` TEXT, `e2e_counter` INTEGER, `internal_two_way_sync_timestamp` INTEGER, `internal_two_way_sync_result` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataLivePhoto", + "columnName": "metadata_live_photo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tags", + "columnName": "tags", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataGPS", + "columnName": "metadata_gps", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "e2eCounter", + "columnName": "e2e_counter", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySync", + "columnName": "internal_two_way_sync_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySyncResult", + "columnName": "internal_two_way_sync_result", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` TEXT, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER, `sub_folder_rule` INTEGER, `exclude_hidden` INTEGER, `last_scan_timestamp_ms` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subFolderRule", + "columnName": "sub_folder_rule", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "excludeHidden", + "columnName": "exclude_hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastScanTimestampMs", + "columnName": "last_scan_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "offline_operations", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `offline_operations_parent_oc_file_id` INTEGER, `offline_operations_path` TEXT, `offline_operations_type` TEXT, `offline_operations_file_name` TEXT, `offline_operations_created_at` INTEGER, `offline_operations_modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "parentOCFileId", + "columnName": "offline_operations_parent_oc_file_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "offline_operations_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "offline_operations_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filename", + "columnName": "offline_operations_file_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "createdAt", + "columnName": "offline_operations_created_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAt", + "columnName": "offline_operations_modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '361bfed7935162cd5f38801e888044cd')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index 00e06122d27c..0d42ad4fa71f 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -25,7 +25,7 @@ */ public class ProviderMeta { public static final String DB_NAME = "filelist"; - public static final int DB_VERSION = 85; + public static final int DB_VERSION = 86; private ProviderMeta() { // No instance From 17da386445f172cd272f3deb24e0acba36b1b0ea Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Thu, 9 Jan 2025 13:47:15 +0000 Subject: [PATCH 62/72] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- app/src/main/res/values-ug/strings.xml | 180 ++++++++++++------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/app/src/main/res/values-ug/strings.xml b/app/src/main/res/values-ug/strings.xml index d39585d1679d..d3c49124f516 100644 --- a/app/src/main/res/values-ug/strings.xml +++ b/app/src/main/res/values-ug/strings.xml @@ -1,9 +1,9 @@ - % 1 $ s ئاندىرويىد دېتالى + %1$s ئاندىرويىد دېتالى ھەققىدە - نەشرى% 1 $ s - نەشرى% 1 $ s ، #% 2 $ s نى ياساڭ + نەشرى%1$s + نەشرى%1$s ، #%2$s $ s نى ياساڭ ھېسابات قۇرۇش مەغلۇب بولدى ھېسابات سىنبەلگىسى ھېسابات تېپىلمىدى! @@ -31,13 +31,13 @@ باشقا ئۇلىنىش قوشۇڭ يېڭى ئاممىۋى ئورتاقلىشىش ئۇلانمىسىنى قوشۇڭ يېڭى بىخەتەر ھۆججەت چۈشۈرۈش - % 1 $ s غا قوشۇڭ + %1$s غا قوشۇڭ ئىلغار تەڭشەكلەر قايتا تولۇقلاشقا يول قويۇڭ ئاساسى URL ۋاكالەتچى ئېغىز باشقۇرۇش تاختىسىدىكى بىر كىچىك قورالنى كۆرسىتىدۇ - % S دىن ئىزدەڭ + %s دىن ئىزدەڭ ھەممىسى بەزى تېكىستلەرنى كىرگۈزۈڭ بۇ ۋەزىپىنى ئۆچۈرمەكچىمۇ؟ @@ -45,7 +45,7 @@ مەغلۇب بولدى ۋەزىپە تىزىملىكى يۈكلىنىۋاتىدۇ ، ساقلاپ تۇرۇڭ ھېچقانداق ۋەزىپە يوق. يېڭى ۋەزىپە يارىتىش ئۈچۈن ۋەزىپە تۈرىنى تاللاڭ. - % S ۋەزىپە تىپىغا ماس كېلىدىغان ۋەزىپە يوق ، ئاستىدىن ئوڭدىن يېڭى ۋەزىپە قۇرالايسىز. + % %s ۋەزىپە تىپىغا ماس كېلىدىغان ۋەزىپە يوق ، ئاستىدىن ئوڭدىن يېڭى ۋەزىپە قۇرالايسىز. ئىلگىرىلەۋاتىدۇ پىلانلانغان تاماملاندى @@ -61,7 +61,7 @@ كىرگۈزۈش چىقىرىش بىرلەشمە ھېسابات تېپىلمىدى! - زىيارەت مەغلۇپ بولدى:% 1 $ s + زىيارەت مەغلۇپ بولدى:%1$s بۇ ھېسابات تېخى بۇ ئۈسكۈنىگە قوشۇلمىدى ئۈسكۈنىدە ئوخشاش ئىشلەتكۈچى ۋە مۇلازىمېتىرنىڭ ھېساباتى بار كىرگۈزۈلگەن ئىشلەتكۈچى بۇ ھېساباتتىكى ئىشلەتكۈچىگە ماس كەلمەيدۇ @@ -84,11 +84,11 @@ مۇلازىمېتىر جاۋاب قايتۇرۇشقا بەك ئۇزۇن ۋاقىت كەتتى كىرمەكچى بولۇۋاتىسىز… ئىشلەتكۈچى ئىسمى ياكى پارولى خاتا - نامەلۇم خاتالىق:% 1 $ s + نامەلۇم خاتالىق:%1$s نامەلۇم HTTP خاتالىقى يۈز بەردى! نامەلۇم خاتالىق يۈز بەردى! ساھىبجامال تاپالمىدى - % 1 $ s كۆپ ھېساباتنى قوللىمايدۇ + %1$s كۆپ ھېساباتنى قوللىمايدۇ ئۇلىنىش قۇرالمىدى كىرىشنى ئەمەلدىن قالدۇرۇڭ كىرىش تەلىپىڭىزنى بىر تەرەپ قىلىشتا مەسىلە كۆرۈلدى. كېيىن قايتا سىناڭ. @@ -128,7 +128,7 @@ ئۇقتۇرۇشنى تازىلاش مەغلۇب بولدى. ھالەت ئۇچۇرىنى تازىلاش ئۇنىڭدىن كېيىنكى ھالەت ئۇچۇرىنى تازىلاڭ - تېكىست% 1 $ دىن كۆچۈرۈلگەن + تېكىست%1$s دىن كۆچۈرۈلگەن چاپلاش تاختىسىغا كۆچۈرەلەيدىغان تېكىست تاپشۇرۇۋالمىدى ئۇلىنىش كۆچۈرۈلدى چاپلاش تاختىسىغا كۆچۈرگەندە كۈتۈلمىگەن خاتالىق @@ -161,7 +161,7 @@ بۇ پات ئارىدا يېتىپ كېلىدىغان بارلىق ئىقتىدارلارنى ئۆز ئىچىگە ئالىدۇ ، ئۇ ناھايىتى قانىغان قىرغاقتا. خاتالىق / خاتالىق يۈز بېرىشى مۇمكىن ، ئەگەر شۇنداق بولغاندا ، بايقىغانلىرىڭىزنى دوكلات قىلىڭ. مۇنبەر باشقىلارغا ياردەم قىلىڭ - كودنى تەكشۈرۈش ، تۈزىتىش ۋە يېزىش ، تەپسىلاتىنى% 1 $ s دىن كۆرۈڭ. + كودنى تەكشۈرۈش ، تۈزىتىش ۋە يېزىش ، تەپسىلاتىنى%1$s دىن كۆرۈڭ. ئاكتىپ تۆھپە قوشۇڭ ئەپ تەرجىمە @@ -176,13 +176,13 @@ GitHub دىكى بىر مەسىلىنى دوكلات قىلىڭ سەپلەڭ يەرلىك مەخپىيلەشتۈرۈشنى ئۆچۈرۈڭ - راستىنلا% 1 $ s نى ئۆچۈرمەكچىمۇ؟ + راستىنلا%1$s نى ئۆچۈرمەكچىمۇ؟ تاللانغان تۈرلەرنى ئۆچۈرمەكچىمۇ؟ - % 1 $ s ۋە ئۇنىڭ مەزمۇنىنى ئۆچۈرمەكچىمۇ؟ + %1$s ۋە ئۇنىڭ مەزمۇنىنى ئۆچۈرمەكچىمۇ؟ تاللانغان تۈرلەرنى ۋە ئۇلارنىڭ مەزمۇنىنى ئۆچۈرمەكچىمۇ؟ پەقەت يەرلىك زىددىيەتنى ھەل قىلىش دىئالوگى قۇرغىلى بولمايدۇ - زىددىيەتلىك ھۆججەت% 1 $ s + زىددىيەتلىك ھۆججەت%1$s ھۆججەت قىسقۇچ يەرلىك ھۆججەت ئەگەر ھەر ئىككى نەشرىنى تاللىسىڭىز ، يەرلىك ھۆججەتنىڭ نامىغا بىر سان قوشۇلىدۇ. @@ -233,7 +233,7 @@ كۆپەيتىلگەن نۇسخىسىنى تەكشۈرمىدى. بۇ ھەزىم قىلىش ھېسابلاش ئۇسۇلى تېلېفونىڭىزدا يوق. بىۋاسىتە ئۇلىنىش ئارقىلىق كىرىش مەغلۇب بولدى! - % 1 $ s دىن% 2 $ s غىچە كىرىڭ + %1$s دىن%2$s غىچە كىرىڭ چەكلەش خىزمەتتىن ھەيدەش ئۇقتۇرۇشنى ئەمەلدىن قالدۇرۇش @@ -249,13 +249,13 @@ يەرلىك ھۆججەت قۇرالمايدۇ يەرلىك ھۆججەتنىڭ ئىناۋەتسىز ئىسمى ئەڭ يېڭى dev نەشرىنى چۈشۈرۈڭ - % 1 $ s نى چۈشۈرەلمىدى + %1$s نى چۈشۈرەلمىدى چۈشۈرۈش مەغلۇپ بولدى ، قايتا كىرىڭ چۈشۈرۈش مەغلۇب بولدى بۇ ھۆججەتنى مۇلازىمېتىردا ئىشلەتكىلى بولمايدۇ - % 1 $ d %% چۈشۈرۈش% 2 $ s + %1$d %% چۈشۈرۈش%2$s چۈشۈرۈش… - % 1 $ s چۈشۈرۈلدى + %1$s چۈشۈرۈلدى چۈشۈرۈلدى ئىشلەتكۈچى چۈشۈرۈش جەريانىدا بەزى ھۆججەتلەر ئەمەلدىن قالدۇرۇلدى ھۆججەتلەرنى چۈشۈرۈش جەريانىدا خاتالىق كۆرۈلدى @@ -280,8 +280,8 @@ يۈكلەش چېكىنىش يان بالداقنى ئېچىڭ - ئىشلىتىلگەن% 2 $ s نىڭ% 1 $ s - % 1 $ s ئىشلىتىلگەن + ئىشلىتىلگەن% %2$s نىڭ%1$s + %1$s ئىشلىتىلگەن ئاپتوماتىك يوللاش Counter بەك كونا Hash تېپىلمىدى @@ -314,11 +314,11 @@ شىفىر يېگەندە خاتالىق. پارول خاتا؟ نىشان ھۆججەت نامىنى كىرگۈزۈڭ ھۆججەت نامىنى كىرگۈزۈڭ - % 1 $ s نى% 2 $ s يەرلىك ھۆججەت قىسقۇچقا كۆچۈرگىلى بولمايدۇ + %1$s نى%2$s يەرلىك ھۆججەت قىسقۇچقا كۆچۈرگىلى بولمايدۇ ھالقىلىق خاتالىق: مەشغۇلات قىلالمىدى چېسلانى تاللاشتا خاتالىق ئىنكاس ھۆججىتى - % 1 $ s چۈشۈپ كەتتى + %1$s چۈشۈپ كەتتى قېلىپتىن ھۆججەت قۇرۇشتا خاتالىق ھۆججەت ھەرىكىتىنى كۆرسىتىشتە خاتالىق ھۆججەت قۇلۇپ ھالىتىنى ئۆزگەرتىشتە خاتالىق @@ -390,8 +390,8 @@ سېكۇنت بۇرۇن ئىجازەت لازىم ساقلاش ئىجازەتنامىسى - % 1 $ s ساقلاشقا رۇخسەت قىلىش بىلەن ئەڭ ياخشى ئىشلەيدۇ. بارلىق ھۆججەتلەرنى تولۇق زىيارەت قىلالايسىز ياكى رەسىم ۋە سىنلارنى ئوقۇشقىلا بولىدۇ. - % 1 $ s ھۆججەت يوللاش ئۈچۈن ھۆججەت باشقۇرۇش ئىجازەتنامىسىگە موھتاج. بارلىق ھۆججەتلەرنى تولۇق زىيارەت قىلالايسىز ياكى رەسىم ۋە سىنلارنى ئوقۇشقىلا بولىدۇ. + %1$s ساقلاشقا رۇخسەت قىلىش بىلەن ئەڭ ياخشى ئىشلەيدۇ. بارلىق ھۆججەتلەرنى تولۇق زىيارەت قىلالايسىز ياكى رەسىم ۋە سىنلارنى ئوقۇشقىلا بولىدۇ. + %1$s ھۆججەت يوللاش ئۈچۈن ھۆججەت باشقۇرۇش ئىجازەتنامىسىگە موھتاج. بارلىق ھۆججەتلەرنى تولۇق زىيارەت قىلالايسىز ياكى رەسىم ۋە سىنلارنى ئوقۇشقىلا بولىدۇ. مەنزىلنى تەكشۈرۈش… تازىلاش… سانلىق مەلۇمات ساقلاش قىسقۇچىنى يېڭىلاش @@ -408,18 +408,18 @@ كۆچۈشكە تەييارلىق قىلىش… ھېسابات تەڭشىكىنى ئەسلىگە كەلتۈرۈش… ھېساباتنى تەڭشەش… - سىز يەنىلا سانلىق مەلۇمات ساقلاش قىسقۇچىنى% 1 $ s غا ئۆزگەرتمەكچىمۇ؟ \ n \ n ئەسكەرتىش: بارلىق سانلىق مەلۇماتلارنى قايتا چۈشۈرۈشكە توغرا كېلىدۇ. + سىز يەنىلا سانلىق مەلۇمات ساقلاش قىسقۇچىنى%1$s غا ئۆزگەرتمەكچىمۇ؟ \ n \ n ئەسكەرتىش: بارلىق سانلىق مەلۇماتلارنى قايتا چۈشۈرۈشكە توغرا كېلىدۇ. مەنبە ھۆججەت قىسقۇچنى ئوقۇغىلى بولمايدۇ! كۆرسەتكۈچنى يېڭىلاش… ئىشلىتىش تولۇق ماسقەدەملەشنى ساقلاۋاتىدۇ… نۆۋەتتىكى ھۆججەت قىسقۇچنىڭ ئىسمى ئىناۋەتسىز ، قىسقۇچنىڭ نامىنى ئۆزگەرتىڭ. ئۆينى قايتا نىشانلاش… ھۆججەت قىسقۇچتا ساقلانغان ئىسىملار ياكى ئىناۋەتسىز ھەرپلەر بار - % s چەكلەنگەن ھۆججەت كېڭەيتىش + %s چەكلەنگەن ھۆججەت كېڭەيتىش ھۆججەت نامىنىڭ بېشىدا ياكى ئاخىرىدا بوشلۇق بولماسلىقى كېرەك - ئىسىم ئىناۋەتسىز ھەرپلەرنى ئۆز ئىچىگە ئالىدۇ:% s - % s چەكلەنگەن ئىسىم - % s. كۆچۈرۈش ياكى كۆچۈرۈشتىن بۇرۇن ھۆججەتنىڭ نامىنى ئۆزگەرتىڭ + ئىسىم ئىناۋەتسىز ھەرپلەرنى ئۆز ئىچىگە ئالىدۇ:%s + %s چەكلەنگەن ئىسىم + %s. كۆچۈرۈش ياكى كۆچۈرۈشتىن بۇرۇن ھۆججەتنىڭ نامىنى ئۆزگەرتىڭ بەزى مەزمۇنلارنى زاپاس ئىسىملار ياكى ئىناۋەتسىز ھەرپلەر بولغاچقا يۈكلەشكە بولمايدۇ ھۆججەت تېپىلمىدى ھۆججەت ماسقەدەملەنمىدى. ئەڭ يېڭى نەشرىنى كۆرسىتىش. @@ -430,7 +430,7 @@ تەپسىلاتى چۈشۈر ئېكسپورت - ھۆججەت يوللاش جەريانىدا% 1 $ s غا ئۆزگەرتىلدى + ھۆججەت يوللاش جەريانىدا%1$s غا ئۆزگەرتىلدى ماسقەدەملەش ھۆججەت تاللانمىدى ھۆججەت ئىسمى قۇرۇق بولمايدۇ @@ -457,9 +457,9 @@ بۇ ھۆججەتنىڭ نامىنى ئۆزگەرتىش ھۆججەتلەرنى يوللاش… بەزى ھۆججەتلەرنى يۆتكىگىلى بولمىدى - يەرلىك:% 1 $ s + يەرلىك:%1$s ھەممىنى يۆتكەڭ - يىراقتىن:% 1 $ s + يىراقتىن:%1$s بارلىق ھۆججەتلەر يۆتكەلدى ئالدىغا 4 سائەت @@ -482,12 +482,12 @@ رەسىمنى تەھرىرلىيەلمىدى. ھۆججەت تەپسىلاتلىرى رەسىمگە تارتىش شارائىتى - ƒ /% s - ISO% s - % s MP - % s mm - % s s - قىسقۇچتا% 1 $ s + ƒ /%s + ISO%s + %s MP + %s mm + %s s + قىسقۇچتا%1$s مەۋجۇت ھۆججەتلەرنىمۇ يۈكلەڭ توك قاچىلىغاندا ئاندىن يۈكلەڭ / InstantUpload @@ -497,7 +497,7 @@ ئىناۋەتسىز URL كۆرۈنمەيدۇ بەلگە قۇرۇق بولالمايدۇ - ئاخىرقى زاپاسلاش:% 1 $ s + ئاخىرقى زاپاسلاش:%1$s ئۇلىنىش ئۇلىنىش ئىسمى يوللاش ۋە تەھرىرلەشكە يول قويۇڭ @@ -508,29 +508,29 @@ تېخىمۇ كۆپ نەتىجىلەرنى يۈكلەڭ بۇ ھۆججەت قىسقۇچتا ھۆججەت يوق. يەرلىك ھۆججەت سىستېمىسىدا ھۆججەت تېپىلمىدى - % 1 $ s /% 2 $ s + %1$s / %2$s باشقا ھۆججەت قىسقۇچ يوق. ھۆججەت قىسقۇچنى تېپىڭ - ۋاقتى توشىدۇ:% 1 $ s + ۋاقتى توشىدۇ:%1$s ھۆججەتنى قۇلۇپلاش - % 1 $ s قۇلۇپلانغان - % 1 $ s ئەپ تەرىپىدىن قۇلۇپلانغان - % 1 $ s ئاندىرويىد ئەپ خاتىرىسى + %1$s قۇلۇپلانغان + %1$s ئەپ تەرىپىدىن قۇلۇپلانغان + %1$s ئاندىرويىد ئەپ خاتىرىسى خاتىرە ئەۋەتىدىغان ئەپ تېپىلمىدى. ئېلېكترونلۇق خەت خېرىدارنى قاچىلاڭ. - % 1 $ s دەپ تىزىمغا كىردى + %1$s دەپ تىزىمغا كىردى كىرىڭ - تور كۆرگۈچتە ئاچقاندا% 1 $ s تور كۆرۈنمە يۈزىگە ئۇلىنىش. + تور كۆرگۈچتە ئاچقاندا%1$s تور كۆرۈنمە يۈزىگە ئۇلىنىش. خاتىرىلەرنى ئۆچۈرۈڭ يېڭىلاش ئىزدەش خاتىرىلىرى ئېلېكترونلۇق خەت ئارقىلىق خاتىرە ئەۋەتىڭ خاتىرە:% 1 $ d kB ، سوئال% 4 $ d ms دىكى% 2 $ d /% 3 $ d ماسلاشتى Loading… - خاتىرە:% 1 $ d kB ، سۈزگۈچ يوق + خاتىرە:% %1$d kB ، سۈزگۈچ يوق خاتىرە مۇلازىمېتىر ئاسراش ھالىتىدە سانلىق مەلۇماتنى تازىلاش - % 1 $ s نىڭ سانلىق مەلۇماتلىرىدىن تەڭشەك ، ساندان ۋە مۇلازىمېتىر گۇۋاھنامىسى مەڭگۈلۈك ئۆچۈرۈلىدۇ. \ n \ n چۈشۈرۈلگەن ھۆججەتلەر تۇتۇلمايدۇ. \ n \ n بۇ جەريانغا بىر ئاز ۋاقىت كېتىدۇ. + %1$s نىڭ سانلىق مەلۇماتلىرىدىن تەڭشەك ، ساندان ۋە مۇلازىمېتىر گۇۋاھنامىسى مەڭگۈلۈك ئۆچۈرۈلىدۇ. \ n \ n چۈشۈرۈلگەن ھۆججەتلەر تۇتۇلمايدۇ. \ n \ n بۇ جەريانغا بىر ئاز ۋاقىت كېتىدۇ. بوشلۇقنى باشقۇرۇش ھۆججەت يوللاشنىڭ ئەڭ يۇقىرى چېكىگە يەتتىڭىز. بىر قېتىمدا 500 دىن ئاز ھۆججەت يوللاڭ. مېدىيا ھۆججىتىنى ئاقلاشقا بولمايدۇ @@ -540,10 +540,10 @@ ئىچىگە ئورۇنلاشتۇرۇلغان مېدىيا قويغۇچ مېدىيا ھۆججىتىنى قويالمايدۇ قوللىمايدىغان مېدىيا كودلىغۇچ تېز ئىلگىرىلەش كۇنۇپكىسى - % 1 $ s مۇزىكا قويغۇچ + %1$s مۇزىكا قويغۇچ قويۇش ياكى توختىتىش كۇنۇپكىسى كەينىگە قايتۇرۇش كۇنۇپكىسى - % 1 $ s (ئويناش) + %1$s (ئويناش) ئەڭ يېڭى ئەڭ كونا A - Z. @@ -560,7 +560,7 @@ مۇلازىمېتىرنى ساقلاۋاتقاندا خاتالىق كۆرۈلدى. مەشغۇلاتنى تاماملىيالمىدى. مەشغۇلاتنى تاماملىيالمىدى. مۇلازىمېتىرنى ئىشلەتكىلى بولمايدۇ. يېڭى باھا… - يېڭى% 1 $ s مېدىيا ھۆججەت قىسقۇچى بايقالدى. + يېڭى%1$s مېدىيا ھۆججەت قىسقۇچى بايقالدى. سۈرەت video يېڭى ئۇقتۇرۇش @@ -601,9 +601,9 @@ تورغا ئۇلانمىسىڭىزمۇ ھۆججەت قىسقۇچلىرىڭىزنى رەتلىيەلەيسىز ، ھۆججەت قۇرالايسىز. تورغا قايتىپ كەلگەندىن كېيىن ، ساقلاۋاتقان ھەرىكەتلىرىڭىز ئاپتوماتىك ماسقەدەملىنىدۇ. سىز تورسىز ، ئەمما خىزمەت داۋاملىشىدۇ ھۆججەت مەۋجۇت ئەمەس. ئاۋۋال ھۆججەتنى يۈكلەڭ. - زىددىيەتلىك ھۆججەت قىسقۇچ:% s + زىددىيەتلىك ھۆججەت قىسقۇچ:%s تورسىز ھۆججەت قىسقۇچنى ئۆچۈرۈڭ - تورسىز مەشغۇلاتنى تاماملىغىلى بولمايدۇ. % s + تورسىز مەشغۇلاتنى تاماملىغىلى بولمايدۇ. %s تورسىز مەشغۇلات تورسىز مەشغۇلاتنى باشلاش 1 سائەت @@ -627,7 +627,7 @@ ھۆججەتلەرنى يوللاش ۋە چۈشۈرۈش ئۈچۈن قوشۇمچە ئىجازەتلەر. رەسىم ئورنىتىدىغان ھېچقانداق دېتال تېپىلمىدى باش بەت ئېكرانى - % 1 $ s نى ئېچىڭ + %1$s نى ئېچىڭ 389 KB placeholder.txt 12:23:45 @@ -717,9 +717,9 @@ QR كودىنى ئوقۇغىلى بولمىدى! ھۆججەت قىسقۇچنى تاپقىلى بولمايدۇ ، ماسقەدەملەش مەشغۇلاتى بىكار قىلىنىدۇ يوللاشقا ھۆججەت تاپالمىدى - ئۈسكۈنىڭىزدە% 1 $ s نى سىناپ بېقىڭ! - ئۈسكۈنىڭىزدە% 1 $ s ئىشلىتىشكە تەكلىپ قىلماقچى. \ N بۇ يەرگە چۈشۈرۈڭ:% 2 $ s - % 1 $ s ياكى% 2 $ s + ئۈسكۈنىڭىزدە%1$s نى سىناپ بېقىڭ! + ئۈسكۈنىڭىزدە%1$s ئىشلىتىشكە تەكلىپ قىلماقچى. \ N بۇ يەرگە چۈشۈرۈڭ:% 2 $ s + %1$s ياك%2$s $ s مەزمۇننى يېڭىلاش قايتا يۈكلەڭ (remote) @@ -779,14 +779,14 @@ ھەمبەھىرلەش ئۇلىنىشنى ھەمبەھىرلەش ۋە كۆچۈرۈش ھەمبەھىر - % 1 $ s - ۋاقتى% 1 $ s - ئورتاقلىشىش% 1 $ s - % 1 $ s (گۇرۇپپا) + %1$s + ۋاقتى%1$s + ئورتاقلىشىش%1$s + %1$s (گۇرۇپپا) ئىچكى ئۇلىنىشنى ئورتاقلىشىش ئىچكى ئورتاقلىشىش ئۇلىنىشى پەقەت بۇ ھۆججەتنى زىيارەت قىلالايدىغان ئىشلەتكۈچىلەر ئۈچۈن ئىشلەيدۇ ئىچكى ئورتاقلىشىش ئۇلىنىشى پەقەت بۇ ھۆججەت قىسقۇچنى زىيارەت قىلىدىغان ئىشلەتكۈچىلەر ئۈچۈن ئىشلەيدۇ - % 1 $ s + %1$s ئۇلىنىشنى ھەمبەھىرلەش پارول كىرگۈزۈشىڭىز كېرەك بۇ ھۆججەت ياكى ھۆججەت قىسقۇچنى ئورتاقلاشماقچى بولغاندا خاتالىق كۆرۈلدى. @@ -794,7 +794,7 @@ بۇ ھۆججەتنى ئورتاقلىشىش ئىختىيارى پارول كىرگۈزۈڭ پارول كىرگۈزۈڭ - ئورتاقلىشىش ئۇلىنىشى (% 1 $ s) + ئورتاقلىشىش ئۇلىنىشى (%1$s) ۋاقتى توشىدۇ پارول بەلگىلەڭ بىخەتەر ھۆججەت چۈشۈرۈش جەريانىدا قايتا ئىشلىتىشكە بولمايدۇ @@ -804,8 +804,8 @@ بىخەتەر ھۆججەت چۈشۈرۈش پەقەت كۆرۈش ئورتاقلىشىش ئىجازەتنامىسى - % 1 $ s (يىراق) - % 1 $ s (سۆھبەت) + %1$s (يىراق) + %1$s (سۆھبەت) يېڭى ئېلېكترونلۇق خەت ئەۋەتىڭ تاپشۇرۇۋالغۇچىغا دىققەت قىلىڭ تەڭشەك @@ -818,13 +818,13 @@ share ئورتاقلاشتى ئۇلىنىش ئارقىلىق ھەمبەھىرلەندى - % 1 $ s بىلەن ئورتاقلاشتى + %1$s بىلەن ئورتاقلاشتى شارنى قوشۇش مەغلۇب بولدى ئورتاقلىشىش مەغلۇب بولدى. بۇ ھۆججەت ياكى ھۆججەت قىسقۇچ بۇ ئادەم ياكى گۇرۇپپا بىلەن ئورتاقلاشقان. رەسىملەرنى كۆرسەت سىنلارنى كۆرسەت تەمىنلىگۈچى بىلەن تىزىملىتىڭ - % 1 $ s نىڭ Nextcloud ھېساباتىڭىزنى زىيارەت قىلىشىغا يول قويۇڭ% 2 $ s? + %1$s نىڭ Nextcloud ھېساباتىڭىزنى زىيارەت قىلىشىغا يول قويۇڭ% 2 $ s? تەرتىپلەش يوشۇر تەپسىلاتى @@ -875,28 +875,28 @@ يىل / ئاي / كۈن يىل / ئاي يىل - \ "% 1 $ s \" سىز بىلەن ئورتاقلاشتى - % 1 $ s سىز بىلەن ئورتاقلاشتى \ "% 2 $ s \" + \ "%1$s \" سىز بىلەن ئورتاقلاشتى + %1$s سىز بىلەن ئورتاقلاشتى \ \"%2$s $ s \" پەقەت رەسىملەر رەسىم ۋە سىن پەقەت سىنلار تەكلىپ ماسقەدەملەش توقۇنۇشلار بايقالدى - % 1 $ s ھۆججەت قىسقۇچى ئەمدى مەۋجۇت ئەمەس - % 1 $ s نى ماسقەدەملىيەلمىدى - % 1 $ s نىڭ مەخپىي نومۇرى خاتا + %1$s ھۆججەت قىسقۇچى ئەمدى مەۋجۇت ئەمەس + %1$s نى ماسقەدەملىيەلمىدى + %1$s نىڭ مەخپىي نومۇرى خاتا ماس قەدەملىك ھۆججەتلەر مەغلۇپ بولدى ماسقەدەملەش مەغلۇپ بولدى ماسقەدەملەش مەغلۇپ بولدى ، قايتا كىرىڭ ھۆججەت مەزمۇنى ماسقەدەملەندى - % 1 $ s ھۆججەت قىسقۇچنى ماسقەدەملەش تاماملانمىدى - 1.3.16 نەشرىگە قەدەر ، بۇ ئۈسكۈنىدىن يۈكلەنگەن ھۆججەتلەر يەرلىك% 1 $ s ھۆججەت قىسقۇچىغا كۆچۈرۈلۈپ ، بىر ھۆججەت كۆپ ھېسابات بىلەن ماس قەدەمدە سانلىق مەلۇمات يوقاپ كېتىشنىڭ ئالدىنى ئالىدۇ. \ N \ n بۇ ئۆزگىرىش سەۋەبىدىن ، بارلىق ھۆججەتلەر ئىلگىرىكى نەشرىگە يۈكلەنگەن. بۇ دېتالنىڭ% 2 $ s ھۆججەت قىسقۇچىغا كۆچۈرۈلگەن. قانداقلا بولمىسۇن ، خاتالىق ھېسابات ماسقەدەملەش جەريانىدا بۇ مەشغۇلاتنىڭ تاماملىنىشىنىڭ ئالدىنى ئالدى. سىز ھۆججەتلەرنى (لار) نى تاشلاپ قويۇپ ، ئۇلىنىشنى% 3 $ s غا ئۆچۈرەلەيسىز ياكى ھۆججەت (لەر) نى% 1 $ s ھۆججەت قىسقۇچىغا يۆتكىسىڭىز ھەمدە ئۇلىنىشنى% 4 $ s غا ساقلاپ قويسىڭىز بولىدۇ. \ N \ n تۆۋەندە كۆرسىتىلگەن يەرلىك ھۆججەت (لار) بولۇپ ، ئۇلانغان% 5 $ s دىكى يىراقتىكى ھۆججەتلەر. + %1$s ھۆججەت قىسقۇچنى ماسقەدەملەش تاماملانمىدى + 1.3.16 نەشرىگە قەدەر ، بۇ ئۈسكۈنىدىن يۈكلەنگەن ھۆججەتلەر يەرلىك%1$s ھۆججەت قىسقۇچىغا كۆچۈرۈلۈپ ، بىر ھۆججەت كۆپ ھېسابات بىلەن ماس قەدەمدە سانلىق مەلۇمات يوقاپ كېتىشنىڭ ئالدىنى ئالىدۇ. \ N \ n بۇ ئۆزگىرىش سەۋەبىدىن ، بارلىق ھۆججەتلەر ئىلگىرىكى نەشرىگە يۈكلەنگەن. بۇ دېتالنىڭ% 2 $ s ھۆججەت قىسقۇچىغا كۆچۈرۈلگەن. قانداقلا بولمىسۇن ، خاتالىق ھېسابات ماسقەدەملەش جەريانىدا بۇ مەشغۇلاتنىڭ تاماملىنىشىنىڭ ئالدىنى ئالدى. سىز ھۆججەتلەرنى (لار) نى تاشلاپ قويۇپ ، ئۇلىنىشنى% 3 $ s غا ئۆچۈرەلەيسىز ياكى ھۆججەت (لەر) نى%1$s ھۆججەت قىسقۇچىغا يۆتكىسىڭىز ھەمدە ئۇلىنىشنى% 4 $ s غا ساقلاپ قويسىڭىز بولىدۇ. \ N \ n تۆۋەندە كۆرسىتىلگەن يەرلىك ھۆججەت (لار) بولۇپ ، ئۇلانغان% 5 $ s دىكى يىراقتىكى ھۆججەتلەر. بەزى يەرلىك ھۆججەتلەر ئۇنتۇلدى ھۆججەتنىڭ ئەڭ يېڭى نەشرىنى ئېلىش. ماسقەدەملەشنى تاللاڭ بوش ئورۇن - % 1 $ s بولسا% 2 $ s ، ئەمما ئۈسكۈنىدە پەقەت% 3 $ s بار. + %1$s بولسا% 2 $ s ، ئەمما ئۈسكۈنىدە پەقەت% 3 $ s بار. يېتەرلىك بوشلۇق يوق ماسقەدەملەش ھالىتى كۇنۇپكىسى ھۆججەتلەر @@ -904,7 +904,7 @@ قىسقۇچلارنى سەپلەڭ دەرھال يوللاش پۈتۈنلەي يېڭىلاندى. ئاپتوماتىك يوللاشنى ئاساسىي تىزىملىكنىڭ ئىچىدىن قايتا تەڭشەڭ. \ N \ n يېڭى ۋە كېڭەيتىلگەن ئاپتوماتىك يوللاشتىن ھۇزۇرلىنىڭ. ھېچقانداق مېدىيا ھۆججەت قىسقۇچى تېپىلمىدى - % 1 $ s + %1$s تىپ ماسقەدەملەندى خەتكۈچ @@ -919,8 +919,8 @@ ئۆچۈرۈلگەن ھۆججەتلەر ئۆچۈرۈلگەن ھۆججەت يوق ئۆچۈرۈلگەن ھۆججەتلەرنى بۇ يەردىن ئەسلىگە كەلتۈرەلەيسىز. - % 1 $ s ھۆججەتنى ئۆچۈرگىلى بولمايدۇ! - % 1 $ s ھۆججىتىنى ئەسلىگە كەلتۈرگىلى بولمايدۇ! + %1$s ھۆججەتنى ئۆچۈرگىلى بولمايدۇ! + %1$s ھۆججىتىنى ئەسلىگە كەلتۈرگىلى بولمايدۇ! مەڭگۈلۈك ئۆچۈرۈڭ ئەخلەت ساندۇقىنى قاچىلاش مەغلۇب بولدى! ھۆججەتلەرنى مەڭگۈلۈك ئۆچۈرگىلى بولمايدۇ! @@ -962,8 +962,8 @@ Video ھۆججەت ئىسمى ھۆججەت شەكلى - Google خەرىتە تېزلەتمە ھۆججىتى (% s) - ئىنتېرنېت تېزلەتمە ھۆججىتى (% s) + Google خەرىتە تېزلەتمە ھۆججىتى (%s) + ئىنتېرنېت تېزلەتمە ھۆججىتى (%s) پارچە تېكىست ھۆججىتى (.txt) يوللاش ئۈچۈن ھۆججەت ئىسمى ۋە ھۆججەت تىپى كىرگۈزۈڭ ھۆججەتلەرنى يۈكلەڭ @@ -978,9 +978,9 @@ ھۆججەتنى يەرلىك ساقلاشقا كۆچۈرگىلى بولمايدۇ ھۆججەت قىسقۇچنى قۇلۇپلاش مەغلۇب بولدى ئىشلەتكۈچى يوللاش ئەمەلدىن قالدۇرۇلدى - % 1 $ d /% 2 $ d -% 3 $ s + %1$d d /%2$d d -%3$s شىفىرلاش پەقەت> = Android 5.0 بىلەنلا مۇمكىن - بوشلۇق يېتەرلىك بولمىسا تاللانغان ھۆججەتلەرنى% 1 $ s ھۆججەت قىسقۇچىغا كۆچۈرۈپ كېتىشنىڭ ئالدىنى ئالىدۇ. ئۇلارنىڭ ئورنىغا ئۇلارنى يۆتكىمەكچىمۇ؟ + بوشلۇق يېتەرلىك بولمىسا تاللانغان ھۆججەتلەرنى%1$s ھۆججەت قىسقۇچىغا كۆچۈرۈپ كېتىشنىڭ ئالدىنى ئالىدۇ. ئۇلارنىڭ ئورنىغا ئۇلارنى يۆتكىمەكچىمۇ؟ ساقلاش نورمىسى ئېشىپ كەتتى كامېرادىن ھۆججەتنى سايىلەڭ ماس قەدەملىك توقۇنۇشنى قولدا ھەل قىلىڭ @@ -988,7 +988,7 @@ تاللاڭ يۈكلە قوبۇل قىلىنغان سانلىق مەلۇماتلار ئىناۋەتلىك ھۆججەتنى ئۆز ئىچىگە ئالمىدى. - % 1 $ s قوبۇل قىلىنغان ھۆججەتنى ئوقۇشقا بولمايدۇ + %1$s قوبۇل قىلىنغان ھۆججەتنى ئوقۇشقا بولمايدۇ ھۆججەتنى ۋاقىتلىق قىسقۇچقا كۆچۈرەلمىدى. قايتا ئەۋەتىپ بېقىڭ. يوللاش ئۈچۈن تاللانغان ھۆججەت تېپىلمىدى. ھۆججەتنىڭ بار-يوقلۇقىنى تەكشۈرۈپ بېقىڭ. بۇ ھۆججەتنى يۈكلەشكە بولمايدۇ @@ -998,23 +998,23 @@ قىسقۇچ ئاتى مەغلۇپ بولغان يەرلىك ھۆججەتلەرنى قايتا سىناڭ يۈكلەش قىسقۇچىنى تاللاڭ - % 1 $ s نى يۈكلىيەلمىدى + %1$s نى يۈكلىيەلمىدى يۈكلەش مەغلۇپ بولدى ، قايتا كىرىڭ ھۆججەت يوللاش توقۇنۇشى - قايسى نەشىرىنى% 1 $ s ساقلاشنى تاللاڭ + قايسى نەشىرىنى%1$s ساقلاشنى تاللاڭ يۈكلەش مەغلۇپ بولدى يوللاش ئۇسۇلى: - ھۆججەتنى% 1 $ s قىسقۇچقا يۆتكەڭ + ھۆججەتنى%1$s قىسقۇچقا يۆتكەڭ مەنبە قىسقۇچ پەقەت ئوقۇلىدۇ. ھۆججەت پەقەت يۈكلىنىدۇ ھۆججەتنى ئەسلى ھۆججەت قىسقۇچىدا ساقلاڭ ھۆججەت قىسقۇچتىن ھۆججەتنى ئۆچۈرۈڭ بۇ ھۆججەت قىسقۇچقا يۈكلەش - % 1 $ d %% يۈكلەش% 2 $ s + %1$d %% يۈكلەش% 2 %2$s يۈكلەش… - % 1 $ s يوللاندى + %1$s يوللاندى چېكىن تەڭشەك - ئۈسكۈنىڭىزدە% 1 $ s ھېسابات يوق. ئالدى بىلەن ھېسابات قۇرۇڭ. + ئۈسكۈنىڭىزدە%1$s ھېسابات يوق. ئالدى بىلەن ھېسابات قۇرۇڭ. ھېسابات تېپىلمىدى نۆۋەتتىكى قايتا قوزغىتىش مەغلۇب بولدى @@ -1060,7 +1060,7 @@ ئاندىرويىد سىستېمىسى WebView نى يېڭىلاڭ يېڭى رەسىم ئاتلاش - % 1 $ s دىكى يېڭى + %1$s دىكى يېڭى ئەھۋالىڭىز نېمە؟ ئىشلەتكىلى بولمايدۇ ھۆججەتلەرنى چۈشۈرۈش… From 077101e25f3040ffb34dc29805a3e8485de53de7 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Thu, 9 Jan 2025 13:58:08 +0000 Subject: [PATCH 63/72] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- app/src/main/res/values-ug/strings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/values-ug/strings.xml b/app/src/main/res/values-ug/strings.xml index d3c49124f516..f7e99616aa59 100644 --- a/app/src/main/res/values-ug/strings.xml +++ b/app/src/main/res/values-ug/strings.xml @@ -170,7 +170,7 @@ F-Droid دېتالىدىن قويۇپ بېرىش نامزاتىغا ئېرىشىڭ Google Play دۇكىنىدىن قويۇپ بېرىش نامزاتىغا ئېرىشىڭ كاندىداتنى قويۇپ بېرىش - قويۇپ بېرىلىدىغان كاندىدات (RC) پات ئارىدا ئېلان قىلىنىدىغان سۈرەت بولۇپ ، مۇقىم بولۇشى مۆلچەرلەنمەكتە. شەخسىي تەڭشىكىڭىزنى سىناش بۇنىڭغا كاپالەتلىك قىلالايدۇ. Play دۇكىنىدا سىناققا تىزىملىتىڭ ياكى F-Droid نىڭ \ "نەشرى \" بۆلىكىنى قولدا كۆرۈڭ. + The release candidate (RC) is a snapshot of the upcoming release and is expected to be stable. Testing your individual setup could help ensure this. Sign up for testing on the Play store or manually look in the \"Version\" section of F-Droid. خاتالىق بايقالدى؟ Oddments? سىناق ئارقىلىق ياردەم GitHub دىكى بىر مەسىلىنى دوكلات قىلىڭ @@ -280,7 +280,7 @@ يۈكلەش چېكىنىش يان بالداقنى ئېچىڭ - ئىشلىتىلگەن% %2$s نىڭ%1$s + ئىشلىتىلگەن %2$s نىڭ%1$s %1$s ئىشلىتىلگەن ئاپتوماتىك يوللاش Counter بەك كونا @@ -434,7 +434,7 @@ ماسقەدەملەش ھۆججەت تاللانمىدى ھۆججەت ئىسمى قۇرۇق بولمايدۇ - چەكلەنگەن ھەرپلەر: / \\ <>: "|? * + Forbidden characters: / \\ < > : " | ? * ھۆججەت ئىسمى كەم دېگەندە بىر ئىناۋەتسىز ھەرپنى ئۆز ئىچىگە ئالىدۇ ھۆججەت ئىسمى سانلىق مەلۇماتلىرىڭىزنى بىخەتەر ۋە كونتروللۇقىڭىزدا ساقلاڭ @@ -449,7 +449,7 @@ نىشان ھۆججەت قىسقۇچىنى تاللاڭ كۆچۈرۈڭ يۆتكەڭ - سىزگە% s رۇخسەت قىلىنمايدۇ + You are not permitted %s بۇ ھۆججەتنى كۆچۈرۈش بۇ ھۆججەتنى قۇرۇش بۇ ھۆججەتنى ئۆچۈرۈش @@ -524,9 +524,9 @@ يېڭىلاش ئىزدەش خاتىرىلىرى ئېلېكترونلۇق خەت ئارقىلىق خاتىرە ئەۋەتىڭ - خاتىرە:% 1 $ d kB ، سوئال% 4 $ d ms دىكى% 2 $ d /% 3 $ d ماسلاشتى + Logs: %1$d kB, query matched %2$d / %3$d in %4$d ms Loading… - خاتىرە:% %1$d kB ، سۈزگۈچ يوق + خاتىرە:%1$d kB ، سۈزگۈچ يوق خاتىرە مۇلازىمېتىر ئاسراش ھالىتىدە سانلىق مەلۇماتنى تازىلاش @@ -718,7 +718,7 @@ ھۆججەت قىسقۇچنى تاپقىلى بولمايدۇ ، ماسقەدەملەش مەشغۇلاتى بىكار قىلىنىدۇ يوللاشقا ھۆججەت تاپالمىدى ئۈسكۈنىڭىزدە%1$s نى سىناپ بېقىڭ! - ئۈسكۈنىڭىزدە%1$s ئىشلىتىشكە تەكلىپ قىلماقچى. \ N بۇ يەرگە چۈشۈرۈڭ:% 2 $ s + I want to invite you to use %1$s on your device.\nDownload here: %2$s %1$s ياك%2$s $ s مەزمۇننى يېڭىلاش قايتا يۈكلەڭ @@ -824,7 +824,7 @@ رەسىملەرنى كۆرسەت سىنلارنى كۆرسەت تەمىنلىگۈچى بىلەن تىزىملىتىڭ - %1$s نىڭ Nextcloud ھېساباتىڭىزنى زىيارەت قىلىشىغا يول قويۇڭ% 2 $ s? + Allow %1$s to access your Nextcloud account %2$s? تەرتىپلەش يوشۇر تەپسىلاتى @@ -875,7 +875,7 @@ يىل / ئاي / كۈن يىل / ئاي يىل - \ "%1$s \" سىز بىلەن ئورتاقلاشتى + \"%1$s\" has been shared with you %1$s سىز بىلەن ئورتاقلاشتى \ \"%2$s $ s \" پەقەت رەسىملەر رەسىم ۋە سىن @@ -891,12 +891,12 @@ ماسقەدەملەش مەغلۇپ بولدى ، قايتا كىرىڭ ھۆججەت مەزمۇنى ماسقەدەملەندى %1$s ھۆججەت قىسقۇچنى ماسقەدەملەش تاماملانمىدى - 1.3.16 نەشرىگە قەدەر ، بۇ ئۈسكۈنىدىن يۈكلەنگەن ھۆججەتلەر يەرلىك%1$s ھۆججەت قىسقۇچىغا كۆچۈرۈلۈپ ، بىر ھۆججەت كۆپ ھېسابات بىلەن ماس قەدەمدە سانلىق مەلۇمات يوقاپ كېتىشنىڭ ئالدىنى ئالىدۇ. \ N \ n بۇ ئۆزگىرىش سەۋەبىدىن ، بارلىق ھۆججەتلەر ئىلگىرىكى نەشرىگە يۈكلەنگەن. بۇ دېتالنىڭ% 2 $ s ھۆججەت قىسقۇچىغا كۆچۈرۈلگەن. قانداقلا بولمىسۇن ، خاتالىق ھېسابات ماسقەدەملەش جەريانىدا بۇ مەشغۇلاتنىڭ تاماملىنىشىنىڭ ئالدىنى ئالدى. سىز ھۆججەتلەرنى (لار) نى تاشلاپ قويۇپ ، ئۇلىنىشنى% 3 $ s غا ئۆچۈرەلەيسىز ياكى ھۆججەت (لەر) نى%1$s ھۆججەت قىسقۇچىغا يۆتكىسىڭىز ھەمدە ئۇلىنىشنى% 4 $ s غا ساقلاپ قويسىڭىز بولىدۇ. \ N \ n تۆۋەندە كۆرسىتىلگەن يەرلىك ھۆججەت (لار) بولۇپ ، ئۇلانغان% 5 $ s دىكى يىراقتىكى ھۆججەتلەر. + As of version 1.3.16, files uploaded from this device are copied into the local %1$s folder to prevent data loss when a single file is synced with multiple accounts.\n\nDue to this change, all files uploaded with earlier versions of this app were copied into the %2$s folder. However, an error prevented the completion of this operation during account synchronization. You may either leave the file(s) as is and delete the link to %3$s, or move the file(s) into the %1$s folder and retain the link to %4$s.\n\nListed below are the local file(s), and the remote file(s) in %5$s they were linked to. بەزى يەرلىك ھۆججەتلەر ئۇنتۇلدى ھۆججەتنىڭ ئەڭ يېڭى نەشرىنى ئېلىش. ماسقەدەملەشنى تاللاڭ بوش ئورۇن - %1$s بولسا% 2 $ s ، ئەمما ئۈسكۈنىدە پەقەت% 3 $ s بار. + %1$s is %2$s, but there is only %3$s available on device. يېتەرلىك بوشلۇق يوق ماسقەدەملەش ھالىتى كۇنۇپكىسى ھۆججەتلەر From 1c7534e16dcf819246b71fd2ebfa2a551e29093e Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Thu, 9 Jan 2025 14:04:14 +0000 Subject: [PATCH 64/72] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- app/src/main/res/values-ug/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ug/strings.xml b/app/src/main/res/values-ug/strings.xml index f7e99616aa59..0f47ca8d318e 100644 --- a/app/src/main/res/values-ug/strings.xml +++ b/app/src/main/res/values-ug/strings.xml @@ -45,7 +45,7 @@ مەغلۇب بولدى ۋەزىپە تىزىملىكى يۈكلىنىۋاتىدۇ ، ساقلاپ تۇرۇڭ ھېچقانداق ۋەزىپە يوق. يېڭى ۋەزىپە يارىتىش ئۈچۈن ۋەزىپە تۈرىنى تاللاڭ. - % %s ۋەزىپە تىپىغا ماس كېلىدىغان ۋەزىپە يوق ، ئاستىدىن ئوڭدىن يېڭى ۋەزىپە قۇرالايسىز. + %s ۋەزىپە تىپىغا ماس كېلىدىغان ۋەزىپە يوق ، ئاستىدىن ئوڭدىن يېڭى ۋەزىپە قۇرالايسىز. ئىلگىرىلەۋاتىدۇ پىلانلانغان تاماملاندى From c512805fd1b303c6e08640a3a98b89ce2032afce Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Fri, 10 Jan 2025 02:57:24 +0000 Subject: [PATCH 65/72] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- app/src/main/res/values-ug/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-ug/strings.xml b/app/src/main/res/values-ug/strings.xml index 0f47ca8d318e..d2e28c973fac 100644 --- a/app/src/main/res/values-ug/strings.xml +++ b/app/src/main/res/values-ug/strings.xml @@ -170,7 +170,7 @@ F-Droid دېتالىدىن قويۇپ بېرىش نامزاتىغا ئېرىشىڭ Google Play دۇكىنىدىن قويۇپ بېرىش نامزاتىغا ئېرىشىڭ كاندىداتنى قويۇپ بېرىش - The release candidate (RC) is a snapshot of the upcoming release and is expected to be stable. Testing your individual setup could help ensure this. Sign up for testing on the Play store or manually look in the \"Version\" section of F-Droid. + قويۇپ بېرىلىدىغان كاندىدات (RC) پات ئارىدا ئېلان قىلىنىدىغان سۈرەت بولۇپ ، مۇقىم بولۇشى مۆلچەرلەنمەكتە. شەخسىي تەڭشىكىڭىزنى سىناش بۇنىڭغا كاپالەتلىك قىلالايدۇ. Play دۇكىنىدا سىناققا تىزىملىتىڭ ياكى F-Droid نىڭ \ \"نەشرى \" بۆلىكىنى قولدا كۆرۈڭ. خاتالىق بايقالدى؟ Oddments? سىناق ئارقىلىق ياردەم GitHub دىكى بىر مەسىلىنى دوكلات قىلىڭ @@ -434,7 +434,7 @@ ماسقەدەملەش ھۆججەت تاللانمىدى ھۆججەت ئىسمى قۇرۇق بولمايدۇ - Forbidden characters: / \\ < > : " | ? * + چەكلەنگەن ھەرپلەر: / \\ <>: \"|? * ھۆججەت ئىسمى كەم دېگەندە بىر ئىناۋەتسىز ھەرپنى ئۆز ئىچىگە ئالىدۇ ھۆججەت ئىسمى سانلىق مەلۇماتلىرىڭىزنى بىخەتەر ۋە كونتروللۇقىڭىزدا ساقلاڭ @@ -449,7 +449,7 @@ نىشان ھۆججەت قىسقۇچىنى تاللاڭ كۆچۈرۈڭ يۆتكەڭ - You are not permitted %s + سىزگە%s رۇخسەت قىلىنمايدۇ بۇ ھۆججەتنى كۆچۈرۈش بۇ ھۆججەتنى قۇرۇش بۇ ھۆججەتنى ئۆچۈرۈش @@ -524,7 +524,7 @@ يېڭىلاش ئىزدەش خاتىرىلىرى ئېلېكترونلۇق خەت ئارقىلىق خاتىرە ئەۋەتىڭ - Logs: %1$d kB, query matched %2$d / %3$d in %4$d ms + خاتىرە:%1$d kB ، سوئال%4$d ms دىكى%2$d/ %3$d ماسلاشتى Loading… خاتىرە:%1$d kB ، سۈزگۈچ يوق خاتىرە @@ -718,7 +718,7 @@ ھۆججەت قىسقۇچنى تاپقىلى بولمايدۇ ، ماسقەدەملەش مەشغۇلاتى بىكار قىلىنىدۇ يوللاشقا ھۆججەت تاپالمىدى ئۈسكۈنىڭىزدە%1$s نى سىناپ بېقىڭ! - I want to invite you to use %1$s on your device.\nDownload here: %2$s + ئۈسكۈنىڭىزدە%1$s ئىشلىتىشكە تەكلىپ قىلماقچى. \ N بۇ يەرگە چۈشۈرۈڭ:%2$s %1$s ياك%2$s $ s مەزمۇننى يېڭىلاش قايتا يۈكلەڭ @@ -824,7 +824,7 @@ رەسىملەرنى كۆرسەت سىنلارنى كۆرسەت تەمىنلىگۈچى بىلەن تىزىملىتىڭ - Allow %1$s to access your Nextcloud account %2$s? + %1$s نىڭ Nextcloud ھېساباتىڭىزنى زىيارەت قىلىشىغا يول قويۇڭ%2$s? تەرتىپلەش يوشۇر تەپسىلاتى @@ -875,7 +875,7 @@ يىل / ئاي / كۈن يىل / ئاي يىل - \"%1$s\" has been shared with you + \"%1$s\" سىز بىلەن ئورتاقلاشتى %1$s سىز بىلەن ئورتاقلاشتى \ \"%2$s $ s \" پەقەت رەسىملەر رەسىم ۋە سىن @@ -891,12 +891,12 @@ ماسقەدەملەش مەغلۇپ بولدى ، قايتا كىرىڭ ھۆججەت مەزمۇنى ماسقەدەملەندى %1$s ھۆججەت قىسقۇچنى ماسقەدەملەش تاماملانمىدى - As of version 1.3.16, files uploaded from this device are copied into the local %1$s folder to prevent data loss when a single file is synced with multiple accounts.\n\nDue to this change, all files uploaded with earlier versions of this app were copied into the %2$s folder. However, an error prevented the completion of this operation during account synchronization. You may either leave the file(s) as is and delete the link to %3$s, or move the file(s) into the %1$s folder and retain the link to %4$s.\n\nListed below are the local file(s), and the remote file(s) in %5$s they were linked to. + 1.3.16 نەشرىگە قەدەر ، بۇ ئۈسكۈنىدىن يۈكلەنگەن ھۆججەتلەر يەرلىك%1$s ھۆججەت قىسقۇچىغا كۆچۈرۈلۈپ ، بىر ھۆججەت كۆپ ھېسابات بىلەن ماس قەدەمدە سانلىق مەلۇمات يوقاپ كېتىشنىڭ ئالدىنى ئالىدۇ. \ N \ n بۇ ئۆزگىرىش سەۋەبىدىن ، بارلىق ھۆججەتلەر ئىلگىرىكى نەشرىگە يۈكلەنگەن. بۇ دېتالنىڭ%2$s ھۆججەت قىسقۇچىغا كۆچۈرۈلگەن. قانداقلا بولمىسۇن ، خاتالىق ھېسابات ماسقەدەملەش جەريانىدا بۇ مەشغۇلاتنىڭ تاماملىنىشىنىڭ ئالدىنى ئالدى. سىز ھۆججەتلەرنى (لار) نى تاشلاپ قويۇپ ، ئۇلىنىشنى%3$s غا ئۆچۈرەلەيسىز ياكى ھۆججەت (لەر) نى%1$s ھۆججەت قىسقۇچىغا يۆتكىسىڭىز ھەمدە ئۇلىنىشنى%4$s غا ساقلاپ قويسىڭىز بولىدۇ. \ N \ n تۆۋەندە كۆرسىتىلگەن يەرلىك ھۆججەت (لار) بولۇپ ، ئۇلانغان%5$s دىكى يىراقتىكى ھۆججەتلەر. بەزى يەرلىك ھۆججەتلەر ئۇنتۇلدى ھۆججەتنىڭ ئەڭ يېڭى نەشرىنى ئېلىش. ماسقەدەملەشنى تاللاڭ بوش ئورۇن - %1$s is %2$s, but there is only %3$s available on device. + %1$s بولسا%2$s، ئەمما ئۈسكۈنىدە پەقەت%3$s بار. يېتەرلىك بوشلۇق يوق ماسقەدەملەش ھالىتى كۇنۇپكىسى ھۆججەتلەر From c231a84eb41a84243bc8ffbd147d72c7b46c7ccd Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 9 Jan 2025 16:01:32 +0100 Subject: [PATCH 66/72] revert removing verification Signed-off-by: tobiasKaminsky --- gradle/verification-metadata.xml | 16984 +++++++++++++++++++++++++++-- 1 file changed, 16068 insertions(+), 916 deletions(-) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index f776fef6000c..644445b97410 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -3,6 +3,17 @@ true true + + + + + + + + + + + @@ -19,6 +30,7 @@ + @@ -26,54 +38,97 @@ + - - + + + + + + + + + - - + + + + + + - + + + + - + + + + - + + + + + + - + + + + - + + + + + + - + + + + + + + + + + - + + + + @@ -81,7 +136,14 @@ - + + + + + + + + @@ -93,11 +155,22 @@ - + + + + + + + + + + + + @@ -107,47 +180,75 @@ + - - + + + + + + + + + + + + + - + + + + + + + + + - - - + + + - + + + + + - + + - + - + + + + @@ -155,8 +256,13 @@ + - + + + + + @@ -170,28 +276,36 @@ - - + + + + - + + - + + + + + + @@ -199,25 +313,40 @@ - + - + + + + - - + + + + + + + - + + + + + + + - + + @@ -226,18 +355,32 @@ + - + + + + + + + + + - + + + + + + @@ -257,6 +400,24 @@ + + + + + + + + + + + + + + + + + + @@ -265,6 +426,19 @@ + + + + + + + + + + + + + @@ -273,12 +447,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -291,6 +576,14 @@ + + + + + + + + @@ -299,6 +592,14 @@ + + + + + + + + @@ -307,7 +608,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -320,6 +645,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -328,6 +690,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -336,6 +730,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -344,11 +770,32 @@ + + + + + + + + + + + + + + + + + + + + + @@ -373,6 +820,11 @@ + + + + + @@ -383,7 +835,7 @@ - + @@ -467,11 +919,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -481,1409 +975,15965 @@ - - - + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - - - - + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + + + + - - - + + + - - + + + + + + + + + + - - - + + + - - + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - - + + + - - + + - - - + + + - - - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - - + + + - - - + + + @@ -1894,19 +16944,121 @@ + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - From ea9663dbcd8af7910cf2d3476fdc6804a5419ff7 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 10 Jan 2025 08:16:20 +0100 Subject: [PATCH 67/72] bump lib Signed-off-by: tobiasKaminsky --- build.gradle | 2 +- gradle/verification-metadata.xml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 58e6de85ae13..60c72adb36b4 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion ="856c2516c6dd92058535d726ab55f0aef19ee089" + androidLibraryVersion ="30443186505dbb16c19ac69a34122010446207fe" androidPluginVersion = '8.7.3' androidxMediaVersion = '1.5.1' androidxTestVersion = "1.6.1" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 644445b97410..0c6dabd826b6 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -8640,6 +8640,14 @@ + + + + + + + + From 281bc60b8712a26517f21a5adda73007ad4250dc Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 9 Jan 2025 14:46:31 +0100 Subject: [PATCH 68/72] re-add lint check for translation Signed-off-by: tobiasKaminsky --- app/lint.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/lint.xml b/app/lint.xml index 5988518654de..1e5fde50dab4 100644 --- a/app/lint.xml +++ b/app/lint.xml @@ -37,10 +37,6 @@ - - - - From ac35fcfa9b228542c21ddb3b85074f4776e77639 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:12:35 +0000 Subject: [PATCH 69/72] fix(deps): update dependency com.android.tools.build:gradle to v8.8.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- build.gradle | 2 +- gradle/verification-metadata.xml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 60c72adb36b4..c46840c4dac1 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { ext { androidLibraryVersion ="30443186505dbb16c19ac69a34122010446207fe" - androidPluginVersion = '8.7.3' + androidPluginVersion = '8.8.0' androidxMediaVersion = '1.5.1' androidxTestVersion = "1.6.1" appCompatVersion = '1.7.0' diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 0c6dabd826b6..7e1995f0a4bd 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -6151,6 +6151,14 @@ + + + + + + + + From 8e51872f175ddaeec81d0d390e9ebcd219abe8b1 Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 10 Jan 2025 23:09:05 +0100 Subject: [PATCH 70/72] Fixes after CR Signed-off-by: batpio --- .../dialog/DurationPickerDialogFragmentIT.kt | 42 ++++++++++++------- .../ui/dialog/DurationPickerDialogFragment.kt | 26 +++++------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt index 12ef4e494271..cee08fe02a24 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt @@ -9,10 +9,15 @@ */ package com.owncloud.android.ui.dialog -import androidx.test.espresso.intent.rule.IntentsTestRule +import androidx.annotation.UiThread +import androidx.test.core.app.launchActivity +import androidx.test.espresso.Espresso.onView +import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.ViewMatchers.isDisplayed +import androidx.test.espresso.matcher.ViewMatchers.isRoot import com.nextcloud.test.TestActivity import com.owncloud.android.AbstractIT -import org.junit.Rule +import com.owncloud.android.utils.ScreenshotTest import org.junit.Test import java.util.concurrent.TimeUnit.DAYS import java.util.concurrent.TimeUnit.HOURS @@ -20,26 +25,31 @@ import java.util.concurrent.TimeUnit.MINUTES class DurationPickerDialogFragmentIT : AbstractIT() { - @get:Rule - val testActivityRule = IntentsTestRule(TestActivity::class.java, true, false) + private val testClassName = "com.owncloud.android.ui.dialog.DurationPickerDialogFragmentIT" @Test + @UiThread + @ScreenshotTest fun showSyncDelayDurationDialog() { val initialDuration = DAYS.toMillis(2) + HOURS.toMillis(8) + MINUTES.toMillis(15) - val activity = testActivityRule.launchActivity(null) - val fm = activity.supportFragmentManager - val ft = fm.beginTransaction() - ft.addToBackStack(null) + launchActivity().use { scenario -> + scenario.onActivity { sut -> + val transaction = sut.supportFragmentManager.beginTransaction() - val dialog = DurationPickerDialogFragment.newInstance( - initialDuration, - "Dialog title", - "Hint message" - ) - dialog.show(ft, "DURATION_DIALOG") + val dialog = DurationPickerDialogFragment.newInstance( + initialDuration, + "Dialog title", + "Hint message" + ) + dialog.show(transaction, "DURATION_DIALOG") - waitForIdleSync() - screenshot(dialog.requireDialog().window!!.decorView) + onIdleSync { + val screenShotName = createName(testClassName + "_" + "showSyncDelayDurationDialog", "") + onView(isRoot()).check(matches(isDisplayed())) + screenshotViaName(sut, screenShotName) + } + } + } } } diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt index ee4ec7cb110a..66bc8b03e372 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt @@ -28,8 +28,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { private var resultListener: Listener? = null - private var _binding: DurationPickerBinding? = null - val binding get() = _binding!! + private lateinit var binding: DurationPickerBinding private var duration: Long get() = TimeUnit.DAYS.toMillis(binding.daysPicker.value.toLong()) + @@ -64,7 +63,7 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { } override fun onCreateDialog(savedState: Bundle?): Dialog { - _binding = DurationPickerBinding.inflate(requireActivity().layoutInflater, null, false) + binding = DurationPickerBinding.inflate(requireActivity().layoutInflater, null, false) setupLimits() @@ -96,11 +95,6 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { return builder.create() } - override fun onDestroyView() { - super.onDestroyView() - _binding = null - } - private fun setupLimits() { binding.daysPicker.maxValue = MAX_DAYS_VALUE binding.hoursPicker.maxValue = MAX_HOURS_VALUE @@ -125,14 +119,14 @@ class DurationPickerDialogFragment : DialogFragment(), Injectable { private const val HINT_MESSAGE = "HINT" fun newInstance(duration: Long, title: String?, hintMessage: String?): DurationPickerDialogFragment { - val args = Bundle() - args.putLong(DURATION, duration) - args.putString(HINT_MESSAGE, hintMessage) - args.putString(DIALOG_TITLE, title) - val dialogFragment = DurationPickerDialogFragment() - dialogFragment.arguments = args - dialogFragment.setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) - return dialogFragment + return DurationPickerDialogFragment().apply { + arguments = Bundle().apply { + putLong(DURATION, duration) + putString(HINT_MESSAGE, hintMessage) + putString(DIALOG_TITLE, title) + } + setStyle(STYLE_NORMAL, R.style.Theme_ownCloud_Dialog) + } } } } From 440814712d703af9eca24091ecf0878cc7c205db Mon Sep 17 00:00:00 2001 From: batpio Date: Fri, 10 Jan 2025 23:16:32 +0100 Subject: [PATCH 71/72] DB automigration Signed-off-by: batpio --- .../java/com/nextcloud/client/database/NextcloudDatabase.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt index e58a011292a2..45f7eb27564e 100644 --- a/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt +++ b/app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt @@ -68,7 +68,8 @@ import com.owncloud.android.db.ProviderMeta AutoMigration(from = 81, to = 82), AutoMigration(from = 82, to = 83), AutoMigration(from = 83, to = 84), - AutoMigration(from = 84, to = 85, spec = DatabaseMigrationUtil.DeleteColumnSpec::class) + AutoMigration(from = 84, to = 85, spec = DatabaseMigrationUtil.DeleteColumnSpec::class), + AutoMigration(from = 85, to = 86) ], exportSchema = true ) From ccafc2b54f3d92dc9f383fb810e9cf08ffab943d Mon Sep 17 00:00:00 2001 From: batpio Date: Wed, 5 Feb 2025 19:02:38 +0100 Subject: [PATCH 72/72] Master merge fixes Signed-off-by: batpio --- .../87.json | 1338 +++++++++++++++++ .../nextcloud/client/jobs/FilesSyncWork.kt | 9 +- .../datamodel/FilesystemDataProvider.java | 20 +- .../com/owncloud/android/db/ProviderMeta.java | 2 +- 4 files changed, 1355 insertions(+), 14 deletions(-) create mode 100644 app/schemas/com.nextcloud.client.database.NextcloudDatabase/87.json diff --git a/app/schemas/com.nextcloud.client.database.NextcloudDatabase/87.json b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/87.json new file mode 100644 index 000000000000..7c0e2c10293a --- /dev/null +++ b/app/schemas/com.nextcloud.client.database.NextcloudDatabase/87.json @@ -0,0 +1,1338 @@ +{ + "formatVersion": 1, + "database": { + "version": 87, + "identityHash": "9ea093a026a7c22cb81914f6a7422483", + "entities": [ + { + "tableName": "arbitrary_data", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `cloud_id` TEXT, `key` TEXT, `value` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "cloudId", + "columnName": "cloud_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "key", + "columnName": "key", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "capabilities", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `assistant` INTEGER, `account` TEXT, `version_mayor` INTEGER, `version_minor` INTEGER, `version_micro` INTEGER, `version_string` TEXT, `version_edition` TEXT, `extended_support` INTEGER, `core_pollinterval` INTEGER, `sharing_api_enabled` INTEGER, `sharing_public_enabled` INTEGER, `sharing_public_password_enforced` INTEGER, `sharing_public_expire_date_enabled` INTEGER, `sharing_public_expire_date_days` INTEGER, `sharing_public_expire_date_enforced` INTEGER, `sharing_public_send_mail` INTEGER, `sharing_public_upload` INTEGER, `sharing_user_send_mail` INTEGER, `sharing_resharing` INTEGER, `sharing_federation_outgoing` INTEGER, `sharing_federation_incoming` INTEGER, `files_bigfilechunking` INTEGER, `files_undelete` INTEGER, `files_versioning` INTEGER, `external_links` INTEGER, `server_name` TEXT, `server_color` TEXT, `server_text_color` TEXT, `server_element_color` TEXT, `server_slogan` TEXT, `server_logo` TEXT, `background_url` TEXT, `end_to_end_encryption` INTEGER, `end_to_end_encryption_keys_exist` INTEGER, `end_to_end_encryption_api_version` TEXT, `activity` INTEGER, `background_default` INTEGER, `background_plain` INTEGER, `richdocument` INTEGER, `richdocument_mimetype_list` TEXT, `richdocument_direct_editing` INTEGER, `richdocument_direct_templates` INTEGER, `richdocument_optional_mimetype_list` TEXT, `sharing_public_ask_for_optional_password` INTEGER, `richdocument_product_name` TEXT, `direct_editing_etag` TEXT, `user_status` INTEGER, `user_status_supports_emoji` INTEGER, `etag` TEXT, `files_locking_version` TEXT, `groupfolders` INTEGER, `drop_account` INTEGER, `security_guard` INTEGER, `forbidden_filename_characters` INTEGER, `forbidden_filenames` INTEGER, `forbidden_filename_extensions` INTEGER, `forbidden_filename_basenames` INTEGER, `files_download_limit` INTEGER, `files_download_limit_default` INTEGER, `recommendation` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "assistant", + "columnName": "assistant", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionMajor", + "columnName": "version_mayor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMinor", + "columnName": "version_minor", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionMicro", + "columnName": "version_micro", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "versionString", + "columnName": "version_string", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "versionEditor", + "columnName": "version_edition", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "extendedSupport", + "columnName": "extended_support", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "corePollinterval", + "columnName": "core_pollinterval", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingApiEnabled", + "columnName": "sharing_api_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicEnabled", + "columnName": "sharing_public_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicPasswordEnforced", + "columnName": "sharing_public_password_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnabled", + "columnName": "sharing_public_expire_date_enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateDays", + "columnName": "sharing_public_expire_date_days", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicExpireDateEnforced", + "columnName": "sharing_public_expire_date_enforced", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicSendMail", + "columnName": "sharing_public_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingPublicUpload", + "columnName": "sharing_public_upload", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingUserSendMail", + "columnName": "sharing_user_send_mail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingResharing", + "columnName": "sharing_resharing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationOutgoing", + "columnName": "sharing_federation_outgoing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharingFederationIncoming", + "columnName": "sharing_federation_incoming", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesBigfilechunking", + "columnName": "files_bigfilechunking", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesUndelete", + "columnName": "files_undelete", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesVersioning", + "columnName": "files_versioning", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "externalLinks", + "columnName": "external_links", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverName", + "columnName": "server_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverColor", + "columnName": "server_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverTextColor", + "columnName": "server_text_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverElementColor", + "columnName": "server_element_color", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverSlogan", + "columnName": "server_slogan", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverLogo", + "columnName": "server_logo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverBackgroundUrl", + "columnName": "background_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "endToEndEncryption", + "columnName": "end_to_end_encryption", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionKeysExist", + "columnName": "end_to_end_encryption_keys_exist", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "endToEndEncryptionApiVersion", + "columnName": "end_to_end_encryption_api_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "activity", + "columnName": "activity", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundDefault", + "columnName": "background_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "serverBackgroundPlain", + "columnName": "background_plain", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocument", + "columnName": "richdocument", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentMimetypeList", + "columnName": "richdocument_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richdocumentDirectEditing", + "columnName": "richdocument_direct_editing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentTemplates", + "columnName": "richdocument_direct_templates", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentOptionalMimetypeList", + "columnName": "richdocument_optional_mimetype_list", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharingPublicAskForOptionalPassword", + "columnName": "sharing_public_ask_for_optional_password", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "richdocumentProductName", + "columnName": "richdocument_product_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "directEditingEtag", + "columnName": "direct_editing_etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "userStatus", + "columnName": "user_status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userStatusSupportsEmoji", + "columnName": "user_status_supports_emoji", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filesLockingVersion", + "columnName": "files_locking_version", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "groupfolders", + "columnName": "groupfolders", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "dropAccount", + "columnName": "drop_account", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "securityGuard", + "columnName": "security_guard", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameCharacters", + "columnName": "forbidden_filename_characters", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNames", + "columnName": "forbidden_filenames", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFileNameExtensions", + "columnName": "forbidden_filename_extensions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "forbiddenFilenameBaseNames", + "columnName": "forbidden_filename_basenames", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesDownloadLimit", + "columnName": "files_download_limit", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "filesDownloadLimitDefault", + "columnName": "files_download_limit_default", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "recommendation", + "columnName": "recommendation", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "external_links", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `icon_url` TEXT, `language` TEXT, `type` INTEGER, `name` TEXT, `url` TEXT, `redirect` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "iconUrl", + "columnName": "icon_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "redirect", + "columnName": "redirect", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filelist", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `filename` TEXT, `encrypted_filename` TEXT, `path` TEXT, `path_decrypted` TEXT, `parent` INTEGER, `created` INTEGER, `modified` INTEGER, `content_type` TEXT, `content_length` INTEGER, `media_path` TEXT, `file_owner` TEXT, `last_sync_date` INTEGER, `last_sync_date_for_data` INTEGER, `modified_at_last_sync_for_data` INTEGER, `etag` TEXT, `etag_on_server` TEXT, `share_by_link` INTEGER, `permissions` TEXT, `remote_id` TEXT, `local_id` INTEGER NOT NULL DEFAULT -1, `update_thumbnail` INTEGER, `is_downloading` INTEGER, `favorite` INTEGER, `hidden` INTEGER, `is_encrypted` INTEGER, `etag_in_conflict` TEXT, `shared_via_users` INTEGER, `mount_type` INTEGER, `has_preview` INTEGER, `unread_comments_count` INTEGER, `owner_id` TEXT, `owner_display_name` TEXT, `note` TEXT, `sharees` TEXT, `rich_workspace` TEXT, `metadata_size` TEXT, `metadata_live_photo` TEXT, `locked` INTEGER, `lock_type` INTEGER, `lock_owner` TEXT, `lock_owner_display_name` TEXT, `lock_owner_editor` TEXT, `lock_timestamp` INTEGER, `lock_timeout` INTEGER, `lock_token` TEXT, `tags` TEXT, `metadata_gps` TEXT, `e2e_counter` INTEGER, `internal_two_way_sync_timestamp` INTEGER, `internal_two_way_sync_result` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "name", + "columnName": "filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "encryptedName", + "columnName": "encrypted_filename", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "pathDecrypted", + "columnName": "path_decrypted", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "parent", + "columnName": "parent", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "creation", + "columnName": "created", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "contentType", + "columnName": "content_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "contentLength", + "columnName": "content_length", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "storagePath", + "columnName": "media_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "file_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastSyncDate", + "columnName": "last_sync_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastSyncDateForData", + "columnName": "last_sync_date_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAtLastSyncForData", + "columnName": "modified_at_last_sync_for_data", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etag", + "columnName": "etag", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "etagOnServer", + "columnName": "etag_on_server", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedViaLink", + "columnName": "share_by_link", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remoteId", + "columnName": "remote_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "localId", + "columnName": "local_id", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "-1" + }, + { + "fieldPath": "updateThumbnail", + "columnName": "update_thumbnail", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isDownloading", + "columnName": "is_downloading", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "favorite", + "columnName": "favorite", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isEncrypted", + "columnName": "is_encrypted", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "etagInConflict", + "columnName": "etag_in_conflict", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharedWithSharee", + "columnName": "shared_via_users", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "mountType", + "columnName": "mount_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hasPreview", + "columnName": "has_preview", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "unreadCommentsCount", + "columnName": "unread_comments_count", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "ownerId", + "columnName": "owner_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ownerDisplayName", + "columnName": "owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "sharees", + "columnName": "sharees", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "richWorkspace", + "columnName": "rich_workspace", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataSize", + "columnName": "metadata_size", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataLivePhoto", + "columnName": "metadata_live_photo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locked", + "columnName": "locked", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockType", + "columnName": "lock_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockOwner", + "columnName": "lock_owner", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerDisplayName", + "columnName": "lock_owner_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockOwnerEditor", + "columnName": "lock_owner_editor", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lockTimestamp", + "columnName": "lock_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockTimeout", + "columnName": "lock_timeout", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lockToken", + "columnName": "lock_token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tags", + "columnName": "tags", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "metadataGPS", + "columnName": "metadata_gps", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "e2eCounter", + "columnName": "e2e_counter", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySync", + "columnName": "internal_two_way_sync_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "internalTwoWaySyncResult", + "columnName": "internal_two_way_sync_result", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filesystem", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `is_folder` INTEGER, `found_at` INTEGER, `upload_triggered` INTEGER, `syncedfolder_id` TEXT, `crc32` TEXT, `modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileIsFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileFoundRecently", + "columnName": "found_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSentForUpload", + "columnName": "upload_triggered", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncedFolderId", + "columnName": "syncedfolder_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "crc32", + "columnName": "crc32", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileModified", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "ocshares", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `file_source` INTEGER, `item_source` INTEGER, `share_type` INTEGER, `shate_with` TEXT, `path` TEXT, `permissions` INTEGER, `shared_date` INTEGER, `expiration_date` INTEGER, `token` TEXT, `shared_with_display_name` TEXT, `is_directory` INTEGER, `user_id` TEXT, `id_remote_shared` INTEGER, `owner_share` TEXT, `is_password_protected` INTEGER, `note` TEXT, `hide_download` INTEGER, `share_link` TEXT, `share_label` TEXT, `download_limit_limit` INTEGER, `download_limit_count` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "fileSource", + "columnName": "file_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "itemSource", + "columnName": "item_source", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareType", + "columnName": "share_type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareWith", + "columnName": "shate_with", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "permissions", + "columnName": "permissions", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "sharedDate", + "columnName": "shared_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "expirationDate", + "columnName": "expiration_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "token", + "columnName": "token", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareWithDisplayName", + "columnName": "shared_with_display_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isDirectory", + "columnName": "is_directory", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "userId", + "columnName": "user_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "idRemoteShared", + "columnName": "id_remote_shared", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "accountOwner", + "columnName": "owner_share", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "isPasswordProtected", + "columnName": "is_password_protected", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "note", + "columnName": "note", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "hideDownload", + "columnName": "hide_download", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "shareLink", + "columnName": "share_link", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "shareLabel", + "columnName": "share_label", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloadLimitLimit", + "columnName": "download_limit_limit", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "downloadLimitCount", + "columnName": "download_limit_count", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "synced_folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `wifi_only` INTEGER, `charging_only` INTEGER, `existing` INTEGER, `enabled` INTEGER, `enabled_timestamp_ms` INTEGER, `subfolder_by_date` INTEGER, `account` TEXT, `upload_option` INTEGER, `name_collision_policy` INTEGER, `upload_delay_time_ms` INTEGER NOT NULL DEFAULT 0, `type` INTEGER, `hidden` INTEGER, `sub_folder_rule` INTEGER, `exclude_hidden` INTEGER, `last_scan_timestamp_ms` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "wifiOnly", + "columnName": "wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "chargingOnly", + "columnName": "charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "existing", + "columnName": "existing", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabled", + "columnName": "enabled", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "enabledTimestampMs", + "columnName": "enabled_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subfolderByDate", + "columnName": "subfolder_by_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "account", + "columnName": "account", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uploadAction", + "columnName": "upload_option", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadDelayTimeMs", + "columnName": "upload_delay_time_ms", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "hidden", + "columnName": "hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "subFolderRule", + "columnName": "sub_folder_rule", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "excludeHidden", + "columnName": "exclude_hidden", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastScanTimestampMs", + "columnName": "last_scan_timestamp_ms", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "list_of_uploads", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `local_path` TEXT, `remote_path` TEXT, `account_name` TEXT, `file_size` INTEGER, `status` INTEGER, `local_behaviour` INTEGER, `upload_time` INTEGER, `name_collision_policy` INTEGER, `is_create_remote_folder` INTEGER, `upload_end_timestamp` INTEGER, `last_result` INTEGER, `is_while_charging_only` INTEGER, `is_wifi_only` INTEGER, `created_by` INTEGER, `folder_unlock_token` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localPath", + "columnName": "local_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "remotePath", + "columnName": "remote_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "accountName", + "columnName": "account_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "fileSize", + "columnName": "file_size", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "status", + "columnName": "status", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "localBehaviour", + "columnName": "local_behaviour", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadTime", + "columnName": "upload_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "nameCollisionPolicy", + "columnName": "name_collision_policy", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isCreateRemoteFolder", + "columnName": "is_create_remote_folder", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uploadEndTimestamp", + "columnName": "upload_end_timestamp", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastResult", + "columnName": "last_result", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWhileChargingOnly", + "columnName": "is_while_charging_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isWifiOnly", + "columnName": "is_wifi_only", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "createdBy", + "columnName": "created_by", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folderUnlockToken", + "columnName": "folder_unlock_token", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "virtual", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` TEXT, `ocfile_id` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "ocFileId", + "columnName": "ocfile_id", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "offline_operations", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `offline_operations_parent_oc_file_id` INTEGER, `offline_operations_path` TEXT, `offline_operations_type` TEXT, `offline_operations_file_name` TEXT, `offline_operations_created_at` INTEGER, `offline_operations_modified_at` INTEGER)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "parentOCFileId", + "columnName": "offline_operations_parent_oc_file_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "path", + "columnName": "offline_operations_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "offline_operations_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "filename", + "columnName": "offline_operations_file_name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "createdAt", + "columnName": "offline_operations_created_at", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modifiedAt", + "columnName": "offline_operations_modified_at", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9ea093a026a7c22cb81914f6a7422483')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 93c6e22991bc..ec6735133043 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -243,19 +243,14 @@ class FilesSyncWork( null } - val maxFileTimestamp = if (syncedFolder.uploadDelayTimeMs > 0) { - System.currentTimeMillis() - syncedFolder.uploadDelayTimeMs - } else { - null - } - // Ensure only new files are processed for upload. // Files that have been previously uploaded cannot be re-uploaded, // even if they have been deleted or moved from the target folder, // as they are already marked as uploaded in the database. val paths = filesystemDataProvider.getFilesForUpload( syncedFolder.localPath, - syncedFolder.id.toString() + syncedFolder.id.toString(), + syncedFolder.uploadDelayTimeMs ) if (paths.isEmpty()) { return diff --git a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java index 0d98d8c49a5b..fcd31187572e 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java +++ b/app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java @@ -118,19 +118,27 @@ public void storeOrUpdateFileValue(String localPath, long modifiedAt, boolean is } } - public Set getFilesForUpload(String localPath, String syncedFolderId) { + public Set getFilesForUpload(String localPath, String syncedFolderId, long minFileAge) { Set localPathsToUpload = new HashSet<>(); + String query = ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH + " LIKE ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID + " = ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ?"; String likeParam = localPath + "%"; + String[] queryParams = new String[]{likeParam, syncedFolderId, "0", "0"}; + + if (minFileAge > 0) { + query += " and " + ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_MODIFIED + " <= ?"; + long maxFileTimestamp = System.currentTimeMillis() - minFileAge; + queryParams = ObjectArrays.concat(queryParams, Long.toString(maxFileTimestamp)); + } Cursor cursor = contentResolver.query( ProviderMeta.ProviderTableMeta.CONTENT_URI_FILESYSTEM, null, - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_LOCAL_PATH + " LIKE ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_SYNCED_FOLDER_ID + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_SENT_FOR_UPLOAD + " = ? and " + - ProviderMeta.ProviderTableMeta.FILESYSTEM_FILE_IS_FOLDER + " = ?", - new String[]{likeParam, syncedFolderId, "0", "0"}, + query, + queryParams, null); if (cursor != null) { diff --git a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java index b1301d372532..42de1f9decf8 100644 --- a/app/src/main/java/com/owncloud/android/db/ProviderMeta.java +++ b/app/src/main/java/com/owncloud/android/db/ProviderMeta.java @@ -25,7 +25,7 @@ */ public class ProviderMeta { public static final String DB_NAME = "filelist"; - public static final int DB_VERSION = 86; + public static final int DB_VERSION = 87; private ProviderMeta() { // No instance