diff options
author | Konstantin Lopyrev <klopyrev@google.com> | 2010-08-10 19:02:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-10 19:02:51 -0700 |
commit | 8279c754d176d5c2aa23f6f7ad16fcea03278788 (patch) | |
tree | 7c8595734b0f6fb752c83633b4308aaf4bec43ab /core/java/android | |
parent | e8fa85d7a1a75d6894a75b1c25abf99bbff50085 (diff) | |
parent | 91a7f5fef8a9fc496acef23f513cb48139e8dff5 (diff) | |
download | frameworks_base-8279c754d176d5c2aa23f6f7ad16fcea03278788.zip frameworks_base-8279c754d176d5c2aa23f6f7ad16fcea03278788.tar.gz frameworks_base-8279c754d176d5c2aa23f6f7ad16fcea03278788.tar.bz2 |
am 91a7f5fe: Making sure that the prefix is handled properly.
Merge commit '91a7f5fef8a9fc496acef23f513cb48139e8dff5' into gingerbread-plus-aosp
* commit '91a7f5fef8a9fc496acef23f513cb48139e8dff5':
Making sure that the prefix is handled properly.
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/view/View.java | 2 | ||||
-rw-r--r-- | core/java/android/view/ViewDebug.java | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index b5b29b5..b8623e7 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4848,7 +4848,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * of ViewGroup that are responsible for arranging their children. * @return The LayoutParams associated with this view */ - @ViewDebug.ExportedProperty(deepExport = true, category = "layout") + @ViewDebug.ExportedProperty(deepExport = true, prefix = "layout_") public ViewGroup.LayoutParams getLayoutParams() { return mLayoutParams; } diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java index 7908f36..2ca08ea 100644 --- a/core/java/android/view/ViewDebug.java +++ b/core/java/android/view/ViewDebug.java @@ -1377,9 +1377,8 @@ public class ViewDebug { Object methodValue = method.invoke(view, (Object[]) null); final Class<?> returnType = method.getReturnType(); final ExportedProperty property = sAnnotations.get(method); - String fullName = (property.category().length() == 0) ? - method.getName() : - (property.category() + ":" + method.getName()); + String categoryPrefix = + property.category().length() != 0 ? property.category() + ":" : ""; if (returnType == int.class) { @@ -1390,7 +1389,8 @@ public class ViewDebug { final FlagToString[] flagsMapping = property.flagMapping(); if (flagsMapping.length > 0) { final int intValue = (Integer) methodValue; - final String valuePrefix = prefix + fullName + '_'; + final String valuePrefix = + categoryPrefix + prefix + method.getName() + '_'; exportUnrolledFlags(out, flagsMapping, intValue, valuePrefix); } @@ -1415,7 +1415,7 @@ public class ViewDebug { } } else if (returnType == int[].class) { final int[] array = (int[]) methodValue; - final String valuePrefix = prefix + fullName + '_'; + final String valuePrefix = categoryPrefix + prefix + method.getName() + '_'; final String suffix = "()"; exportUnrolledArray(context, out, property, array, valuePrefix, suffix); @@ -1429,7 +1429,7 @@ public class ViewDebug { } } - writeEntry(out, prefix, fullName, "()", methodValue); + writeEntry(out, categoryPrefix + prefix, method.getName(), "()", methodValue); } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } @@ -1450,9 +1450,8 @@ public class ViewDebug { Object fieldValue = null; final Class<?> type = field.getType(); final ExportedProperty property = sAnnotations.get(field); - String fullName = (property.category().length() == 0) ? - field.getName() : - (property.category() + ":" + field.getName()); + String categoryPrefix = + property.category().length() != 0 ? property.category() + ":" : ""; if (type == int.class) { @@ -1463,7 +1462,8 @@ public class ViewDebug { final FlagToString[] flagsMapping = property.flagMapping(); if (flagsMapping.length > 0) { final int intValue = field.getInt(view); - final String valuePrefix = prefix + fullName + '_'; + final String valuePrefix = + categoryPrefix + prefix + field.getName() + '_'; exportUnrolledFlags(out, flagsMapping, intValue, valuePrefix); } @@ -1486,7 +1486,7 @@ public class ViewDebug { } } else if (type == int[].class) { final int[] array = (int[]) field.get(view); - final String valuePrefix = prefix + fullName + '_'; + final String valuePrefix = categoryPrefix + prefix + field.getName() + '_'; final String suffix = ""; exportUnrolledArray(context, out, property, array, valuePrefix, suffix); @@ -1495,8 +1495,8 @@ public class ViewDebug { return; } else if (!type.isPrimitive()) { if (property.deepExport()) { - dumpViewProperties(context, field.get(view), out, - prefix + property.prefix()); + dumpViewProperties(context, field.get(view), out, prefix + + property.prefix()); continue; } } @@ -1505,7 +1505,7 @@ public class ViewDebug { fieldValue = field.get(view); } - writeEntry(out, prefix, fullName, "", fieldValue); + writeEntry(out, categoryPrefix + prefix, field.getName(), "", fieldValue); } catch (IllegalAccessException e) { } } |