Skip to content

Commit

Permalink
Merge pull request #4949 from nextcloud/backport/4947/stable-3.9
Browse files Browse the repository at this point in the history
[stable-3.9] use SystemClock.elapsedRealtime() everywhere
  • Loading branch information
tobiasKaminsky authored Dec 5, 2019
2 parents 09f7f64 + 9b176b9 commit 891d1ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void onActivityStopped(Activity activity) {
}

private boolean passCodeShouldBeRequested(Long timestamp) {
return (System.currentTimeMillis() - timestamp) > PASS_CODE_TIMEOUT &&
return (SystemClock.elapsedRealtime() - timestamp) > PASS_CODE_TIMEOUT &&
visibleActivitiesCounter <= 0 && isPassCodeEnabled();
}

Expand All @@ -134,7 +134,7 @@ private boolean isPassCodeEnabled() {
}

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

Expand Down

0 comments on commit 891d1ab

Please sign in to comment.