From 9c9980bba68dcc2cde156015663f1837ee45cde7 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Mon, 23 Sep 2019 11:11:53 +0200 Subject: [PATCH] Change TimeOut default to 5 minutes --- .../java/com/kunzisoft/keepass/settings/PreferencesUtil.kt | 4 ++-- .../java/com/kunzisoft/keepass/timeout/ClipboardHelper.kt | 3 +-- app/src/main/res/values/donottranslate.xml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.kt b/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.kt index b49bd139f..1956471b2 100644 --- a/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.kt +++ b/app/src/main/java/com/kunzisoft/keepass/settings/PreferencesUtil.kt @@ -109,8 +109,8 @@ object PreferencesUtil { fun getAppTimeout(context: Context): Long { return try { val prefs = PreferenceManager.getDefaultSharedPreferences(context) - java.lang.Long.parseLong(prefs.getString(context.getString(R.string.app_timeout_key), - context.getString(R.string.clipboard_timeout_default)) ?: "60000") + (prefs.getString(context.getString(R.string.app_timeout_key), + context.getString(R.string.clipboard_timeout_default)) ?: "300000").toLong() } catch (e: NumberFormatException) { TimeoutHelper.DEFAULT_TIMEOUT } diff --git a/app/src/main/java/com/kunzisoft/keepass/timeout/ClipboardHelper.kt b/app/src/main/java/com/kunzisoft/keepass/timeout/ClipboardHelper.kt index a799645b2..646b47601 100644 --- a/app/src/main/java/com/kunzisoft/keepass/timeout/ClipboardHelper.kt +++ b/app/src/main/java/com/kunzisoft/keepass/timeout/ClipboardHelper.kt @@ -60,8 +60,7 @@ class ClipboardHelper(private val context: Context) { val sClipClear = prefs.getString(context.getString(R.string.clipboard_timeout_key), context.getString(R.string.clipboard_timeout_default)) - val clipClearTime = java.lang.Long.parseLong(sClipClear ?: "60000") - + val clipClearTime = (sClipClear ?: "300000").toLong() if (clipClearTime > 0) { mTimer.schedule(ClearClipboardTask(context, text), clipClearTime) } diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index 17d065d87..2aa1ca90c 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -109,7 +109,7 @@ clear_clipboard_notification_key true clip_timeout_key - 60000 + 300000 settings_autofill_enable_key false keyboard_selection_entry_key @@ -119,7 +119,7 @@ keyboard_notification_entry_clear_close_key true keyboard_entry_timeout_key - 60000 + 300000 keyboard_key_vibrate_key true keyboard_key_sound_key