Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d53abec authored by Adam Lesinski's avatar Adam Lesinski Committed by android-build-merger
Browse files

Merge \\"Don\\'t hold on to AssetManager instances\\" into nyc-dev am: f8e99e72

am: 165e9d92

Change-Id: I184f3508fd602409d01f105500693b5d02ab37a3
parents 35dc9267 165e9d92
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -49,6 +49,10 @@ public class TypedArray {
            attrs.mLength = len;
            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;
            if (attrs.mData.length >= fullLen) {
                return attrs;
@@ -66,7 +70,7 @@ public class TypedArray {

    private final Resources mResources;
    private final DisplayMetrics mMetrics;
    private final AssetManager mAssets;
    private AssetManager mAssets;

    private boolean mRecycled;

@@ -1086,6 +1090,7 @@ public class TypedArray {
        // These may have been set by the client.
        mXml = null;
        mTheme = null;
        mAssets = null;

        mResources.mTypedArrayPool.release(this);
    }