diff options
| author | 2022-08-11 16:17:21 +0000 | |
|---|---|---|
| committer | 2022-08-11 16:17:21 +0000 | |
| commit | 53c6a79cfd9d66a9a3e5b660dcc8e967d0722e5b (patch) | |
| tree | fcfb8a4450a76db15c7e269eddbc5e0957c837d6 | |
| parent | b618fee451226b6afc551228393ec7b1e48e1aca (diff) | |
| parent | b9a934064598aa655fab4ce75c8eab6165409670 (diff) | |
[RESTRICT AUTOMERGE] Do not send new Intent to non-exported activity when navigateUpTo am: b9a9340645
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19518948
Change-Id: I298a415227f87fa71a196cfad35c88319f265e50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStack.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java index 565eeceebfd6..52309cafe10b 100644 --- a/services/core/java/com/android/server/wm/ActivityStack.java +++ b/services/core/java/com/android/server/wm/ActivityStack.java @@ -4324,7 +4324,23 @@ class ActivityStack extends ConfigurationContainer { parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TASK || parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TOP || (destIntentFlags & Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) { - parent.deliverNewIntentLocked(callingUid, destIntent, srec.packageName); + boolean abort; + try { + final int callingPid = srec.app != null ? srec.app.getPid() : 0; + abort = !mStackSupervisor.checkStartAnyActivityPermission(destIntent, + parent.info, null /* resultWho */, -1 /* requestCode */, callingPid, + callingUid, srec.info.packageName, false /* ignoreTargetSecurity */, + false /* launchingInTask */, srec.app, null /* resultRecord */, + null /* resultRootTask */); + } catch (SecurityException e) { + abort = true; + } + if (abort) { + android.util.EventLog.writeEvent(0x534e4554, "238605611", callingUid, ""); + foundParentInTask = false; + } else { + parent.deliverNewIntentLocked(callingUid, destIntent, srec.packageName); + } } else { try { ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo( |