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

Commit 2dc7b8b3 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Reduce the scope of holding the mPidsSelfLocked lock" into main

parents 6b9e304f 7ba146d5
Loading
Loading
Loading
Loading
+32 −31
Original line number Diff line number Diff line
@@ -6025,11 +6025,13 @@ public class ActivityManagerService extends IActivityManager.Stub
        }
        synchronized (mProcLock) {
            synchronized (mPidsSelfLocked) {
            int newestTimeIndex = -1;
            long newestTime = Long.MIN_VALUE;
            for (int i = 0; i < pids.length; i++) {
                    ProcessRecord pr = mPidsSelfLocked.get(pids[i]);
                final ProcessRecord pr;
                synchronized (mPidsSelfLocked) {
                    pr = mPidsSelfLocked.get(pids[i]);
                }
                if (pr != null) {
                    final long pendingTopTime =
                            mPendingStartActivityUids.getPendingTopPidTime(pr.uid, pids[i]);
@@ -6066,7 +6068,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
        }
    }
    }
    // =========================================================
    // PERMISSIONS