summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-08-26 20:19:32 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-26 20:19:32 +0000
commitbf7907bfc855478c16650e77a7a8a72370c6f35f (patch)
tree9fb415e761c67eb2b4d7463ee9fddd6e99407833
parentf2bf5470a3ec1f5eb8584e0d7c1a8eb3c08d8d20 (diff)
parent6b836cd06b1a2ebe5d31336486bb1b54e42439df (diff)
downloadframeworks_base-bf7907bfc855478c16650e77a7a8a72370c6f35f.zip
frameworks_base-bf7907bfc855478c16650e77a7a8a72370c6f35f.tar.gz
frameworks_base-bf7907bfc855478c16650e77a7a8a72370c6f35f.tar.bz2
am 6b836cd0: am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
* commit '6b836cd06b1a2ebe5d31336486bb1b54e42439df': Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index 6951558..e79a662 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -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 {