DO NOT MERGE: Fix deadlock in AcitivityManagerService. am: dce4be63bb
am: a437e7f3f1
Change-Id: I13fdcfc2ecca2e5e1d178d61ef8ec6990a0fc3af
This commit is contained in:
@@ -2754,16 +2754,19 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
app.setPid(startResult.pid);
|
app.setPid(startResult.pid);
|
||||||
app.usingWrapper = startResult.usingWrapper;
|
app.usingWrapper = startResult.usingWrapper;
|
||||||
app.removed = false;
|
app.removed = false;
|
||||||
|
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) {
|
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);
|
this.mPidsSelfLocked.put(startResult.pid, app);
|
||||||
Message msg = mHandler.obtainMessage(PROC_START_TIMEOUT_MSG);
|
Message msg = mHandler.obtainMessage(PROC_START_TIMEOUT_MSG);
|
||||||
msg.obj = app;
|
msg.obj = app;
|
||||||
|
|||||||
Reference in New Issue
Block a user