From d875cb6baac509fa999ee76043a1f6eccb071a38 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Wed, 12 Aug 2020 21:33:25 +0200 Subject: [PATCH] Improve auto lock and make it more customizable This patch makes the auto lock option more customizable. Users can now choose a combination of the following: Locking Aegis when - The back button is pressed - The app is minimized - The device is locked --- app/build.gradle | 1 + .../aegis/AegisApplication.java | 41 ++++++++++--- .../beemdevelopment/aegis/CancelAction.java | 7 --- .../beemdevelopment/aegis/Preferences.java | 30 +++++++++- .../aegis/ui/AegisActivity.java | 32 ++--------- .../aegis/ui/AuthActivity.java | 15 ++--- .../aegis/ui/MainActivity.java | 17 +++--- .../aegis/ui/PreferencesFragment.java | 57 +++++++++++++++++-- app/src/main/res/values-ar-rSA/strings.xml | 1 - app/src/main/res/values-cs-rCZ/strings.xml | 1 - app/src/main/res/values-de-rDE/strings.xml | 1 - app/src/main/res/values-el-rGR/strings.xml | 1 - app/src/main/res/values-es-rES/strings.xml | 1 - app/src/main/res/values-fi-rFI/strings.xml | 1 - app/src/main/res/values-fr-rFR/strings.xml | 1 - app/src/main/res/values-hu-rHU/strings.xml | 1 - app/src/main/res/values-it-rIT/strings.xml | 1 - app/src/main/res/values-kn-rIN/strings.xml | 1 - app/src/main/res/values-nl-rNL/strings.xml | 1 - app/src/main/res/values-pl-rPL/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-pt-rPT/strings.xml | 1 - app/src/main/res/values-ru-rRU/strings.xml | 1 - app/src/main/res/values-tr-rTR/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values/arrays.xml | 6 +- app/src/main/res/values/strings.xml | 7 ++- app/src/main/res/xml/preferences.xml | 4 +- 28 files changed, 146 insertions(+), 88 deletions(-) delete mode 100644 app/src/main/java/com/beemdevelopment/aegis/CancelAction.java diff --git a/app/build.gradle b/app/build.gradle index 6af1135be9..6a82de7946 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -115,6 +115,7 @@ dependencies { implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.documentfile:documentfile:1.0.1' + implementation "androidx.lifecycle:lifecycle-process:2.2.0" implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation "androidx.viewpager2:viewpager2:1.0.0" diff --git a/app/src/main/java/com/beemdevelopment/aegis/AegisApplication.java b/app/src/main/java/com/beemdevelopment/aegis/AegisApplication.java index b809b557f3..bf161d4e49 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/AegisApplication.java +++ b/app/src/main/java/com/beemdevelopment/aegis/AegisApplication.java @@ -12,7 +12,12 @@ import android.graphics.drawable.Icon; import android.os.Build; +import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; +import androidx.lifecycle.Lifecycle; +import androidx.lifecycle.LifecycleEventObserver; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.ProcessLifecycleOwner; import com.beemdevelopment.aegis.services.NotificationService; import com.beemdevelopment.aegis.ui.MainActivity; @@ -53,6 +58,9 @@ public void onCreate() { intentFilter.addAction(CODE_LOCK_VAULT_ACTION); registerReceiver(receiver, intentFilter); + // lock the app if the user moves the application to the background + ProcessLifecycleOwner.get().getLifecycle().addObserver(new AppLifecycleObserver()); + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { initAppShortcuts(); } @@ -111,8 +119,8 @@ public Preferences getPreferences() { return _prefs; } - public boolean isAutoLockEnabled() { - return _prefs.isAutoLockEnabled() && !isVaultLocked() && _manager.isEncryptionEnabled() ; + public boolean isAutoLockEnabled(int autoLockType) { + return _prefs.isAutoLockTypeEnabled(autoLockType) && !isVaultLocked() && _manager.isEncryptionEnabled(); } public void registerLockListener(LockListener listener) { @@ -123,10 +131,14 @@ public void unregisterLockListener(LockListener listener) { _lockListeners.remove(listener); } - public void lock() { + /** + * Locks the vault and the app. + * @param userInitiated whether or not the user initiated the lock in MainActivity. + */ + public void lock(boolean userInitiated) { _manager = null; for (LockListener listener : _lockListeners) { - listener.onLocked(); + listener.onLocked(userInitiated); } stopService(new Intent(AegisApplication.this, NotificationService.class)); @@ -168,16 +180,29 @@ private void initNotificationChannels() { } } - public class ScreenOffReceiver extends BroadcastReceiver { + private class AppLifecycleObserver implements LifecycleEventObserver { + @Override + public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Event event) { + if (event == Lifecycle.Event.ON_STOP && isAutoLockEnabled(Preferences.AUTO_LOCK_ON_MINIMIZE)) { + lock(false); + } + } + } + + private class ScreenOffReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { - if (isAutoLockEnabled()) { - lock(); + if (isAutoLockEnabled(Preferences.AUTO_LOCK_ON_DEVICE_LOCK)) { + lock(false); } } } public interface LockListener { - void onLocked(); + /** + * When called, the app/vault has been locked and the listener should perform its cleanup operations. + * @param userInitiated whether or not the user initiated the lock in MainActivity. + */ + void onLocked(boolean userInitiated); } } diff --git a/app/src/main/java/com/beemdevelopment/aegis/CancelAction.java b/app/src/main/java/com/beemdevelopment/aegis/CancelAction.java deleted file mode 100644 index aa00692205..0000000000 --- a/app/src/main/java/com/beemdevelopment/aegis/CancelAction.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.beemdevelopment.aegis; - -public enum CancelAction { - KILL, - CLOSE -} - diff --git a/app/src/main/java/com/beemdevelopment/aegis/Preferences.java b/app/src/main/java/com/beemdevelopment/aegis/Preferences.java index b17555d76b..dc520b1097 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/Preferences.java +++ b/app/src/main/java/com/beemdevelopment/aegis/Preferences.java @@ -12,6 +12,17 @@ import java.util.concurrent.TimeUnit; public class Preferences { + public static final int AUTO_LOCK_OFF = 1 << 0; + public static final int AUTO_LOCK_ON_BACK_BUTTON = 1 << 1; + public static final int AUTO_LOCK_ON_MINIMIZE = 1 << 2; + public static final int AUTO_LOCK_ON_DEVICE_LOCK = 1 << 3; + + public static final int[] AUTO_LOCK_SETTINGS = { + AUTO_LOCK_ON_BACK_BUTTON, + AUTO_LOCK_ON_MINIMIZE, + AUTO_LOCK_ON_DEVICE_LOCK + }; + private SharedPreferences _prefs; public Preferences(Context context) { @@ -73,8 +84,25 @@ public boolean isIntroDone() { return _prefs.getBoolean("pref_intro", false); } + private int getAutoLockMask() { + final int def = AUTO_LOCK_ON_BACK_BUTTON | AUTO_LOCK_ON_DEVICE_LOCK; + if (!_prefs.contains("pref_auto_lock_mask")) { + return _prefs.getBoolean("pref_auto_lock", true) ? def : AUTO_LOCK_OFF; + } + + return _prefs.getInt("pref_auto_lock_mask", def); + } + public boolean isAutoLockEnabled() { - return _prefs.getBoolean("pref_auto_lock", true); + return getAutoLockMask() != AUTO_LOCK_OFF; + } + + public boolean isAutoLockTypeEnabled(int autoLockType) { + return (getAutoLockMask() & autoLockType) == autoLockType; + } + + public void setAutoLockMask(int autoLock) { + _prefs.edit().putInt("pref_auto_lock_mask", autoLock).apply(); } public void setIntroDone(boolean done) { diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/AegisActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/AegisActivity.java index 898ece1ddf..0e5008192c 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/AegisActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/AegisActivity.java @@ -6,7 +6,6 @@ import android.view.WindowManager; import android.widget.Toast; -import androidx.annotation.CallSuper; import androidx.appcompat.app.AppCompatActivity; import com.beemdevelopment.aegis.AegisApplication; @@ -20,9 +19,7 @@ import java.util.Map; public abstract class AegisActivity extends AppCompatActivity implements AegisApplication.LockListener { - private boolean _resumed; private AegisApplication _app; - private Theme _configuredTheme; @Override protected void onCreate(Bundle savedInstanceState) { @@ -39,6 +36,7 @@ protected void onCreate(Bundle savedInstanceState) { Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); + finish(); return; } @@ -58,24 +56,9 @@ protected void onDestroy() { } @Override - protected void onResume() { - super.onResume(); - _resumed = true; - } - - @Override - protected void onPause() { - super.onPause(); - _resumed = false; - } - - @CallSuper - @Override - public void onLocked() { - if (isOrphan()) { - setResult(RESULT_CANCELED, null); - finish(); - } + public void onLocked(boolean userInitiated) { + setResult(RESULT_CANCELED, null); + finishAndRemoveTask(); } protected AegisApplication getApp() { @@ -139,13 +122,6 @@ protected boolean saveVault(boolean backup) { } } - /** - * Reports whether this Activity has been resumed. (i.e. onResume was called) - */ - protected boolean isOpen() { - return _resumed; - } - /** * Reports whether this Activity instance has become an orphan. This can happen if * the vault was locked by an external trigger while the Activity was still open. diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java index ab288a50cb..53fca85a29 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java @@ -23,7 +23,6 @@ import androidx.biometric.BiometricPrompt; import com.beemdevelopment.aegis.AegisApplication; -import com.beemdevelopment.aegis.CancelAction; import com.beemdevelopment.aegis.Preferences; import com.beemdevelopment.aegis.R; import com.beemdevelopment.aegis.ThemeMap; @@ -52,9 +51,7 @@ public class AuthActivity extends AegisActivity { private EditText _textPassword; - private CancelAction _cancelAction; private SlotList _slots; - private SecretKey _bioKey; private BiometricSlot _bioSlot; private BiometricPrompt _bioPrompt; @@ -62,7 +59,7 @@ public class AuthActivity extends AegisActivity { private int _failedUnlockAttempts; // the first time this activity is resumed after creation, it's possible to inhibit showing the - // biometric prompt by setting 'inhibitBioPrompt' to false through the intent + // biometric prompt by setting 'inhibitBioPrompt' to true through the intent private boolean _inhibitBioPrompt; private Preferences _prefs; @@ -95,7 +92,6 @@ protected void onCreate(Bundle savedInstanceState) { } else { _inhibitBioPrompt = savedInstanceState.getBoolean("inhibitBioPrompt", false); } - _cancelAction = (CancelAction) intent.getSerializableExtra("cancelAction"); _slots = (SlotList) intent.getSerializableExtra("slots"); _stateless = _slots != null; if (!_stateless) { @@ -182,11 +178,10 @@ private void selectPassword() { @Override public void onBackPressed() { - switch (_cancelAction) { - case KILL: - finishAffinity(); - case CLOSE: - finish(); + if (_stateless) { + super.onBackPressed(); + } else { + finishAffinity(); } } diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java index 9e02876f13..6d82d045f0 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/MainActivity.java @@ -25,7 +25,7 @@ import androidx.appcompat.widget.SearchView; import com.beemdevelopment.aegis.AegisApplication; -import com.beemdevelopment.aegis.CancelAction; +import com.beemdevelopment.aegis.Preferences; import com.beemdevelopment.aegis.R; import com.beemdevelopment.aegis.SortCategory; import com.beemdevelopment.aegis.ViewMode; @@ -523,8 +523,8 @@ public void onBackPressed() { return; } - if (_app.isAutoLockEnabled()) { - _app.lock(); + if (_app.isAutoLockEnabled(Preferences.AUTO_LOCK_ON_BACK_BUTTON)) { + _app.lock(false); return; } @@ -596,7 +596,7 @@ public boolean onOptionsItemSelected(MenuItem item) { return true; } case R.id.action_lock: - _app.lock(); + _app.lock(true); return true; default: if (item.getGroupId() == R.id.action_filter_group) { @@ -655,7 +655,6 @@ private void loadEntries() { private void startAuthActivity(boolean inhibitBioPrompt) { if (!_isAuthenticating) { Intent intent = new Intent(this, AuthActivity.class); - intent.putExtra("cancelAction", CancelAction.KILL); intent.putExtra("inhibitBioPrompt", inhibitBioPrompt); startActivityForResult(intent, CODE_DECRYPT); _isAuthenticating = true; @@ -747,7 +746,7 @@ public void onScroll(int dx, int dy) { public void onListChange() { _fabScrollHelper.setVisible(true); } @Override - public void onLocked() { + public void onLocked(boolean userInitiated) { if (_actionMode != null) { _actionMode.finish(); } @@ -755,11 +754,11 @@ public void onLocked() { _entryListView.clearEntries(); _loaded = false; - if (isOpen()) { + if (userInitiated) { startAuthActivity(true); + } else { + super.onLocked(userInitiated); } - - super.onLocked(); } private void copyEntryCode(VaultEntry entry) { diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/PreferencesFragment.java b/app/src/main/java/com/beemdevelopment/aegis/ui/PreferencesFragment.java index 943e83506f..de88675274 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/PreferencesFragment.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/PreferencesFragment.java @@ -20,7 +20,6 @@ import com.beemdevelopment.aegis.AegisApplication; import com.beemdevelopment.aegis.BuildConfig; -import com.beemdevelopment.aegis.CancelAction; import com.beemdevelopment.aegis.Preferences; import com.beemdevelopment.aegis.R; import com.beemdevelopment.aegis.Theme; @@ -235,7 +234,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { _result.putExtra("needsRefresh", true); return true; }); - + Preference entryHighlightPreference = findPreference("pref_highlight_entry"); entryHighlightPreference.setOnPreferenceChangeListener((preference, newValue) -> { _result.putExtra("needsRefresh", true); @@ -254,7 +253,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { public boolean onPreferenceChange(Preference preference, Object newValue) { _result.putExtra("needsRecreate", true); Window window = getActivity().getWindow(); - if ((boolean)newValue) { + if ((boolean) newValue) { window.addFlags(WindowManager.LayoutParams.FLAG_SECURE); } else { window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE); @@ -458,6 +457,35 @@ public boolean onPreferenceClick(Preference preference) { }); _autoLockPreference = findPreference("pref_auto_lock"); + _autoLockPreference.setSummary(getAutoLockSummary()); + _autoLockPreference.setOnPreferenceClickListener((preference) -> { + final int[] items = Preferences.AUTO_LOCK_SETTINGS; + final String[] textItems = getResources().getStringArray(R.array.pref_auto_lock_types); + final boolean[] checkedItems = new boolean[items.length]; + for (int i = 0; i < items.length; i++) { + checkedItems[i] = _prefs.isAutoLockTypeEnabled(items[i]); + } + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) + .setTitle(R.string.pref_auto_lock_prompt) + .setMultiChoiceItems(textItems, checkedItems, (dialog, index, isChecked) -> checkedItems[index] = isChecked) + .setPositiveButton(android.R.string.ok, (dialog, which) -> { + int autoLock = Preferences.AUTO_LOCK_OFF; + for (int i = 0; i < checkedItems.length; i++) { + if (checkedItems[i]) { + autoLock |= items[i]; + } + } + + _prefs.setAutoLockMask(autoLock); + _autoLockPreference.setSummary(getAutoLockSummary()); + }) + .setNegativeButton(android.R.string.cancel, null); + Dialogs.showSecureDialog(builder.create()); + + return false; + }); + _passwordReminderPreference = findPreference("pref_password_reminder"); } @@ -575,7 +603,6 @@ private void processImporterState(DatabaseImporter.State state) { Intent intent = new Intent(getActivity(), AuthActivity.class); intent.putExtra("slots", ((AegisImporter.EncryptedState) state).getSlots()); - intent.putExtra("cancelAction", CancelAction.CLOSE); startActivityForResult(intent, CODE_IMPORT_DECRYPT); } else { state.decrypt(getActivity(), new DatabaseImporter.DecryptListener() { @@ -842,6 +869,28 @@ private void setPinKeyboardPreference(boolean enable) { _pinKeyboardPreference.setChecked(enable); } + private String getAutoLockSummary() { + final int[] settings = Preferences.AUTO_LOCK_SETTINGS; + final String[] descriptions = getResources().getStringArray(R.array.pref_auto_lock_types); + + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < settings.length; i++) { + if (_prefs.isAutoLockTypeEnabled(settings[i])) { + if (builder.length() != 0) { + builder.append(", "); + } + + builder.append(descriptions[i].toLowerCase()); + } + } + + if (builder.length() == 0) { + return getString(R.string.pref_auto_lock_summary_disabled); + } + + return getString(R.string.pref_auto_lock_summary, builder.toString()); + } + private class SetPasswordListener implements Dialogs.SlotListener { @Override public void onSlotResult(Slot slot, Cipher cipher) { diff --git a/app/src/main/res/values-ar-rSA/strings.xml b/app/src/main/res/values-ar-rSA/strings.xml index 4b8d4be974..717195ea9b 100644 --- a/app/src/main/res/values-ar-rSA/strings.xml +++ b/app/src/main/res/values-ar-rSA/strings.xml @@ -48,7 +48,6 @@ سيتم اخفاء الرموز افتراضيًا. انقر على الرموز لكشف الكود. مهلة النقر للكشف القفل التلقائي - القفل التلقائي عند إغلاق التطبيق أو قفل الجهاز التشفير قم بتشفير المخزن وفك قفله بكملة مرور أو مصادقة بيومترية فتح القفل البيومتري diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml index 6ecf4aa314..5b100f07d3 100644 --- a/app/src/main/res/values-cs-rCZ/strings.xml +++ b/app/src/main/res/values-cs-rCZ/strings.xml @@ -49,7 +49,6 @@ Ve výchozím stavu budou kódy skryté. Kód zobrazíte klepnutím na token. Prodleva zobrazení kódu Automatické uzamknutí - Automaticky uzamknout trezor při zavření aplikace, nebo uzamčení zařízení. Šifrování Šifrovat trezor a odemykat jej pomocí hesla, nebo biometrie Biometrické odemknutí diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 38dea52c56..9c9afc2e8d 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -41,7 +41,6 @@ Schlüssel werden standardmäßig ausgeblendet. Tippe auf die Schlüssel, um den Code anzuzeigen. Zeitüberschreitung für Tippen zum Anzeigen Automatische Sperre - Automatische Sperre, wenn die App geschlossen oder dein Gerät gesperrt wird. Verschlüsselung Biometische Entsperrung Erlauben, die Datenbank mit biometrischer Authentifizierung zu entsperren diff --git a/app/src/main/res/values-el-rGR/strings.xml b/app/src/main/res/values-el-rGR/strings.xml index d3e5aa354a..495bce971c 100644 --- a/app/src/main/res/values-el-rGR/strings.xml +++ b/app/src/main/res/values-el-rGR/strings.xml @@ -36,7 +36,6 @@ Απόκρυψη αναγνωριστικών από προεπιλογή. Πατήστε στα αναγνωριστικά για προβολή κωδικού. Χρονικό όριο πατήματος προβολής Αυτόματο κλείδωμα - Αυτόματο κλείδωμα στο κλείσιμο της εφαρμογής ή στο κλείδωμα της συσκευή σας. Κρυπτογράφηση Κρυπτογράφηση λίστας και ξεκλείδωμα με κωδικό ή βιομετρική μέθοδο Βιομετρικό ξεκλείδωμα diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 3c1e4b661f..df25743ca2 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -46,7 +46,6 @@ Los tokens se ocultarán por defecto. Pulse sobre ellos para revelar el código. Tiempo de espera de pulsar para mostrar Bloqueo automático - Bloquear automáticamente cuando cierre la aplicación o bloquee su dispositivo. Cifrado Cifra la base de datos y la desbloquea mediante una contraseña o biometría Desbloqueo biométrico diff --git a/app/src/main/res/values-fi-rFI/strings.xml b/app/src/main/res/values-fi-rFI/strings.xml index e2b04b551d..b3b18b12ab 100644 --- a/app/src/main/res/values-fi-rFI/strings.xml +++ b/app/src/main/res/values-fi-rFI/strings.xml @@ -45,7 +45,6 @@ Todennustunnukset piilotetaan oletuksena. Napauta todennustunnusta paljastaaksesi sen koodi. Kuinka kauan todennustunnus on näkyvissä napautuksen jälkeen Lukitse automaattisesti - Lukitsee sovelluksen automaattisesti, kun suljet sen tai lukitset laitteesi. Salaus Salaa holvi ja avaa se salasanalla tai biometriikalla Biometrinen avaaminen diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index ee59234519..54a3b8349e 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -45,7 +45,6 @@ Les jetons seront masqués par défaut. Appuyer sur le jeton pour révéler le code. Délai pour appuyer pour révéler Verrouillage automatique - Verrouiller automatiquement lorsque vous fermez l\'application ou verrouillez votre appareil. Chiffrement Chiffrer le coffre-fort et le déverrouiller avec un mot de passe ou la biométrie Déverrouillage biométrique diff --git a/app/src/main/res/values-hu-rHU/strings.xml b/app/src/main/res/values-hu-rHU/strings.xml index c65fa8cb5b..144d29c08f 100644 --- a/app/src/main/res/values-hu-rHU/strings.xml +++ b/app/src/main/res/values-hu-rHU/strings.xml @@ -46,7 +46,6 @@ A tokenek alapból rejtve lesznek. Koppintson a tokenekre, hogy megjelenjen a kód. Értintésre történő megjelenítés időtúllépése Automatikus zárolás - Automatikus zárolás, ha bezárja az alkalmazást vagy zárolja a képernyőt. Titkosítás A széf titkosítása, és jelszavas vagy biometrikus feloldás beállítása Biometrikus feloldás diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index 8319f053c0..d779c656a1 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -53,7 +53,6 @@ I token saranno nascosti. Toccandone uno viene mostrato il codice. Timeout visualizzazione codice OTP Blocco automatico - Blocca automaticamente quando chiudi l\'app o blocca il dispositivo. Crittografia Cripta il database e sbloccalo con password o impronta digitale Sblocco biometrico diff --git a/app/src/main/res/values-kn-rIN/strings.xml b/app/src/main/res/values-kn-rIN/strings.xml index f2158b8ddd..7af8458802 100644 --- a/app/src/main/res/values-kn-rIN/strings.xml +++ b/app/src/main/res/values-kn-rIN/strings.xml @@ -29,7 +29,6 @@ ಪೂರ್ವನಿಯೋಜಿತವಾಗಿ ಟೋಕನ್ಗಳನ್ನು ಮರೆಮಾಡಲಾಗುತ್ತದೆ. ಸಂಕೇತವನ್ನು ಬಹಿರಂಗಪಡಿಸುವುದಕ್ಕೆ ಟೋಕನ್ಗಳನ್ನು ಒತ್ತು. \'ನೋಡುವುದಕ್ಕೆ ಟ್ಯಾಪ್ ಮಾಡಿ\'ಗೆ ಸಮಯದ ಅವಧಿ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಬೀಗ ಹಾಕು - ನೀವು ಅಪ್ಲಿಕೇಶನವನ್ನು ಮುಚ್ಚಿದಾಗ ಅಥವ ಡಿವೈಸಿಗೆ ಬೀಗ ಹಾಕಿದಾಗ, ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಬೀಗ ಹಾಕು. ಗೂಢಲಿಪೀಕರಣ ಗುಪ್ತಪದವನ್ನು ಬದಲಾಯಿಸು ವೌಲ್ಟ್ ಅನ್ನು ತೆರೆಯಲು ಹೊಸಾ ಗುಪ್ತಪದವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ diff --git a/app/src/main/res/values-nl-rNL/strings.xml b/app/src/main/res/values-nl-rNL/strings.xml index 065f0503c8..93c9709446 100644 --- a/app/src/main/res/values-nl-rNL/strings.xml +++ b/app/src/main/res/values-nl-rNL/strings.xml @@ -45,7 +45,6 @@ Codes zullen standaard worden verborgen. Tik een uitgever aan om de code te onthullen. Time-out voor aantikken om te onthullen Automatisch vergrendelen - Kluis automatisch vergrendelen wanneer je de app sluit of je toestel vergrendelt. Encryptie Encrypt de kluis en ontgrendel deze met een wachtwoord of biometrie Ontgrendelen met biometrie diff --git a/app/src/main/res/values-pl-rPL/strings.xml b/app/src/main/res/values-pl-rPL/strings.xml index b7db7257f2..7031e182ad 100644 --- a/app/src/main/res/values-pl-rPL/strings.xml +++ b/app/src/main/res/values-pl-rPL/strings.xml @@ -55,7 +55,6 @@ Tokeny zostaną domyślnie ukryte. Kliknij na token, aby pokazać kod. Limit czasu dla odkrycia Automatyczna blokada - Automatycznie zablokuj aplikację po jej zamknięciu lub zablokowaniu urządzenia. Szyfrowanie Zaszyfruj sejf i odblokuj go za pomocą hasła lub autoryzacji biometrycznej Autoryzacja biometryczna diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index e9921bb807..9253d94fa1 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -47,7 +47,6 @@ Tokens ficarão ocultos por padrão. Toque nos tokens para revelar o código. Tempo de espera para tocar para revelar Bloqueio Automático - Bloqueia automaticamente quando você fecha o app ou bloqueia seu dispositivo. Criptografia Encripta o cofre e o desbloqueia com uma senha ou biometria Desbloqueio biométrico diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 67eacdaf74..18019047cd 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -45,7 +45,6 @@ Tokens serão ocultados por padrão. Toque nos tokens para revelar código. Tempo limite para o tocar e mostrar Bloqueio automático - Bloquear automaticamente quando você fechar o app ou bloquear seu dispositivo. Encriptação Criptografe o cofre e desbloqueie-o com uma senha ou sua digital Desbloqueio biométrico diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml index ec8e5cacaf..c406fb3eaf 100644 --- a/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/src/main/res/values-ru-rRU/strings.xml @@ -51,7 +51,6 @@ Коды будут скрыты по умолчанию. Нажмите на токен, чтобы показать код. Тайм-аут для отображения по нажатию Автоматическая блокировка - Автоматическая блокировка при закрытии приложения и блокировке устройства. Шифрование Зашифруйте хранилище и разблокируйте его с помощью пароля или биометрии Биометрическая разблокировка diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 9254a51447..9bea638c2a 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -46,7 +46,6 @@ Kodlar varsayılan olarak gizlenir. Kodu görmek için üstüne dokunun Gösterme için zaman aşımı Otomatik kilitleme - Cihazı kilitlediğimde veya uygulamayı kapattığımda otomatik olarak kilitle. Şifreleme Kasayı şifrele ve açmak için bir parola veya biyometrik doğrulama kullan Biyometrik kilit açma diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index a046e6bc3d..7e36bf0af0 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -52,7 +52,6 @@ 默认情况下,令牌将被隐藏。为了显示验证码,需要点击令牌。 点击令牌后,验证码的显示时间 自动锁定 - 关闭应用或锁定设备时自动锁定 加密 加密数据库,并在解锁时要求密码或生物识别验证。 生物识别解锁 diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 1f69e6da63..9086481391 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -84,5 +84,9 @@ @string/password_strength_strong + + @string/pref_auto_lock_type_back_button + @string/pref_auto_lock_type_minimize + @string/pref_auto_lock_type_device_lock + - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 03a73e3170..dc1262274d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -57,7 +57,12 @@ Tokens will be hidden by default. Tap on the tokens to reveal code. Timeout for tap to reveal Auto lock - Automatically lock when you close the app or lock your device. + When %s + Disabled + Automatically lock Aegis when + The back button is pressed + The app is minimized + The device is locked Encryption Encrypt the vault and unlock it with a password or biometrics Biometric unlock diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index a508c63c58..4e5b840d35 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -137,10 +137,10 @@ android:summary="@string/pref_pin_keyboard_summary" app:iconSpaceReserved="false"/> -