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

Commit 97de72bc authored by Achim Thesmann's avatar Achim Thesmann Committed by Android (Google) Code Review
Browse files

Merge "Remove setIgnorePendingIntentCreatorForegroundState" into main

parents 541edf86 2c704a60
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -2204,19 +2204,6 @@ public class ActivityOptions extends ComponentOptions {
        return mDismissKeyguardIfInsecure;
    }

    /**
     * Sets background activity launch logic won't use pending intent creator foreground state.
     *
     * @hide
     * @deprecated use {@link #setPendingIntentCreatorBackgroundActivityStartMode(int)} instead
     */
    @Deprecated
    public ActivityOptions setIgnorePendingIntentCreatorForegroundState(boolean ignore) {
        mPendingIntentCreatorBackgroundActivityStartMode = ignore
                ? MODE_BACKGROUND_ACTIVITY_START_DENIED : MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
        return this;
    }

    /**
     * Allow a {@link PendingIntent} to use the privilege of its creator to start background
     * activities.
+2 −1
Original line number Diff line number Diff line
@@ -1617,7 +1617,8 @@ abstract public class ManagedServices {
        intent.putExtra(Intent.EXTRA_CLIENT_LABEL, mConfig.clientLabel);

        final ActivityOptions activityOptions = ActivityOptions.makeBasic();
        activityOptions.setIgnorePendingIntentCreatorForegroundState(true);
        activityOptions.setPendingIntentCreatorBackgroundActivityStartMode(
                ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED);
        final PendingIntent pendingIntent = PendingIntent.getActivity(
                mContext, 0, new Intent(mConfig.settingsAction), PendingIntent.FLAG_IMMUTABLE,
                activityOptions.toBundle());