summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2023-01-11 18:58:41 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-18 17:54:21 +0000
commit8d4767b63da511f057f6b835ea56ac6a9041ad3f (patch)
tree096fae5acf631703408c88c75cc831161d3e610c
parentb18378bd79f8fba3c20e61193754d84ab66ac26a (diff)
downloadbase-8d4767b63da511f057f6b835ea56ac6a9041ad3f.tar.gz
Revert "Ensure that only SysUI can override pending intent launch flags"
This reverts commit c4d3106e347922610f8c554de3ae238175ed393e. Reason for revert: b/264884187, b/264885689 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48acfb0f1d71912e757cadd505901471c1df4d4c) Merged-In: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba Change-Id: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba
-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 8624ee031a93..bda60ff2172b 100644
--- a/services/core/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/core/java/com/android/server/am/PendingIntentRecord.java
@@ -379,16 +379,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