summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-07-18 21:53:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-18 21:53:37 +0000
commit0804e0aded17c1aee8cbd2c34247b390051123c3 (patch)
treec45d39f8c7ee4d2c222aaa2ca0a19607fe4e936d /tools
parentd7f2bf067fce644ed902122fffb9e22b6596a0ff (diff)
parenta9e488a6d2b20ecc91412072a5f39022d7fe6926 (diff)
downloadframeworks_base-0804e0aded17c1aee8cbd2c34247b390051123c3.zip
frameworks_base-0804e0aded17c1aee8cbd2c34247b390051123c3.tar.gz
frameworks_base-0804e0aded17c1aee8cbd2c34247b390051123c3.tar.bz2
am a9e488a6: am d8d3e87c: am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev
* commit 'a9e488a6d2b20ecc91412072a5f39022d7fe6926': 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 fde4e1a..29e1f76 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
@@ -620,19 +620,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(