From 5dad60e6928f29d5a959cb4e2fb45e17253ca88c Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Thu, 31 May 2018 18:48:05 -0400 Subject: [PATCH] Consider icon scale when calculating icon offset in shelf Fixes the the jumping of the last icon in the notification shade when you start to collapse slowly. Test: visual Change-Id: Ia4d4189104ce1b4e7b45276f4a2fa26f8186390e Fixes: 80270979 --- .../src/com/android/systemui/statusbar/NotificationShelf.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 306319903ecb0..fac77689e2897 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -482,8 +482,8 @@ public class NotificationShelf extends ActivatableNotificationView implements iconTransformDistance = Math.min(iconTransformDistance, fullHeight); if (isLastChild) { fullHeight = Math.min(fullHeight, row.getMinHeight() - getIntrinsicHeight()); - iconTransformDistance = Math.min(iconTransformDistance, row.getMinHeight() - - getIntrinsicHeight()); + iconTransformDistance = Math.min(iconTransformDistance, + row.getMinHeight() - getIntrinsicHeight() * icon.getIconScale()); } float viewEnd = viewStart + fullHeight; if (expandingAnimated && mAmbientState.getScrollY() == 0