[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
This commit is contained in:
riddle_hsu
2014-12-12 20:01:29 +08:00
committed by Riddle Hsu
parent 4c23a0ec16
commit 22242ab29a

View File

@@ -6018,6 +6018,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 {