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

Commit a59603c7 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove pid record mapping after killing process" into main

parents 41d3bec4 d55b27a6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3212,7 +3212,6 @@ public final class ProcessList {
        if ((pid > 0 && pid != ActivityManagerService.MY_PID)
                || (pid == 0 && app.isPendingStart())) {
            if (pid > 0) {
                mService.removePidLocked(pid, app);
                app.setBindMountPending(false);
                mService.mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
                mService.mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
@@ -3230,6 +3229,12 @@ public final class ProcessList {
                }
            }
            app.killLocked(reason, reasonCode, subReason, true, async);
            if (pid > 0) {
                // Remove pid record mapping after killing the process, so there won't be a short
                // period that the app is still alive but its access to system may be illegal due
                // to no existing record for its pid.
                mService.removePidLocked(pid, app);
            }
            mService.handleAppDiedLocked(app, pid, willRestart, allowRestart,
                    false /* fromBinderDied */);
            if (willRestart) {