/cts/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityTextTraversalTest.java | 78 public boolean accept(AccessibilityEvent event) { in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 80 (event.getEventType() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 82 && event.getAction() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 84 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 85 && event.getClassName().equals(View.class.getName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 86 && event.getContentDescription().toString().equals( in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 88 && event.getFromIndex() == 0 in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 89 && event.getToIndex() == 1 in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 90 && event.getMovementGranularity() == in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() 108 public boolean accept(AccessibilityEvent event) { in testActionNextAndPreviousAtGranularityCharacterOverContentDescription() [all …]
|
D | AccessibilityFocusAndInputFocusSyncTest.java | 61 public boolean accept(AccessibilityEvent event) { in testFindAccessibilityFocus() 62 return event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED; in testFindAccessibilityFocus() 101 public boolean accept(AccessibilityEvent event) { in testActionAccessibilityFocus() 102 return event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED; in testActionAccessibilityFocus() 129 public boolean accept(AccessibilityEvent event) { in testActionClearAccessibilityFocus() 130 return event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED; in testActionClearAccessibilityFocus() 148 public boolean accept(AccessibilityEvent event) { in testActionClearAccessibilityFocus() 149 return event.getEventType() in testActionClearAccessibilityFocus() 180 public boolean accept(AccessibilityEvent event) { in testOnlyOneNodeHasAccessibilityFocus() 181 return event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED; in testOnlyOneNodeHasAccessibilityFocus() [all …]
|
D | AccessibilityWindowQueryTest.java | 107 public boolean accept(AccessibilityEvent event) { in testNoWindowsAccessIfFlagNotSet() 108 if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_CLICKED) { in testNoWindowsAccessIfFlagNotSet() 109 events.add(event); in testNoWindowsAccessIfFlagNotSet() 118 AccessibilityEvent event = events.get(0); in testNoWindowsAccessIfFlagNotSet() local 119 assertNull(event.getSource().getWindow()); in testNoWindowsAccessIfFlagNotSet() 179 public boolean accept(AccessibilityEvent event) { in testTraverseWindowFromEvent() 180 if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_CLICKED) { in testTraverseWindowFromEvent() 181 events.add(event); in testTraverseWindowFromEvent() 190 AccessibilityEvent event = events.get(0); in testTraverseWindowFromEvent() local 191 AccessibilityWindowInfo window = event.getSource().getWindow(); in testTraverseWindowFromEvent() [all …]
|
D | AccessibilityEndToEndTest.java | 91 public boolean accept(AccessibilityEvent event) { in testTypeViewSelectedAccessibilityEvent() 92 return equalsAccessiblityEvent(event, expected); in testTypeViewSelectedAccessibilityEvent() 127 public boolean accept(AccessibilityEvent event) { in testTypeViewClickedAccessibilityEvent() 128 return equalsAccessiblityEvent(event, expected); in testTypeViewClickedAccessibilityEvent() 163 public boolean accept(AccessibilityEvent event) { in testTypeViewLongClickedAccessibilityEvent() 164 return equalsAccessiblityEvent(event, expected); in testTypeViewLongClickedAccessibilityEvent() 201 public boolean accept(AccessibilityEvent event) { in testTypeViewFocusedAccessibilityEvent() 202 return equalsAccessiblityEvent(event, expected); in testTypeViewFocusedAccessibilityEvent() 230 public boolean accept(AccessibilityEvent event) { in testTypeViewTextChangedAccessibilityEvent() 231 return event.getEventType() == AccessibilityEvent.TYPE_VIEW_FOCUSED; in testTypeViewTextChangedAccessibilityEvent() [all …]
|
/cts/tests/uiautomator/test-apps/CtsUiAutomatorApp/src/com/android/cts/uiautomator/ |
D | TestGenericDetailFragment.java | 63 public boolean onTouch(View v, MotionEvent event) { in onCreateView() 65 switch(event.getAction() & MotionEvent.ACTION_MASK) { in onCreateView() 70 collectStartAction(event, v, 0); in onCreateView() 75 collectStartAction(event, v, getPointerIndex(event)); in onCreateView() 80 collectEndAction(event, v, getPointerIndex(event)); in onCreateView() 85 collectEndAction(event, v, 0); in onCreateView() 142 private void collectStartAction(MotionEvent event, View view, int pointerIndex) { in collectStartAction() argument 145 mPointerEvents[getPointerId(event)].startX = in collectStartAction() 146 (int)(event.getX(pointerIndex) + offsetInScreen[0]); in collectStartAction() 147 mPointerEvents[getPointerId(event)].startY = in collectStartAction() [all …]
|
D | Test5DetailFragment.java | 83 public boolean onTouch(View v, MotionEvent event) { in onCreateView() 84 if (event.getAction() == MotionEvent.ACTION_DOWN) { in onCreateView() 86 collectStartAction(event, v); in onCreateView() 87 } else if (event.getAction() == MotionEvent.ACTION_UP) { in onCreateView() 88 collectEndAction(event, v); in onCreateView() 130 private void collectStartAction(MotionEvent event, View view) { in collectStartAction() argument 133 mPointerEvent.startX = (int)(event.getX() + offsetInScreen[0]); in collectStartAction() 134 mPointerEvent.startY = (int)(event.getY() + offsetInScreen[1]); in collectStartAction() 145 private void collectEndAction(MotionEvent event, View view) { in collectEndAction() argument 148 mPointerEvent.endX = (int)(event.getX() + offsetInScreen[0]); in collectEndAction() [all …]
|
/cts/tests/tests/hardware/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 | 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()
|
D | FrequencyVerification.java | 158 protected void addSensorEventInternal(TestSensorEvent event) { in addSensorEventInternal() argument 160 mMinTimestamp = event.timestamp; in addSensorEventInternal() 161 mMaxTimestamp = event.timestamp; in addSensorEventInternal() 163 if (mMinTimestamp > event.timestamp) { in addSensorEventInternal() 164 mMinTimestamp = event.timestamp; in addSensorEventInternal() 166 if (mMaxTimestamp < event.timestamp) { in addSensorEventInternal() 167 mMaxTimestamp = event.timestamp; in addSensorEventInternal()
|
D | EventTimestampSynchronizationVerification.java | 126 protected void addSensorEventInternal(TestSensorEvent event) { in addSensorEventInternal() argument 127 mCollectedEvents.add(event); in addSensorEventInternal() 143 TestSensorEvent event = mCollectedEvents.get(i); in verifyTimestampSynchronization() local 144 long eventTimestampNs = event.timestamp; in verifyTimestampSynchronization() 145 long receivedTimestampNs = event.receivedTimestamp; in verifyTimestampSynchronization() 160 failures.add(new IndexedEvent(i, event)); in verifyTimestampSynchronization()
|
/cts/tests/tests/hardware/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()
|
D | TestSensorEventListener.java | 97 public void onSensorChanged(SensorEvent event) { in onSensorChanged() argument 101 mCollectedEvents.add(new TestSensorEvent(event, timestampNs)); in onSensorChanged() 210 TestSensorEvent event = mCollectedEvents.get(i); in logCollectedEventsToFile() local 212 event.receivedTimestamp/1000000) { in logCollectedEventsToFile() 218 builder.append("Timestamp=").append(event.timestamp/1000000).append("ms, "); in logCollectedEventsToFile() 219 builder.append("ReceivedTimestamp=").append(event.receivedTimestamp/1000000). in logCollectedEventsToFile() 221 builder.append("Accuracy=").append(event.accuracy).append(", "); in logCollectedEventsToFile() 222 builder.append("Values=").append(Arrays.toString(event.values)); in logCollectedEventsToFile() 233 TestSensorEvent event = mCollectedEvents.get(i); in logCollectedEventsToFile() local 235 event.receivedTimestamp/1000000) { in logCollectedEventsToFile() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
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/app/src/android/app/cts/ |
D | InstrumentationTestActivity.java | 74 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 75 return super.onTouchEvent(event); in onTouchEvent() 79 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument 80 return super.onTrackballEvent(event); in onTrackballEvent() 127 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 129 mMotionEvent = event; in onTouchEvent() 130 return super.onTouchEvent(event); in onTouchEvent() 208 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 209 mKeyDownList.add(event); in onKeyDown() 211 return super.onKeyDown(keyCode, event); in onKeyDown() [all …]
|
D | TestDialog.java | 131 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 133 onTouchEvent = event; in onTouchEvent() 134 return super.onTouchEvent(event); in onTouchEvent() 138 public boolean onTrackballEvent(MotionEvent event) { in onTrackballEvent() argument 140 onTrackballEvent = event; in onTrackballEvent() 141 return super.onTrackballEvent(event); in onTrackballEvent() 145 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 148 onKeyDownReturn = super.onKeyDown(keyCode, event); in onKeyDown() 154 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 157 return super.onKeyUp(keyCode, event); in onKeyUp() [all …]
|
/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/tests/tests/view/src/android/view/cts/ |
D | MockView.java | 89 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument 91 return super.onKeyShortcut(keyCode, event); in onKeyShortcut() 171 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument 173 return super.onKeyDown(keyCode, event); in onKeyDown() 181 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument 183 return super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple() 191 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument 193 return super.onKeyUp(keyCode, event); in onKeyUp() 201 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument 203 return super.onTouchEvent(event); in onTouchEvent() [all …]
|
/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()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | SeekBarTest.java | 69 MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, in testSetOnSeekBarChangeListener() local 71 mInstrumentation.sendPointerSync(event); in testSetOnSeekBarChangeListener() 80 event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE, in testSetOnSeekBarChangeListener() 82 mInstrumentation.sendPointerSync(event); in testSetOnSeekBarChangeListener() 89 event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, in testSetOnSeekBarChangeListener() 91 mInstrumentation.sendPointerSync(event); in testSetOnSeekBarChangeListener()
|
/cts/tests/tests/drm/src/android/drm/cts/ |
D | DrmEventTest.java | 167 DrmEvent event = createDrmEvent(isInfo, 0, "", attributes); in checkGetAttributeWithEventType() local 169 assertNull(event.getAttribute(key)); in checkGetAttributeWithEventType() 171 assertEquals(event.getAttribute(key), attributes.get(key)); in checkGetAttributeWithEventType() 178 DrmEvent event = createDrmEvent(isInfo, id, "", null); in checkGetUniqueIdWithEventType() local 179 assertEquals(id, event.getUniqueId()); in checkGetUniqueIdWithEventType() 185 DrmEvent event = createDrmEvent(isInfo, 0, msg, null); in checkGetMessageWithEventType() local 186 assertNotNull(event); in checkGetMessageWithEventType() 188 assertNotNull(event.getMessage()); in checkGetMessageWithEventType() 190 assertEquals(event.getMessage(), msg); in checkGetMessageWithEventType()
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | DialerKeyListenerTest.java | 38 for (int event: events) { in testLookup() 39 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, event); in testLookup() 93 protected int lookup(KeyEvent event, Spannable content) { in lookup() argument 94 return super.lookup(event, content); in lookup()
|
D | BaseKeyListenerTest.java | 43 final KeyEvent event = getKey(KeyEvent.KEYCODE_DEL, modifiers); in testBackspace() local 48 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 53 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 58 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 60 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 68 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 73 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 78 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 86 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() 91 mockBaseKeyListener.backspace(mTextView, content, event.getKeyCode(), event); in testBackspace() [all …]
|
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
D | UsageStatsTest.java | 146 UsageEvents.Event event = new UsageEvents.Event(); in testOrderedActivityLaunchSequenceInEventLog() local 147 assertTrue(events.getNextEvent(event)); in testOrderedActivityLaunchSequenceInEventLog() 148 eventList.add(event); in testOrderedActivityLaunchSequenceInEventLog() 154 UsageEvents.Event event = eventList.get(end - 1); in testOrderedActivityLaunchSequenceInEventLog() local 155 if (event.getClassName().equals(activitySequence[activitySequence.length - 1].getName()) in testOrderedActivityLaunchSequenceInEventLog() 156 && event.getEventType() == UsageEvents.Event.MOVE_TO_FOREGROUND) { in testOrderedActivityLaunchSequenceInEventLog() 173 UsageEvents.Event event = eventList.get(index); in testOrderedActivityLaunchSequenceInEventLog() local 174 assertEquals(mTargetPackage, event.getPackageName()); in testOrderedActivityLaunchSequenceInEventLog() 175 assertEquals(activitySequence[i].getName(), event.getClassName()); in testOrderedActivityLaunchSequenceInEventLog() 176 assertEquals(UsageEvents.Event.MOVE_TO_FOREGROUND, event.getEventType()); in testOrderedActivityLaunchSequenceInEventLog() [all …]
|