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

Commit 84c07cf3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix memory leak in SuspendBlockerImpl" into main

parents a207b8dc 741dbaca
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5583,7 +5583,7 @@ public final class PowerManagerService extends SystemService
        private void recordReferenceLocked(String id) {
            LongArray times = mOpenReferenceTimes.get(id);
            if (times == null) {
                times = new LongArray();
                times = new LongArray(2);
                mOpenReferenceTimes.put(id, times);
            }
            times.add(System.currentTimeMillis());
@@ -5593,6 +5593,9 @@ public final class PowerManagerService extends SystemService
            LongArray times = mOpenReferenceTimes.get(id);
            if (times != null && times.size() > 0) {
                times.remove(times.size() - 1);
                if (times.size() == 0) {
                    mOpenReferenceTimes.remove(id);
                }
            }
        }
    }