summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Deepanshu Gupta <deepanshu@google.com> 2014-09-26 00:35:59 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-09-26 00:35:59 +0000
commit14ffff154f974bb169b3449ad24c508c836c670c (patch)
tree9fcff3b9937c156e489de3ede7b1fd44e550178d
parent71b19fc301ff08bd13d394dfa9ef6a3f535b149e (diff)
parentc8cbff8bdc6c8e61a177eeb1aa728038e0aa86dd (diff)
am c8cbff8b: Fix error when using list as actionBarNavMode. [DO NOT MERGE]
* commit 'c8cbff8bdc6c8e61a177eeb1aa728038e0aa86dd': Fix error when using list as actionBarNavMode. [DO NOT MERGE]
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java9
1 files changed, 7 insertions, 2 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 625f10803542..0a6795b00f0c 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
@@ -630,10 +630,15 @@ public final class BridgeContext extends Context {
defStyleRes, value.getSecond()),
null /*data*/);
}
+ } else if (value.getFirst() == ResourceType.ATTR) {
+ // Ignore. There's a bug in the framework where sometimes defStyleAttr ends up
+ // in defStyleRes. The framework ignores the attribute when it's not a style.
+ // But to let the developers find bugs in their code, we log an error for other
+ // cases.
} else {
- Bridge.getLog().error(null,
+ Bridge.getLog().warning(null,
String.format(
- "Resouce id 0x%x is not of type STYLE (instead %s)",
+ "Resource id 0x%x is not of type STYLE (instead %s)",
defStyleRes, value.getFirst().toString()),
null /*data*/);
}