Skip to content

Commit c27ac27

Browse files
committed
Code refactored for code merging.
1 parent fd8456b commit c27ac27

File tree

8 files changed

+18
-20
lines changed

8 files changed

+18
-20
lines changed

app/src/main/java/com/owncloud/android/datamodel/OCFile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,14 @@ public boolean isHidden() {
605605
* is a combination of localId + instanceId If a file has remoteId: 4174305739oc97a8ddfc96, in this 4174305739 is
606606
* localId & oc97a8ddfc96 is instanceId which is of 12 digits
607607
*
608-
* @return file fileId, unique within the instance
608+
* unique fileId for the file within the instance
609609
*/
610610
@SuppressFBWarnings("STT")
611611
public long getLocalId() {
612612
if (localId > 0) {
613613
return localId;
614614
} else if (remoteId != null && remoteId.length() > 8) {
615+
//NMC Customization --> for long remote id's
615616
return Long.parseLong(remoteId.substring(0, remoteId.length() - 12).replaceAll("^0*", ""));
616617
} else {
617618
return -1;

app/src/main/java/com/owncloud/android/files/FileMenuFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ private boolean isRichDocumentEditingSupported(OCCapability capability, String m
301301
}
302302

303303
private void filterSync(List<Integer> toHide, boolean synchronizing) {
304-
if (files.isEmpty() || (!anyFileDown() && !containsFolder()) || synchronizing || containsEncryptedFile()
305-
|| containsEncryptedFolder()) {
304+
//NMC Customization --> show sync option for e2ee folder
305+
if (files.isEmpty() || (!anyFileDown() && !containsFolder()) || synchronizing) {
306306
toHide.add(R.id.action_sync_file);
307307
}
308308
}

app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,6 @@ public void handleMnemonicRequest(Intent data) {
10001000
.create();
10011001

10021002
alertDialog.show();
1003-
viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE));
10041003
}
10051004
}
10061005
}

