diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 8771ceb71d989..de26b54971caa 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -1094,13 +1094,16 @@ public class BubbleController implements ConfigurationChangeListener { } void updateNotNotifyingEntry(Bubble b, BubbleEntry entry, boolean showInShade) { + boolean showInShadeBefore = b.showInShade(); boolean isBubbleSelected = Objects.equals(b, mBubbleData.getSelectedBubble()); boolean isBubbleExpandedAndSelected = isStackExpanded() && isBubbleSelected; b.setEntry(entry); boolean suppress = isBubbleExpandedAndSelected || !showInShade || !b.showInShade(); b.setSuppressNotification(suppress); b.setShowDot(!isBubbleExpandedAndSelected); - mImpl.mCachedState.updateBubbleSuppressedState(b); + if (showInShadeBefore != b.showInShade()) { + mImpl.mCachedState.updateBubbleSuppressedState(b); + } } @VisibleForTesting