diff options
author | Alan Viverette <alanv@google.com> | 2015-05-08 11:04:47 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-05-08 11:04:47 -0700 |
commit | ac67409582aafd7c3f3f58a79b7b3292221a88b8 (patch) | |
tree | 594826860baf9cb0473eff1f10d91a1c519b0d27 /core | |
parent | e1a1d2e85a3f0626ae13322998fd45a1eb4a49d7 (diff) | |
download | frameworks_base-ac67409582aafd7c3f3f58a79b7b3292221a88b8.zip frameworks_base-ac67409582aafd7c3f3f58a79b7b3292221a88b8.tar.gz frameworks_base-ac67409582aafd7c3f3f58a79b7b3292221a88b8.tar.bz2 |
Use correct array index for Theme.getTheme()
Change-Id: Ic462a7b8a81bb87bf08136bb30e3432f10269918
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/content/res/Resources.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index e65b4ca..a572590 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -1804,8 +1804,8 @@ public class Resources { final int N = mKey.mCount; final String[] themes = new String[N * 2]; for (int i = 0, j = N - 1; i < themes.length; i += 2, --j) { - final int resId = mKey.mResId[i]; - final boolean forced = mKey.mForce[i]; + final int resId = mKey.mResId[j]; + final boolean forced = mKey.mForce[j]; try { themes[i] = getResourceName(resId); } catch (NotFoundException e) { @@ -1819,8 +1819,7 @@ public class Resources { /** @hide */ public void encode(@NonNull ViewHierarchyEncoder encoder) { encoder.beginObject(this); - // TODO: revert after getTheme() is fixed - String[] properties = new String[0]; // getTheme(); + final String[] properties = getTheme(); for (int i = 0; i < properties.length; i += 2) { encoder.addProperty(properties[i], properties[i+1]); } |