Loading core/api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -13379,7 +13379,8 @@ package android.content.res { method public void setTo(android.content.res.Resources.Theme); } public class TypedArray { public class TypedArray implements java.lang.AutoCloseable { method public void close(); method public boolean getBoolean(@StyleableRes int, boolean); method public int getChangingConfigurations(); method @ColorInt public int getColor(@StyleableRes int, @ColorInt int); core/java/android/content/res/TypedArray.java +12 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.Arrays; * The indices used to retrieve values from this structure correspond to * the positions of the attributes given to obtainStyledAttributes. */ public class TypedArray { public class TypedArray implements AutoCloseable { static TypedArray obtain(Resources res, int len) { TypedArray attrs = res.mTypedArrayPool.acquire(); Loading Loading @@ -1252,6 +1252,17 @@ public class TypedArray { mResources.mTypedArrayPool.release(this); } /** * Recycles the TypedArray, to be re-used by a later caller. After calling * this function you must not ever touch the typed array again. * * @see #recycle() * @throws RuntimeException if the TypedArray has already been recycled. */ public void close() { recycle(); } /** * Extracts theme attributes from a typed array for later resolution using * {@link android.content.res.Resources.Theme#resolveAttributes(int[], int[])}. Loading Loading
core/api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -13379,7 +13379,8 @@ package android.content.res { method public void setTo(android.content.res.Resources.Theme); } public class TypedArray { public class TypedArray implements java.lang.AutoCloseable { method public void close(); method public boolean getBoolean(@StyleableRes int, boolean); method public int getChangingConfigurations(); method @ColorInt public int getColor(@StyleableRes int, @ColorInt int);
core/java/android/content/res/TypedArray.java +12 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import java.util.Arrays; * The indices used to retrieve values from this structure correspond to * the positions of the attributes given to obtainStyledAttributes. */ public class TypedArray { public class TypedArray implements AutoCloseable { static TypedArray obtain(Resources res, int len) { TypedArray attrs = res.mTypedArrayPool.acquire(); Loading Loading @@ -1252,6 +1252,17 @@ public class TypedArray { mResources.mTypedArrayPool.release(this); } /** * Recycles the TypedArray, to be re-used by a later caller. After calling * this function you must not ever touch the typed array again. * * @see #recycle() * @throws RuntimeException if the TypedArray has already been recycled. */ public void close() { recycle(); } /** * Extracts theme attributes from a typed array for later resolution using * {@link android.content.res.Resources.Theme#resolveAttributes(int[], int[])}. Loading