From 651abb99245f31b054c4aeb8b5604d607df85fec Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Fri, 18 Jun 2021 15:39:36 -0700 Subject: [PATCH] Fix bug where workspace alpha does not get set to 1 when animation gets cancelled. - Can also remove QSB from app launch animator, since its in the hotseat now. Bug: 189458349 Test: manual Change-Id: Ib41376e3f8c58166c6ee6fbfed38bdd443663df4 --- .../android/launcher3/QuickstepTransitionManager.java | 2 -- .../com/android/quickstep/util/WorkspaceRevealAnim.java | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 31cf51c3b3..dd248e4e83 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -497,8 +497,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener view -> viewsToAnimate.add(((CellLayout) view).getShortcutsAndWidgets())); viewsToAnimate.add(mLauncher.getHotseat()); - // Add QSB - viewsToAnimate.add(mLauncher.findViewById(R.id.search_container_all_apps)); viewsToAnimate.forEach(view -> { view.setLayerType(View.LAYER_TYPE_HARDWARE, null); diff --git a/quickstep/src/com/android/quickstep/util/WorkspaceRevealAnim.java b/quickstep/src/com/android/quickstep/util/WorkspaceRevealAnim.java index 50da93b828..df94d0bee6 100644 --- a/quickstep/src/com/android/quickstep/util/WorkspaceRevealAnim.java +++ b/quickstep/src/com/android/quickstep/util/WorkspaceRevealAnim.java @@ -24,6 +24,7 @@ import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW; import static com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM; import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.view.View; @@ -98,6 +99,14 @@ public class WorkspaceRevealAnim { alpha.setDuration(DURATION_MS); alpha.setInterpolator(Interpolators.DECELERATED_EASE); mAnimators.play(alpha); + + mAnimators.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + SCALE_PROPERTY.set(v, 1f); + v.setAlpha(1f); + } + }); } /**