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

Commit 648208df authored by Lyn Han's avatar Lyn Han
Browse files

Log overflow bubble restoration after phone reboot

Fixes: 178533138
Test: restart phone, examine logs
Change-Id: Ibffa5e4061a07b0f9327f6e99b138c354b96bee2
parent 9330a9ac
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