diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-08-26 05:55:42 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-26 05:55:42 +0000 |
commit | 6b836cd06b1a2ebe5d31336486bb1b54e42439df (patch) | |
tree | 68194255d6be3f016ac8b3288cc7973924d0a75e | |
parent | 91e456d235256c385a7da1e45f098386bc68e86a (diff) | |
parent | a287b8428ac6d9073f84f9b2f47ba5fc73939f10 (diff) | |
download | frameworks_base-6b836cd06b1a2ebe5d31336486bb1b54e42439df.zip frameworks_base-6b836cd06b1a2ebe5d31336486bb1b54e42439df.tar.gz frameworks_base-6b836cd06b1a2ebe5d31336486bb1b54e42439df.tar.bz2 |
am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
* commit 'a287b8428ac6d9073f84f9b2f47ba5fc73939f10':
Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java | 3 |
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 { |