Don't update notification layer when collapsing the panel

This change makes sure that we don't update the hardware for the
notification layer when we collapse or expand the panel. It does so
by starting the fading when the panel is more collapsed.

Bug: 17287256
Change-Id: I35dc35494d71d816b7e6c5821b769847aaa183b0
This commit is contained in:
Jorim Jaggi
2014-09-05 16:01:00 +02:00
parent 06c19ea001
commit 12a6782d61

View File

@@ -1278,7 +1278,7 @@ public class NotificationPanelView extends PanelView implements
private void updateNotificationTranslucency() {
float alpha = (getNotificationsTopY() + mNotificationStackScroller.getItemHeight())
/ (mQsMinExpansionHeight + mNotificationStackScroller.getBottomStackPeekSize()
+ mNotificationStackScroller.getCollapseSecondCardPadding());
- mNotificationStackScroller.getCollapseSecondCardPadding());
alpha = Math.max(0, Math.min(alpha, 1));
alpha = (float) Math.pow(alpha, 0.75);
if (alpha != 1f && mNotificationStackScroller.getLayerType() != LAYER_TYPE_HARDWARE) {