summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-05-22 16:03:54 -0700
committerDeepanshu Gupta <deepanshu@google.com>2014-05-28 16:52:01 -0700
commitdc62340f18becf51f6f3c94d3994665bcd7dd537 (patch)
tree241ca5e6cccbe6a626edd843d3159285792b5d1e /tools
parentbaef8c1ffe5c900fb0da9512654bf249b5fc9269 (diff)
downloadframeworks_base-dc62340f18becf51f6f3c94d3994665bcd7dd537.zip
frameworks_base-dc62340f18becf51f6f3c94d3994665bcd7dd537.tar.gz
frameworks_base-dc62340f18becf51f6f3c94d3994665bcd7dd537.tar.bz2
Stopgap fix for layoutlib.
This is a temporary fix for changes made to TypedArray regrading theme attributes. Change-Id: I173fde6d8d3259479b0654ff331bc27bf2814fb0
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java12
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java3
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
index cc621c4..105803e 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
@@ -826,6 +826,11 @@ public final class BridgeTypedArray extends TypedArray {
return null;
}
+ @Override
+ public int[] extractThemeAttrs() {
+ return null;
+ }
+
/**
* Retrieve the raw TypedValue for the attribute at <var>index</var>.
*
@@ -912,4 +917,9 @@ public final class BridgeTypedArray extends TypedArray {
public String toString() {
return Arrays.toString(mResourceData);
}
- }
+
+ static TypedArray obtain(Resources res, int len) {
+ return res instanceof BridgeResources ?
+ new BridgeTypedArray(((BridgeResources) res), null, len, true) : null;
+ }
+}
diff --git a/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java b/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
index 5d89f83..faa8852 100644
--- a/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/content/res/TypedArray_Delegate.java
@@ -30,7 +30,6 @@ public class TypedArray_Delegate {
@LayoutlibDelegate
/*package*/ static TypedArray obtain(Resources res, int len) {
- // FIXME
- return null;
+ return BridgeTypedArray.obtain(res, len);
}
}