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

Commit 6096c421 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug in last access time computation." into sc-dev

parents 266fa7fb e8c6c784
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) {