summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-09-04 04:14:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-04 04:14:31 +0000
commit1c3a884519dc5937bf321519d6adafb41a333bc1 (patch)
tree427c00587dd04d8bbe337a919cf127af6dde4490 /tools
parent6d4873f577774e5e7427e2675e4c6ff8049646be (diff)
parent47a400131f026fd4afdf09e77fe82e79201c1458 (diff)
downloadframeworks_base-1c3a884519dc5937bf321519d6adafb41a333bc1.zip
frameworks_base-1c3a884519dc5937bf321519d6adafb41a333bc1.tar.gz
frameworks_base-1c3a884519dc5937bf321519d6adafb41a333bc1.tar.bz2
am 47a40013: Merge "Fix "@null" resource values in LayoutLib. [DO NOT MERGE]" into klp-dev
* commit '47a400131f026fd4afdf09e77fe82e79201c1458': Fix "@null" resource values in LayoutLib. [DO NOT MERGE]
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
index 446d139..0530828 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
@@ -91,7 +91,7 @@ public final class BridgeTypedArray extends TypedArray {
// first count the array size
int count = 0;
for (ResourceValue data : mResourceData) {
- if (data != null) {
+ if (data != null && !RenderResources.REFERENCE_NULL.equals(data.getValue())) {
count++;
}
}
@@ -103,7 +103,8 @@ public final class BridgeTypedArray extends TypedArray {
// fill the array with the indices.
int index = 1;
for (int i = 0 ; i < mResourceData.length ; i++) {
- if (mResourceData[i] != null) {
+ if (mResourceData[i] != null
+ && !RenderResources.REFERENCE_NULL.equals(mResourceData[i].getValue())) {
mIndices[index++] = i;
}
}