summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2025-01-31 18:09:22 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-31 18:09:22 -0800
commit7f72fb6543b2243acbac1c078f6bc401f62953b1 (patch)
tree952355b40cd6994198f1531202fdfa97d6e9d09a
parent447da13d7932535988a94be35086e5b643d8e023 (diff)
parentff8b387710e42fff6eeaf714ae965806762a7704 (diff)
Merge "Revert "Make sure Bitmap for PiP overlay being recycled"" into main
-rw-r--r--libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/pip/PipContentOverlay.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/pip/PipContentOverlay.java b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/pip/PipContentOverlay.java
index 9f0c7322dfff..62ca5c687a2a 100644
--- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/pip/PipContentOverlay.java
+++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/pip/PipContentOverlay.java
@@ -169,8 +169,6 @@ public abstract class PipContentOverlay {
// The maximum size for app icon in pixel.
private static final int MAX_APP_ICON_SIZE_DP = 72;
- private static final long RECYCLE_BITMAP_TIMEOUT_MILLIS = 2_000;
-
private final Context mContext;
private final int mAppIconSizePx;
/**
@@ -233,12 +231,6 @@ public abstract class PipContentOverlay {
tx.setAlpha(mLeash, 0f);
tx.reparent(mLeash, parentLeash);
tx.apply();
-
- // Recycle the mBitmap as a last resort.
- if (mContext.getMainThreadHandler() != null) {
- mContext.getMainThreadHandler().postDelayed(
- this::safeRecycle, RECYCLE_BITMAP_TIMEOUT_MILLIS);
- }
}
@Override
@@ -264,10 +256,6 @@ public abstract class PipContentOverlay {
@Override
public void detach(SurfaceControl.Transaction tx) {
super.detach(tx);
- safeRecycle();
- }
-
- private void safeRecycle() {
if (mBitmap != null && !mBitmap.isRecycled()) {
mBitmap.recycle();
}