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

Commit 043ae355 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents c1d9cdfe 7a5b2b6d
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);