Fix bugs with quickstep springs.
* Listeners weren't getting called properly. We add one listener to the SpringbjectAnimator and then use that to dispatch to the other listeners. * We fast finish on both double swipe cases to prevent the shelf from ending in an invalid state. This causes a visual jump but this can be addressed in follow up CL. Bug: 111698021 Change-Id: Ifeb55da9dd253d062122a8e1577f94044f688641
This commit is contained in:
1 parent
e0c5f5d0ab
commit
f82fd49244
3 files changed
+50
-7
No files matched your search
@@ -25,6 +25,7 @@ import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRE
|
||||
import static com.android.launcher3.anim.Interpolators.ACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
|
||||
|
||||
import android.animation.TimeInterpolator;
|
||||
import android.animation.ValueAnimator;
|
||||
@@ -82,7 +83,7 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
|
||||
if (mCurrentAnimation != null) {
|
||||
if (mFinishFastOnSecondTouch) {
|
||||
// TODO: Animate to finish instead.
|
||||
mCurrentAnimation.getAnimationPlayer().end();
|
||||
mCurrentAnimation.skipToEnd();
|
||||
}
|
||||
|
||||
AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
|
||||
@@ -241,7 +242,10 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
|
||||
private void handleFirstSwipeToOverview(final ValueAnimator animator,
|
||||
final long expectedDuration, final LauncherState targetState, final float velocity,
|
||||
final boolean isFling) {
|
||||
if (mFromState == NORMAL && mToState == OVERVIEW && targetState == OVERVIEW) {
|
||||
if (QUICKSTEP_SPRINGS.get() && mFromState == OVERVIEW && mToState == ALL_APPS
|
||||
&& targetState == OVERVIEW) {
|
||||
mFinishFastOnSecondTouch = true;
|
||||
} else if (mFromState == NORMAL && mToState == OVERVIEW && targetState == OVERVIEW) {
|
||||
mFinishFastOnSecondTouch = true;
|
||||
if (isFling && expectedDuration != 0) {
|
||||
// Update all apps interpolator to add a bit of overshoot starting from currFraction
|
||||
|
||||
Reference in new issue
Block a user