Merge "Process only app initiated removals in onEntryRemoved callback" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9095108312
@@ -576,7 +576,9 @@ public class BubblesManager implements Dumpable {
|
|||||||
@Override
|
@Override
|
||||||
public void onEntryRemoved(NotificationEntry entry,
|
public void onEntryRemoved(NotificationEntry entry,
|
||||||
@NotifCollection.CancellationReason int reason) {
|
@NotifCollection.CancellationReason int reason) {
|
||||||
BubblesManager.this.onEntryRemoved(entry);
|
if (reason == REASON_APP_CANCEL || reason == REASON_APP_CANCEL_ALL) {
|
||||||
|
BubblesManager.this.onEntryRemoved(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -807,7 +807,7 @@ public class NewNotifPipelineBubblesTest extends SysuiTestCase {
|
|||||||
assertTrue(mBubbleController.hasBubbles());
|
assertTrue(mBubbleController.hasBubbles());
|
||||||
|
|
||||||
// Removes the notification
|
// Removes the notification
|
||||||
mEntryListener.onEntryRemoved(mRow, 0);
|
mEntryListener.onEntryRemoved(mRow, REASON_APP_CANCEL);
|
||||||
assertFalse(mBubbleController.hasBubbles());
|
assertFalse(mBubbleController.hasBubbles());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -938,7 +938,7 @@ public class NewNotifPipelineBubblesTest extends SysuiTestCase {
|
|||||||
mBubblesManager.handleDismissalInterception(groupSummary.getEntry());
|
mBubblesManager.handleDismissalInterception(groupSummary.getEntry());
|
||||||
|
|
||||||
// WHEN the summary is cancelled by the app
|
// WHEN the summary is cancelled by the app
|
||||||
mEntryListener.onEntryRemoved(groupSummary.getEntry(), 0);
|
mEntryListener.onEntryRemoved(groupSummary.getEntry(), REASON_APP_CANCEL);
|
||||||
|
|
||||||
// THEN the summary and its children are removed from bubble data
|
// THEN the summary and its children are removed from bubble data
|
||||||
assertFalse(mBubbleData.hasBubbleInStackWithKey(groupedBubble.getEntry().getKey()));
|
assertFalse(mBubbleData.hasBubbleInStackWithKey(groupedBubble.getEntry().getKey()));
|
||||||
|
|||||||
Reference in New Issue
Block a user