summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2022-08-15 16:24:40 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-08-15 16:24:40 +0000
commitdc0b0fd918eacda43e08d5ffdc790a3ee783d3cf (patch)
treeab913112c27d51831141586e6f24d11720af3bf3
parent5b518a2a6980655a7a502ce9708b4b2da8e43010 (diff)
parentf119f2712b6da14d54b3a72b8231c11ed76673e0 (diff)
Merge "Only update the cached state if the value changed" into tm-qpr-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java5
1 files changed, 4 insertions, 1 deletions
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 8771ceb71d98..de26b54971ca 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