diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-08-19 16:15:37 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2014-08-26 00:48:18 +0000 |
commit | ffee9b2740986560a507fc9726c2e4e2eba5db7f (patch) | |
tree | f572fb765ce92eff677b9b46e49f0da175b72729 /tools/layoutlib/bridge/src | |
parent | 17b94b8a583849c769aab57644e6c3c289b79e55 (diff) | |
download | frameworks_base-ffee9b2740986560a507fc9726c2e4e2eba5db7f.zip frameworks_base-ffee9b2740986560a507fc9726c2e4e2eba5db7f.tar.gz frameworks_base-ffee9b2740986560a507fc9726c2e4e2eba5db7f.tar.bz2 |
Fix "@null" resource values in LayoutLib. [DO NOT MERGE]
Bug: http://b.android.com/74072
Change-Id: Ib84906d86772ac3df2407e71ad2167797bec4542
(cherry picked from commit c9cd725f1013bed27e6f6594b176c10a6a4c0f16)
Diffstat (limited to 'tools/layoutlib/bridge/src')
-rw-r--r-- | tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java | 5 |
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; } } |