summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-06-05 15:22:42 +0200
committerSelim Cinek <cinek@google.com>2015-06-05 15:22:42 +0200
commit8f93763cf0f4b3c41f6b0ecac09b621eb0ca328b (patch)
tree8a483687e8967b89da5b2a8436a80774eb97335a /packages/SystemUI/src
parent90975e38dd91df12e015b793f4b2a39051785041 (diff)
downloadframeworks_base-8f93763cf0f4b3c41f6b0ecac09b621eb0ca328b.zip
frameworks_base-8f93763cf0f4b3c41f6b0ecac09b621eb0ca328b.tar.gz
frameworks_base-8f93763cf0f4b3c41f6b0ecac09b621eb0ca328b.tar.bz2
Children which are removed when HUNd now animate out
Bug: 21652976 Change-Id: I7754cbc059e31e57b7b64ea4da7c6ccd9c8c7f04
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index eac5e79..c31244c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -96,6 +96,7 @@ public class StackStateAnimator {
private ExpandableNotificationRow mChildExpandingView;
private int mHeadsUpAppearHeightBottom;
private boolean mShadeExpanded;
+ private ArrayList<View> mChildrenToClearFromOverlay = new ArrayList<>();
public StackStateAnimator(NotificationStackScrollLayout hostLayout) {
mHostLayout = hostLayout;
@@ -794,6 +795,10 @@ public class StackStateAnimator {
private void onAnimationFinished() {
mHostLayout.onChildAnimationFinished();
+ for (View v : mChildrenToClearFromOverlay) {
+ mHostLayout.getOverlay().remove(v);
+ }
+ mChildrenToClearFromOverlay.clear();
}
/**
@@ -880,8 +885,20 @@ public class StackStateAnimator {
finalState.applyState(changingView, mTmpState);
} else if (event.animationType == NotificationStackScrollLayout
.AnimationEvent.ANIMATION_TYPE_HEADS_UP_DISAPPEAR) {
- // This item is added, initialize it's properties.
mHeadsUpDisappearChildren.add(changingView);
+ if (mHostLayout.indexOfChild(changingView) == -1) {
+ // This notification was actually removed, so we need to add it to the overlay
+ mHostLayout.getOverlay().add(changingView);
+ ViewState viewState = new ViewState();
+ viewState.initFrom(changingView);
+ viewState.yTranslation = -changingView.getActualHeight();
+ // We temporarily enable Y animations, the real filter will be combined
+ // afterwards anyway
+ mAnimationFilter.animateY = true;
+ startViewAnimations(changingView, viewState, 0,
+ ANIMATION_DURATION_HEADS_UP_DISAPPEAR);
+ mChildrenToClearFromOverlay.add(changingView);
+ }
}
mNewEvents.add(event);
}