From bb73e9c65a2e03f50c29def64d564fb29dc946ce Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 26 May 2016 12:06:40 -0700 Subject: [PATCH] Notification: Fix bug with sliding action list Fixes a bug where the action bar was not where it was supposed to be if the expanded notification was smaller than the collapsed + action height. Bug: 28767094 Change-Id: I30c0ae430d4d5f9e88a02f5143094e90cf31b620 --- .../systemui/statusbar/NotificationContentView.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java index 5a8d4b3577199..70ea55c661918 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java @@ -402,12 +402,17 @@ public class NotificationContentView extends FrameLayout { return mContext.getResources().getDimensionPixelSize( com.android.internal.R.dimen.notification_action_list_height); } + int hint; if (mHeadsUpChild != null) { - return mHeadsUpChild.getHeight(); + hint = mHeadsUpChild.getHeight(); } else { - return mContractedChild.getHeight() + mContext.getResources().getDimensionPixelSize( - com.android.internal.R.dimen.notification_action_list_height); + hint = mContractedChild.getHeight() + mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.notification_action_list_height); } + if (mExpandedChild != null) { + hint = Math.min(hint, mExpandedChild.getHeight()); + } + return hint; } private void updateContentTransformation() {