Loading core/java/android/window/SplashScreenView.java +8 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ import com.android.internal.R; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.policy.DecorView; import java.io.Closeable; import java.io.IOException; import java.time.Duration; import java.time.Instant; import java.util.function.Consumer; Loading Loading @@ -568,6 +570,12 @@ public final class SplashScreenView extends FrameLayout { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); releaseAnimationSurfaceHost(); if (mIconView instanceof ImageView imageView && imageView.getDrawable() instanceof Closeable closeableDrawable) { try { closeableDrawable.close(); } catch (IOException ignore) { } } } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenIconDrawableFactory.java +12 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.window.SplashScreenView; import com.android.internal.R; import java.io.Closeable; import java.util.function.LongConsumer; /** Loading Loading @@ -100,7 +101,7 @@ public class SplashscreenIconDrawableFactory { * Drawable pre-drawing the scaled icon in a separate thread to increase the speed of the * final drawing. */ private static class ImmobileIconDrawable extends Drawable { private static class ImmobileIconDrawable extends Drawable implements Closeable { private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG); private final Matrix mMatrix = new Matrix(); Loading Loading @@ -154,6 +155,16 @@ public class SplashscreenIconDrawableFactory { public int getOpacity() { return 1; } @Override public void close() { synchronized (mPaint) { if (mIconBitmap != null) { mIconBitmap.recycle(); mIconBitmap = null; } } } } /** Loading Loading
core/java/android/window/SplashScreenView.java +8 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,8 @@ import com.android.internal.R; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.policy.DecorView; import java.io.Closeable; import java.io.IOException; import java.time.Duration; import java.time.Instant; import java.util.function.Consumer; Loading Loading @@ -568,6 +570,12 @@ public final class SplashScreenView extends FrameLayout { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); releaseAnimationSurfaceHost(); if (mIconView instanceof ImageView imageView && imageView.getDrawable() instanceof Closeable closeableDrawable) { try { closeableDrawable.close(); } catch (IOException ignore) { } } } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenIconDrawableFactory.java +12 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.window.SplashScreenView; import com.android.internal.R; import java.io.Closeable; import java.util.function.LongConsumer; /** Loading Loading @@ -100,7 +101,7 @@ public class SplashscreenIconDrawableFactory { * Drawable pre-drawing the scaled icon in a separate thread to increase the speed of the * final drawing. */ private static class ImmobileIconDrawable extends Drawable { private static class ImmobileIconDrawable extends Drawable implements Closeable { private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG); private final Matrix mMatrix = new Matrix(); Loading Loading @@ -154,6 +155,16 @@ public class SplashscreenIconDrawableFactory { public int getOpacity() { return 1; } @Override public void close() { synchronized (mPaint) { if (mIconBitmap != null) { mIconBitmap.recycle(); mIconBitmap = null; } } } } /** Loading