Loading core/java/android/content/res/TypedArray.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,10 @@ public class TypedArray { attrs.mLength = len; attrs.mLength = len; attrs.mRecycled = false; attrs.mRecycled = false; // Reset the assets, which may have changed due to configuration changes // or further resource loading. attrs.mAssets = res.getAssets(); final int fullLen = len * AssetManager.STYLE_NUM_ENTRIES; final int fullLen = len * AssetManager.STYLE_NUM_ENTRIES; if (attrs.mData.length >= fullLen) { if (attrs.mData.length >= fullLen) { return attrs; return attrs; Loading @@ -66,7 +70,7 @@ public class TypedArray { private final Resources mResources; private final Resources mResources; private final DisplayMetrics mMetrics; private final DisplayMetrics mMetrics; private final AssetManager mAssets; private AssetManager mAssets; private boolean mRecycled; private boolean mRecycled; Loading Loading @@ -1086,6 +1090,7 @@ public class TypedArray { // These may have been set by the client. // These may have been set by the client. mXml = null; mXml = null; mTheme = null; mTheme = null; mAssets = null; mResources.mTypedArrayPool.release(this); mResources.mTypedArrayPool.release(this); } } Loading Loading
core/java/android/content/res/TypedArray.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,10 @@ public class TypedArray { attrs.mLength = len; attrs.mLength = len; attrs.mRecycled = false; attrs.mRecycled = false; // Reset the assets, which may have changed due to configuration changes // or further resource loading. attrs.mAssets = res.getAssets(); final int fullLen = len * AssetManager.STYLE_NUM_ENTRIES; final int fullLen = len * AssetManager.STYLE_NUM_ENTRIES; if (attrs.mData.length >= fullLen) { if (attrs.mData.length >= fullLen) { return attrs; return attrs; Loading @@ -66,7 +70,7 @@ public class TypedArray { private final Resources mResources; private final Resources mResources; private final DisplayMetrics mMetrics; private final DisplayMetrics mMetrics; private final AssetManager mAssets; private AssetManager mAssets; private boolean mRecycled; private boolean mRecycled; Loading Loading @@ -1086,6 +1090,7 @@ public class TypedArray { // These may have been set by the client. // These may have been set by the client. mXml = null; mXml = null; mTheme = null; mTheme = null; mAssets = null; mResources.mTypedArrayPool.release(this); mResources.mTypedArrayPool.release(this); } } Loading