Merge "Log overflow bubble restoration after phone reboot" into sc-dev

This commit is contained in:
Lyn Han
2021-02-04 20:17:40 +00:00
committed by Android (Google) Code Review
4 changed files with 12 additions and 4 deletions

View File

@@ -771,7 +771,8 @@ public class BubbleController {
// if the bubble is already active, there's no need to push it to overflow
return;
}
bubble.inflate((b) -> mBubbleData.overflowBubble(DISMISS_AGED, bubble),
bubble.inflate(
(b) -> mBubbleData.overflowBubble(Bubbles.DISMISS_RELOAD_FROM_DISK, bubble),
mContext, this, mStackView, mBubbleIconFactory, true /* skipInflation */);
});
return null;

View File

@@ -542,7 +542,8 @@ public class BubbleData {
void overflowBubble(@DismissReason int reason, Bubble bubble) {
if (bubble.getPendingIntentCanceled()
|| !(reason == Bubbles.DISMISS_AGED
|| reason == Bubbles.DISMISS_USER_GESTURE)) {
|| reason == Bubbles.DISMISS_USER_GESTURE
|| reason == Bubbles.DISMISS_RELOAD_FROM_DISK)) {
return;
}
if (DEBUG_BUBBLE_DATA) {

View File

@@ -61,7 +61,10 @@ public class BubbleLogger {
BUBBLE_OVERFLOW_REMOVE_BLOCKED(490),
@UiEvent(doc = "User selected the overflow.")
BUBBLE_OVERFLOW_SELECTED(600);
BUBBLE_OVERFLOW_SELECTED(600),
@UiEvent(doc = "Restore bubble to overflow after phone reboot.")
BUBBLE_OVERFLOW_RECOVER(691);
private final int mId;
@@ -112,6 +115,8 @@ public class BubbleLogger {
log(b, Event.BUBBLE_OVERFLOW_ADD_AGED);
} else if (r == Bubbles.DISMISS_USER_GESTURE) {
log(b, Event.BUBBLE_OVERFLOW_ADD_USER_GESTURE);
} else if (r == Bubbles.DISMISS_RELOAD_FROM_DISK) {
log(b, Event.BUBBLE_OVERFLOW_RECOVER);
}
}

View File

@@ -54,7 +54,7 @@ public interface Bubbles {
DISMISS_NOTIF_CANCEL, DISMISS_ACCESSIBILITY_ACTION, DISMISS_NO_LONGER_BUBBLE,
DISMISS_USER_CHANGED, DISMISS_GROUP_CANCELLED, DISMISS_INVALID_INTENT,
DISMISS_OVERFLOW_MAX_REACHED, DISMISS_SHORTCUT_REMOVED, DISMISS_PACKAGE_REMOVED,
DISMISS_NO_BUBBLE_UP})
DISMISS_NO_BUBBLE_UP, DISMISS_RELOAD_FROM_DISK})
@Target({FIELD, LOCAL_VARIABLE, PARAMETER})
@interface DismissReason {}
@@ -72,6 +72,7 @@ public interface Bubbles {
int DISMISS_SHORTCUT_REMOVED = 12;
int DISMISS_PACKAGE_REMOVED = 13;
int DISMISS_NO_BUBBLE_UP = 14;
int DISMISS_RELOAD_FROM_DISK = 15;
/**
* @return {@code true} if there is a bubble associated with the provided key and if its