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