am f5f70b66: Merge "[ActivityManager] Avoid killing unrelated processes."
* commit 'f5f70b66a3f22ca5e23a4d1e6061f2a36dfb4c92': [ActivityManager] Avoid killing unrelated processes.
This commit is contained in:
@@ -1216,7 +1216,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
TAG, "Death received in " + this
|
TAG, "Death received in " + this
|
||||||
+ " for thread " + mAppThread.asBinder());
|
+ " for thread " + mAppThread.asBinder());
|
||||||
synchronized(ActivityManagerService.this) {
|
synchronized(ActivityManagerService.this) {
|
||||||
appDiedLocked(mApp, mPid, mAppThread);
|
appDiedLocked(mApp, mPid, mAppThread, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4688,10 +4688,11 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
}
|
}
|
||||||
|
|
||||||
final void appDiedLocked(ProcessRecord app) {
|
final void appDiedLocked(ProcessRecord app) {
|
||||||
appDiedLocked(app, app.pid, app.thread);
|
appDiedLocked(app, app.pid, app.thread, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread) {
|
final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread,
|
||||||
|
boolean fromBinderDied) {
|
||||||
// First check if this ProcessRecord is actually active for the pid.
|
// First check if this ProcessRecord is actually active for the pid.
|
||||||
synchronized (mPidsSelfLocked) {
|
synchronized (mPidsSelfLocked) {
|
||||||
ProcessRecord curProc = mPidsSelfLocked.get(pid);
|
ProcessRecord curProc = mPidsSelfLocked.get(pid);
|
||||||
@@ -4707,7 +4708,9 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!app.killed) {
|
if (!app.killed) {
|
||||||
Process.killProcessQuiet(pid);
|
if (!fromBinderDied) {
|
||||||
|
Process.killProcessQuiet(pid);
|
||||||
|
}
|
||||||
Process.killProcessGroup(app.info.uid, pid);
|
Process.killProcessGroup(app.info.uid, pid);
|
||||||
app.killed = true;
|
app.killed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user