app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,6 @@ class OCFileListDelegate(
341341
} else if (file.isSharedViaLink) {
342342
sharedIconView.setImageResource(R.drawable.shared_via_link)
343343
sharedIconView.contentDescription = context.getString(R.string.shared_icon_shared_via_link)
344-
} else if (file.isEncrypted) {
345-
sharedIconView.visibility = View.GONE
346344
} else {
347345
sharedIconView.setImageResource(R.drawable.ic_unshared)
348346
sharedIconView.contentDescription = context.getString(R.string.shared_icon_share)

app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ public class OCFileListFragment extends ExtendedListFragment implements
232232

233233
@Inject DeviceInfo deviceInfo;
234234

235-
private boolean mShowOnlyFolder, mHideEncryptedFolder;
236-
237235
protected enum MenuItemAddRemove {
238236
DO_NOTHING,
239237
REMOVE_SORT,
240238
REMOVE_GRID_AND_SORT,
241239
ADD_GRID_AND_SORT_WITH_SEARCH
242240
}
243241

242+
private boolean mShowOnlyFolder, mHideEncryptedFolder;
243+
244244
protected MenuItemAddRemove menuItemAddRemoveValue = MenuItemAddRemove.ADD_GRID_AND_SORT_WITH_SEARCH;
245245

246246
private List<MenuItem> mOriginalMenuItems = new ArrayList<>();

app/src/main/res/values-de/strings.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,9 @@
566566
<string name="prefs_davx5_setup_error">Unerwarteter Fehler beim Einrichten von DAVx5 (früher bekannt als DAVdroid)</string>
567567
<string name="prefs_e2e_active">Ende-zu-Ende-Verschlüsselung ist eingerichtet!</string>
568568
<string name="prefs_e2e_mnemonic">E2E-Gedächtnisstütze</string>
569-
<string name="prefs_mnemonic_summary">12-Wort-Schlüssel anzeigen (Passphrase)</string>
570-
<string name="dialog_e2e_mnemonic_title">Passphrase</string>
571569
<string name="prefs_e2e_no_device_credentials">Um die Gedächtnisstütze anzuzeigen, aktivieren Sie bitte Geräte-Zugangsdaten</string>
572570
<string name="prefs_enable_media_scan_notifications">Benachrichtigungen der Mediensuche anzeigen</string>
571+
<string name="dialog_e2e_mnemonic_title">Passphrase</string>
573572
<string name="prefs_enable_media_scan_notifications_summary">Über neu gefundene Medienordner informieren</string>
574573
<string name="prefs_gpl_v2">GNU General Public Lizenz, version 2</string>
575574
<string name="prefs_help">Hilfe</string>
@@ -579,7 +578,6 @@
579578
<string name="prefs_instant_upload_path_use_subfolders_summary">In Unterordnern speichern, basierend auf Jahr und Monat</string>
580579
<string name="prefs_instant_upload_path_use_subfolders_title">Unterordner benutzen</string>
581580
<string name="prefs_keys_exist">Fügen Sie dieses Gerät zur Ende-zu-Ende Verschlüsselung hinzu.</string>
582-
<string name="prefs_keys_exist_summary">Die Ende-zu-Ende Verschlüsselung wurde bereits auf einem anderen Gerät eingerichtet. Bitte geben Sie Ihre Passphrase ein, damit die Dateien synchronisiert und entschlüsselt werden.</string>
583581
<string name="prefs_license">Lizenz</string>
584582
<string name="prefs_lock">App-PIN</string>
585583
<string name="prefs_lock_device_credentials_enabled">Geräte-Anmeldedaten aktiviert</string>
@@ -590,8 +588,8 @@
590588
<string name="prefs_lock_using_passcode">PIN</string>
591589
<string name="prefs_manage_accounts">Konten verwalten</string>
592590
<string name="prefs_recommend">Einem Freund empfehlen</string>
593-
<string name="prefs_setup_e2e">Ende-zu-ende Verschlüsselung starten</string>
594591
<string name="prefs_remove_e2e">Verschlüsselung lokal entfernen</string>
592+
<string name="prefs_setup_e2e">Ende-zu-ende Verschlüsselung starten</string>
595593
<string name="prefs_show_hidden_files">Versteckte Dateien anzeigen</string>
596594
<string name="prefs_sourcecode">Zum Programmcode</string>
597595
<string name="prefs_storage_path">Speicherordner</string>
@@ -620,7 +618,8 @@
620618
<string name="remote">(entfernt)</string>
621619
<string name="remote_file_fetch_failed">Datei nicht gefunden!</string>
622620
<string name="remove_e2e">Sie können die Passphrase auf diesem Gerät entfernen.</string>
623-
<string name="remove_e2e_message">Sie können die Passphrase auf diesem Gerät entfernen. Dadurch bleiben die verschlüsselten Inhalte unberührt, jedoch kann dieses Gerät die Daten nicht mehr entschlüsseln.\n\nSie können die Passphrase jederzeit wieder hier eingeben, um Zugriff von diesem Gerät aus auf ihre verschlüsselten Inhalte zu gewährleisten.</string> <string name="remove_fail_msg">Löschung fehlgeschlagen</string>
621+
<string name="remove_e2e_message">Sie können die Passphrase auf diesem Gerät entfernen. Dadurch bleiben die verschlüsselten Inhalte unberührt, jedoch kann dieses Gerät die Daten nicht mehr entschlüsseln.\n\nSie können die Passphrase jederzeit wieder hier eingeben, um Zugriff von diesem Gerät aus auf ihre verschlüsselten Inhalte zu gewährleisten.</string>
622+
<string name="remove_fail_msg">Löschung fehlgeschlagen</string>
624623
<string name="remove_notification_failed">Entfernen der Benachrichtigungen fehlgeschlagen.</string>
625624
<string name="remove_push_notification">Entfernen</string>
626625
<string name="remove_success_msg">Gelöscht</string>
@@ -664,7 +663,8 @@
664663
<string name="set_picture_as">Nutze Bild als</string>
665664
<string name="set_status">Status setzen</string>
666665
<string name="set_status_message">Statusnachricht setzen</string>
667-
<string name="setup_e2e">Nach dem Start der Verschlüsselung wird ihnen eine aus 12 Wörtern zufällig erzeugte Wortfolge (Passphrase) angezeigt. Diese bleibt in dieser App erhalten und kann erneut angezeigt werden. Dennoch empfehlen wir ihnen, die Passphrase zu notieren.</string> <string name="share">Teilen</string>
666+
<string name="setup_e2e">Nach dem Start der Verschlüsselung wird ihnen eine aus 12 Wörtern zufällig erzeugte Wortfolge (Passphrase) angezeigt. Diese bleibt in dieser App erhalten und kann erneut angezeigt werden. Dennoch empfehlen wir ihnen, die Passphrase zu notieren.</string>
667+
<string name="share">Teilen</string>
668668
<string name="share_copy_link">Teilen &amp; Link kopieren</string>
669669
<string name="share_dialog_title">Teilen</string>
670670
<string name="share_expiration_date_format">%1$s</string>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
<string name="prefs_calendar_contacts_sync_setup_successful">Calendar &amp; contacts sync set up</string>
5252
<string name="prefs_daily_backup_summary">Daily backup of your calendar &amp; contacts</string>
5353
<string name="prefs_daily_contact_backup_summary">Daily backup of your contacts</string>
54-
<string name="prefs_mnemonic_summary">Displays your 12 word key (passhprase)</string>
5554
<string name="prefs_sycned_folders_summary">Manage folders for auto upload</string>
5655
<string name="prefs_help">Help</string>
5756
<string name="prefs_recommend">Recommend to a friend</string>
@@ -60,6 +59,7 @@
6059
<string name="prefs_value_theme_dark">Dark</string>
6160
<string name="prefs_value_theme_system">Follow system</string>
6261
<string name="prefs_theme_title">Theme</string>
62+
<string name="prefs_keys_exist_summary">End-to-end encryption was already set up on another client. Please enter your mnemonic to allow this client to sync and decrypt the files.</string>
6363

6464
<string name="recommend_subject">Try %1$s on your device!</string>
6565
<string name="recommend_text">I want to invite you to use %1$s on your device.\nDownload here: %2$s</string>
@@ -1057,19 +1057,19 @@
10571057
<string name="no_items">No items</string>
10581058
<string name="check_back_later_or_reload">Check back later or reload.</string>
10591059
<string name="e2e_not_yet_setup">End-to-end encryption is not yet setup.</string>
1060-
<string name="e2e_offline">Not possible without internet connection</string>
10611060
<string name="error_file_actions">Error showing file actions</string>
10621061
<string name="pin_home">Pin to Home screen</string>
10631062
<string name="pin_shortcut_label">Open %1$s</string>
1063+
<string name="displays_mnemonic">Displays your 12 word passphrase</string>
10641064
<string name="prefs_setup_e2e">Start end-to-end encryption</string>
1065+
<string name="prefs_e2e_active">End-to-end encryption is set up!</string>
10651066
<string name="prefs_remove_e2e">Remove encryption locally</string>
10661067
<string name="remove_e2e">You can remove end-to-end encryption locally on this device.</string>
10671068
<string name="confirm_removal">Remove encryption locally</string>
10681069
<string name="remove_e2e_message">You can remove the passphrase on this device. This will not affect the encrypted content, but this device will no longer be able to decrypt your data.\n\nYou can re- enter the passphrase here at any time to ensure access to your encrypted content from this device.</string>
10691070
<string name="setup_e2e">After starting the encryption, a randomly generated word sequence (passphrase) of 12 words is displayed. This remains in this app and can be displayed again. Nevertheless, we recommend that you write down the passphrase.</string>
10701071
<string name="error_showing_encryption_dialog">Error showing encryption setup dialog!</string>
10711072
<string name="prefs_keys_exist">Add end-to-end encryption to this client</string>
1072-
<string name="prefs_keys_exist_summary">End-to-end encryption was already set up on another client. Please enter your mnemonic to allow this client to sync and decrypt the files.</string>
10731073
<string name="add_new_secure_file_drop">Add new secure file drop</string>
10741074
<string name="e2e_offline">Not possible without internet connection</string>
10751075
<string name="scan_page">Scan page</string>

app/src/main/res/xml/preferences.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@
8181
<Preference
8282
android:title="@string/prefs_keys_exist"
8383
android:key="setup_e2e_keys_exist"
84-
android:summary="@string/prefs_keys_exist_summary" />
84+
android:summary="End to end encryption was already set up on another client. Please enter your mnemonic to allow this client to sync and decrypt the files." />
8585
<Preference
86-
android:title="@string/prefs_e2e_mnemonic"
86+
android:title="@string/prefs_e2e_active"
8787
android:key="mnemonic"
88-
android:summary="@string/prefs_mnemonic_summary" />
88+
android:summary="@string/displays_mnemonic" />
8989
<Preference
9090
android:title="@string/prefs_remove_e2e"
9191
android:key="remove_e2e"

0 commit comments

Comments
 (0)