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

Commit f96294e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add PendingIntent flags"

parents 7db7b68b 856be9e9
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -629,10 +629,8 @@ public class NotificationEntryManagerTest extends SysuiTestCase {
        return new Notification.Action.Builder(
                Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),
                "action",
                // TODO(b/174935104) Please replace FLAG_MUTABLE_UNAUDITED below
                // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
                PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"),
                    PendingIntent.FLAG_MUTABLE_UNAUDITED)).build();
                    PendingIntent.FLAG_IMMUTABLE)).build();
    }

    private static class FakeNotificationLifetimeExtender implements NotificationLifetimeExtender {
+2 −6
Original line number Diff line number Diff line
@@ -233,10 +233,8 @@ public class NotificationEntryTest extends SysuiTestCase {
        return new Notification.Action.Builder(
                Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),
                title,
                // TODO(b/174965424) Please replace FLAG_MUTABLE_UNAUDITED below
                // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
                PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"),
                    PendingIntent.FLAG_MUTABLE_UNAUDITED))
                    PendingIntent.FLAG_IMMUTABLE))
                .setContextual(true)
                .build();
    }
@@ -245,10 +243,8 @@ public class NotificationEntryTest extends SysuiTestCase {
        return new Notification.Action.Builder(
                Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),
                title,
                // TODO(b/174965424) Please replace FLAG_MUTABLE_UNAUDITED below
                // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
                PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"),
                    PendingIntent.FLAG_MUTABLE_UNAUDITED)).build();
                    PendingIntent.FLAG_IMMUTABLE)).build();
    }

    private ArrayList<Notification.Action> createActions(String... titles) {
+1 −3
Original line number Diff line number Diff line
@@ -476,10 +476,8 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {

    private NotificationEntry createBubble() {
        Notification.BubbleMetadata data = new Notification.BubbleMetadata.Builder(
                // TODO(b/174970399) Please replace FLAG_MUTABLE_UNAUDITED below
                // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
                PendingIntent.getActivity(mContext, 0, new Intent(),
                    PendingIntent.FLAG_MUTABLE_UNAUDITED),
                    PendingIntent.FLAG_MUTABLE),
                        Icon.createWithResource(mContext.getResources(), R.drawable.android))
                .build();
        Notification n = new Notification.Builder(getContext(), "a")
+1 −3
Original line number Diff line number Diff line
@@ -213,11 +213,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase {
                notification, UserHandle.CURRENT, null, 0);
        mEntry = new NotificationEntryBuilder().setSbn(mSbn).setShortcutInfo(mShortcutInfo).build();

        // TODO(b/175005650) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0,
                new Intent(mContext, BubblesTestActivity.class),
                PendingIntent.FLAG_MUTABLE_UNAUDITED);
                PendingIntent.FLAG_MUTABLE);
        mBubbleSbn = new SbnBuilder(mSbn).setBubbleMetadata(
                new Notification.BubbleMetadata.Builder(bubbleIntent,
                        Icon.createWithResource(mContext, R.drawable.android)).build())
+1 −3
Original line number Diff line number Diff line
@@ -455,10 +455,8 @@ public class NotificationTestHelper {

    private BubbleMetadata makeBubbleMetadata(PendingIntent deleteIntent) {
        Intent target = new Intent(mContext, BubblesTestActivity.class);
        // TODO(b/175014468) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, target,
                PendingIntent.FLAG_MUTABLE_UNAUDITED);
                PendingIntent.FLAG_MUTABLE);

        return new BubbleMetadata.Builder(bubbleIntent,
                        Icon.createWithResource(mContext, R.drawable.android))
Loading