Update RoundableState logs
The dump of the NotificationShadeWindowControllerImpl contains its view hierarchy using the `toString()` method of the `View` class. We want to keep it, because it contains some basic description of the View state, visibility, clickability and the view's position inside its parent. The dump of the NotificationStackScrollLayout knows more about our custom views and their custom properties. This CL updates the RoundableState logs to follow this pattern. Fixes: 278509751 Test: dumpsysui NotificationStackScrollLayout NotificationShadeWindowControllerImpl Change-Id: Id64fc6e8ed692c530aace95eb3036c0b37af647a
This commit is contained in:
@@ -383,11 +383,11 @@ class RoundableState(
|
||||
}
|
||||
|
||||
fun debugString() = buildString {
|
||||
append("TargetView: ${targetView.hashCode()} ")
|
||||
append("Top: $topRoundness ")
|
||||
append(topRoundnessMap.map { "${it.key} ${it.value}" })
|
||||
append(" Bottom: $bottomRoundness ")
|
||||
append(bottomRoundnessMap.map { "${it.key} ${it.value}" })
|
||||
append("Roundable { ")
|
||||
append("top: { value: $topRoundness, requests: $topRoundnessMap}")
|
||||
append(", ")
|
||||
append("bottom: { value: $bottomRoundness, requests: $bottomRoundnessMap}")
|
||||
append("}")
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -3649,16 +3649,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
} else {
|
||||
pw.println("no viewState!!!");
|
||||
}
|
||||
pw.println("Roundness: " + getRoundableState().debugString());
|
||||
pw.println(getRoundableState().debugString());
|
||||
|
||||
int transientViewCount = mChildrenContainer == null
|
||||
? 0 : mChildrenContainer.getTransientViewCount();
|
||||
if (mIsSummaryWithChildren || transientViewCount > 0) {
|
||||
pw.println();
|
||||
pw.print("ChildrenContainer");
|
||||
pw.print(" visibility: " + mChildrenContainer.getVisibility());
|
||||
pw.print(", alpha: " + mChildrenContainer.getAlpha());
|
||||
pw.print(", translationY: " + mChildrenContainer.getTranslationY());
|
||||
pw.println(mChildrenContainer.debugString());
|
||||
pw.println();
|
||||
List<ExpandableNotificationRow> notificationChildren = getAttachedChildren();
|
||||
pw.print("Children: " + notificationChildren.size() + " {");
|
||||
@@ -3725,12 +3721,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String roundableStateDebug = "RoundableState = " + getRoundableState().debugString();
|
||||
return "ExpandableNotificationRow:" + hashCode() + " { " + roundableStateDebug + " }";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
|
||||
@@ -352,7 +352,7 @@ public abstract class ExpandableOutlineView extends ExpandableView {
|
||||
IndentingPrintWriter pw = DumpUtilsKt.asIndenting(pwOriginal);
|
||||
super.dump(pw, args);
|
||||
DumpUtilsKt.withIncreasedIndent(pw, () -> {
|
||||
pw.println("Roundness: " + getRoundableState().debugString());
|
||||
pw.println(getRoundableState().debugString());
|
||||
if (DUMP_VERBOSE) {
|
||||
pw.println("mCustomOutline: " + mCustomOutline + " mOutlineRect: " + mOutlineRect);
|
||||
pw.println("mOutlineAlpha: " + mOutlineAlpha);
|
||||
|
||||
@@ -1546,9 +1546,11 @@ public class NotificationChildrenContainer extends ViewGroup
|
||||
mUseRoundnessSourceTypes = enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String roundableStateDebug = "RoundableState = " + getRoundableState().debugString();
|
||||
return "NotificationChildrenContainer:" + hashCode() + " { " + roundableStateDebug + " }";
|
||||
public String debugString() {
|
||||
return TAG + " { "
|
||||
+ "visibility: " + getVisibility()
|
||||
+ ", alpha: " + getAlpha()
|
||||
+ ", translationY: " + getTranslationY()
|
||||
+ ", roundableState: " + getRoundableState().debugString() + "}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user