Merge change 3227 into donut

* changes:
  Fix int to string mapping of exported properties. The value generated by the mapping in a @ViewDebug.ExportedProperty annotation was always overriden by the resolveId attribute.
This commit is contained in:
Android (Google) Code Review
2009-06-04 15:12:06 -07:00
2 changed files with 50 additions and 49 deletions

View File

@ -1260,7 +1260,7 @@ public class ViewDebug {
for (int j = 0; j < valuesCount; j++) {
String name;
String value;
String value = null;
final int intValue = array[j];
@ -1276,7 +1276,6 @@ public class ViewDebug {
}
}
value = String.valueOf(intValue);
if (hasMapping) {
int mappingCount = mapping.length;
for (int k = 0; k < mappingCount; k++) {
@ -1289,7 +1288,9 @@ public class ViewDebug {
}
if (resolveId) {
value = (String) resolveId(context, intValue);
if (value == null) value = (String) resolveId(context, intValue);
} else {
value = String.valueOf(intValue);
}
writeEntry(out, prefix, name, suffix, value);

View File

@ -881,7 +881,7 @@ public class RelativeLayout extends ViewGroup {
@ViewDebug.IntToString(from = RIGHT_OF, to = "rightOf")
}, mapping = {
@ViewDebug.IntToString(from = TRUE, to = "true"),
@ViewDebug.IntToString(from = 0, to = "FALSE/NO_ID")
@ViewDebug.IntToString(from = 0, to = "false/NO_ID")
})
private int[] mRules = new int[VERB_COUNT];