summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-06-09 00:00:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-09 00:00:06 +0000
commit196597b7c09fce62276099292bb0e3d0572fe4a5 (patch)
tree7654cd9232ff40c3bdb3d203e9c32480f46ff42e /packages/SystemUI/src
parent8711ed644bab42c03ab9a22c14e1cb2825a107a6 (diff)
parent8f93763cf0f4b3c41f6b0ecac09b621eb0ca328b (diff)
downloadframeworks_base-196597b7c09fce62276099292bb0e3d0572fe4a5.zip
frameworks_base-196597b7c09fce62276099292bb0e3d0572fe4a5.tar.gz
frameworks_base-196597b7c09fce62276099292bb0e3d0572fe4a5.tar.bz2
Merge "Children which are removed when HUNd now animate out" into mnc-dev
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);
}