Merge "[ActivityManager] Avoid orphan ContentProviderRecord."
This commit is contained in:
@@ -5816,17 +5816,20 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
if (app.isolated) {
|
if (app.isolated) {
|
||||||
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
|
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
|
||||||
}
|
}
|
||||||
app.kill(reason, true);
|
boolean willRestart = false;
|
||||||
handleAppDiedLocked(app, true, allowRestart);
|
|
||||||
removeLruProcessLocked(app);
|
|
||||||
|
|
||||||
if (app.persistent && !app.isolated) {
|
if (app.persistent && !app.isolated) {
|
||||||
if (!callerWillRestart) {
|
if (!callerWillRestart) {
|
||||||
addAppLocked(app.info, false, null /* ABI override */);
|
willRestart = true;
|
||||||
} else {
|
} else {
|
||||||
needRestart = true;
|
needRestart = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
app.kill(reason, true);
|
||||||
|
handleAppDiedLocked(app, willRestart, allowRestart);
|
||||||
|
if (willRestart) {
|
||||||
|
removeLruProcessLocked(app);
|
||||||
|
addAppLocked(app.info, false, null /* ABI override */);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mRemovedProcesses.add(app);
|
mRemovedProcesses.add(app);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user