Merge "Don't update the bubble on ranking changes if it's already in the stack" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d0c94559c2
@@ -957,9 +957,10 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
|
|||||||
String key = orderedKeys[i];
|
String key = orderedKeys[i];
|
||||||
NotificationEntry entry = mNotificationEntryManager.getPendingOrActiveNotif(key);
|
NotificationEntry entry = mNotificationEntryManager.getPendingOrActiveNotif(key);
|
||||||
rankingMap.getRanking(key, mTmpRanking);
|
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);
|
mBubbleData.notificationEntryRemoved(entry, BubbleController.DISMISS_BLOCKED);
|
||||||
} else if (entry != null && mTmpRanking.isBubble()) {
|
} else if (entry != null && mTmpRanking.isBubble() && !isActiveBubble) {
|
||||||
entry.setFlagBubble(true);
|
entry.setFlagBubble(true);
|
||||||
onEntryUpdated(entry);
|
onEntryUpdated(entry);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ public class BubbleData {
|
|||||||
Bubble b = mOverflowBubbles.get(i);
|
Bubble b = mOverflowBubbles.get(i);
|
||||||
if (b.getKey().equals(entry.getKey())) {
|
if (b.getKey().equals(entry.getKey())) {
|
||||||
moveOverflowBubbleToPending(b);
|
moveOverflowBubbleToPending(b);
|
||||||
|
b.setEntry(entry);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,6 +241,7 @@ public class BubbleData {
|
|||||||
for (int i = 0; i < mPendingBubbles.size(); i++) {
|
for (int i = 0; i < mPendingBubbles.size(); i++) {
|
||||||
Bubble b = mPendingBubbles.get(i);
|
Bubble b = mPendingBubbles.get(i);
|
||||||
if (b.getKey().equals(entry.getKey())) {
|
if (b.getKey().equals(entry.getKey())) {
|
||||||
|
b.setEntry(entry);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user