summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rohan Shah <shahrk@google.com> 2018-05-22 10:59:30 -0700
committer Rohan Shah <shahrk@google.com> 2018-05-23 17:10:43 -0700
commita759496b94d2059adbb3e8d13c633cf37fe6309f (patch)
tree8ae0ed50eca919ee7e033874ec098847a4561b6d
parentc4da4d494b51854a3c22dbeda67ade6726ef2e15 (diff)
[Notif] Remove transient views on swipe out
We are not removing transient views for the 'swiped out' animation. Utilizing the transient view cleanup in onAnimationFinished to handle this better. Test: Manually Bug: 79896012 Change-Id: I3c169815433e34795472264de30ff23b3d744269
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java10
1 files changed, 10 insertions, 0 deletions
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 dc4b697cbdbe..5fe3c6c32388 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -3290,6 +3290,16 @@ public class NotificationStackScrollLayout extends ViewGroup
if (!childWasSwipedOut) {
Rect clipBounds = child.getClipBounds();
childWasSwipedOut = clipBounds != null && clipBounds.height() == 0;
+
+ if (childWasSwipedOut && child instanceof ExpandableView) {
+ // Clean up any potential transient views if the child has already been swiped
+ // out, as we won't be animating it further (due to its height already being
+ // clipped to 0.
+ ViewGroup transientContainer = ((ExpandableView) child).getTransientContainer();
+ if (transientContainer != null) {
+ transientContainer.removeTransientView(child);
+ }
+ }
}
int animationType = childWasSwipedOut
? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT