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

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

Merge "Temporarily disable some Bubbles checks"

parents b94d36d4 54f0682f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6097,14 +6097,15 @@ public class NotificationManagerService extends SystemService {
        }

        // bubble or inline reply that's immutable?
        if (n.getBubbleMetadata() != null
        // TODO (b/171418004): renable after app outreach
        /*if (n.getBubbleMetadata() != null
                && n.getBubbleMetadata().getIntent() != null
                && hasFlag(mAmi.getPendingIntentFlags(
                        n.getBubbleMetadata().getIntent().getTarget()),
                        PendingIntent.FLAG_IMMUTABLE)) {
            throw new IllegalArgumentException(r.getKey() + " Not posted."
                    + " PendingIntents attached to bubbles must be mutable");
        }
        }*/

        if (n.actions != null) {
            for (Notification.Action action : n.actions) {
+3 −2
Original line number Diff line number Diff line
@@ -7145,7 +7145,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
        inOrder.verify(child).recordDismissalSentiment(anyInt());
    }

    @Test
    // TODO (b/171418004): renable after app outreach
    /*@Test
    public void testImmutableBubbleIntent() throws Exception {
        when(mAmi.getPendingIntentFlags(pi1))
                .thenReturn(FLAG_IMMUTABLE | FLAG_ONE_SHOT);
@@ -7160,7 +7161,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
        } catch (IllegalArgumentException e) {
            // good
        }
    }
    }*/

    @Test
    public void testMutableBubbleIntent() throws Exception {