am 04fb2587: Fixed the touch handling when QS was open
* commit '04fb25871d77ecdffaa03989d8b85c26715fff84': Fixed the touch handling when QS was open
This commit is contained in:
@@ -638,10 +638,9 @@ public class NotificationPanelView extends PanelView implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isInContentBounds(float x, float y) {
|
protected boolean isInContentBounds(float x, float y) {
|
||||||
float yTransformed = y - mNotificationStackScroller.getY();
|
|
||||||
float stackScrollerX = mNotificationStackScroller.getX();
|
float stackScrollerX = mNotificationStackScroller.getX();
|
||||||
return mNotificationStackScroller.isInContentBounds(yTransformed) && stackScrollerX < x
|
return !mNotificationStackScroller.isBelowLastNotification(x - stackScrollerX, y)
|
||||||
&& x < stackScrollerX + mNotificationStackScroller.getWidth();
|
&& stackScrollerX < x && x < stackScrollerX + mNotificationStackScroller.getWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initDownStates(MotionEvent event) {
|
private void initDownStates(MotionEvent event) {
|
||||||
|
|||||||
@@ -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();
|
int childCount = getChildCount();
|
||||||
for (int i = childCount - 1; i >= 0; i--) {
|
for (int i = childCount - 1; i >= 0; i--) {
|
||||||
ExpandableView child = (ExpandableView) getChildAt(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() {
|
private void updateExpandButtons() {
|
||||||
|
|||||||
Reference in New Issue
Block a user