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

Commit e6749c16 authored by Mady Mellor's avatar Mady Mellor
Browse files

Add flagRemoved check back in BubbleExtractor

This was accidentally removed in ag/10606620

There was a mistake in the test that caused it to pass.

Test: atest BubbleExtractorTest
Fixes: 154753435
Change-Id: I7cb254b78f48c23087150b54ad74375dacf5c9a0
parent 3b145e0b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -94,7 +94,9 @@ public class BubbleExtractor implements NotificationSignalExtractor {
                && record.isConversation()
                && !mActivityManager.isLowRamDevice()
                && (record.getNotification().flags & FLAG_FOREGROUND_SERVICE) == 0;
        final boolean applyFlag = fulfillsPolicy && canPresentAsBubble(record);
        final boolean applyFlag = fulfillsPolicy
                && canPresentAsBubble(record)
                && !record.isFlagBubbleRemoved();
        if (applyFlag) {
            record.getNotification().flags |= FLAG_BUBBLE;
        } else {
+1 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ public class BubbleExtractorTest extends UiServiceTestCase {
                BUBBLE_PREFERENCE_ALL /* app */,
                true /* channel */);
        when(mActivityManager.isLowRamDevice()).thenReturn(false);
        setUpShortcutBubble(true /* isValid */);

        NotificationRecord r = getNotificationRecord(true /* bubble */);
        r.setFlagBubbleRemoved(true);