Merge "Don't update the bubble on ranking changes if it's already in the stack" into rvc-dev am: d0c94559c2 am: 139bd905da

Change-Id: I0c760960fc0275ee4dbae2b74b02e7712adaf89d
This commit is contained in:
TreeHugger Robot
2020-03-25 01:30:02 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 2 deletions

View File

@@ -957,9 +957,10 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
String key = orderedKeys[i];
NotificationEntry entry = mNotificationEntryManager.getPendingOrActiveNotif(key);
rankingMap.getRanking(key, mTmpRanking);
if (mBubbleData.hasBubbleWithKey(key) && !mTmpRanking.canBubble()) {
boolean isActiveBubble = mBubbleData.hasBubbleWithKey(key);
if (isActiveBubble && !mTmpRanking.canBubble()) {
mBubbleData.notificationEntryRemoved(entry, BubbleController.DISMISS_BLOCKED);
} else if (entry != null && mTmpRanking.isBubble()) {
} else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble) {
entry.setFlagBubble(true);
onEntryUpdated(entry);
}

View File

@@ -233,6 +233,7 @@ public class BubbleData {
Bubble b = mOverflowBubbles.get(i);
if (b.getKey().equals(entry.getKey())) {
moveOverflowBubbleToPending(b);
b.setEntry(entry);
return b;
}
}
@@ -240,6 +241,7 @@ public class BubbleData {
for (int i = 0; i < mPendingBubbles.size(); i++) {
Bubble b = mPendingBubbles.get(i);
if (b.getKey().equals(entry.getKey())) {
b.setEntry(entry);
return b;
}
}