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

Commit f26beef9 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Do not reuse the same ProcessRecord if it's not fully gone yet" into...

Merge "Do not reuse the same ProcessRecord if it's not fully gone yet" into udc-dev am: 32db01a1 am: f1da8d2a am: 29ccd415

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23638571



Change-Id: I4ea2caa80fa98f40733fb3140a193f876aa3db51
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1738f530 29ccd415
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2572,9 +2572,14 @@ public final class ProcessList {
            // and did the cleanup before the actual death notification. Check the dying processes.
            predecessor = mDyingProcesses.get(processName, info.uid);
            if (predecessor != null) {
                if (app != null) {
                // The process record could have existed but its pid is set to 0. In this case,
                // the 'app' and 'predecessor' could end up pointing to the same instance;
                // so make sure we check this case here.
                if (app != null && app != predecessor) {
                    app.mPredecessor = predecessor;
                    predecessor.mSuccessor = app;
                } else {
                    app = null;
                }
                Slog.w(TAG_PROCESSES, predecessor.toString() + " is attached to a previous process "
                        + predecessor.getDyingPid());
@@ -5195,6 +5200,8 @@ public final class ProcessList {
            mDyingProcesses.remove(app.processName, app.uid);
            app.setDyingPid(0);
            handlePrecedingAppDiedLocked(app);
            // Remove from the LRU list if it's still there.
            removeLruProcessLocked(app);
            return true;
        }
        return false;