diff --git a/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java b/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java index 0f3a21f782..43e3218579 100644 --- a/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java +++ b/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java @@ -584,7 +584,7 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment { /** * Get index for name collision selection dialog. - * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME. Otherwise: 0 + * @return 0 if ASK_USER, 1 if OVERWRITE, 2 if RENAME, 3 if SKIP, Otherwise: 0 */ static private Integer getSelectionIndexForNameCollisionPolicy(FileUploader.NameCollisionPolicy nameCollisionPolicy) { switch (nameCollisionPolicy) { @@ -592,6 +592,8 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment { return 1; case RENAME: return 2; + case CANCEL: + return 3; case ASK_USER: default: return 0; @@ -601,7 +603,7 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment { /** * Get index for name collision selection dialog. * Inverse of getSelectionIndexForNameCollisionPolicy. - * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2. Otherwise: ASK_USEr + * @return ASK_USER if 0, OVERWRITE if 1, RENAME if 2, SKIP if 3. Otherwise: ASK_USEr */ static private FileUploader.NameCollisionPolicy getNameCollisionPolicyForSelectionIndex(int index) { switch (index) { @@ -609,6 +611,8 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment { return FileUploader.NameCollisionPolicy.OVERWRITE; case 2: return FileUploader.NameCollisionPolicy.RENAME; + case 3: + return FileUploader.NameCollisionPolicy.CANCEL; case 0: default: return FileUploader.NameCollisionPolicy.ASK_USER; diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index b58518a81a..30e8f30c00 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -16,5 +16,6 @@ @string/pref_instant_name_collision_policy_entries_always_ask @string/pref_instant_name_collision_policy_entries_overwrite @string/pref_instant_name_collision_policy_entries_rename + @string/pref_instant_name_collision_policy_entries_cancel diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 878c048d5e..92cf6a22b6 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -459,6 +459,7 @@ Ask me every time Rename new version Overwrite remote version + Skip uploading Sharing Share %1$s