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

Commit 5dfb9e66 authored by Mady Mellor's avatar Mady Mellor
Browse files

Add some extra info the bubble dumpsys

BubbleController
- Add the userId & status bar state, and whether bubbles are showing
  in bar format or not

BubbleStackView
- Add whether the stack is temporarily invisible

Also modified some formatting.

Test: manual - add some bubbles
             - adb shell dumpsys activity service com.android.systemui | grep -A 100 "BubbleController state"
Bug: 294121232
Change-Id: I871fed51e9e75d0e8e97af3a14470cc5af03b581
parent 9e3e45e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -973,9 +973,9 @@ public class Bubble implements BubbleViewProvider {
        pw.print("  suppressNotif: "); pw.println(shouldSuppressNotification());
        pw.print("  autoExpand:    "); pw.println(shouldAutoExpand());
        pw.print("  isDismissable: "); pw.println(mIsDismissable);
        pw.println("  bubbleMetadataFlagListener null: " + (mBubbleMetadataFlagListener == null));
        pw.println("  bubbleMetadataFlagListener null?: " + (mBubbleMetadataFlagListener == null));
        if (mExpandedView != null) {
            mExpandedView.dump(pw);
            mExpandedView.dump(pw, "  ");
        }
    }

+9 −3
Original line number Diff line number Diff line
@@ -1991,13 +1991,20 @@ public class BubbleController implements ConfigurationChangeListener,
     * Description of current bubble state.
     */
    private void dump(PrintWriter pw, String prefix) {
        pw.println("BubbleController state:");
        pw.print(prefix); pw.println("BubbleController state:");
        pw.print(prefix); pw.println("  currentUserId= " + mCurrentUserId);
        pw.print(prefix); pw.println("  isStatusBarShade= " + mIsStatusBarShade);
        pw.print(prefix); pw.println("  isShowingAsBubbleBar= " + isShowingAsBubbleBar());
        pw.println();

        mBubbleData.dump(pw);
        pw.println();

        if (mStackView != null) {
            mStackView.dump(pw);
        }
        pw.println();

        mImpl.mCachedState.dump(pw);
    }

@@ -2246,8 +2253,7 @@ public class BubbleController implements ConfigurationChangeListener,
                pw.println("mIsStackExpanded: " + mIsStackExpanded);
                pw.println("mSelectedBubbleKey: " + mSelectedBubbleKey);

                pw.print("mSuppressedBubbleKeys: ");
                pw.println(mSuppressedBubbleKeys.size());
                pw.println("mSuppressedBubbleKeys: " + mSuppressedBubbleKeys.size());
                for (String key : mSuppressedBubbleKeys) {
                    pw.println("   suppressing: " + key);
                }
+7 −6
Original line number Diff line number Diff line
@@ -1231,6 +1231,7 @@ public class BubbleData {
     * Description of current bubble data state.
     */
    public void dump(PrintWriter pw) {
        pw.println("BubbleData state:");
        pw.print("  selected: ");
        pw.println(mSelectedBubble != null
                ? mSelectedBubble.getKey()
@@ -1238,19 +1239,19 @@ public class BubbleData {
        pw.print("  expanded: ");
        pw.println(mExpanded);

        pw.print("stack bubble count:    ");
        pw.print("Stack bubble count: ");
        pw.println(mBubbles.size());
        for (Bubble bubble : mBubbles) {
            bubble.dump(pw);
        }

        pw.print("overflow bubble count:    ");
        pw.print("Overflow bubble count: ");
        pw.println(mOverflowBubbles.size());
        for (Bubble bubble : mOverflowBubbles) {
            bubble.dump(pw);
        }

        pw.print("summaryKeys: ");
        pw.print("SummaryKeys: ");
        pw.println(mSuppressedGroupKeys.size());
        for (String key : mSuppressedGroupKeys.keySet()) {
            pw.println("     suppressing: " + key);
+9 −4
Original line number Diff line number Diff line
@@ -77,20 +77,25 @@ public class BubbleDebugConfig {

    static String formatBubblesString(List<Bubble> bubbles, BubbleViewProvider selected) {
        StringBuilder sb = new StringBuilder();
        for (Bubble bubble : bubbles) {
        for (int i = 0; i < bubbles.size(); i++) {
            Bubble bubble = bubbles.get(i);
            if (bubble == null) {
                sb.append("   <null> !!!!!\n");
                sb.append("   <null> !!!!!");
            } else {
                boolean isSelected = (selected != null
                        && selected.getKey() != BubbleOverflow.KEY
                        && !BubbleOverflow.KEY.equals(selected.getKey())
                        && bubble == selected);
                String arrow = isSelected ? "=>" : "  ";
                sb.append(String.format("%s Bubble{act=%12d, showInShade=%d, key=%s}\n",

                sb.append(String.format("%s Bubble{act=%12d, showInShade=%d, key=%s}",
                        arrow,
                        bubble.getLastActivity(),
                        (bubble.showInShade() ? 1 : 0),
                        bubble.getKey()));
            }
            if (i != bubbles.size() - 1) {
                sb.append("\n");
            }
        }
        return sb.toString();
    }
+4 −4
Original line number Diff line number Diff line
@@ -1094,9 +1094,9 @@ public class BubbleExpandedView extends LinearLayout {
    /**
     * Description of current expanded view state.
     */
    public void dump(@NonNull PrintWriter pw) {
        pw.print("BubbleExpandedView");
        pw.print("  taskId:               "); pw.println(mTaskId);
        pw.print("  stackView:            "); pw.println(mStackView);
    public void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
        pw.print(prefix); pw.println("BubbleExpandedView:");
        pw.print(prefix); pw.print("  taskId: "); pw.println(mTaskId);
        pw.print(prefix); pw.print("  stackView: "); pw.println(mStackView);
    }
}
Loading