summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mohammed Rashidy <rashidy@google.com> 2023-04-13 17:12:00 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-04-13 17:12:00 +0000
commit99d4a174f95350f5327cac146a93eeaeeca9ed8f (patch)
treeecbcc917ce74b0ea7a71e7090261020e15726fa8
parentf813fcad368102ead7783c31dbeffd7bc21db23f (diff)
parenta7b6be8ad6c7261cc52b8a4b237bd9f285de9c13 (diff)
Merge "Remove ActivityRecords for sandbox activities when App/sandbox died" into udc-dev
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 76d4925ee703..f5cb613601fe 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -4144,7 +4144,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
*/
void handleAppDied() {
final boolean remove;
- if ((mRelaunchReason == RELAUNCH_REASON_WINDOWING_MODE_RESIZE
+ if (Process.isSdkSandboxUid(getUid())) {
+ // Sandbox activities are created for SDKs run in the sandbox process, when the sandbox
+ // process dies, the SDKs are unloaded and can not handle the activity, so sandbox
+ // activity records should be removed.
+ remove = true;
+ } else if ((mRelaunchReason == RELAUNCH_REASON_WINDOWING_MODE_RESIZE
|| mRelaunchReason == RELAUNCH_REASON_FREE_RESIZE)
&& launchCount < 3 && !finishing) {
// If the process crashed during a resize, always try to relaunch it, unless it has