BubbleData [1/n]: remove unused parameter
Remove an unused parameter from updateBubble (always true).
Eventually BubbleData will determine and apply and changes in
position, affecting other bubbles potentially.
Bug: 123542488
Test: atest BubbleControllerTest
Change-Id: Id90d9c905f63f90273205de91f0cff3e221c1ba4
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 56b231b..33fe04c 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -325,12 +325,11 @@
* Adds or updates a bubble associated with the provided notification entry.
*
* @param notif the notification associated with this bubble.
- * @param updatePosition whether this update should promote the bubble to the top of the stack.
*/
- public void updateBubble(NotificationEntry notif, boolean updatePosition) {
+ void updateBubble(NotificationEntry notif) {
if (mStackView != null && mBubbleData.getBubble(notif.key) != null) {
// It's an update
- mStackView.updateBubble(notif, updatePosition);
+ mStackView.updateBubble(notif);
} else {
if (mStackView == null) {
mStackView = new BubbleStackView(mContext, mBubbleData, mSurfaceSynchronizer);
@@ -403,7 +402,7 @@
return;
}
if (entry.isBubble() && mNotificationInterruptionStateProvider.shouldBubbleUp(entry)) {
- updateBubble(entry, true /* updatePosition */);
+ updateBubble(entry);
}
}
@@ -416,7 +415,7 @@
&& alertAgain(entry, entry.notification.getNotification())) {
entry.setShowInShadeWhenBubble(true);
entry.setBubbleDismissed(false); // updates come back as bubbles even if dismissed
- updateBubble(entry, true /* updatePosition */);
+ updateBubble(entry);
mStackView.updateDotVisibility(entry.key);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index 00b1c9e..3d8dc07 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -595,15 +595,13 @@
/**
* Updates a bubble in the stack.
- *
- * @param entry the entry to update in the stack.
- * @param updatePosition whether this bubble should be moved to top of the stack.
+ * @param entry the entry to update in the stack.
*/
- public void updateBubble(NotificationEntry entry, boolean updatePosition) {
+ public void updateBubble(NotificationEntry entry) {
Bubble b = mBubbleData.getBubble(entry.key);
mBubbleData.updateBubble(entry.key, entry);
- if (updatePosition && !mIsExpanded) {
+ if (!mIsExpanded) {
// If alerting it gets promoted to top of the stack.
if (mBubbleContainer.indexOfChild(b.iconView) != 0) {
mBubbleContainer.moveViewTo(b.iconView, 0);