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

Commit b2e0f33e authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where a removed notification would stick around

Because we going back to the keyguard, the translation was
reset and the callback would not be called, leaving us with
a stuck notification.

Test: have only 1 notification in shade locked an swipe it away after doing a half-swipe first
Change-Id: Iea2db4ff7efa2e84aa36cd13cfa8cfa1859d6892
Fixes: 64762751
parent d836c4f8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -439,7 +439,12 @@ public class SwipeHelper implements Gefingerpoken {
            public void onAnimationEnd(Animator animation) {
                updateSwipeProgressFromOffset(animView, canBeDismissed);
                mDismissPendingMap.remove(animView);
                if (!mCancelled) {
                boolean wasRemoved = false;
                if (animView instanceof ExpandableNotificationRow) {
                    ExpandableNotificationRow row = (ExpandableNotificationRow) animView;
                    wasRemoved = row.isRemoved();
                }
                if (!mCancelled || wasRemoved) {
                    mCallback.onChildDismissed(animView);
                }
                if (endAction != null) {
+4 −1
Original line number Diff line number Diff line
@@ -4539,7 +4539,10 @@ public class NotificationStackScrollLayout extends ViewGroup
                    anim.start();
                }
            } else if (mMenuExposedView instanceof ExpandableNotificationRow) {
                ((ExpandableNotificationRow) mMenuExposedView).resetTranslation();
                ExpandableNotificationRow row = (ExpandableNotificationRow) mMenuExposedView;
                if (!row.isRemoved()) {
                    row.resetTranslation();
                }
            }
            mMenuExposedView = null;
        }