diff options
| author | Chet Haase <chet@google.com> | 2011-04-22 16:18:45 -0700 |
|---|---|---|
| committer | Chet Haase <chet@google.com> | 2011-05-05 07:35:40 -0700 |
| commit | ed30fd8e9a2d65ee5c8520de55b0089c219f390c (patch) | |
| tree | 26ba777cc019d3adcba613427a2bb2feabf9a54f /core/java/android/view/ViewDebug.java | |
| parent | 098b781699981a550500d2e30b4c844af63eb187 (diff) | |
Add ability for hierarchyviewer to output displaylist info
Clicking on a node in hierarchyviewer1 and hierarchyviewer2 and then
clicking the new "Dump DisplayList" button will cause the display
list for the selected node (including its children) to be output into
logcat.
Change-Id: Iad05f5f6cca0f8b465dccd962b501dc18fe6e053
Diffstat (limited to 'core/java/android/view/ViewDebug.java')
| -rw-r--r-- | core/java/android/view/ViewDebug.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java index 3f05b2947b1a..153409961550 100644 --- a/core/java/android/view/ViewDebug.java +++ b/core/java/android/view/ViewDebug.java @@ -375,6 +375,7 @@ public class ViewDebug { private static final String REMOTE_COMMAND_REQUEST_LAYOUT = "REQUEST_LAYOUT"; private static final String REMOTE_PROFILE = "PROFILE"; private static final String REMOTE_COMMAND_CAPTURE_LAYERS = "CAPTURE_LAYERS"; + private static final String REMOTE_COMMAND_OUTPUT_DISPLAYLIST = "OUTPUT_DISPLAYLIST"; private static HashMap<Class<?>, Field[]> sFieldsForClasses; private static HashMap<Class<?>, Method[]> sMethodsForClasses; @@ -885,6 +886,8 @@ public class ViewDebug { final String[] params = parameters.split(" "); if (REMOTE_COMMAND_CAPTURE.equalsIgnoreCase(command)) { capture(view, clientStream, params[0]); + } else if (REMOTE_COMMAND_OUTPUT_DISPLAYLIST.equalsIgnoreCase(command)) { + outputDisplayList(view, params[0]); } else if (REMOTE_COMMAND_INVALIDATE.equalsIgnoreCase(command)) { invalidate(view, params[0]); } else if (REMOTE_COMMAND_REQUEST_LAYOUT.equalsIgnoreCase(command)) { @@ -1156,6 +1159,11 @@ public class ViewDebug { } } + private static void outputDisplayList(View root, String parameter) throws IOException { + final View view = findView(root, parameter); + view.getViewAncestor().outputDisplayList(view); + } + private static void capture(View root, final OutputStream clientStream, String parameter) throws IOException { |
