Merge "Handle duplicate DOWN event" into sc-qpr1-dev am: 6ce3c76c24 am: aa9afafcaa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15887942 Change-Id: I7b5d4bcb18d00cc3f24f3b18c009c77a42bdaf2c
This commit is contained in:
@@ -3770,6 +3770,9 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
@Override
|
@Override
|
||||||
protected TouchHandler createTouchHandler() {
|
protected TouchHandler createTouchHandler() {
|
||||||
return new TouchHandler() {
|
return new TouchHandler() {
|
||||||
|
|
||||||
|
private long mLastTouchDownTime = -1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
if (mBlockTouches || mQs.disallowPanelTouches()) {
|
if (mBlockTouches || mQs.disallowPanelTouches()) {
|
||||||
@@ -3801,6 +3804,19 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
|
if (event.getDownTime() == mLastTouchDownTime) {
|
||||||
|
// An issue can occur when swiping down after unlock, where multiple down
|
||||||
|
// events are received in this handler with identical downTimes. Until the
|
||||||
|
// source of the issue can be located, detect this case and ignore.
|
||||||
|
// see b/193350347
|
||||||
|
Log.w(TAG, "Duplicate down event detected... ignoring");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
mLastTouchDownTime = event.getDownTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mBlockTouches || (mQsFullyExpanded && mQs != null
|
if (mBlockTouches || (mQsFullyExpanded && mQs != null
|
||||||
&& mQs.disallowPanelTouches())) {
|
&& mQs.disallowPanelTouches())) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user