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

Commit aa4a00a3 authored by Ashwini Oruganti's avatar Ashwini Oruganti Committed by Android (Google) Code Review
Browse files

Merge "NotificationUiAdjustmentTest: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED"

parents 07f012d4 68934579
Loading
Loading
Loading
Loading
+30 −8
Original line number Diff line number Diff line
@@ -39,8 +39,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentLength() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        Notification.Action action =
                createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build();
        assertThat(NotificationUiAdjustment.needReinflate(
@@ -51,8 +54,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentLabels() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        Notification.Action firstAction =
                createActionBuilder("first", R.drawable.ic_corp_icon, pendingIntent).build();
        Notification.Action secondAction =
@@ -66,8 +72,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentIcons() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        Notification.Action firstAction =
                createActionBuilder("same", R.drawable.ic_corp_icon, pendingIntent).build();
        Notification.Action secondAction =
@@ -82,10 +91,14 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentPendingIntent() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent firstPendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_VIEW),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        PendingIntent secondPendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(Intent.ACTION_PROCESS_TEXT),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        Notification.Action firstAction =
                createActionBuilder("same", R.drawable.ic_corp_icon, firstPendingIntent)
                        .build();
@@ -101,8 +114,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentChoices() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);

        RemoteInput firstRemoteInput =
                createRemoteInput("same", "same", new CharSequence[] {"first"});
@@ -126,8 +142,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_differentRemoteInputLabel() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);

        RemoteInput firstRemoteInput =
                createRemoteInput("same", "first", new CharSequence[] {"same"});
@@ -151,8 +170,11 @@ public class NotificationUiAdjustmentTest extends SysuiTestCase {

    @Test
    public void needReinflate_negative() {
        // TODO(b/174258598) Please replace FLAG_MUTABLE_UNAUDITED below
        // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
        PendingIntent pendingIntent =
                PendingIntent.getActivity(mContext, 0, new Intent(), 0);
                PendingIntent.getActivity(mContext, 0, new Intent(),
                        PendingIntent.FLAG_MUTABLE_UNAUDITED);
        RemoteInput firstRemoteInput =
                createRemoteInput("same", "same", new CharSequence[] {"same"});
        RemoteInput secondRemoteInput =