summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Deepanshu Gupta <deepanshu@google.com> 2014-09-04 02:22:43 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-09-04 02:22:43 +0000
commitaac20cfcb4752a38bb27fb134869868c487d855f (patch)
tree8d88a6f692a6a85f977875df87cf173a856b0267
parent14f413be3c7701750b996b90c95471e8cf04ae96 (diff)
parent9776312a80f0072bf1d1fe8183e168f7d5879c4c (diff)
am 9776312a: Merge "Fix "@null" resource values in LayoutLib. [DO NOT MERGE]" into klp-modular-dev
* commit '9776312a80f0072bf1d1fe8183e168f7d5879c4c': Fix "@null" resource values in LayoutLib. [DO NOT MERGE]
-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 446d139b2161..0530828b20c1 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;
}
}