/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | MyAutofillCallback.java | 43 public void onAutofillEvent(View view, int event) { in onAutofillEvent() argument 44 Log.v(TAG, "onAutofillEvent: view=" + view + ", event=" + callbackEventAsString(event)); in onAutofillEvent() 45 mEvents.offer(new MyEvent(view, event)); in onAutofillEvent() 49 public void onAutofillEvent(View view, int childId, int event) { in onAutofillEvent() argument 51 + ", event=" + callbackEventAsString(event)); in onAutofillEvent() 52 mEvents.offer(new MyEvent(view, childId, event)); in onAutofillEvent() 59 final MyEvent event = mEvents.poll(CONNECTION_TIMEOUT.ms(), TimeUnit.MILLISECONDS); in getEvent() local 60 if (event == null) { in getEvent() 63 return event; in getEvent() 70 final MyEvent event = mEvents.poll(CONNECTION_TIMEOUT.ms(), TimeUnit.MILLISECONDS); in assertNotCalled() local [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextTraversalTest.java | 81 public boolean accept(AccessibilityEvent event) { in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 83 (event.getEventType() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 85 && event.getAction() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 87 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 88 && event.getClassName().equals(View.class.getName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 89 && event.getContentDescription().toString().equals( in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 91 && event.getFromIndex() == 0 in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 92 && event.getToIndex() == 1 in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 93 && event.getMovementGranularity() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 111 public boolean accept(AccessibilityEvent event) { in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() [all …]
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeEventStreamTestUtils.java | 117 combinedCondition = event -> event.isEnterEvent() && condition.test(event); in expectEvent() 120 combinedCondition = event -> !event.isEnterEvent() && condition.test(event); in expectEvent() 132 final ImeEvent event = result.get(); in expectEvent() local 133 if (event == null) { in expectEvent() 137 return event; in expectEvent() 152 return event -> { in editorMatcher() 153 if (!TextUtils.equals(eventName, event.getEventName())) { in editorMatcher() 156 final EditorInfo editorInfo = event.getArguments().getParcelable("editorInfo"); in editorMatcher() 179 final Predicate<ImeEvent> predicate = event -> { 180 if (!TextUtils.equals("onHandleCommand", event.getEventName())) { [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | MockViewForListPopupWindow.java | 41 public boolean onKeyPreIme(int keyCode, KeyEvent event) { in onKeyPreIme() argument 43 return mListPopupWindow.onKeyPreIme(keyCode, event); in onKeyPreIme() 45 return super.onKeyPreIme(keyCode, event); in onKeyPreIme() 49 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 51 return mListPopupWindow.onKeyDown(keyCode, event); in onKeyDown() 53 return super.onKeyDown(keyCode, event); in onKeyDown() 57 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 59 return mListPopupWindow.onKeyUp(keyCode, event); in onKeyUp() 61 return super.onKeyUp(keyCode, event); in onKeyUp()
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | BaseMovementMethodTest.java | 92 MotionEvent event = createScrollEvent(1, 0); in testOnGenericMotionEvent_horizontalScroll() local 93 assertTrue(mMovementMethod.onGenericMotionEvent(mTextView, text, event)); in testOnGenericMotionEvent_horizontalScroll() 96 event.recycle(); in testOnGenericMotionEvent_horizontalScroll() 99 event = createScrollEvent(-1, 0); in testOnGenericMotionEvent_horizontalScroll() 100 assertTrue(mMovementMethod.onGenericMotionEvent(mTextView, text, event)); in testOnGenericMotionEvent_horizontalScroll() 103 event.recycle(); in testOnGenericMotionEvent_horizontalScroll() 106 event = createScrollEvent(-1, 0); in testOnGenericMotionEvent_horizontalScroll() 107 assertFalse(mMovementMethod.onGenericMotionEvent(mTextView, text, event)); in testOnGenericMotionEvent_horizontalScroll() 108 event.recycle(); in testOnGenericMotionEvent_horizontalScroll() 113 event = createScrollEvent(1, 0); in testOnGenericMotionEvent_horizontalScroll() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/ |
D | AbstractSensorVerification.java | 34 for (TestSensorEvent event : events) { in addSensorEvents() 35 addSensorEventInternal(event); in addSensorEvents() 48 protected abstract void addSensorEventInternal(TestSensorEvent event); in addSensorEventInternal() argument 66 public final TestSensorEvent event; field in AbstractSensorVerification.IndexedEvent 68 public IndexedEvent(int index, TestSensorEvent event) { in IndexedEvent() argument 70 this.event = event; in IndexedEvent() 80 public IndexedEventPair(int index, TestSensorEvent event, TestSensorEvent previousEvent) { in IndexedEventPair() argument 81 super(index, event); in IndexedEventPair()
|
D | ContinuousEventSanitizedVerification.java | 84 final TestSensorEvent event = mNonSanitizedEvents.get(i); in verify() local 85 sb.append(String.format("sensor:%s", event.sensor.getName())); in verify() 86 sb.append(String.format("accuracy:%d", event.accuracy)); in verify() 87 sb.append(String.format("values:%s", Arrays.toString(event.values))); in verify() 110 protected void addSensorEventInternal(TestSensorEvent event) { in addSensorEventInternal() argument 111 … Log.i("OPALA", "event time: " + event.timestamp + " verif start:" + mVerificationStartTimeNano); in addSensorEventInternal() 112 if (event.receivedTimestamp > mVerificationStartTimeNano) { in addSensorEventInternal() 113 mNonSanitizedEvents.add(event); in addSensorEventInternal()
|
D | EventOrderingVerification.java | 87 nanosToMillis(info.event.timestamp))); in verify() 112 protected void addSensorEventInternal(TestSensorEvent event) { in addSensorEventInternal() argument 114 mMaxTimestamp = event.timestamp; in addSensorEventInternal() 116 if (event.timestamp <= mMaxTimestamp) { in addSensorEventInternal() 117 mOutOfOrderEvents.add(new IndexedEventPair(mIndex, event, mPreviousEvent)); in addSensorEventInternal() 119 mMaxTimestamp = event.timestamp; in addSensorEventInternal() 123 mPreviousEvent = event; in addSensorEventInternal()
|
D | AbstractMeanVerification.java | 34 protected void addSensorEventInternal(TestSensorEvent event) { in addSensorEventInternal() argument 36 mSums = new float[event.values.length]; in addSensorEventInternal() 38 Assert.assertEquals(mSums.length, event.values.length); in addSensorEventInternal() 40 mSums[i] += event.values[i]; in addSensorEventInternal()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | OffBodySensorTestActivity.java | 94 public final SensorEvent event; field in OffBodySensorTestActivity.SensorEventRegistry 97 public SensorEventRegistry(SensorEvent event, long realtimeTimestampNanos) { in SensorEventRegistry() argument 98 this.event = event; in SensorEventRegistry() 112 public void onSensorChanged(SensorEvent event) { in onSensorChanged() argument 114 int type = event.sensor.getType(); in onSensorChanged() 117 switch((int) event.values[0]) { in onSensorChanged() 119 Log.i(TAG, "onSensorChanged(): OFF_BODY ts="+event.timestamp+ in onSensorChanged() 121 (elapsedRealtimeNanos-event.timestamp)/1000000+"mS"); in onSensorChanged() 125 Log.i(TAG, "onSensorChanged(): ON_BODY ts = "+event.timestamp+ in onSensorChanged() 127 (elapsedRealtimeNanos-event.timestamp)/1000000+"mS"); in onSensorChanged() [all …]
|
D | SensorSynchronizationTestActivity.java | 73 TestSensorEvent event = mSensorEvents.get(i); in analyzeData() local 75 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in analyzeData() 77 accInitValues = event.values.clone(); in analyzeData() 78 } else if (angleBetweenVecsDegrees(accInitValues, event.values) > THRESH_DEGREES in analyzeData() 81 accMovementTimestamp = event.timestamp; in analyzeData() 83 } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { in analyzeData() 85 magInitValues = event.values.clone(); in analyzeData() 86 } else if (angleBetweenVecsDegrees(magInitValues, event.values) > THRESH_DEGREES in analyzeData() 89 magMovementTimestamp = event.timestamp; in analyzeData() 92 if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { in analyzeData() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | MovementDetectorHelper.java | 83 public void onSensorChanged(SensorEvent event) { in onSensorChanged() argument 87 mGravity[0] = event.values[0]; in onSensorChanged() 88 mGravity[1] = event.values[1]; in onSensorChanged() 89 mGravity[2] = event.values[2]; in onSensorChanged() 92 mGravity[0] = ALPHA * mGravity[0] + (1 - ALPHA) * event.values[0]; in onSensorChanged() 93 mGravity[1] = ALPHA * mGravity[1] + (1 - ALPHA) * event.values[1]; in onSensorChanged() 94 mGravity[2] = ALPHA * mGravity[2] + (1 - ALPHA) * event.values[2]; in onSensorChanged() 98 linearAcceleration[0] = event.values[0] - mGravity[0]; in onSensorChanged() 99 linearAcceleration[1] = event.values[1] - mGravity[1]; in onSensorChanged() 100 linearAcceleration[2] = event.values[2] - mGravity[2]; in onSensorChanged()
|
D | TestSensorEvent.java | 42 public TestSensorEvent(SensorEvent event) { in TestSensorEvent() argument 43 this(event, SystemClock.elapsedRealtimeNanos()); in TestSensorEvent() 53 public TestSensorEvent(SensorEvent event, long receivedTimestamp) { in TestSensorEvent() argument 54 values = event.values.clone(); in TestSensorEvent() 55 sensor = event.sensor; in TestSensorEvent() 56 timestamp = event.timestamp; in TestSensorEvent() 57 accuracy = event.accuracy; in TestSensorEvent()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | InputMethodServiceTest.java | 70 return event -> { in backKeyDownMatcher() 71 if (!TextUtils.equals("onKeyDown", event.getEventName())) { in backKeyDownMatcher() 74 final int keyCode = event.getArguments().getInt("keyCode"); in backKeyDownMatcher() 78 return event.getReturnBooleanValue() == expectedReturnValue; in backKeyDownMatcher() 110 expectEvent(stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 162 expectEvent(stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 165 expectEvent(stream, event -> "hideSoftInput".equals(event.getEventName()), TIMEOUT); 166 expectEvent(stream, event -> "onFinishInputView".equals(event.getEventName()), TIMEOUT); 180 stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 183 expectEvent(stream, event -> "showSoftInput".equals(event.getEventName()), TIMEOUT); [all …]
|
/cts/tests/framework/base/windowmanager/dndtargetapp/src/android/server/wm/dndtargetapp/ |
D | DropTarget.java | 80 private String checkExtraValue(DragEvent event) { in checkExtraValue() argument 81 PersistableBundle extras = event.getClipDescription().getExtras(); in checkExtraValue() 106 public boolean onDrag(View v, DragEvent event) { in onDrag() argument 107 checkDragEvent(event); in onDrag() 109 switch (event.getAction()) { in onDrag() 112 logResult(RESULT_KEY_EXTRAS, checkExtraValue(event)); in onDrag() 126 accessContent(event, RESULT_KEY_ACCESS_BEFORE, false); in onDrag() 129 accessContent(event, RESULT_KEY_DROP_RESULT, requestPermissions); in onDrag() 132 accessContent(event, RESULT_KEY_ACCESS_AFTER, false); in onDrag() 144 private void accessContent(DragEvent event, String resultKey, boolean requestPermissions) { in accessContent() argument [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | InstrumentationTestActivity.java | 79 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 80 return super.onTouchEvent(event); in onTouchEvent() 84 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument 85 return super.onTrackballEvent(event); in onTrackballEvent() 132 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 134 mMotionEvent = event; in onTouchEvent() 135 return super.onTouchEvent(event); in onTouchEvent() 213 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 214 mKeyDownList.add(event); in onKeyDown() 216 return super.onKeyDown(keyCode, event); in onKeyDown() [all …]
|
D | TestDialog.java | 133 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 135 onTouchEvent = event; in onTouchEvent() 136 return super.onTouchEvent(event); in onTouchEvent() 140 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument 142 onTrackballEvent = event; in onTrackballEvent() 143 return super.onTrackballEvent(event); in onTrackballEvent() 147 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 150 onKeyDownReturn = super.onKeyDown(keyCode, event); in onKeyDown() 156 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 159 return super.onKeyUp(keyCode, event); in onKeyUp() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | KeyEventInterceptTestActivity.java | 29 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 30 mKeyEvents.add(event); in onKeyDown() 35 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 37 mKeyEvents.add(event); in onKeyUp()
|
D | LongPressBackActivity.java | 49 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 50 if (keyCode == KeyEvent.KEYCODE_BACK && !event.isCanceled()) { in onKeyDown() 53 return super.onKeyDown(keyCode, event); in onKeyDown() 57 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 61 return super.onKeyUp(keyCode, event); in onKeyUp()
|
D | MockView.java | 94 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument 96 return super.onKeyShortcut(keyCode, event); in onKeyShortcut() 176 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 178 return super.onKeyDown(keyCode, event); in onKeyDown() 186 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument 188 return super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple() 196 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 198 return super.onKeyUp(keyCode, event); in onKeyUp() 206 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 208 return super.onTouchEvent(event); in onTouchEvent() [all …]
|
D | TouchDelegateTest.java | 124 MotionEvent event = mActivity.removeOldestButtonEvent(); in ensureOldestActionEquals() local 125 assertNotNull(event); in ensureOldestActionEquals() 126 assertEquals(action, event.getActionMasked()); in ensureOldestActionEquals() 127 event.recycle(); in ensureOldestActionEquals() 150 final MotionEvent event = MotionEvent.obtain(downTime, eventTime, action, in dispatchMotionEventToActivity() local 152 event.setSource(InputDevice.SOURCE_TOUCHSCREEN); in dispatchMotionEventToActivity() 153 mActivity.dispatchTouchEvent(event); in dispatchMotionEventToActivity() 154 event.recycle(); in dispatchMotionEventToActivity() 175 final MotionEvent event = MotionEvent.obtain(downTime, eventTime, action, pointerCount, in dispatchMultiTouchMotionEventToActivity() local 179 mActivity.dispatchTouchEvent(event); in dispatchMultiTouchMotionEventToActivity() [all …]
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvInputServiceTest.java | 543 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); in verifyCommandDispatchKeyDown() local 544 mTvView.dispatchKeyEvent(event); in verifyCommandDispatchKeyDown() 553 && keyEventEquals(event, session.mKeyDownEvent); in verifyCommandDispatchKeyDown() 562 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_MULTIPLE, keyCode); in verifyCommandDispatchKeyMultiple() local 563 mTvView.dispatchKeyEvent(event); in verifyCommandDispatchKeyMultiple() 572 && keyEventEquals(event, session.mKeyMultipleEvent) in verifyCommandDispatchKeyMultiple() 573 && session.mKeyMultipleNumber == event.getRepeatCount(); in verifyCommandDispatchKeyMultiple() 582 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_UP, keyCode); in verifyCommandDispatchKeyUp() local 583 mTvView.dispatchKeyEvent(event); in verifyCommandDispatchKeyUp() 592 && keyEventEquals(event, session.mKeyUpEvent); in verifyCommandDispatchKeyUp() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | AccessibilityEventFilterUtils.java | 48 protected boolean matchesSafely(AccessibilityEvent event) { in matchesSafely() argument 49 return event.getEventType() == mType; in matchesSafely() 67 protected boolean matchesSafely(AccessibilityEvent event) { in matchesSafely() argument 68 return (event.getWindowChanges() & mWindowChanges) == mWindowChanges; in matchesSafely() 86 protected boolean matchesSafely(AccessibilityEvent event) { in matchesSafely() argument 87 return (event.getContentChangeTypes() & mContentChanges) == mContentChanges; in matchesSafely()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/touch/ |
D | TouchPointView.java | 62 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 64 if (event.getActionMasked() == MotionEvent.ACTION_UP) { in onTouchEvent() 68 for (int i = 0; i < event.getPointerCount(); i++) { in onTouchEvent() 69 int pointerId = event.getPointerId(i); in onTouchEvent() 70 int pointerIndex = event.findPointerIndex(pointerId); in onTouchEvent() 72 finger.point = new Point((int)event.getX(pointerIndex), (int)event.getY(pointerIndex)); in onTouchEvent()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/ |
D | ProjectedPresentation.java | 41 public void injectTouchEvent(MotionEvent event) { in injectTouchEvent() argument 43 getWindow().injectInputEvent(event); in injectTouchEvent() 46 public void injectKeyEvent(KeyEvent event) { in injectKeyEvent() argument 48 getWindow().injectInputEvent(event); in injectKeyEvent()
|