summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorim Jaggi <jjaggi@google.com> 2014-08-25 18:44:01 +0200
committer Jorim Jaggi <jjaggi@google.com> 2014-08-26 18:39:47 +0200
commit1d49ec9f416edec68db7df30ae0476d1942f65a6 (patch)
treea19e23bd63266fc6594ea551c7bf377d08df6db1
parent5369d7a9317a137ca0b7ad43c889203a7669626f (diff)
Fix jumping animation when using two-finger expand
Also fixes other minor issues with the panel expansion. Bug: 17250134 Change-Id: I70ee5410bad10ff71f6d868005bf6274ef881e95
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java10
2 files changed, 11 insertions, 3 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 e1beb0899052..387abc319335 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -58,7 +58,7 @@ public class NotificationPanelView extends PanelView implements
private static final int CAP_HEIGHT = 1456;
private static final int FONT_HEIGHT = 2163;
- private static final float HEADER_RUBBERBAND_FACTOR = 2.15f;
+ private static final float HEADER_RUBBERBAND_FACTOR = 2.05f;
private static final float LOCK_ICON_ACTIVE_SCALE = 1.2f;
private KeyguardAffordanceHelper mAfforanceHelper;
@@ -1665,7 +1665,7 @@ public class NotificationPanelView extends PanelView implements
@Override
protected boolean fullyExpandedClearAllVisible() {
return mNotificationStackScroller.isDismissViewNotGone()
- && mNotificationStackScroller.isScrolledToBottom();
+ && mNotificationStackScroller.isScrolledToBottom() && !mTwoFingerQsExpand;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 68a02cff4f63..82efd1d65c19 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -2150,7 +2150,15 @@ public class NotificationStackScrollLayout extends ViewGroup
}
public int getDismissViewHeight() {
- return mDismissView.getHeight() + mPaddingBetweenElementsNormal;
+ int height = mDismissView.getHeight() + mPaddingBetweenElementsNormal;
+
+ // Hack: Accommodate for additional distance when we only have one notification and the
+ // dismiss all button.
+ if (getNotGoneChildCount() == 2 && getLastChildNotGone() == mDismissView
+ && getFirstChildNotGone() instanceof ActivatableNotificationView) {
+ height += mCollapseSecondCardPadding;
+ }
+ return height;
}
public float getBottomMostNotificationBottom() {