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

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

Merge "Fix potential race condition due to missing lock"

parents b7c776aa 402cd201
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -5221,7 +5221,9 @@ public final class ActiveServices {
            sr.setProcess(null, null, 0, null);
            sr.isolatedProc = null;
            sr.executeNesting = 0;
            synchronized (mAm.mProcessStats.mLock) {
                sr.forceClearTracker();
            }
            if (mDestroyingServices.remove(sr)) {
                if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "killServices remove destroying " + sr);
            }
@@ -5371,7 +5373,9 @@ public final class ActiveServices {
            i--;
            ServiceRecord sr = mDestroyingServices.get(i);
            if (sr.app == app) {
                synchronized (mAm.mProcessStats.mLock) {
                    sr.forceClearTracker();
                }
                mDestroyingServices.remove(i);
                if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "killServices remove destroying " + sr);
            }