summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorEvan Rosky <erosky@google.com>2020-04-28 14:55:46 -0700
committerEvan Rosky <erosky@google.com>2020-04-28 15:00:21 -0700
commit89f367d39fa915b90ddcd45f6294c19d580e8426 (patch)
treedeae80785b7a69ac0578b49f842a54693ae7e7d5 /core/java/android
parent046df72d9a8a7d5f6e6f255c313fc129db874f68 (diff)
Add a window dump for uiautomator
There's no good way to dump all the windows and views that uiautomator sees, so added one. Otherwise its a pain to do multi-window debugging. This could also possibly be used by various hierarchy viewers that currently are only able to look at the active window. Bug: 151632128 Test: adb shell uiautomator dump --windows Change-Id: I20b45507584e35ef5d725691b2ffb060bcfa18db
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/accessibility/AccessibilityWindowInfo.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityWindowInfo.java b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
index ca5c417bdc6d..813234f1f49c 100644
--- a/core/java/android/view/accessibility/AccessibilityWindowInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
@@ -752,7 +752,10 @@ public final class AccessibilityWindowInfo implements Parcelable {
}
}
- private static String typeToString(int type) {
+ /**
+ * @hide
+ */
+ public static String typeToString(int type) {
switch (type) {
case TYPE_APPLICATION: {
return "TYPE_APPLICATION";
@@ -770,7 +773,7 @@ public final class AccessibilityWindowInfo implements Parcelable {
return "TYPE_SPLIT_SCREEN_DIVIDER";
}
default:
- return "<UNKNOWN>";
+ return "<UNKNOWN:" + type + ">";
}
}