Loading services/core/java/com/android/server/am/PendingIntentRecord.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -317,12 +317,17 @@ public final class PendingIntentRecord extends IIntentSender.Stub { resolvedType = key.requestResolvedType; resolvedType = key.requestResolvedType; } } // Apply any launch flags from the ActivityOptions. This is to ensure that the caller // Apply any launch flags from the ActivityOptions. This is used only by SystemUI // can specify a consistent launch mode even if the PendingIntent is immutable // 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) final ActivityOptions opts = ActivityOptions.fromBundle(options); final ActivityOptions opts = ActivityOptions.fromBundle(options); if (opts != null) { 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 // Extract options before clearing calling identity mergedOptions = key.options; mergedOptions = key.options; Loading Loading
services/core/java/com/android/server/am/PendingIntentRecord.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -317,12 +317,17 @@ public final class PendingIntentRecord extends IIntentSender.Stub { resolvedType = key.requestResolvedType; resolvedType = key.requestResolvedType; } } // Apply any launch flags from the ActivityOptions. This is to ensure that the caller // Apply any launch flags from the ActivityOptions. This is used only by SystemUI // can specify a consistent launch mode even if the PendingIntent is immutable // 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) final ActivityOptions opts = ActivityOptions.fromBundle(options); final ActivityOptions opts = ActivityOptions.fromBundle(options); if (opts != null) { 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 // Extract options before clearing calling identity mergedOptions = key.options; mergedOptions = key.options; Loading