diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java | 10 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java | 4 |
2 files changed, 3 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java index ccbbb2465742..cc0824ecc45c 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java @@ -218,7 +218,7 @@ public class BubbleData { } mPendingBubbles.remove(bubble); // No longer pending once we're here Bubble prevBubble = getBubbleWithKey(bubble.getKey()); - suppressFlyout |= !shouldShowFlyout(bubble.getEntry()); + suppressFlyout |= !bubble.getEntry().getRanking().visuallyInterruptive(); if (prevBubble == null) { // Create a new bubble @@ -329,14 +329,6 @@ public class BubbleData { return bubbleChildren; } - private boolean shouldShowFlyout(NotificationEntry notif) { - if (notif.getRanking().visuallyInterruptive()) { - return true; - } - return hasBubbleWithKey(notif.getKey()) - && !getBubbleWithKey(notif.getKey()).showInShade(); - } - private void doAdd(Bubble bubble) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "doAdd: " + bubble); diff --git a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java index 7daf92213c45..b09603d78ecb 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleDataTest.java @@ -228,7 +228,7 @@ public class BubbleDataTest extends SysuiTestCase { } @Test - public void sameUpdate_NotInShade_showFlyout() { + public void sameUpdate_NotInShade_NotVisuallyInterruptive_dontShowFlyout() { // Setup mBubbleData.setListener(mListener); @@ -247,7 +247,7 @@ public class BubbleDataTest extends SysuiTestCase { // Verify BubbleData.Update update = mUpdateCaptor.getValue(); - assertThat(update.updatedBubble.showFlyout()).isTrue(); + assertThat(update.updatedBubble.showFlyout()).isFalse(); } // COLLAPSED / ADD |