Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2f054ae authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Remove extra check for isPendingIntentBackgroundActivityLaunchAllowedByPermission

Since this getter is now only an accessor to the start mode tested
before this is a redundant check.

Test: atest BackgroundActivityLaunchTest BackgroundActivityStartContriller*Test
Flag: com.android.window.flags.bal_additional_start_modes
Bug: 352182359
Change-Id: If7403bb2d0c412e0c1e477e56d1cd89859dd51c1
parent bf13f5ba
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -149,21 +149,6 @@ public class PendingIntentController {
                        ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED);
            }

            if (opts != null && opts.isPendingIntentBackgroundActivityLaunchAllowedByPermission()) {
                Slog.wtf(TAG,
                        "Resetting option pendingIntentBackgroundActivityLaunchAllowedByPermission"
                                + " which is set by the pending intent creator ("
                                + packageName
                                + ") because this option is meant for the pending intent sender");
                if (CompatChanges.isChangeEnabled(PendingIntent.PENDING_INTENT_OPTIONS_CHECK,
                        callingUid)) {
                    throw new IllegalArgumentException(
                            "pendingIntentBackgroundActivityLaunchAllowedByPermission "
                                    + "can not be set by creator of a PendingIntent");
                }
                opts.setPendingIntentBackgroundActivityLaunchAllowedByPermission(false);
            }

            final boolean noCreate = (flags & PendingIntent.FLAG_NO_CREATE) != 0;
            final boolean cancelCurrent = (flags & PendingIntent.FLAG_CANCEL_CURRENT) != 0;
            final boolean updateCurrent = (flags & PendingIntent.FLAG_UPDATE_CURRENT) != 0;