Revert "Intercept abnormal MotionEvent in GestureDetector#onTouc..."

Revert "Intercept abnormal MotionEvent in GestureDetector#onTouc..."

Revert "Intercept abnormal MotionEvent in GestureDetector#onTouc..."

Revert "Intercept abnormal MotionEvent in GestureDetector#onTouc..."

Revert submission 19755403-242021191_ontouch

Reason for revert: b/246911932
Reverted Changes:
I518867b05:Intercept abnormal MotionEvent in GestureDetector#...
I22a5d1c16:Intercept abnormal MotionEvent in GestureDetector#...

Change-Id: Ifa7c3326abbded0a6345088dcb76d637cf444586
diff --git a/tests/tests/view/src/android/view/cts/GestureDetectorTest.java b/tests/tests/view/src/android/view/cts/GestureDetectorTest.java
index 4b2caf6..9a1e56b 100644
--- a/tests/tests/view/src/android/view/cts/GestureDetectorTest.java
+++ b/tests/tests/view/src/android/view/cts/GestureDetectorTest.java
@@ -29,7 +29,6 @@
 import android.view.GestureDetector;
 import android.view.GestureDetector.SimpleOnGestureListener;
 import android.view.MotionEvent;
-import android.view.ViewConfiguration;
 
 import androidx.test.annotation.UiThreadTest;
 import androidx.test.filters.MediumTest;
@@ -56,9 +55,6 @@
     private long mEventTime;
     private MotionEvent mButtonPressPrimaryMotionEvent;
     private MotionEvent mButtonPressSecondaryMotionEvent;
-    private MotionEvent mDownEvent;
-    private MotionEvent mMoveEvent;
-    private MotionEvent mUpEvent;
 
     @Rule
     public ActivityTestRule<GestureDetectorCtsActivity> mActivityRule =
@@ -79,15 +75,6 @@
         mButtonPressSecondaryMotionEvent = MotionEvent.obtain(mDownTime, mEventTime,
                 MotionEvent.ACTION_BUTTON_PRESS, X_3F, Y_4F, 0);
         mButtonPressSecondaryMotionEvent.setActionButton(MotionEvent.BUTTON_SECONDARY);
-
-        mDownEvent = MotionEvent.obtain(mDownTime, mEventTime,
-                MotionEvent.ACTION_DOWN, X_3F, Y_4F, 0);
-        mMoveEvent = MotionEvent.obtain(mDownTime, mEventTime, MotionEvent.ACTION_MOVE,
-                ViewConfiguration.get(mActivity).getScaledTouchSlop(),
-                ViewConfiguration.get(mActivity).getScaledTouchSlop(), 0);
-        mUpEvent = MotionEvent.obtain(mDownTime, mEventTime, MotionEvent.ACTION_UP,
-                ViewConfiguration.get(mActivity).getScaledTouchSlop(),
-                ViewConfiguration.get(mActivity).getScaledTouchSlop(), 0);
     }
 
     @UiThreadTest
@@ -139,14 +126,4 @@
         mGestureDetector.onGenericMotionEvent(mButtonPressPrimaryMotionEvent);
         verify(mListener, times(1)).onContextClick(mButtonPressPrimaryMotionEvent);
     }
-
-    @Test
-    public void testCompleteEventStream() {
-        assertFalse(mGestureDetector.onTouchEvent(mMoveEvent));
-        assertFalse(mGestureDetector.onTouchEvent(mUpEvent));
-
-        mGestureDetector.setIsLongpressEnabled(false);
-        mGestureDetector.onTouchEvent(mDownEvent);
-        assertTrue(mGestureDetector.onTouchEvent(mMoveEvent));
-    }
 }