Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5f70b66 authored by Olawale Ogunwale's avatar Olawale Ogunwale Committed by Gerrit Code Review
Browse files

Merge "[ActivityManager] Avoid killing unrelated processes."

parents 000293c9 2541306a
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1215,7 +1215,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                TAG, "Death received in " + this
                + " for thread " + mAppThread.asBinder());
            synchronized(ActivityManagerService.this) {
                appDiedLocked(mApp, mPid, mAppThread);
                appDiedLocked(mApp, mPid, mAppThread, true);
            }
        }
    }
@@ -4687,10 +4687,11 @@ public final class ActivityManagerService extends ActivityManagerNative
    }
    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.
        synchronized (mPidsSelfLocked) {
            ProcessRecord curProc = mPidsSelfLocked.get(pid);
@@ -4706,7 +4707,9 @@ public final class ActivityManagerService extends ActivityManagerNative
        }
        if (!app.killed) {
            if (!fromBinderDied) {
                Process.killProcessQuiet(pid);
            }
            Process.killProcessGroup(app.info.uid, pid);
            app.killed = true;
        }