Fixed a bug that ommitted booleans from serializing content values or bundles to string in AndroidUtilities

pull/14/head
Sam Bosley 14 years ago
parent 44c8906d48
commit c0dad1c969

@ -213,6 +213,8 @@ public class AndroidUtilities {
result.append('l').append(value);
else if(value instanceof String)
result.append('s').append(value.toString().replace(SERIALIZATION_SEPARATOR, SEPARATOR_ESCAPE));
else if (value instanceof Boolean)
result.append('b').append(value);
else
throw new UnsupportedOperationException(value.getClass().toString());
result.append(SERIALIZATION_SEPARATOR);
@ -257,6 +259,9 @@ public class AndroidUtilities {
case 's':
object.put(key, value.replace(SEPARATOR_ESCAPE, SERIALIZATION_SEPARATOR));
break;
case 'b':
object.put(key, Boolean.parseBoolean(value));
break;
}
}
});
@ -288,6 +293,9 @@ public class AndroidUtilities {
case 's':
object.putString(key, value.replace(SEPARATOR_ESCAPE, SERIALIZATION_SEPARATOR));
break;
case 'b':
object.putBoolean(key, Boolean.parseBoolean(value));
break;
}
}
});

Loading…
Cancel
Save