Ganfra's review

This commit is contained in:
Benoit Marty 2020-09-23 16:53:51 +02:00 committed by Benoit Marty
parent 9f154748ae
commit 03c66315cb
2 changed files with 4 additions and 5 deletions

View File

@ -218,7 +218,9 @@
<activity android:name=".features.terms.ReviewTermsActivity" /> <activity android:name=".features.terms.ReviewTermsActivity" />
<activity android:name=".features.widgets.WidgetActivity" /> <activity android:name=".features.widgets.WidgetActivity" />
<activity android:name=".features.pin.PinActivity" /> <activity
android:name=".features.pin.PinActivity"
android:launchMode="singleTop" />
<!-- Services --> <!-- Services -->

View File

@ -32,9 +32,6 @@ import javax.inject.Singleton
// 2 minutes, when enabled // 2 minutes, when enabled
private const val PERIOD_OF_GRACE_IN_MS = 2 * 60 * 1000L private const val PERIOD_OF_GRACE_IN_MS = 2 * 60 * 1000L
// 1 seconds, to avoid asking for PIN code when switching between Activities
private const val PERIOD_OF_GRACE_DISABLED_IN_MS = 1000L
/** /**
* This class is responsible for keeping the status of locking * This class is responsible for keeping the status of locking
* It automatically locks when entering background/foreground with a grace period. * It automatically locks when entering background/foreground with a grace period.
@ -112,7 +109,7 @@ class PinLocker @Inject constructor(
return if (vectorPreferences.useGracePeriod()) { return if (vectorPreferences.useGracePeriod()) {
PERIOD_OF_GRACE_IN_MS PERIOD_OF_GRACE_IN_MS
} else { } else {
PERIOD_OF_GRACE_DISABLED_IN_MS 0L
} }
} }
} }