Skip to content

Commit

Permalink
Changed flow in export methods to continue through the loop if it enc…
Browse files Browse the repository at this point in the history
…ounters

an int[] return type.

There are two such instances:

1. "private int[] mRules" within RelativeLayout LayoutParams.
2. "public int[] getLocationOnScreen" in View.

When I added #2, we noticed missing annotated fields/methods in Hierarchy
Viewer, but #1 also caused the same issue (mainly not exporting
alignWithParent field)

Bug: 16844914
Change-Id: I0d83a4391aa0565897cd7f0523995c97b7a4976d
  • Loading branch information
Jon Miranda committed Aug 12, 2014
1 parent 125cf62 commit 4852021
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/java/android/view/ViewDebug.java
Original file line number Diff line number Diff line change
Expand Up @@ -1107,8 +1107,7 @@ private static void exportMethods(Context context, Object view, BufferedWriter o

exportUnrolledArray(context, out, property, array, valuePrefix, suffix);

// Probably want to return here, same as for fields.
return;
continue;
} else if (!returnType.isPrimitive()) {
if (property.deepExport()) {
dumpViewProperties(context, methodValue, out, prefix + property.prefix());
Expand Down Expand Up @@ -1187,8 +1186,7 @@ private static void exportFields(Context context, Object view, BufferedWriter ou

exportUnrolledArray(context, out, property, array, valuePrefix, suffix);

// We exit here!
return;
continue;
} else if (!type.isPrimitive()) {
if (property.deepExport()) {
dumpViewProperties(context, field.get(view), out, prefix +
Expand Down

0 comments on commit 4852021

Please sign in to comment.