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

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

Merge "Fix race conditions in removing dying process record"

parents 78337f8a 0120825e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -11951,6 +11951,15 @@ public class ActivityManagerService extends IActivityManager.Stub
        // If this is a preceding instance of another process instance
        allowRestart = mProcessList.handlePrecedingAppDiedLocked(app);
        // If somehow this process was still waiting for the death of its predecessor,
        // (probably it's "killed" before starting for real), reset the bookkeeping.
        final ProcessRecord predecessor = app.mPredecessor;
        if (predecessor != null) {
            predecessor.mSuccessor = null;
            predecessor.mSuccessorStartRunnable = null;
            app.mPredecessor = null;
        }
        // If the caller is restarting this app, then leave it in its
        // current lists and let the caller take care of it.
        if (restarting) {
+2 −1
Original line number Diff line number Diff line
@@ -5144,7 +5144,8 @@ public final class ProcessList {
        }

        Watchdog.getInstance().processDied(app.processName, app.getPid());
        if (app.getDeathRecipient() == null) {
        if (app.getDeathRecipient() == null
                && mDyingProcesses.get(app.processName, app.uid) == app) {
            // If we've done unlinkDeathRecipient before calling into this, remove from dying list.
            mDyingProcesses.remove(app.processName, app.uid);
            app.setDyingPid(0);