Loading packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +19 −3 Original line number Diff line number Diff line Loading @@ -216,11 +216,20 @@ class Bubble implements BubbleViewProvider { return mInflated; } void stopInflation() { if (mInflationTask == null) { return; } mInflationTask.cancel(/* mayInterruptIfRunning */ true); mIconView = null; mExpandedView = null; mInflated = false; } void setViewInfo(BubbleViewInfoTask.BubbleViewInfo info) { if (!isInflated()) { mIconView = info.imageView; mExpandedView = info.expandedView; mInflated = true; } mShortcutInfo = info.shortcutInfo; Loading @@ -231,8 +240,15 @@ class Bubble implements BubbleViewProvider { mDotColor = info.dotColor; mDotPath = info.dotPath; mExpandedView.update(this); mIconView.update(this); if (mExpandedView != null && mIconView != null) { mInflated = true; } if (mExpandedView != null) { mExpandedView.update(/* bubble */ this); } if (mIconView != null) { mIconView.update(/* bubble */ this); } } void setInflated(boolean inflated) { Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +10 −6 Original line number Diff line number Diff line Loading @@ -203,10 +203,7 @@ public class BubbleData { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "promoteBubbleFromOverflow: " + bubble); } // Preserve new order for next repack, which sorts by last updated time. bubble.markUpdatedAt(mTimeSource.currentTimeMillis()); mOverflowBubbles.remove(bubble); moveOverflowBubbleToPending(bubble); bubble.inflate( b -> { notificationEntryUpdated(bubble, /* suppressFlyout */ Loading @@ -217,6 +214,13 @@ public class BubbleData { dispatchPendingChanges(); } private void moveOverflowBubbleToPending(Bubble b) { // Preserve new order for next repack, which sorts by last updated time. b.markUpdatedAt(mTimeSource.currentTimeMillis()); mOverflowBubbles.remove(b); mPendingBubbles.add(b); } /** * Constructs a new bubble or returns an existing one. Does not add new bubbles to * bubble data, must go through {@link #notificationEntryUpdated(Bubble, boolean, boolean)} Loading @@ -228,8 +232,7 @@ public class BubbleData { for (int i = 0; i < mOverflowBubbles.size(); i++) { Bubble b = mOverflowBubbles.get(i); if (b.getKey().equals(entry.getKey())) { mOverflowBubbles.remove(b); mPendingBubbles.add(b); moveOverflowBubbleToPending(b); return b; } } Loading Loading @@ -445,6 +448,7 @@ public class BubbleData { Log.d(TAG, "overflowing bubble: " + bubble); } mOverflowBubbles.add(0, bubble); bubble.stopInflation(); if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { // Remove oldest bubble. Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +19 −3 Original line number Diff line number Diff line Loading @@ -216,11 +216,20 @@ class Bubble implements BubbleViewProvider { return mInflated; } void stopInflation() { if (mInflationTask == null) { return; } mInflationTask.cancel(/* mayInterruptIfRunning */ true); mIconView = null; mExpandedView = null; mInflated = false; } void setViewInfo(BubbleViewInfoTask.BubbleViewInfo info) { if (!isInflated()) { mIconView = info.imageView; mExpandedView = info.expandedView; mInflated = true; } mShortcutInfo = info.shortcutInfo; Loading @@ -231,8 +240,15 @@ class Bubble implements BubbleViewProvider { mDotColor = info.dotColor; mDotPath = info.dotPath; mExpandedView.update(this); mIconView.update(this); if (mExpandedView != null && mIconView != null) { mInflated = true; } if (mExpandedView != null) { mExpandedView.update(/* bubble */ this); } if (mIconView != null) { mIconView.update(/* bubble */ this); } } void setInflated(boolean inflated) { Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +10 −6 Original line number Diff line number Diff line Loading @@ -203,10 +203,7 @@ public class BubbleData { if (DEBUG_BUBBLE_DATA) { Log.d(TAG, "promoteBubbleFromOverflow: " + bubble); } // Preserve new order for next repack, which sorts by last updated time. bubble.markUpdatedAt(mTimeSource.currentTimeMillis()); mOverflowBubbles.remove(bubble); moveOverflowBubbleToPending(bubble); bubble.inflate( b -> { notificationEntryUpdated(bubble, /* suppressFlyout */ Loading @@ -217,6 +214,13 @@ public class BubbleData { dispatchPendingChanges(); } private void moveOverflowBubbleToPending(Bubble b) { // Preserve new order for next repack, which sorts by last updated time. b.markUpdatedAt(mTimeSource.currentTimeMillis()); mOverflowBubbles.remove(b); mPendingBubbles.add(b); } /** * Constructs a new bubble or returns an existing one. Does not add new bubbles to * bubble data, must go through {@link #notificationEntryUpdated(Bubble, boolean, boolean)} Loading @@ -228,8 +232,7 @@ public class BubbleData { for (int i = 0; i < mOverflowBubbles.size(); i++) { Bubble b = mOverflowBubbles.get(i); if (b.getKey().equals(entry.getKey())) { mOverflowBubbles.remove(b); mPendingBubbles.add(b); moveOverflowBubbleToPending(b); return b; } } Loading Loading @@ -445,6 +448,7 @@ public class BubbleData { Log.d(TAG, "overflowing bubble: " + bubble); } mOverflowBubbles.add(0, bubble); bubble.stopInflation(); if (mOverflowBubbles.size() == mMaxOverflowBubbles + 1) { // Remove oldest bubble. Loading