Merge "Fixed a bug where a removed notification would stick around" into oc-mr1-dev am: ba55894ec8

am: 988ef15c33

Change-Id: Ib0faa3d5e717c9ffa86bc719faff261c448765a8
This commit is contained in:
Selim Cinek
2017-08-18 22:35:25 +00:00
committed by android-build-merger
2 changed files with 10 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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;
}