Merge "Fixing QS reacting to touches in notifications area in split shade" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
df844e0c3a
@@ -1903,6 +1903,9 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
|
|
||||||
|
|
||||||
private boolean handleQsTouch(MotionEvent event) {
|
private boolean handleQsTouch(MotionEvent event) {
|
||||||
|
if (mShouldUseSplitNotificationShade && touchXOutsideOfQs(event.getX())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
final int action = event.getActionMasked();
|
final int action = event.getActionMasked();
|
||||||
if (action == MotionEvent.ACTION_DOWN && getExpandedFraction() == 1f
|
if (action == MotionEvent.ACTION_DOWN && getExpandedFraction() == 1f
|
||||||
&& mBarState != KEYGUARD && !mQsExpanded && isQsExpansionEnabled()) {
|
&& mBarState != KEYGUARD && !mQsExpanded && isQsExpansionEnabled()) {
|
||||||
@@ -1944,8 +1947,12 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean touchXOutsideOfQs(float touchX) {
|
||||||
|
return touchX < mQsFrame.getX() || touchX > mQsFrame.getX() + mQsFrame.getWidth();
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isInQsArea(float x, float y) {
|
private boolean isInQsArea(float x, float y) {
|
||||||
if (x < mQsFrame.getX() || x > mQsFrame.getX() + mQsFrame.getWidth()) {
|
if (touchXOutsideOfQs(x)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Let's reject anything at the very bottom around the home handle in gesture nav
|
// Let's reject anything at the very bottom around the home handle in gesture nav
|
||||||
@@ -4094,9 +4101,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
@Override
|
@Override
|
||||||
public void flingTopOverscroll(float velocity, boolean open) {
|
public void flingTopOverscroll(float velocity, boolean open) {
|
||||||
// in split shade mode we want to expand/collapse QS only when touch happens within QS
|
// in split shade mode we want to expand/collapse QS only when touch happens within QS
|
||||||
if (mShouldUseSplitNotificationShade
|
if (mShouldUseSplitNotificationShade && touchXOutsideOfQs(mInitialTouchX)) {
|
||||||
&& (mInitialTouchX < mQsFrame.getX()
|
|
||||||
|| mInitialTouchX > mQsFrame.getX() + mQsFrame.getWidth())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mLastOverscroll = 0f;
|
mLastOverscroll = 0f;
|
||||||
|
|||||||
Reference in New Issue
Block a user