Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java +4 −3 Original line number Diff line number Diff line Loading @@ -948,10 +948,11 @@ public class BubbleData { } void overflowBubble(@DismissReason int reason, Bubble bubble) { if (bubble.getPendingIntentCanceled() || !(reason == Bubbles.DISMISS_AGED boolean isOverflowReason = reason == Bubbles.DISMISS_AGED || reason == Bubbles.DISMISS_USER_GESTURE || reason == Bubbles.DISMISS_RELOAD_FROM_DISK)) { || reason == Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER || reason == Bubbles.DISMISS_RELOAD_FROM_DISK; if (bubble.getPendingIntentCanceled() || !isOverflowReason) { return; } ProtoLog.d(WM_SHELL_BUBBLES, "overflowBubble=%s reason=%s", bubble.getKey(), Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,20 @@ public class BubbleDataTest extends ShellTestCase { assertOverflowChangedTo(ImmutableList.of()); } @Test public void testOverflow_dismissFromLauncher_addsOverflowBubble() { // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryA2, 2000); mBubbleData.setListener(mListener); // Test mBubbleData.dismissBubbleWithKey(mEntryA1.getKey(), Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER); verifyUpdateReceived(); assertOverflowChangedTo(ImmutableList.of(mBubbleA1)); } /** * Verifies that the update shouldn't show the user education, if the education is not required */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java +4 −3 Original line number Diff line number Diff line Loading @@ -948,10 +948,11 @@ public class BubbleData { } void overflowBubble(@DismissReason int reason, Bubble bubble) { if (bubble.getPendingIntentCanceled() || !(reason == Bubbles.DISMISS_AGED boolean isOverflowReason = reason == Bubbles.DISMISS_AGED || reason == Bubbles.DISMISS_USER_GESTURE || reason == Bubbles.DISMISS_RELOAD_FROM_DISK)) { || reason == Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER || reason == Bubbles.DISMISS_RELOAD_FROM_DISK; if (bubble.getPendingIntentCanceled() || !isOverflowReason) { return; } ProtoLog.d(WM_SHELL_BUBBLES, "overflowBubble=%s reason=%s", bubble.getKey(), Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java +14 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,20 @@ public class BubbleDataTest extends ShellTestCase { assertOverflowChangedTo(ImmutableList.of()); } @Test public void testOverflow_dismissFromLauncher_addsOverflowBubble() { // Setup sendUpdatedEntryAtTime(mEntryA1, 1000); sendUpdatedEntryAtTime(mEntryA2, 2000); mBubbleData.setListener(mListener); // Test mBubbleData.dismissBubbleWithKey(mEntryA1.getKey(), Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER); verifyUpdateReceived(); assertOverflowChangedTo(ImmutableList.of(mBubbleA1)); } /** * Verifies that the update shouldn't show the user education, if the education is not required */ Loading