am 1ddc0077: am 19e420c5: Merge change Iae493184 into eclair
Merge commit '1ddc0077ac0c26a9dc74875791bfea3f34a8cc7b' into eclair-mr2-plus-aosp
* commit '1ddc0077ac0c26a9dc74875791bfea3f34a8cc7b':
Minor fix for the parent style computation in the layoutlib.
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index c455977..2df9219 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -675,9 +675,12 @@
name = name.substring(BridgeConstants.PREFIX_ANDROID.length());
}
- // at this point we could have the format style/<name>. we want only the name
+ // at this point we could have the format <type>/<name>. we want only the name as long as
+ // the type is style.
if (name.startsWith(BridgeConstants.REFERENCE_STYLE)) {
name = name.substring(BridgeConstants.REFERENCE_STYLE.length());
+ } else if (name.indexOf('/') != -1) {
+ return null;
}
IResourceValue parent = null;
@@ -697,7 +700,7 @@
return (IStyleResourceValue)parent;
}
- sLogger.error(String.format("Unable to resolve parent style name: ", parentName));
+ sLogger.error(String.format("Unable to resolve parent style name: %s", parentName));
return null;
}
@@ -1069,24 +1072,24 @@
public void wallpaperOffsetsComplete(IBinder window) {
// pass for now.
}
-
+
@SuppressWarnings("unused")
public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
int z, Bundle extras, boolean sync) {
// pass for now.
return null;
}
-
+
@SuppressWarnings("unused")
public void wallpaperCommandComplete(IBinder window, Bundle result) {
// pass for now.
}
-
+
@SuppressWarnings("unused")
public void closeSystemDialogs(String reason) {
// pass for now.
}
-
+
public IBinder asBinder() {
// pass for now.
return null;
@@ -1151,12 +1154,12 @@
int z, Bundle extras, boolean sync) {
// pass for now.
}
-
+
@SuppressWarnings("unused")
public void closeSystemDialogs(String reason) {
// pass for now.
}
-
+
public IBinder asBinder() {
// pass for now.
return null;