From b3a6f1e96d0df9df312b23da50059f464ef7c4c8 Mon Sep 17 00:00:00 2001 From: Xiyuan Xia Date: Tue, 28 Apr 2015 16:17:18 -0700 Subject: [PATCH] Update bottom area alpha when stack height changes Bottom area alpha depends on stack scroller's notification top Y which depends on stack translation which changes when stack height changes. Thus the bottom area alpha needs to be updated when stack height changes. Bug: 20457060 Change-Id: Ibcc95c830a83737732aa15147cd82d21f2ee9161 --- .../systemui/statusbar/phone/NotificationPanelView.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index b87c25b43ba52..f8cb6892e013e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -327,7 +327,7 @@ public class NotificationPanelView extends PanelView implements } else if (!mQsExpanded) { setQsExpansion(mQsMinExpansionHeight + mLastOverscroll); } - mNotificationStackScroller.setStackHeight(getExpandedHeight()); + updateStackHeight(getExpandedHeight()); updateHeader(); mNotificationStackScroller.updateIsSmallScreen( mHeader.getCollapsedHeight() + mQsPeekHeight); @@ -1457,7 +1457,7 @@ public class NotificationPanelView extends PanelView implements setQsExpansion(mQsMinExpansionHeight + t * (getTempQsMaxExpansion() - mQsMinExpansionHeight)); } - mNotificationStackScroller.setStackHeight(expandedHeight); + updateStackHeight(expandedHeight); updateHeader(); updateUnlockIcon(); updateNotificationTranslucency(); @@ -2241,4 +2241,9 @@ public class NotificationPanelView extends PanelView implements mScrollView.setTranslationX(translation); mHeader.setTranslationX(translation); } + + private void updateStackHeight(float stackHeight) { + mNotificationStackScroller.setStackHeight(stackHeight); + updateKeyguardBottomAreaAlpha(); + } }