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:
@ -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);
|
||||
|
@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user