diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index e3eaadd2c66cb..4b377153e558e 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -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) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 188f216009254..c2da72bb666e2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -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; }