diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index e8e9d4ebec6f1..637f9a780a1fc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -388,12 +388,13 @@ public class NotificationShelf extends ActivatableNotificationView { View rowIcon = row.getNotificationIcon(); float notificationIconPosition = row.getTranslationY() + row.getContentTranslation(); - if (usingLinearInterpolation) { + boolean stayingInShelf = row.isInShelf() && !row.isTransformingIntoShelf(); + if (usingLinearInterpolation && !stayingInShelf) { // If we interpolate from the notification position, this might lead to a slightly // odd interpolation, since the notification position changes as well. Let's interpolate // from a fixed distance. We can only do this if we don't animate and the icon is // always in the interpolated positon. - notificationIconPosition = mMaxShelfEnd - getIntrinsicHeight() - iconTransformDistance; + notificationIconPosition = getTranslationY() - iconTransformDistance; } float notificationIconSize = 0.0f; int iconTopPadding; @@ -426,7 +427,7 @@ public class NotificationShelf extends ActivatableNotificationView { iconState.hidden = transitionAmount == 0.0f; iconState.alpha = alpha; iconState.yTranslation = iconYTranslation; - if (row.isInShelf() && !row.isTransformingIntoShelf()) { + if (stayingInShelf) { iconState.iconAppearAmount = 1.0f; iconState.alpha = 1.0f; iconState.scaleX = 1.0f;