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

Commit 3cc6d0b3 authored by Nate Myren's avatar Nate Myren Committed by Android (Google) Code Review
Browse files

Merge "Do not look at self when comparing for duplicate usage"

parents 285be6fe 6fa6a807
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -662,6 +662,11 @@ public class PermissionUsageHelper {
            // usage for that uid, keep it. Otherwise, remove it
            boolean isMostRecentForUid = true;
            for (int otherUsageNum = 0; otherUsageNum < rawUsages.size(); otherUsageNum++) {
                // Do not compare this usage to itself
                if (otherUsageNum == usageNum) {
                    continue;
                }

                OpUsage otherUsage = rawUsages.get(otherUsageNum);
                if (otherUsage.uid == usage.uid) {
                    if (otherUsage.isRunning && !usage.isRunning) {