From 67bc75a8a923feb85560c29bcbdd6b237f66e238 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Tue, 22 Mar 2022 15:42:03 -0700 Subject: [PATCH] Fix thumbnail disappearing during staged split animation Previous set the thumbnail view to be visible initially. After deciding not to do so, forgot to put the visibility statement back. Also the transform matrix needs to reset before posting new scales. Test: https://recall.googleplex.com/projects/f46cfe9c-8076-4efe-bf8a-b1cc4f1f5e1b/sessions/6576df3a-6d14-4b7e-8fb2-1c0a335472e4 Fixes: 194414938 Change-Id: I25fe39ea99943a3c1e2257681df3eb379bc30e51 --- .../com/android/quickstep/views/FloatingTaskThumbnailView.java | 1 + quickstep/src/com/android/quickstep/views/FloatingTaskView.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/FloatingTaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/FloatingTaskThumbnailView.java index 98e50f6b93..d869fed37e 100644 --- a/quickstep/src/com/android/quickstep/views/FloatingTaskThumbnailView.java +++ b/quickstep/src/com/android/quickstep/views/FloatingTaskThumbnailView.java @@ -62,6 +62,7 @@ public class FloatingTaskThumbnailView extends View { // Scale down the bitmap to fix x, and crop in y. float scale = 1.0f * getMeasuredWidth() / mBitmap.getWidth(); + mMatrix.reset(); mMatrix.postScale(scale, scale); mBitmapShader.setLocalMatrix(mMatrix); diff --git a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java index 93a3a9f4bb..fe5e1d0d57 100644 --- a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java +++ b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java @@ -91,6 +91,8 @@ public class FloatingTaskView extends FrameLayout { // Copy bounds of exiting thumbnail into ImageView mThumbnailView.setThumbnail(thumbnail); + mThumbnailView.setVisibility(VISIBLE); + RecentsView recentsView = launcher.getOverviewPanel(); mOrientationHandler = recentsView.getPagedOrientationHandler(); mSplitPlaceholderView.setIcon(icon,