Merge pull request #4947 from nextcloud/fixTime

use SystemClock.elapsedRealtime() everywhere
This commit is contained in:
Tobias Kaminsky 2019-12-05 11:08:15 +01:00 committed by GitHub
commit eb74b5230f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ public final class PassCodeManager {
}
private boolean passCodeShouldBeRequested(Long timestamp) {
return (System.currentTimeMillis() - timestamp) > PASS_CODE_TIMEOUT &&
return (SystemClock.elapsedRealtime() - timestamp) > PASS_CODE_TIMEOUT &&
visibleActivitiesCounter <= 0 && isPassCodeEnabled();
}
@ -134,7 +134,7 @@ public final class PassCodeManager {
}
private boolean deviceCredentialsShouldBeRequested(Long timestamp, Activity activity) {
return (System.currentTimeMillis() - timestamp) > PASS_CODE_TIMEOUT && visibleActivitiesCounter <= 0 &&
return (SystemClock.elapsedRealtime() - timestamp) > PASS_CODE_TIMEOUT && visibleActivitiesCounter <= 0 &&
deviceCredentialsAreEnabled(activity);
}