summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-09-04 04:32:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-04 04:32:42 +0000
commita82db08e1d5f2c7b1751a93bc10d0fc5d231f9e4 (patch)
tree190e2774b706be8786764286ae598e30a002803d
parent1310a1cdba8a0f5e1c8741a5fbcf81eb76c6c2b2 (diff)
parente73e14fd02f50e0e9b3fb3ca890de7cb96d8d48b (diff)
downloadframeworks_base-a82db08e1d5f2c7b1751a93bc10d0fc5d231f9e4.zip
frameworks_base-a82db08e1d5f2c7b1751a93bc10d0fc5d231f9e4.tar.gz
frameworks_base-a82db08e1d5f2c7b1751a93bc10d0fc5d231f9e4.tar.bz2
am e73e14fd: am 8ed784e2: am edc8b857: Merge "Fix "@null" resource values in LayoutLib. [DO NOT MERGE]" into jb-mr1.1-dev
* commit 'e73e14fd02f50e0e9b3fb3ca890de7cb96d8d48b': 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 cbc199a..48294d1 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;
}
}