Merge "Don't call TaskView.onRecycle when moving focused task to front" into sc-v2-dev am: 874d9aff0e am: 8911425fdd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15502872
Change-Id: I29e5058092c2d686fa7c44bbb22c9e2127e1b7c3
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 935305a..26664de 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1172,7 +1172,7 @@
mMovingTaskView = focusedTaskView;
removeView(focusedTaskView);
mMovingTaskView = null;
- focusedTaskView.onRecycle();
+ focusedTaskView.resetPersistentViewTransforms();
addView(focusedTaskView, mTaskViewStartIndex);
setCurrentPage(mTaskViewStartIndex);
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index 02c5d84..29810e3 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -871,6 +871,12 @@
setIconAndDimTransitionProgress(iconScale, invert);
}
+ protected void resetPersistentViewTransforms() {
+ mNonGridTranslationX = mNonGridTranslationY =
+ mGridTranslationX = mGridTranslationY = mBoxTranslationY = 0f;
+ resetViewTransforms();
+ }
+
protected void resetViewTransforms() {
// fullscreenTranslation and accumulatedTranslation should not be reset, as
// resetViewTransforms is called during Quickswitch scrolling.
@@ -894,9 +900,7 @@
@Override
public void onRecycle() {
- mNonGridTranslationX = mNonGridTranslationY =
- mGridTranslationX = mGridTranslationY = mBoxTranslationY = 0f;
- resetViewTransforms();
+ resetPersistentViewTransforms();
// Clear any references to the thumbnail (it will be re-read either from the cache or the
// system on next bind)
mSnapshotView.setThumbnail(mTask, null);