OSDN Git Service

am 91043364: am 52be792b: am 27d3b926: Fix error when using list as actionBarNavMode...
authorDeepanshu Gupta <deepanshu@google.com>
Fri, 26 Sep 2014 00:59:08 +0000 (00:59 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 26 Sep 2014 00:59:08 +0000 (00:59 +0000)
* commit '91043364b95fe58225437e2220d497ef6e33edf6':
  Fix error when using list as actionBarNavMode. [DO NOT MERGE]

tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java

index c36afa7..f2f8447 100644 (file)
@@ -626,10 +626,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*/);
                 }