Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 23d9f8c

Browse files
Chris LiGerrit Code Review
Chris Li
authored and
Gerrit Code Review
committed
Merge "check thread group leader before killing process" into main
2 parents 2623db8 + f0e23c6 commit 23d9f8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/core/java/com/android/server/wm/WindowState.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -3254,7 +3254,8 @@ void sendAppVisibilityToClients() {
32543254
// just kill it. And if it is a window of foreground activity, the activity can be
32553255
// restarted automatically if needed.
32563256
Slog.w(TAG, "Exception thrown during dispatchAppVisibility " + this, e);
3257-
if (android.os.Process.getUidForPid(mSession.mPid) == mSession.mUid) {
3257+
if (android.os.Process.getUidForPid(mSession.mPid) == mSession.mUid
3258+
&& android.os.Process.getThreadGroupLeader(mSession.mPid) == mSession.mPid) {
32583259
android.os.Process.killProcess(mSession.mPid);
32593260
}
32603261
}

0 commit comments

Comments
 (0)