summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2023-01-21 10:16:35 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-01-21 10:16:35 +0000
commitf8dcd6ed299086bb3e0982cd42ba833e54231ddc (patch)
tree74ab014771808443a6baf62dad7ef6e94b5ebc86
parented6700eb2375e2b9d176f49ceeee47e63b471f81 (diff)
parent65c1ef9feb196c2e60b491e02b1b723527d844c4 (diff)
Merge "Revert "Ensure that only SysUI can override pending intent launch flags"" into qt-dev am: e6ffbc91fb am: b34c84221f am: 62c12ffd8e am: 29eb265f19 am: 61c27bb464 am: ffef4ed147 am: 65c1ef9feb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20946190 Change-Id: Ibb7109db1569c2c45268ac087ea5b18b7fe80e50 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/am/PendingIntentRecord.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java
index 9ccf83996782..4044cceb606b 100644
--- a/services/core/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/core/java/com/android/server/am/PendingIntentRecord.java
@@ -377,16 +377,11 @@ public final class PendingIntentRecord extends IIntentSender.Stub {
resolvedType = key.requestResolvedType;
}
- // Apply any launch flags from the ActivityOptions. This is used only by SystemUI
- // to ensure that we can launch the pending intent with a consistent launch mode even
- // if the provided PendingIntent is immutable (ie. to force an activity to launch into
- // a new task, or to launch multiple instances if supported by the app)
+ // Apply any launch flags from the ActivityOptions. This is to ensure that the caller
+ // can specify a consistent launch mode even if the PendingIntent is immutable
final ActivityOptions opts = ActivityOptions.fromBundle(options);
if (opts != null) {
- // TODO(b/254490217): Move this check into SafeActivityOptions
- if (controller.mAtmInternal.isCallerRecents(Binder.getCallingUid())) {
- finalIntent.addFlags(opts.getPendingIntentLaunchFlags());
- }
+ finalIntent.addFlags(opts.getPendingIntentLaunchFlags());
}
// Extract options before clearing calling identity