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

Commit e09cbb8b 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...

Merge "Fix issue where the notification could snap to the menu while its invisible" into oc-dev am: 043ae355
am: 86df7a65

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

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

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


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