Merge "Hide the task icon during quick switch from home" into tm-qpr-dev

This commit is contained in:
Tony Wickham
2022-07-26 00:43:55 +00:00
committed by Android (Google) Code Review
@@ -232,6 +232,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
mRecentsView.setFullscreenProgress(fromState.getOverviewFullscreenProgress()); mRecentsView.setFullscreenProgress(fromState.getOverviewFullscreenProgress());
mLauncher.getActionsView().getVisibilityAlpha().setValue( mLauncher.getActionsView().getVisibilityAlpha().setValue(
(fromState.getVisibleElements(mLauncher) & OVERVIEW_ACTIONS) != 0 ? 1f : 0f); (fromState.getVisibleElements(mLauncher) & OVERVIEW_ACTIONS) != 0 ? 1f : 0f);
mRecentsView.setTaskIconScaledDown(true);
float[] scaleAndOffset = toState.getOverviewScaleAndOffset(mLauncher); float[] scaleAndOffset = toState.getOverviewScaleAndOffset(mLauncher);
// As we drag right, animate the following properties: // As we drag right, animate the following properties:
@@ -321,6 +322,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
boolean verticalFling = mSwipeDetector.isFling(velocity.y); boolean verticalFling = mSwipeDetector.isFling(velocity.y);
boolean noFling = !horizontalFling && !verticalFling; boolean noFling = !horizontalFling && !verticalFling;
if (mMotionPauseDetector.isPaused() && noFling) { if (mMotionPauseDetector.isPaused() && noFling) {
// Going to Overview.
cancelAnimations(); cancelAnimations();
StateAnimationConfig config = new StateAnimationConfig(); StateAnimationConfig config = new StateAnimationConfig();
@@ -331,6 +333,8 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
onAnimationToStateCompleted(OVERVIEW); onAnimationToStateCompleted(OVERVIEW);
// Animate the icon after onAnimationToStateCompleted() so it doesn't clobber.
mRecentsView.animateUpTaskIconScale();
} }
}); });
overviewAnim.start(); overviewAnim.start();