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

Commit 2f51e804 authored by Sergey Serokurov's avatar Sergey Serokurov Committed by Automerger Merge Worker
Browse files

Merge "Hide bubbles when focus mode is enabled" into sc-v2-dev am: 18376814 am: 9843ab96

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16155724

Change-Id: I493f3ecad49242bf1eb9ffbebad33b126a6168a9
parents b072c8a2 9843ab96
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1028,13 +1028,16 @@ public class BubbleController {
                // 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.
                mBubbleData.dismissBubbleWithKey(key, DISMISS_BLOCKED);
            } else if (isActiveBubble && !shouldBubbleUp) {
                // If this entry is allowed to bubble, but cannot currently bubble up, dismiss it.
                // This happens when DND is enabled and configured to hide bubbles. 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.
            } else if (isActiveBubble && (!shouldBubbleUp || entry.getRanking().isSuspended())) {
                // If this entry is allowed to bubble, but cannot currently bubble up or is
                // suspended, dismiss it. This happens when DND is enabled and configured to hide
                // bubbles, or focus mode is enabled and the app is designated as distracting.
                // 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);
            } else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble) {
            } else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble
                    && !entry.getRanking().isSuspended()) {
                entry.setFlagBubble(true);
                onEntryUpdated(entry, true /* shouldBubbleUp */);
            }