diff options
| author | 2022-08-15 16:24:40 +0000 | |
|---|---|---|
| committer | 2022-08-15 16:24:40 +0000 | |
| commit | dc0b0fd918eacda43e08d5ffdc790a3ee783d3cf (patch) | |
| tree | ab913112c27d51831141586e6f24d11720af3bf3 | |
| parent | 5b518a2a6980655a7a502ce9708b4b2da8e43010 (diff) | |
| parent | f119f2712b6da14d54b3a72b8231c11ed76673e0 (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.java | 5 |
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 |