Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -403,6 +403,9 @@ public class BubbleData { } } private void doRemove(String key, @DismissReason int reason) { private void doRemove(String key, @DismissReason int reason) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "doRemove: " + key); } // If it was pending remove it // If it was pending remove it for (int i = 0; i < mPendingBubbles.size(); i++) { for (int i = 0; i < mPendingBubbles.size(); i++) { if (mPendingBubbles.get(i).getKey().equals(key)) { if (mPendingBubbles.get(i).getKey().equals(key)) { Loading Loading @@ -445,15 +448,14 @@ public class BubbleData { if (reason == BubbleController.DISMISS_AGED if (reason == BubbleController.DISMISS_AGED || reason == BubbleController.DISMISS_USER_GESTURE) { || reason == BubbleController.DISMISS_USER_GESTURE) { if (DEBUG_BUBBLE_DATA) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "overflowing bubble: " + bubble); Log.d(TAG, "Overflowing: " + bubble); } } mOverflowBubbles.add(0, bubble); mOverflowBubbles.add(0, bubble); bubble.stopInflation(); bubble.stopInflation(); if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { // Remove oldest bubble. // Remove oldest bubble. if (DEBUG_BUBBLE_DATA) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "Overflow full. Remove bubble: " + mOverflowBubbles.get( Log.d(TAG, "Overflow full. Remove: " + mOverflowBubbles.get( mOverflowBubbles.size() - 1)); mOverflowBubbles.size() - 1)); } } mOverflowBubbles.remove(mOverflowBubbles.size() - 1); mOverflowBubbles.remove(mOverflowBubbles.size() - 1); Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +11 −10 Original line number Original line Diff line number Diff line Loading @@ -940,7 +940,6 @@ public class BubbleStackView extends FrameLayout { ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); animateInFlyoutForBubble(bubble); animateInFlyoutForBubble(bubble); updatePointerPosition(); updatePointerPosition(); updateOverflowBtnVisibility( /*apply */ true); requestUpdate(); requestUpdate(); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED); } } Loading @@ -951,16 +950,18 @@ public class BubbleStackView extends FrameLayout { Log.d(TAG, "removeBubble: " + bubble); Log.d(TAG, "removeBubble: " + bubble); } } // Remove it from the views // Remove it from the views int removedIndex = mBubbleContainer.indexOfChild(bubble.getIconView()); for (int i = 0; i < getBubbleCount(); i++) { if (removedIndex >= 0) { View v = mBubbleContainer.getChildAt(i); mBubbleContainer.removeViewAt(removedIndex); if (v instanceof BadgedImageView && ((BadgedImageView) v).getKey().equals(bubble.getKey())) { mBubbleContainer.removeViewAt(i); bubble.cleanupExpandedState(); bubble.cleanupExpandedState(); bubble.setInflated(false); bubble.setInflated(false); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); } else { return; Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } } updateOverflowBtnVisibility(/* apply */ true); Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } private void updateOverflowBtnVisibility(boolean apply) { private void updateOverflowBtnVisibility(boolean apply) { Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -403,6 +403,9 @@ public class BubbleData { } } private void doRemove(String key, @DismissReason int reason) { private void doRemove(String key, @DismissReason int reason) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "doRemove: " + key); } // If it was pending remove it // If it was pending remove it for (int i = 0; i < mPendingBubbles.size(); i++) { for (int i = 0; i < mPendingBubbles.size(); i++) { if (mPendingBubbles.get(i).getKey().equals(key)) { if (mPendingBubbles.get(i).getKey().equals(key)) { Loading Loading @@ -445,15 +448,14 @@ public class BubbleData { if (reason == BubbleController.DISMISS_AGED if (reason == BubbleController.DISMISS_AGED || reason == BubbleController.DISMISS_USER_GESTURE) { || reason == BubbleController.DISMISS_USER_GESTURE) { if (DEBUG_BUBBLE_DATA) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "overflowing bubble: " + bubble); Log.d(TAG, "Overflowing: " + bubble); } } mOverflowBubbles.add(0, bubble); mOverflowBubbles.add(0, bubble); bubble.stopInflation(); bubble.stopInflation(); if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { // Remove oldest bubble. // Remove oldest bubble. if (DEBUG_BUBBLE_DATA) { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "Overflow full. Remove bubble: " + mOverflowBubbles.get( Log.d(TAG, "Overflow full. Remove: " + mOverflowBubbles.get( mOverflowBubbles.size() - 1)); mOverflowBubbles.size() - 1)); } } mOverflowBubbles.remove(mOverflowBubbles.size() - 1); mOverflowBubbles.remove(mOverflowBubbles.size() - 1); Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +11 −10 Original line number Original line Diff line number Diff line Loading @@ -940,7 +940,6 @@ public class BubbleStackView extends FrameLayout { ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); animateInFlyoutForBubble(bubble); animateInFlyoutForBubble(bubble); updatePointerPosition(); updatePointerPosition(); updateOverflowBtnVisibility( /*apply */ true); requestUpdate(); requestUpdate(); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED); } } Loading @@ -951,16 +950,18 @@ public class BubbleStackView extends FrameLayout { Log.d(TAG, "removeBubble: " + bubble); Log.d(TAG, "removeBubble: " + bubble); } } // Remove it from the views // Remove it from the views int removedIndex = mBubbleContainer.indexOfChild(bubble.getIconView()); for (int i = 0; i < getBubbleCount(); i++) { if (removedIndex >= 0) { View v = mBubbleContainer.getChildAt(i); mBubbleContainer.removeViewAt(removedIndex); if (v instanceof BadgedImageView && ((BadgedImageView) v).getKey().equals(bubble.getKey())) { mBubbleContainer.removeViewAt(i); bubble.cleanupExpandedState(); bubble.cleanupExpandedState(); bubble.setInflated(false); bubble.setInflated(false); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED); } else { return; Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } } updateOverflowBtnVisibility(/* apply */ true); Log.d(TAG, "was asked to remove Bubble, but didn't find the view! " + bubble); } } private void updateOverflowBtnVisibility(boolean apply) { private void updateOverflowBtnVisibility(boolean apply) { Loading