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

Commit a9a28020 authored by Diego Perez's avatar Diego Perez Committed by Android (Google) Code Review
Browse files

Merge "Dispose font cache on bridge.dispose"

parents 4110be3a d7437d64
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.annotation.NonNull;
import android.content.res.BridgeAssetManager;
import android.graphics.Bitmap;
import android.graphics.FontFamily_Delegate;
import android.graphics.Typeface;
import android.graphics.Typeface_Delegate;
import android.icu.util.ULocale;
import android.os.Looper;
@@ -402,6 +403,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge {

        // dispose of the default typeface.
        Typeface_Delegate.resetDefaults();
        Typeface.sDynamicTypefaceCache.evictAll();

        return true;
    }
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ public class RenderTestBase {
        sFrameworkRepo = null;
        sProjectResources = null;
        sLogger = null;
        sBridge.dispose();
        sBridge = null;

        TestUtils.gc();
+2 −1
Original line number Diff line number Diff line
@@ -334,7 +334,8 @@ public final class CreateInfo implements ICreateInfo {
    private final static String[] PROMOTED_FIELDS = new String[] {
        "android.graphics.drawable.VectorDrawable#mVectorState",
        "android.view.Choreographer#mLastFrameTimeNanos",
        "android.graphics.FontFamily#mBuilderPtr"
        "android.graphics.FontFamily#mBuilderPtr",
        "android.graphics.Typeface#sDynamicTypefaceCache"
    };

    /**