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

Commit 6bd06005 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "check thread group leader before killing process" into main am:...

Merge "Merge "check thread group leader before killing process" into main am: 23d9f8c2 am: e662626f" into main
parents 7aeb6579 263ea659
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3303,7 +3303,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            // just kill it. And if it is a window of foreground activity, the activity can be
            // restarted automatically if needed.
            Slog.w(TAG, "Exception thrown during dispatchAppVisibility " + this, e);
            if (android.os.Process.getUidForPid(mSession.mPid) == mSession.mUid) {
            if (android.os.Process.getUidForPid(mSession.mPid) == mSession.mUid
                    && android.os.Process.getThreadGroupLeader(mSession.mPid) == mSession.mPid) {
                android.os.Process.killProcess(mSession.mPid);
            }
        }