OSDN Git Service

Changed flow in export methods to continue through the loop if it encounters
authorJon Miranda <jonmiranda@google.com>
Fri, 8 Aug 2014 17:49:47 +0000 (10:49 -0700)
committerJon Miranda <jonmiranda@google.com>
Tue, 12 Aug 2014 22:45:57 +0000 (15:45 -0700)
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

core/java/android/view/ViewDebug.java

index 0b15ba7..4d9a8cc 100644 (file)
@@ -1107,8 +1107,7 @@ public class ViewDebug {
 
                     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());
@@ -1187,8 +1186,7 @@ public class ViewDebug {
 
                     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 +