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:
@@ -28,7 +28,6 @@ import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRES
|
||||
import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
|
||||
import static com.android.launcher3.LauncherState.BACKGROUND_APP;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DURATION;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.SPLIT_LAUNCH_DURATION;
|
||||
import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
|
||||
import static com.android.launcher3.Utilities.mapToRange;
|
||||
import static com.android.launcher3.Utilities.squaredHypot;
|
||||
@@ -3987,14 +3986,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
splitSelectSource.position.stagePosition);
|
||||
}
|
||||
|
||||
public PendingAnimation createSplitSelectInitAnimation() {
|
||||
public PendingAnimation createSplitSelectInitAnimation(int duration) {
|
||||
if (mSplitHiddenTaskView != null) {
|
||||
int duration = mActivity.getStateManager().getState().getTransitionDuration(
|
||||
getContext());
|
||||
return createTaskDismissAnimation(mSplitHiddenTaskView, true, false, duration,
|
||||
true /* dismissingForSplitSelection*/);
|
||||
} else {
|
||||
PendingAnimation anim = new PendingAnimation(SPLIT_LAUNCH_DURATION);
|
||||
PendingAnimation anim = new PendingAnimation(duration);
|
||||
createInitialSplitSelectAnimation(anim);
|
||||
return anim;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user