Loading quickstep/src/com/android/launcher3/uioverrides/TaskViewTouchController.java +1 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> fling = false; } float progress = mCurrentAnimation.getProgressFraction(); float interpolatedProgress = mCurrentAnimation.getInterpolator().getInterpolation(progress); float interpolatedProgress = mCurrentAnimation.getInterpolatedProgress(); if (fling) { logAction = Touch.FLING; boolean goingUp = velocity < 0; Loading quickstep/src/com/android/quickstep/ActivityControlHelper.java +8 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_ROTATION; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; Loading @@ -43,8 +44,7 @@ import android.os.Build; import android.os.Handler; import android.os.Looper; import android.view.View; import androidx.annotation.Nullable; import androidx.annotation.UiThread; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; Loading Loading @@ -77,6 +77,9 @@ import java.util.Objects; import java.util.function.BiPredicate; import java.util.function.Consumer; import androidx.annotation.Nullable; import androidx.annotation.UiThread; /** * Utility class which abstracts out the logical differences between Launcher and RecentsActivity. */ Loading Loading @@ -305,9 +308,10 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { AnimatorPlaybackController.wrap(anim, transitionLength * 2); // Since we are changing the start position of the UI, reapply the state, at the end controller.setEndAction(() -> controller.setEndAction(() -> { activity.getStateManager().goToState( controller.getProgressFraction() > 0.5 ? endState : fromState, false)); controller.getInterpolatedProgress() > 0.5 ? endState : fromState, false); }); callback.accept(controller); } Loading quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -825,6 +825,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { return; } if (start == end || duration <= 0) { mLauncherTransitionController.dispatchSetInterpolator(t -> end); mLauncherTransitionController.getAnimationPlayer().end(); } else { // Adjust start progress and duration in case we are on a different thread. Loading src/com/android/launcher3/anim/AnimatorPlaybackController.java +4 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,10 @@ public abstract class AnimatorPlaybackController implements ValueAnimator.Animat return mCurrentFraction; } public float getInterpolatedProgress() { return getInterpolator().getInterpolation(mCurrentFraction); } /** * Sets the action to be called when the animation is completed. Also clears any * previously set action. Loading src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -372,8 +372,7 @@ public abstract class AbstractStateChangeTouchController final LauncherState targetState; final float progress = mCurrentAnimation.getProgressFraction(); final float interpolatedProgress = mCurrentAnimation.getInterpolator() .getInterpolation(progress); final float interpolatedProgress = mCurrentAnimation.getInterpolatedProgress(); if (fling) { targetState = Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0 Loading Loading
quickstep/src/com/android/launcher3/uioverrides/TaskViewTouchController.java +1 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity> fling = false; } float progress = mCurrentAnimation.getProgressFraction(); float interpolatedProgress = mCurrentAnimation.getInterpolator().getInterpolation(progress); float interpolatedProgress = mCurrentAnimation.getInterpolatedProgress(); if (fling) { logAction = Touch.FLING; boolean goingUp = velocity < 0; Loading
quickstep/src/com/android/quickstep/ActivityControlHelper.java +8 −4 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK; import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_ROTATION; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; Loading @@ -43,8 +44,7 @@ import android.os.Build; import android.os.Handler; import android.os.Looper; import android.view.View; import androidx.annotation.Nullable; import androidx.annotation.UiThread; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; Loading Loading @@ -77,6 +77,9 @@ import java.util.Objects; import java.util.function.BiPredicate; import java.util.function.Consumer; import androidx.annotation.Nullable; import androidx.annotation.UiThread; /** * Utility class which abstracts out the logical differences between Launcher and RecentsActivity. */ Loading Loading @@ -305,9 +308,10 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { AnimatorPlaybackController.wrap(anim, transitionLength * 2); // Since we are changing the start position of the UI, reapply the state, at the end controller.setEndAction(() -> controller.setEndAction(() -> { activity.getStateManager().goToState( controller.getProgressFraction() > 0.5 ? endState : fromState, false)); controller.getInterpolatedProgress() > 0.5 ? endState : fromState, false); }); callback.accept(controller); } Loading
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -825,6 +825,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { return; } if (start == end || duration <= 0) { mLauncherTransitionController.dispatchSetInterpolator(t -> end); mLauncherTransitionController.getAnimationPlayer().end(); } else { // Adjust start progress and duration in case we are on a different thread. Loading
src/com/android/launcher3/anim/AnimatorPlaybackController.java +4 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,10 @@ public abstract class AnimatorPlaybackController implements ValueAnimator.Animat return mCurrentFraction; } public float getInterpolatedProgress() { return getInterpolator().getInterpolation(mCurrentFraction); } /** * Sets the action to be called when the animation is completed. Also clears any * previously set action. Loading
src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -372,8 +372,7 @@ public abstract class AbstractStateChangeTouchController final LauncherState targetState; final float progress = mCurrentAnimation.getProgressFraction(); final float interpolatedProgress = mCurrentAnimation.getInterpolator() .getInterpolation(progress); final float interpolatedProgress = mCurrentAnimation.getInterpolatedProgress(); if (fling) { targetState = Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0 Loading