summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-05-24 03:47:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-05-24 03:47:27 +0000
commit3622bfdba08c665647d5eb8e90c6bf55a2885ec4 (patch)
tree744d6860be0828a5939100e9f075cf31d01eb7b3
parent24e913e5a84507f0c683ed492d87744c4b5e05af (diff)
parenta759496b94d2059adbb3e8d13c633cf37fe6309f (diff)
Merge "[Notif] Remove transient views on swipe out" into pi-dev
-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 0aa51c99c24b..7410069b09fa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -3293,6 +3293,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