diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-08-17 15:18:29 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-08-17 17:35:00 -0700 |
| commit | 4702a856973a553deb82f71b1d3b6c3db5dbf4ba (patch) | |
| tree | 355aaea84ebfa78d9e712c1b46fb257e55000d0f /core/java/android/view/ViewDebug.java | |
| parent | 79af1dd54c16cde063152922b42c96d72ae9eca8 (diff) | |
More view hierarchy, fragment debugging.
Add a View.toString() method.
Rename all of the View private flags to have a PFLAG prefix to
avoid going insane trying to figure out which constant goes with
which flag.
Activity.dump() now includes a summary of the activity's view
hierarchy, using the View.toString() method.
All exceptions thrown by FragmentManager now perform a dump of
the owning activity state, where appropriate.
Change-Id: I6482e397e10cb5a0612ab02ce6ed5131823437a6
Diffstat (limited to 'core/java/android/view/ViewDebug.java')
| -rw-r--r-- | core/java/android/view/ViewDebug.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java index dae9265ab1fb..1286eb9cc313 100644 --- a/core/java/android/view/ViewDebug.java +++ b/core/java/android/view/ViewDebug.java @@ -497,8 +497,8 @@ public class ViewDebug { throws IOException { long durationMeasure = - (root || (view.mPrivateFlags & View.MEASURED_DIMENSION_SET) != 0) ? profileViewOperation( - view, new ViewOperation<Void>() { + (root || (view.mPrivateFlags & View.PFLAG_MEASURED_DIMENSION_SET) != 0) + ? profileViewOperation(view, new ViewOperation<Void>() { public Void[] pre() { forceLayout(view); return null; @@ -524,8 +524,8 @@ public class ViewDebug { }) : 0; long durationLayout = - (root || (view.mPrivateFlags & View.LAYOUT_REQUIRED) != 0) ? profileViewOperation( - view, new ViewOperation<Void>() { + (root || (view.mPrivateFlags & View.PFLAG_LAYOUT_REQUIRED) != 0) + ? profileViewOperation(view, new ViewOperation<Void>() { public Void[] pre() { return null; } @@ -538,9 +538,8 @@ public class ViewDebug { } }) : 0; long durationDraw = - (root || !view.willNotDraw() || (view.mPrivateFlags & View.DRAWN) != 0) ? profileViewOperation( - view, - new ViewOperation<Object>() { + (root || !view.willNotDraw() || (view.mPrivateFlags & View.PFLAG_DRAWN) != 0) + ? profileViewOperation(view, new ViewOperation<Object>() { public Object[] pre() { final DisplayMetrics metrics = (view != null && view.getResources() != null) ? @@ -651,7 +650,7 @@ public class ViewDebug { final boolean localVisible = view.getVisibility() == View.VISIBLE && visible; - if ((view.mPrivateFlags & View.SKIP_DRAW) != View.SKIP_DRAW) { + if ((view.mPrivateFlags & View.PFLAG_SKIP_DRAW) != View.PFLAG_SKIP_DRAW) { final int id = view.getId(); String name = view.getClass().getSimpleName(); if (id != View.NO_ID) { |
