File tree Expand file tree Collapse file tree
app/src/main/java/ua/com/radiokot/money/lock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ val appLockModule = module {
4444
4545 single {
4646 AppLock (
47+ backgroundLockThresholdMs = 10000 ,
4748 preferences = get(),
4849 )
4950 } bind AppLock ::class
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import ua.com.radiokot.money.map
3838 * @see MoneyAppActivity.requiresUnlocking
3939 */
4040class AppLock (
41+ private val backgroundLockThresholdMs : Long ,
4142 private val preferences : AppLockPreferences ,
4243) {
4344 private val log by lazyLogger(" AppLock" )
@@ -104,7 +105,7 @@ class AppLock(
104105 return
105106 }
106107
107- if (SystemClock .uptimeMillis() - wentToBackgroundAtMs > 3000 ) {
108+ if (SystemClock .uptimeMillis() - wentToBackgroundAtMs > backgroundLockThresholdMs ) {
108109
109110 log.debug {
110111 " onAppReturnedToForeground(): locking as been in background long enough:" +
You can’t perform that action at this time.
0 commit comments