diff options
author | Selim Cinek <cinek@google.com> | 2015-06-02 19:58:09 +0200 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2015-06-04 15:28:17 +0000 |
commit | 04fb25871d77ecdffaa03989d8b85c26715fff84 (patch) | |
tree | 70ecafef306fa44bb66da0d8af41b36e0a20b502 /packages/SystemUI/src/com | |
parent | 18d669dc597dc4997ee8d96f38cf138ae31a0cdf (diff) | |
download | frameworks_base-04fb25871d77ecdffaa03989d8b85c26715fff84.zip frameworks_base-04fb25871d77ecdffaa03989d8b85c26715fff84.tar.gz frameworks_base-04fb25871d77ecdffaa03989d8b85c26715fff84.tar.bz2 |
Fixed the touch handling when QS was open
When QS was open, the panel could not always be correctly
scrolled.
Bug: 21525300
Change-Id: If18878d08d20254d9d822d80a295163703d897aa
Diffstat (limited to 'packages/SystemUI/src/com')
2 files changed, 4 insertions, 5 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 2fe98bb..4dbee99 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -638,10 +638,9 @@ public class NotificationPanelView extends PanelView implements @Override protected boolean isInContentBounds(float x, float y) { - float yTransformed = y - mNotificationStackScroller.getY(); float stackScrollerX = mNotificationStackScroller.getX(); - return mNotificationStackScroller.isInContentBounds(yTransformed) && stackScrollerX < x - && x < stackScrollerX + mNotificationStackScroller.getWidth(); + return !mNotificationStackScroller.isBelowLastNotification(x - stackScrollerX, y) + && stackScrollerX < x && x < stackScrollerX + mNotificationStackScroller.getWidth(); } private void initDownStates(MotionEvent event) { 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 4ae800f..0165372 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2614,7 +2614,7 @@ public class NotificationStackScrollLayout extends ViewGroup } } - private boolean isBelowLastNotification(float touchX, float touchY) { + public boolean isBelowLastNotification(float touchX, float touchY) { int childCount = getChildCount(); for (int i = childCount - 1; i >= 0; i--) { ExpandableView child = (ExpandableView) getChildAt(i); @@ -2640,7 +2640,7 @@ public class NotificationStackScrollLayout extends ViewGroup } } } - return touchY > mIntrinsicPadding; + return touchY > mTopPadding + mStackTranslation; } private void updateExpandButtons() { |