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

Commit 86df7a65 authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

Merge "Fix issue where the notification could snap to the menu while its invisible" into oc-dev

am: 043ae355

Change-Id: I0f7d6ba47b6bacd2002a97b89b5c2bf5102ae9e7
parents c69c1aaf 043ae355
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -462,12 +462,21 @@ public class SwipeHelper implements Gefingerpoken {
        int duration = SNAP_ANIM_LEN;
        anim.setDuration(duration);
        anim.addListener(new AnimatorListenerAdapter() {
            boolean wasCancelled = false;

            @Override
            public void onAnimationCancel(Animator animator) {
                wasCancelled = true;
            }

            @Override
            public void onAnimationEnd(Animator animator) {
                mSnappingChild = false;
                if (!wasCancelled) {
                    updateSwipeProgressFromOffset(animView, canBeDismissed);
                    mCallback.onChildSnappedBack(animView, targetLeft);
                }
            }
        });
        prepareSnapBackAnimation(animView, anim);
        mSnappingChild = true;
+4 −0
Original line number Diff line number Diff line
@@ -317,6 +317,10 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
    }

    private void dismiss(View animView, float velocity) {
        if (mFadeAnimator != null) {
            mFadeAnimator.cancel();
        }
        mHandler.removeCallbacks(mCheckForDrag);
        mMenuSnappedTo = false;
        mDismissing = true;
        mSwipeHelper.dismiss(animView, velocity);