Merge "Dump some bubble data to dumpsys" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1d5ce2fda
@@ -49,6 +49,8 @@ import com.android.launcher3.util.DisplayController;
|
||||
import com.android.wm.shell.Flags;
|
||||
import com.android.wm.shell.common.bubbles.BubbleBarLocation;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@@ -1310,6 +1312,37 @@ public class BubbleBarView extends FrameLayout {
|
||||
});
|
||||
}
|
||||
|
||||
/** Dumps the current state of BubbleBarView. */
|
||||
public void dump(PrintWriter pw) {
|
||||
pw.println("BubbleBarView state:");
|
||||
pw.println(" visibility: " + getVisibility());
|
||||
pw.println(" translation Y: " + getTranslationY());
|
||||
pw.println(" bubbles in bar (childCount = " + getChildCount() + ")");
|
||||
for (BubbleView bubbleView: getBubbles()) {
|
||||
BubbleBarItem bubble = bubbleView.getBubble();
|
||||
String key = bubble == null ? "null" : bubble.getKey();
|
||||
pw.println(" bubble key: " + key);
|
||||
}
|
||||
pw.println(" isExpanded: " + isExpanded());
|
||||
pw.println(" mIsAnimatingNewBubble: " + mIsAnimatingNewBubble);
|
||||
if (mBubbleAnimator != null) {
|
||||
pw.println(" mBubbleAnimator.isRunning(): " + mBubbleAnimator.isRunning());
|
||||
pw.println(" mBubbleAnimator is null");
|
||||
}
|
||||
pw.println(" mDragging: " + mDragging);
|
||||
}
|
||||
|
||||
private List<BubbleView> getBubbles() {
|
||||
List<BubbleView> bubbles = new ArrayList<>();
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
View child = getChildAt(i);
|
||||
if (child instanceof BubbleView bubble) {
|
||||
bubbles.add(bubble);
|
||||
}
|
||||
}
|
||||
return bubbles;
|
||||
}
|
||||
|
||||
/** Interface for BubbleBarView to communicate with its controller. */
|
||||
interface Controller {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user