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
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) {