Merge "Add flagRemoved check back in BubbleExtractor" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8c624b8001
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user