Fix wrong initial staged split position

This is caused by having set a wrong animation duration in the 3 button case. Before this change we have a fixed duration of 370ms which happens to be almost match the Overview transtion duration in gesture nav. However the transition duration in 3-button is set to 250ms. After the transition duration, any unfinished animation is cancelled including this one, resulting in the wrong staged split position. Instead this change pulls the transition duration of toState from the caller = RecentsViewStateController.

Fixes: 222210349
Test: manual
Change-Id: Ie2f3dbe38bb6df33961e2ee78b8a55d0e925501f
This commit is contained in:
Tracy Zhou
2022-03-09 14:39:49 -08:00
parent 3c8277d161
commit dd2bea9e70
3 changed files with 6 additions and 8 deletions

View File

@@ -118,8 +118,8 @@ public final class RecentsViewStateController extends
if (isSplitSelectionState(currentState, toState)) {
// Animation to "dismiss" selected taskView
PendingAnimation splitSelectInitAnimation =
mRecentsView.createSplitSelectInitAnimation();
PendingAnimation splitSelectInitAnimation = mRecentsView.createSplitSelectInitAnimation(
toState.getTransitionDuration(mLauncher));
// Add properties to shift remaining taskViews to get out of placeholder view
splitSelectInitAnimation.setFloat(mRecentsView, taskViewsFloat.first,
toState.getSplitSelectTranslation(mLauncher), LINEAR);