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

Commit 6fa6a807 authored by Nate Myren's avatar Nate Myren
Browse files

Do not look at self when comparing for duplicate usage

When looking for duplicate usages, do not compare to self

Fixes: 178088373
Test: manual
Change-Id: I5e7316caff5ff33017cd868324c066a3f3e99bd6
parent 29779f56
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) {