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

Commit 8a624ee9 authored by Hui Yu's avatar Hui Yu
Browse files

Make a copy of FgsTempAllowList's keySet.

The underlying FgsTempAllowList.get() interface actually mutate the
FgsTempAllowList.

Bug: 187445303
Test: adb shell dumpsys activity processes
Change-Id: I79a3106c15e7b2491c895153ba64fdb318c2d561
parent 58076e5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -9334,7 +9334,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            pw.println("  mFgsStartTempAllowList:");
            pw.println("  mFgsStartTempAllowList:");
            final long currentTimeNow = System.currentTimeMillis();
            final long currentTimeNow = System.currentTimeMillis();
            final long elapsedRealtimeNow = SystemClock.elapsedRealtime();
            final long elapsedRealtimeNow = SystemClock.elapsedRealtime();
            final Set<Integer> uids = mFgsStartTempAllowList.keySet();
            final Set<Integer> uids = new ArraySet<>(mFgsStartTempAllowList.keySet());
            for (Integer uid : uids) {
            for (Integer uid : uids) {
                final Pair<Long, FgsTempAllowListItem> entry = mFgsStartTempAllowList.get(uid);
                final Pair<Long, FgsTempAllowListItem> entry = mFgsStartTempAllowList.get(uid);
                if (entry == null) {
                if (entry == null) {