summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-11-23 09:58:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-11-23 09:58:39 +0000
commitf61f288e1773158487aaba95064c6e55a5bf41d6 (patch)
treed77a80e046411fa2f3eea81f43caebf633f6d1d3
parenta090fdd7ec7b37e8df152f97682f69d81e2dddff (diff)
parent1850db48f39281bb91f1ff2338288b2f32213a51 (diff)
Merge "Killing the client process only if the uid matches" into main
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 06978a5338ea..0a5b9eb270a1 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -3276,7 +3276,9 @@ 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);
- android.os.Process.killProcess(mSession.mPid);
+ if (android.os.Process.getUidForPid(mSession.mPid) == mSession.mUid) {
+ android.os.Process.killProcess(mSession.mPid);
+ }
}
}