Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5bac402 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix a bug in last access time computation." into sc-dev am: 6096c421

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13577794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3314f8b33f8828a48a4ef5d3abc2bdfdf22ea6e1
parents db8501c0 6096c421
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -163,8 +163,12 @@ public class RecentLocationAccesses {
        long locationAccessFinishTime = 0L;
        // Earliest time for a location access to end and still be shown in list.
        long recentLocationCutoffTime = now - RECENT_TIME_INTERVAL_MILLIS;
        // Compute the most recent access time from all op entries.
        for (AppOpsManager.OpEntry entry : entries) {
            locationAccessFinishTime = entry.getLastAccessTime(TRUSTED_STATE_FLAGS);
            long lastAccessTime = entry.getLastAccessTime(TRUSTED_STATE_FLAGS);
            if (lastAccessTime > locationAccessFinishTime) {
                locationAccessFinishTime = lastAccessTime;
            }
        }
        // Bail out if the entry is out of date.
        if (locationAccessFinishTime < recentLocationCutoffTime) {