Merge "Hide bubbles when focus mode is enabled" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1837681488
@@ -1028,13 +1028,16 @@ public class BubbleController {
|
|||||||
// If this entry is no longer allowed to bubble, dismiss with the BLOCKED reason.
|
// If this entry is no longer allowed to bubble, dismiss with the BLOCKED reason.
|
||||||
// This means that the app or channel's ability to bubble has been revoked.
|
// This means that the app or channel's ability to bubble has been revoked.
|
||||||
mBubbleData.dismissBubbleWithKey(key, DISMISS_BLOCKED);
|
mBubbleData.dismissBubbleWithKey(key, DISMISS_BLOCKED);
|
||||||
} else if (isActiveBubble && !shouldBubbleUp) {
|
} else if (isActiveBubble && (!shouldBubbleUp || entry.getRanking().isSuspended())) {
|
||||||
// If this entry is allowed to bubble, but cannot currently bubble up, dismiss it.
|
// If this entry is allowed to bubble, but cannot currently bubble up or is
|
||||||
// This happens when DND is enabled and configured to hide bubbles. Dismissing with
|
// suspended, dismiss it. This happens when DND is enabled and configured to hide
|
||||||
// the reason DISMISS_NO_BUBBLE_UP will retain the underlying notification, so that
|
// bubbles, or focus mode is enabled and the app is designated as distracting.
|
||||||
// the bubble will be re-created if shouldBubbleUp returns true.
|
// Dismissing with the reason DISMISS_NO_BUBBLE_UP will retain the underlying
|
||||||
|
// notification, so that the bubble will be re-created if shouldBubbleUp returns
|
||||||
|
// true.
|
||||||
mBubbleData.dismissBubbleWithKey(key, DISMISS_NO_BUBBLE_UP);
|
mBubbleData.dismissBubbleWithKey(key, DISMISS_NO_BUBBLE_UP);
|
||||||
} else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble) {
|
} else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble
|
||||||
|
&& !entry.getRanking().isSuspended()) {
|
||||||
entry.setFlagBubble(true);
|
entry.setFlagBubble(true);
|
||||||
onEntryUpdated(entry, true /* shouldBubbleUp */);
|
onEntryUpdated(entry, true /* shouldBubbleUp */);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user