summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-09-04 02:01:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-04 02:01:59 +0000
commit8ed784e2893c79d943b6184d25167ecf72a9a9ed (patch)
treee0c9a6af39339ab5195052a425d4d3678b119086
parent20fc473c69ae9c564ceb7fd357acc09c6b9e1aaf (diff)
parentedc8b8579ba9f47bbca0ac0c2f0eb11d0eadab09 (diff)
downloadframeworks_base-8ed784e2893c79d943b6184d25167ecf72a9a9ed.zip
frameworks_base-8ed784e2893c79d943b6184d25167ecf72a9a9ed.tar.gz
frameworks_base-8ed784e2893c79d943b6184d25167ecf72a9a9ed.tar.bz2
am edc8b857: Merge "Fix "@null" resource values in LayoutLib. [DO NOT MERGE]" into jb-mr1.1-dev
* commit 'edc8b8579ba9f47bbca0ac0c2f0eb11d0eadab09': 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;
}
}