Change TimeOut default to 5 minutes

This commit is contained in:
J-Jamet
2019-09-23 11:11:53 +02:00
parent 2226c15d29
commit 9c9980bba6
3 changed files with 5 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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)
}

View File

@@ -109,7 +109,7 @@
<string name="clear_clipboard_notification_key" translatable="false">clear_clipboard_notification_key</string>
<bool name="clear_clipboard_notification_default" translatable="false">true</bool>
<string name="clipboard_timeout_key" translatable="false">clip_timeout_key</string>
<string name="clipboard_timeout_default" translatable="false">60000</string>
<string name="clipboard_timeout_default" translatable="false">300000</string>
<string name="settings_autofill_enable_key" translatable="false">settings_autofill_enable_key</string>
<bool name="settings_autofill_enable_default" translatable="false">false</bool>
<string name="keyboard_selection_entry_key" translatable="false">keyboard_selection_entry_key</string>
@@ -119,7 +119,7 @@
<string name="keyboard_notification_entry_clear_close_key" translatable="false">keyboard_notification_entry_clear_close_key</string>
<bool name="keyboard_notification_entry_clear_close_default" translatable="false">true</bool>
<string name="keyboard_entry_timeout_key" translatable="false">keyboard_entry_timeout_key</string>
<string name="keyboard_entry_timeout_default" translatable="false">60000</string>
<string name="keyboard_entry_timeout_default" translatable="false">300000</string>
<string name="keyboard_key_vibrate_key" translatable="false">keyboard_key_vibrate_key</string>
<bool name="keyboard_key_vibrate_default" translatable="false">true</bool>
<string name="keyboard_key_sound_key" translatable="false">keyboard_key_sound_key</string>