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

Commit f9fc56f1 authored by riddle_hsu's avatar riddle_hsu Committed by Steve Kondik
Browse files

[ActivityManager] Fix process record leakage.

Symptom:
Remain dead process record in mLruProcesses.

Root cause:
When a process dies and needs to restart immediately.
The process record will not be removed from mLruProcesses
in handleAppDiedLocked (return kept=true).
If the restarting process start timeout, the record in
mLruProcesses will not be removed.

Solution:
Call removeLruProcessLocked in processStartTimedOutLocked.

Change-Id: I1935ccc586016cb4e90dfdfac96cc88931553d5f
parent 4482c37e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5946,6 +5946,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            // Take care of any services that are waiting for the process.
            mServices.processStartTimedOutLocked(app);
            app.kill("start timeout", true);
            removeLruProcessLocked(app);
            if (mBackupTarget != null && mBackupTarget.app.pid == pid) {
                Slog.w(TAG, "Unattached app died before backup, skipping");
                try {