Skip to content

Commit

Permalink
Fix clock in BitmapPreFillRunner.java
Browse files Browse the repository at this point in the history
currentThreadTimeMillis() returns how long the current thread has been executing, not the current time.
  • Loading branch information
kluever authored Oct 14, 2024
1 parent a98b301 commit 99baea3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
Expand Down Expand Up @@ -181,7 +180,7 @@ public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
@VisibleForTesting
static class Clock {
long now() {
return SystemClock.currentThreadTimeMillis();
return System.currentTimeMillis();
}
}
}

0 comments on commit 99baea3

Please sign in to comment.