Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d81e0c4 authored by Jon Miranda's avatar Jon Miranda Committed by Automerger Merge Worker
Browse files

Merge "Fix bug where taskbar jumps when double swiping up." into tm-qpr-dev...

Merge "Fix bug where taskbar jumps when double swiping up." into tm-qpr-dev am: 9e593747 am: d98af9ae

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22184665



Change-Id: I67dcbba4574d47dc38c79fde5d4022f3b70292f0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a2871844 d98af9ae
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -76,12 +76,11 @@ public class TaskbarTranslationController implements TaskbarControllers.Loggable
    /**
     * Called to cancel any existing animations.
     */
    public void cancelAnimationIfExists() {
    public void cancelSpringIfExists() {
        if (mSpringBounce != null) {
            mSpringBounce.cancel();
            mSpringBounce = null;
        }
        reset();
    }

    private void updateTranslationYForSwipe() {
@@ -144,7 +143,8 @@ public class TaskbarTranslationController implements TaskbarControllers.Loggable
        animator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationStart(Animator animation) {
                cancelAnimationIfExists();
                cancelSpringIfExists();
                reset();
                mAnimationToHomeRunning = true;
            }

@@ -162,6 +162,18 @@ public class TaskbarTranslationController implements TaskbarControllers.Loggable
     */
    public class TransitionCallback {

        /**
         * Clears any existing animations so that user
         * can take control over the movement of the taskbaer.
         */
        public void onActionDown() {
            if (mAnimationToHomeRunning) {
                mTranslationYForSwipe.cancelAnimation();
            }
            mAnimationToHomeRunning = false;
            cancelSpringIfExists();
            reset();
        }
        /**
         * Called when there is movement to move the taskbar.
         */
+4 −0
Original line number Diff line number Diff line
@@ -128,6 +128,10 @@ public class TaskbarStashInputConsumer extends DelegateInputConsumer {
                                mCanceledUnstashHint = false;
                            }
                        }

                        if (mTransitionCallback != null && !mIsTaskbarAllAppsOpen) {
                            mTransitionCallback.onActionDown();
                        }
                        break;
                    case MotionEvent.ACTION_POINTER_UP:
                        int ptrIdx = ev.getActionIndex();