diff options
| author | doc HD <doc.divxm@gmail.com> | 2017-09-06 10:27:00 +0300 |
|---|---|---|
| committer | doc HD <doc.divxm@gmail.com> | 2017-09-06 10:27:00 +0300 |
| commit | 91a8a59154c5a674dda904c0c463de1e3d1a8310 (patch) | |
| tree | 0976950deb115b327e43ce239a7a13e1e71efe28 | |
| parent | 2601b4e82812ac033f3aa57cb6245820f048dea4 (diff) | |
fwb: Fix mismergemm6.0
** Attempt to fix bootloops on optimizing apps..
Change-Id: I52a375fbac5c2d4d77d94425f3e820bb507bb248
| -rwxr-xr-x | services/core/java/com/android/server/am/ActivityManagerService.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 82997092b219..961159086f8d 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -3666,16 +3666,19 @@ public final class ActivityManagerService extends ActivityManagerNative app.killed = false; app.killedByAm = false; checkTime(startTime, "startProcess: starting to update pids map"); + ProcessRecord oldApp; + synchronized (mPidsSelfLocked) { + oldApp = mPidsSelfLocked.get(startResult.pid); + } + // If there is already an app occupying that pid that hasn't been cleaned up + if (oldApp != null && !app.isolated) { + // Clean up anything relating to this pid first + Slog.w(TAG, "Reusing pid " + startResult.pid + + " while app is still mapped to it"); + cleanUpApplicationRecordLocked(oldApp, false, false, -1, + true /*replacingPid*/); + } synchronized (mPidsSelfLocked) { - ProcessRecord oldApp; - // If there is already an app occupying that pid that hasn't been cleaned up - if ((oldApp = mPidsSelfLocked.get(startResult.pid)) != null && !app.isolated) { - // Clean up anything relating to this pid first - Slog.w(TAG, "Reusing pid " + startResult.pid - + " while app is still mapped to it"); - cleanUpApplicationRecordLocked(oldApp, false, false, -1, - true /*replacingPid*/); - } this.mPidsSelfLocked.put(startResult.pid, app); if (isActivityProcess) { Message msg = mHandler.obtainMessage(PROC_START_TIMEOUT_MSG); |
