Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +17 −10 Original line number Diff line number Diff line Loading @@ -1898,8 +1898,15 @@ public class NotificationStackScrollLayout extends ViewGroup boolean pinnedAndClosed = row.isPinned() && !mIsExpanded; if (!mIsExpanded && !isHeadsUp) { type = AnimationEvent.ANIMATION_TYPE_HEADS_UP_DISAPPEAR; } else if (isHeadsUp && (mAddedHeadsUpChildren.contains(row) || pinnedAndClosed)) { if (pinnedAndClosed || shouldHunAppearFromBottom(row)) { } else { StackViewState viewState = mCurrentStackScrollState.getViewStateForView(row); if (viewState == null) { // A view state was never generated for this view, so we don't need to animate // this. This may happen with notification children. continue; } if (isHeadsUp && (mAddedHeadsUpChildren.contains(row) || pinnedAndClosed)) { if (pinnedAndClosed || shouldHunAppearFromBottom(viewState)) { // Our custom add animation type = AnimationEvent.ANIMATION_TYPE_HEADS_UP_APPEAR; } else { Loading @@ -1908,6 +1915,7 @@ public class NotificationStackScrollLayout extends ViewGroup } onBottom = !pinnedAndClosed; } } AnimationEvent event = new AnimationEvent(row, type); event.headsUpFromBottom = onBottom; mAnimationEvents.add(event); Loading @@ -1916,8 +1924,7 @@ public class NotificationStackScrollLayout extends ViewGroup mAddedHeadsUpChildren.clear(); } private boolean shouldHunAppearFromBottom(ExpandableNotificationRow row) { StackViewState viewState = mCurrentStackScrollState.getViewStateForView(row); private boolean shouldHunAppearFromBottom(StackViewState viewState) { if (viewState.yTranslation + viewState.height < mAmbientState.getMaxHeadsUpTranslation()) { return false; } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +3 −4 Original line number Diff line number Diff line Loading @@ -893,13 +893,12 @@ public class StackStateAnimator { 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(); mTmpState.initFrom(changingView); mTmpState.yTranslation = -changingView.getActualHeight(); // We temporarily enable Y animations, the real filter will be combined // afterwards anyway mAnimationFilter.animateY = true; startViewAnimations(changingView, viewState, 0, startViewAnimations(changingView, mTmpState, 0, ANIMATION_DURATION_HEADS_UP_DISAPPEAR); mChildrenToClearFromOverlay.add(changingView); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +17 −10 Original line number Diff line number Diff line Loading @@ -1898,8 +1898,15 @@ public class NotificationStackScrollLayout extends ViewGroup boolean pinnedAndClosed = row.isPinned() && !mIsExpanded; if (!mIsExpanded && !isHeadsUp) { type = AnimationEvent.ANIMATION_TYPE_HEADS_UP_DISAPPEAR; } else if (isHeadsUp && (mAddedHeadsUpChildren.contains(row) || pinnedAndClosed)) { if (pinnedAndClosed || shouldHunAppearFromBottom(row)) { } else { StackViewState viewState = mCurrentStackScrollState.getViewStateForView(row); if (viewState == null) { // A view state was never generated for this view, so we don't need to animate // this. This may happen with notification children. continue; } if (isHeadsUp && (mAddedHeadsUpChildren.contains(row) || pinnedAndClosed)) { if (pinnedAndClosed || shouldHunAppearFromBottom(viewState)) { // Our custom add animation type = AnimationEvent.ANIMATION_TYPE_HEADS_UP_APPEAR; } else { Loading @@ -1908,6 +1915,7 @@ public class NotificationStackScrollLayout extends ViewGroup } onBottom = !pinnedAndClosed; } } AnimationEvent event = new AnimationEvent(row, type); event.headsUpFromBottom = onBottom; mAnimationEvents.add(event); Loading @@ -1916,8 +1924,7 @@ public class NotificationStackScrollLayout extends ViewGroup mAddedHeadsUpChildren.clear(); } private boolean shouldHunAppearFromBottom(ExpandableNotificationRow row) { StackViewState viewState = mCurrentStackScrollState.getViewStateForView(row); private boolean shouldHunAppearFromBottom(StackViewState viewState) { if (viewState.yTranslation + viewState.height < mAmbientState.getMaxHeadsUpTranslation()) { return false; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +3 −4 Original line number Diff line number Diff line Loading @@ -893,13 +893,12 @@ public class StackStateAnimator { 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(); mTmpState.initFrom(changingView); mTmpState.yTranslation = -changingView.getActualHeight(); // We temporarily enable Y animations, the real filter will be combined // afterwards anyway mAnimationFilter.animateY = true; startViewAnimations(changingView, viewState, 0, startViewAnimations(changingView, mTmpState, 0, ANIMATION_DURATION_HEADS_UP_DISAPPEAR); mChildrenToClearFromOverlay.add(changingView); } Loading