Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e450701 authored by Matt Pietal's avatar Matt Pietal Committed by Automerger Merge Worker
Browse files

Merge "Handle duplicate DOWN event" into sc-qpr1-dev am: 6ce3c76c am: aa9afafc am: a3a44087

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15887942

Change-Id: Ica7f313cd0b99c727493dc9b09283bff93b6d765
parents 3fbdf956 a3a44087
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -3931,6 +3931,9 @@ public class NotificationPanelViewController extends PanelViewController {
    @Override
    protected TouchHandler createTouchHandler() {
        return new TouchHandler() {

            private long mLastTouchDownTime = -1L;

            @Override
            public boolean onInterceptTouchEvent(MotionEvent event) {
                if (mBlockTouches || mQs.disallowPanelTouches()) {
@@ -3962,6 +3965,19 @@ public class NotificationPanelViewController extends PanelViewController {

            @Override
            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
                        && mQs.disallowPanelTouches())) {
                    return false;