Merge "Add flagRemoved check back in BubbleExtractor" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-24 01:07:08 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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);