summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-07-18 21:48:05 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-18 21:48:05 +0000
commita9e488a6d2b20ecc91412072a5f39022d7fe6926 (patch)
tree97f25cdab7686fb73cbc041a74f1c8a03e35f234 /tools
parentf75489f2f1f2dc4f75205f4b242800777bf7d5ec (diff)
parentd8d3e87cf339deaf890e4b083d09b074065cd35f (diff)
downloadframeworks_base-a9e488a6d2b20ecc91412072a5f39022d7fe6926.zip
frameworks_base-a9e488a6d2b20ecc91412072a5f39022d7fe6926.tar.gz
frameworks_base-a9e488a6d2b20ecc91412072a5f39022d7fe6926.tar.bz2
am d8d3e87c: am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev
* commit 'd8d3e87cf339deaf890e4b083d09b074065cd35f': 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(