Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b68054c authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Log overflow bubble restoration after phone reboot" into sc-dev am: 5c87a194

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13447707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1de91dfe6307e84fef687741bca1768d405b9be6
parents 25c03667 5c87a194
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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) {
+6 −1
Original line number Diff line number Diff line
@@ -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);
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -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