Handle empty flag attributes, such as gravity=""

Without this, an empty string will be passed into
XmlUtils.convertValueToInt, which throws an
index out of range exception.

Change-Id: Ibd1a140e207653b205852087f33ccb87fbbb9bbc
This commit is contained in:
Tor Norbye
2013-01-04 15:46:25 -08:00
parent 48f7cfb106
commit 72c6137a7a

View File

@@ -218,7 +218,7 @@ public final class BridgeTypedArray extends TypedArray {
return defValue;
}
if (s == null) {
if (s == null || s.length() == 0) {
return defValue;
}