OSDN Git Service

Don't update notification layer when collapsing the panel
authorJorim Jaggi <jjaggi@google.com>
Fri, 5 Sep 2014 14:01:00 +0000 (16:01 +0200)
committerJorim Jaggi <jjaggi@google.com>
Fri, 5 Sep 2014 14:01:00 +0000 (16:01 +0200)
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

packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

index f467e27..cf5aebc 100644 (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) {