am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]

* commit 'a287b8428ac6d9073f84f9b2f47ba5fc73939f10':
  Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
This commit is contained in:
Deepanshu Gupta
2015-08-26 05:55:42 +00:00
committed by Android Git Automerger

View File

@@ -127,6 +127,7 @@ public final class BridgeContext extends Context {
new IdentityHashMap<Object, Map<String,String>>();
// maps for dynamically generated id representing style objects (StyleResourceValue)
@Nullable
private Map<Integer, StyleResourceValue> mDynamicIdToStyleMap;
private Map<StyleResourceValue, Integer> mStyleToDynamicIdMap;
private int mDynamicIdGenerator = 0x02030000; // Base id for R.style in custom namespace
@@ -695,7 +696,7 @@ public final class BridgeContext extends Context {
}
}
} else if (defStyleRes != 0) {
StyleResourceValue item = mDynamicIdToStyleMap.get(defStyleRes);
StyleResourceValue item = getStyleByDynamicId(defStyleRes);
if (item != null) {
defStyleValues = item;
} else {