Merge "Make sure to clear outdated screenshot of splitting tasks" into tm-qpr-dev

This commit is contained in:
Winson Chung
2023-04-17 22:36:56 +00:00
committed by Android (Google) Code Review

View File

@@ -164,6 +164,10 @@ public class SplitDecorManager extends WindowlessWindowManager {
t.remove(mGapBackgroundLeash);
mGapBackgroundLeash = null;
}
if (mScreenshot != null) {
t.remove(mScreenshot);
mScreenshot = null;
}
mHostLeash = null;
mIcon = null;
mResizingIconView = null;
@@ -323,6 +327,8 @@ public class SplitDecorManager extends WindowlessWindowManager {
if (!mShown && mIsResizing && !mOldBounds.equals(mResizingBounds)) {
if (mScreenshotAnimator != null && mScreenshotAnimator.isRunning()) {
mScreenshotAnimator.cancel();
} else if (mScreenshot != null) {
t.remove(mScreenshot);
}
mTempRect.set(mOldBounds);
@@ -339,6 +345,8 @@ public class SplitDecorManager extends WindowlessWindowManager {
if (!mShown && mIsResizing && !mOldBounds.equals(mResizingBounds)) {
if (mScreenshotAnimator != null && mScreenshotAnimator.isRunning()) {
mScreenshotAnimator.cancel();
} else if (mScreenshot != null) {
t.remove(mScreenshot);
}
mScreenshot = screenshot;