mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Dump some bubble data to dumpsys" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1d5ce2fda
@@ -282,6 +282,11 @@ public class TaskbarControllers {
|
||||
}
|
||||
uiController.dumpLogs(prefix + "\t", pw);
|
||||
rotationButtonController.dumpLogs(prefix + "\t", pw);
|
||||
if (bubbleControllers.isPresent()) {
|
||||
bubbleControllers.get().dump(pw);
|
||||
} else {
|
||||
pw.println(String.format("%s\t%s", prefix, "Bubble controllers are empty."));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
import com.android.wm.shell.common.bubbles.BubbleBarLocation;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
@@ -598,4 +599,19 @@ public class BubbleBarViewController {
|
||||
/** Called when bounds have changed */
|
||||
void onBoundsChanged();
|
||||
}
|
||||
|
||||
/** Dumps the state of BubbleBarViewController. */
|
||||
public void dump(PrintWriter pw) {
|
||||
pw.println("Bubble bar view controller state:");
|
||||
pw.println(" mHiddenForSysui: " + mHiddenForSysui);
|
||||
pw.println(" mHiddenForNoBubbles: " + mHiddenForNoBubbles);
|
||||
pw.println(" mShouldShowEducation: " + mShouldShowEducation);
|
||||
pw.println(" mBubbleBarTranslationY.value: " + mBubbleBarTranslationY.value);
|
||||
pw.println(" mBubbleBarSwipeUpTranslationY: " + mBubbleBarSwipeUpTranslationY);
|
||||
if (mBarView != null) {
|
||||
mBarView.dump(pw);
|
||||
} else {
|
||||
pw.println(" Bubble bar view is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ package com.android.launcher3.taskbar.bubbles;
|
||||
import com.android.launcher3.taskbar.TaskbarControllers;
|
||||
import com.android.launcher3.util.RunnableList;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Hosts various bubble controllers to facilitate passing between one another.
|
||||
*/
|
||||
@@ -94,4 +96,9 @@ public class BubbleControllers {
|
||||
bubbleStashedHandleViewController.onDestroy();
|
||||
bubbleBarController.onDestroy();
|
||||
}
|
||||
|
||||
/** Dumps bubble controllers state. */
|
||||
public void dump(PrintWriter pw) {
|
||||
bubbleBarViewController.dump(pw);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ import com.android.launcher3.util.MultiPropertyFactory;
|
||||
import com.android.wm.shell.common.bubbles.BubbleBarLocation;
|
||||
import com.android.wm.shell.shared.animation.PhysicsAnimator;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Coordinates between controllers such as BubbleBarView and BubbleHandleViewController to
|
||||
* create a cohesive animation between stashed/unstashed states.
|
||||
@@ -456,4 +458,13 @@ public class BubbleStashController {
|
||||
public void setHandleTranslationY(float ty) {
|
||||
mHandleViewController.setTranslationYForSwipe(ty);
|
||||
}
|
||||
|
||||
/** Dumps the state of BubbleStashController. */
|
||||
public void dump(PrintWriter pw) {
|
||||
pw.println("Bubble stash controller state:");
|
||||
pw.println(" mIsStashed: " + mIsStashed);
|
||||
pw.println(" mBubblesShowingOnOverview: " + mBubblesShowingOnOverview);
|
||||
pw.println(" mBubblesShowingOnHome: " + mBubblesShowingOnHome);
|
||||
pw.println(" mIsSysuiLocked: " + mIsSysuiLocked);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user