Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +2 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ public class NavBarToHomeTouchController implements TouchController, } } anim.setDuration(accuracy); mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy, this::clearState); mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy) .setOnCancelRunnable(this::clearState); } private void clearState() { Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +3 −4 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, xOverviewAnim.setFloatValues(startXProgress, endXProgress); xOverviewAnim.setDuration(xDuration) .setInterpolator(scrollInterpolatorForVelocity(velocity.x)); mXOverviewAnim.dispatchOnStartWithVelocity(endXProgress, velocity.x); mXOverviewAnim.dispatchOnStart(); boolean flingUpToNormal = verticalFling && velocity.y < 0 && targetState == NORMAL; Loading @@ -414,7 +414,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, ValueAnimator yOverviewAnim = mYOverviewAnim.getAnimationPlayer(); yOverviewAnim.setFloatValues(startYProgress, endYProgress); yOverviewAnim.setDuration(yDuration); mYOverviewAnim.dispatchOnStartWithVelocity(endYProgress, velocity.y); mYOverviewAnim.dispatchOnStart(); ValueAnimator nonOverviewAnim = mNonOverviewAnim.getAnimationPlayer(); if (flingUpToNormal && !mIsHomeScreenVisible) { Loading @@ -436,8 +436,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, float startProgress = mNonOverviewAnim.getProgressFraction(); float endProgress = canceled ? 0 : 1; nonOverviewAnim.setFloatValues(startProgress, endProgress); mNonOverviewAnim.dispatchOnStartWithVelocity(endProgress, horizontalFling ? velocity.x : velocity.y); mNonOverviewAnim.dispatchOnStart(); } nonOverviewAnim.setDuration(Math.max(xDuration, yDuration)); Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import android.view.MotionEvent; import android.view.animation.Interpolator; import com.android.launcher3.Launcher; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.anim.PendingAnimation; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java +6 −20 Original line number Diff line number Diff line Loading @@ -16,17 +16,13 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE; import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE; import static com.android.launcher3.util.DefaultDisplay.getSingleFrameMs; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.view.MotionEvent; import com.android.launcher3.AbstractFloatingView; Loading @@ -35,12 +31,12 @@ import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.touch.BaseSwipeDetector; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.SingleAxisSwipeDetector; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.util.FlingBlockCheck; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.util.TouchController; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.SysUINavigationMode; Loading Loading @@ -218,8 +214,8 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> if (mCurrentAnimation != null) { mCurrentAnimation.setOnCancelRunnable(null); } mCurrentAnimation = AnimatorPlaybackController.wrap( mPendingAnimation.anim, maxDuration, this::clearState); mCurrentAnimation = AnimatorPlaybackController.wrap(mPendingAnimation, maxDuration) .setOnCancelRunnable(this::clearState); onUserControlledAnimationCreated(mCurrentAnimation); mCurrentAnimation.getTarget().addListener(this); mCurrentAnimation.dispatchOnStart(); Loading Loading @@ -288,26 +284,16 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity); } float nextFrameProgress = Utilities.boundToRange(progress + velocity * getSingleFrameMs(mActivity) / Math.abs(mEndDisplacement), 0f, 1f); mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction)); ValueAnimator anim = mCurrentAnimation.getAnimationPlayer(); anim.setFloatValues(nextFrameProgress, goingToEnd ? 1f : 0f); anim.setDuration(animationDuration); anim.setInterpolator(scrollInterpolatorForVelocity(velocity)); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { anim.addUpdateListener(valueAnimator -> { mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> { if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) { mRecentsView.redrawLiveTile(true); } }); } if (UNSTABLE_SPRINGS.get()) { mCurrentAnimation.dispatchOnStartWithVelocity(goingToEnd ? 1f : 0f, velocity); } anim.start(); mCurrentAnimation.startWithVelocity(mActivity, goingToEnd, velocity, mEndDisplacement, animationDuration); } private void onCurrentAnimationEnd(boolean wasSuccess, int logAction) { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -1000,7 +1000,7 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> mLauncherTransitionController.getAnimationPlayer().setDuration(Math.max(0, duration)); if (UNSTABLE_SPRINGS.get()) { mLauncherTransitionController.dispatchOnStartWithVelocity(end, velocityPxPerMs.y); mLauncherTransitionController.dispatchOnStart(); } mLauncherTransitionController.getAnimationPlayer().start(); mHasLauncherTransitionControllerStarted = true; Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NavBarToHomeTouchController.java +2 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ public class NavBarToHomeTouchController implements TouchController, } } anim.setDuration(accuracy); mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy, this::clearState); mCurrentAnimation = AnimatorPlaybackController.wrap(anim, accuracy) .setOnCancelRunnable(this::clearState); } private void clearState() { Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +3 −4 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, xOverviewAnim.setFloatValues(startXProgress, endXProgress); xOverviewAnim.setDuration(xDuration) .setInterpolator(scrollInterpolatorForVelocity(velocity.x)); mXOverviewAnim.dispatchOnStartWithVelocity(endXProgress, velocity.x); mXOverviewAnim.dispatchOnStart(); boolean flingUpToNormal = verticalFling && velocity.y < 0 && targetState == NORMAL; Loading @@ -414,7 +414,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, ValueAnimator yOverviewAnim = mYOverviewAnim.getAnimationPlayer(); yOverviewAnim.setFloatValues(startYProgress, endYProgress); yOverviewAnim.setDuration(yDuration); mYOverviewAnim.dispatchOnStartWithVelocity(endYProgress, velocity.y); mYOverviewAnim.dispatchOnStart(); ValueAnimator nonOverviewAnim = mNonOverviewAnim.getAnimationPlayer(); if (flingUpToNormal && !mIsHomeScreenVisible) { Loading @@ -436,8 +436,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController, float startProgress = mNonOverviewAnim.getProgressFraction(); float endProgress = canceled ? 0 : 1; nonOverviewAnim.setFloatValues(startProgress, endProgress); mNonOverviewAnim.dispatchOnStartWithVelocity(endProgress, horizontalFling ? velocity.x : velocity.y); mNonOverviewAnim.dispatchOnStart(); } nonOverviewAnim.setDuration(Math.max(xDuration, yDuration)); Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import android.view.MotionEvent; import android.view.animation.Interpolator; import com.android.launcher3.Launcher; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.anim.PendingAnimation; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewTouchController.java +6 −20 Original line number Diff line number Diff line Loading @@ -16,17 +16,13 @@ package com.android.launcher3.uioverrides.touchcontrollers; import static com.android.launcher3.AbstractFloatingView.TYPE_ACCESSIBLE; import static com.android.launcher3.anim.Interpolators.scrollInterpolatorForVelocity; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_BOTH; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE; import static com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_POSITIVE; import static com.android.launcher3.util.DefaultDisplay.getSingleFrameMs; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.view.MotionEvent; import com.android.launcher3.AbstractFloatingView; Loading @@ -35,12 +31,12 @@ import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.touch.BaseSwipeDetector; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.SingleAxisSwipeDetector; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.util.FlingBlockCheck; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.util.TouchController; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.SysUINavigationMode; Loading Loading @@ -218,8 +214,8 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> if (mCurrentAnimation != null) { mCurrentAnimation.setOnCancelRunnable(null); } mCurrentAnimation = AnimatorPlaybackController.wrap( mPendingAnimation.anim, maxDuration, this::clearState); mCurrentAnimation = AnimatorPlaybackController.wrap(mPendingAnimation, maxDuration) .setOnCancelRunnable(this::clearState); onUserControlledAnimationCreated(mCurrentAnimation); mCurrentAnimation.getTarget().addListener(this); mCurrentAnimation.dispatchOnStart(); Loading Loading @@ -288,26 +284,16 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity); } float nextFrameProgress = Utilities.boundToRange(progress + velocity * getSingleFrameMs(mActivity) / Math.abs(mEndDisplacement), 0f, 1f); mCurrentAnimation.setEndAction(() -> onCurrentAnimationEnd(goingToEnd, logAction)); ValueAnimator anim = mCurrentAnimation.getAnimationPlayer(); anim.setFloatValues(nextFrameProgress, goingToEnd ? 1f : 0f); anim.setDuration(animationDuration); anim.setInterpolator(scrollInterpolatorForVelocity(velocity)); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { anim.addUpdateListener(valueAnimator -> { mCurrentAnimation.getAnimationPlayer().addUpdateListener(valueAnimator -> { if (mRecentsView.getCurrentPage() != 0 || mCurrentAnimationIsGoingUp) { mRecentsView.redrawLiveTile(true); } }); } if (UNSTABLE_SPRINGS.get()) { mCurrentAnimation.dispatchOnStartWithVelocity(goingToEnd ? 1f : 0f, velocity); } anim.start(); mCurrentAnimation.startWithVelocity(mActivity, goingToEnd, velocity, mEndDisplacement, animationDuration); } private void onCurrentAnimationEnd(boolean wasSuccess, int logAction) { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -1000,7 +1000,7 @@ public class LauncherSwipeHandler<T extends BaseDraggingActivity> mLauncherTransitionController.getAnimationPlayer().setDuration(Math.max(0, duration)); if (UNSTABLE_SPRINGS.get()) { mLauncherTransitionController.dispatchOnStartWithVelocity(end, velocityPxPerMs.y); mLauncherTransitionController.dispatchOnStart(); } mLauncherTransitionController.getAnimationPlayer().start(); mHasLauncherTransitionControllerStarted = true; Loading