add some things related to password protecting the whole app

This commit is contained in:
tibbi 2017-11-08 21:42:23 +01:00
parent 439a2e9578
commit 43e1a00583
28 changed files with 46 additions and 3 deletions

View file

@ -64,9 +64,10 @@ open class BaseConfig(val context: Context) {
get() = prefs.getInt(WIDGET_TEXT_COLOR, context.resources.getColor(R.color.color_primary))
set(widgetTextColor) = prefs.edit().putInt(WIDGET_TEXT_COLOR, widgetTextColor).apply()
// hidden folder visibility protection
var isPasswordProtectionOn: Boolean
get() = prefs.getBoolean(IS_PASSWORD_PROTECTION, false)
set(passwordProtection) = prefs.edit().putBoolean(IS_PASSWORD_PROTECTION, passwordProtection).apply()
get() = prefs.getBoolean(PASSWORD_PROTECTION, false)
set(isPasswordProtectionOn) = prefs.edit().putBoolean(PASSWORD_PROTECTION, isPasswordProtectionOn).apply()
var passwordHash: String
get() = prefs.getString(PASSWORD_HASH, "")
@ -76,6 +77,19 @@ open class BaseConfig(val context: Context) {
get() = prefs.getInt(PROTECTION_TYPE, PROTECTION_PATTERN)
set(protectionType) = prefs.edit().putInt(PROTECTION_TYPE, protectionType).apply()
// whole app launch protection
var appPasswordProtectionOn: Boolean
get() = prefs.getBoolean(APP_PASSWORD_PROTECTION, false)
set(appPasswordProtectionOn) = prefs.edit().putBoolean(APP_PASSWORD_PROTECTION, appPasswordProtectionOn).apply()
var appPasswordHash: String
get() = prefs.getString(APP_PASSWORD_HASH, "")
set(appPasswordHash) = prefs.edit().putString(APP_PASSWORD_HASH, appPasswordHash).apply()
var appProtectionType: Int
get() = prefs.getInt(APP_PROTECTION_TYPE, PROTECTION_PATTERN)
set(appProtectionType) = prefs.edit().putInt(APP_PROTECTION_TYPE, appProtectionType).apply()
var keepLastModified: Boolean
get() = prefs.getBoolean(KEEP_LAST_MODIFIED, true)
set(keepLastModified) = prefs.edit().putBoolean(KEEP_LAST_MODIFIED, keepLastModified).apply()

View file

@ -21,9 +21,12 @@ val CUSTOM_BACKGROUND_COLOR = "custom_background_color"
val CUSTOM_PRIMARY_COLOR = "custom_primary_color"
val WIDGET_BG_COLOR = "widget_bg_color"
val WIDGET_TEXT_COLOR = "widget_text_color"
val IS_PASSWORD_PROTECTION = "password_protection"
val PASSWORD_PROTECTION = "password_protection"
val PASSWORD_HASH = "password_hash"
val PROTECTION_TYPE = "protection_type"
val APP_PASSWORD_PROTECTION = "app_password_protection"
val APP_PASSWORD_HASH = "app_password_hash"
val APP_PROTECTION_TYPE = "app_protection_type"
val KEEP_LAST_MODIFIED = "keep_last_modified"
val USE_ENGLISH = "use_english"

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Groß</string>
<string name="extra_large">Sehr groß</string>
<string name="password_protect_hidden_items">Verstecktes mit Muster/PIN schützen</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Beim Kopieren/Verschieben/Umbenennen die alte Änderungszeit beibehalten</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Grande</string>
<string name="extra_large">Enorme</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Visibilité des éléments protégés par un mot de passe</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Garder la valeur de l\'ancienne modification lors de renommage/déplacement/copie de fichier</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Nagy</string>
<string name="extra_large">Óriási</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Grande</string>
<string name="extra_large">Molto grande</string>
<string name="password_protect_hidden_items">Proteggi con password gli elementi nascosti</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Mantieni valore di ultima modifica dopo il copia/sposta/rinomina</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large"></string>
<string name="extra_large">特大</string>
<string name="password_protect_hidden_items">非表示にした項目をパスワードで保護する</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">크게</string>
<string name="extra_large">아주 크게</string>
<string name="password_protect_hidden_items">숨김파일 보기 암호설정</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Didelis</string>
<string name="extra_large">Ypaè didelis</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Groot</string>
<string name="extra_large">Extra groot</string>
<string name="password_protect_hidden_items">Verborgen items met wachtwoord beveiligen</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Datum laatst gewijzigd behouden bij bestandsoperaties</string>
<!-- About -->

View file

@ -214,6 +214,7 @@
<string name="large">Duża</string>
<string name="extra_large">Bardzo duża</string>
   <string name="password_protect_hidden_items">Chroń widoczność ukrytych plików</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
   <string name="keep_last_modified">Zachowuj starą datę i czas modyfikacji przy kopiowaniu / przenoszeniu / zmianie nazwy plików</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Grande</string>
<string name="extra_large">Muito grande</string>
<string name="password_protect_hidden_items">Proteja visibilidade de ítens ocultos com senha</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Manter valor anterior do arquivo modificado por último ao copiar/mover/renomear arquivo</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Grande</string>
<string name="extra_large">Muito grande</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Manter dados da última modificação ao copiar/mover/renomear</string>
<!-- About -->

View file

@ -212,6 +212,7 @@
<string name="large">Крупный</string>
<string name="extra_large">Очень крупный</string>
<string name="password_protect_hidden_items">Защита паролем отображения скрытых объектов</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Сохранять значение даты изменения файла при копировании/перемещении/переименовании</string>
<!-- About -->

View file

@ -214,6 +214,7 @@
<string name="large">Veľké</string>
<string name="extra_large">Extra veľké</string>
<string name="password_protect_hidden_items">Uzamknúť viditeľnosť skrytých položiek heslom</string>
<string name="password_protect_whole_app">Uzamknúť heslom celú aplikáciu</string>
<string name="keep_last_modified">Ponechať starú hodnotu naposledy-upravené pri kopírovaní/presúvaní/premenúvaní súborov</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Stor</string>
<string name="extra_large">Extra stor</string>
<string name="password_protect_hidden_items">Lösenordsskydda synligheten för dolda objekt</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large"></string>
<string name="extra_large">巨大</string>
<string name="password_protect_hidden_items">使用密码保护隐藏项</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">在复制/移动/重命名文件时保留旧的修改日期</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large"></string>
<string name="extra_large">特大</string>
<string name="password_protect_hidden_items">用密碼保護隱藏的物件</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->

View file

@ -210,6 +210,7 @@
<string name="large">Large</string>
<string name="extra_large">Extra large</string>
<string name="password_protect_hidden_items">Password protect hidden item visibility</string>
<string name="password_protect_whole_app">Password protect the whole application</string>
<string name="keep_last_modified">Keep old last-modified value at file copy/move/rename</string>
<!-- About -->