summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-07-18 21:45:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-18 21:45:19 +0000
commit610341b3eb99ef2f070c96d60ca30c28283f1dea (patch)
tree8b860e411dcb179d93b884bf3909e117564eadff /tools
parent696eb4da44097693a18e99e1f38d062ac1f0e147 (diff)
parent95bbeb967243d453bf793cd06dd2dd914667fee9 (diff)
downloadframeworks_base-610341b3eb99ef2f070c96d60ca30c28283f1dea.zip
frameworks_base-610341b3eb99ef2f070c96d60ca30c28283f1dea.tar.gz
frameworks_base-610341b3eb99ef2f070c96d60ca30c28283f1dea.tar.bz2
am 95bbeb96: am b8e4e8e1: am d3ac01ff: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into jb-mr1.1-dev
* commit '95bbeb967243d453bf793cd06dd2dd914667fee9': Fix style resolution for styles with '.' [DO NOT MERGE]
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java17
1 files changed, 7 insertions, 10 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 efcb35c..736d2fa 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
@@ -613,19 +613,16 @@ public final class BridgeContext extends Context {
}
if (value != null) {
- if ((value.getFirst() == ResourceType.STYLE)
- || (value.getFirst() == ResourceType.ATTR)) {
- // look for the style in the current theme, and its parent:
- ResourceValue item = mRenderResources.findItemInTheme(value.getSecond(),
+ if (value.getFirst() == ResourceType.STYLE) {
+ // look for the style in all resources:
+ StyleResourceValue item = mRenderResources.getStyle(value.getSecond(),
isFrameworkRes);
if (item != null) {
- if (item instanceof StyleResourceValue) {
- if (defaultPropMap != null) {
- defaultPropMap.put("style", item.getName());
- }
-
- defStyleValues = (StyleResourceValue)item;
+ if (defaultPropMap != null) {
+ defaultPropMap.put("style", item.getName());
}
+
+ defStyleValues = item;
} else {
Bridge.getLog().error(null,
String.format(