From 1584de976933134d8e8b4774cac209f14179ddd0 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 5 Dec 2019 11:05:47 +0100 Subject: [PATCH] use SystemClock.elapsedRealtime() everywhere Signed-off-by: tobiasKaminsky --- .../com/owncloud/android/authentication/PassCodeManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/owncloud/android/authentication/PassCodeManager.java b/src/main/java/com/owncloud/android/authentication/PassCodeManager.java index 665a160a5c..f00c414ebe 100644 --- a/src/main/java/com/owncloud/android/authentication/PassCodeManager.java +++ b/src/main/java/com/owncloud/android/authentication/PassCodeManager.java @@ -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); }