Home
last modified time | relevance | path

Searched refs:InputDevice (Results 1 – 25 of 160) sorted by relevance

1234567

/aosp14/frameworks/base/tests/Input/src/com/android/test/input/
H A DInputDeviceTest.java36 private void assertMotionRangeEquals(InputDevice.MotionRange range, in assertMotionRangeEquals()
37 InputDevice.MotionRange outRange) { in assertMotionRangeEquals()
47 private void assertDeviceEquals(InputDevice device, InputDevice outDevice) { in assertDeviceEquals()
75 final InputDevice.Builder deviceBuilder = new InputDevice.Builder() in assertInputDeviceParcelUnparcel()
84 .setSources(InputDevice.SOURCE_HDMI) in assertInputDeviceParcelUnparcel()
85 .setKeyboardType(InputDevice.KEYBOARD_TYPE_NON_ALPHABETIC) in assertInputDeviceParcelUnparcel()
99 InputDevice.SOURCE_UNKNOWN, in assertInputDeviceParcelUnparcel()
107 final InputDevice device = deviceBuilder.build(); in assertInputDeviceParcelUnparcel()
113 InputDevice outDevice = InputDevice.CREATOR.createFromParcel(parcel); in assertInputDeviceParcelUnparcel()
/aosp14/frameworks/base/services/core/java/com/android/server/input/
H A DInputShellCommand.java50 import android.view.InputDevice;
99 map.put("dpad", InputDevice.SOURCE_DPAD);
102 map.put("mouse", InputDevice.SOURCE_MOUSE);
118 int[] devIds = InputDevice.getDeviceIds(); in getInputDeviceId()
120 InputDevice inputDev = InputDevice.getDevice(devId); in getInputDeviceId()
196 case InputDevice.SOURCE_MOUSE: in getToolType()
197 case InputDevice.SOURCE_MOUSE_RELATIVE: in getToolType()
198 case InputDevice.SOURCE_TRACKBALL: in getToolType()
201 case InputDevice.SOURCE_STYLUS: in getToolType()
205 case InputDevice.SOURCE_TOUCHPAD: in getToolType()
[all …]
/aosp14/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/hardware/
H A DInputDevice.kt19 import android.view.InputDevice
25 val InputDevice.isInternalStylusSource: Boolean regex
29 val InputDevice.isExternalStylusSource: Boolean regex
38 val InputDevice.isAnyStylusSource: Boolean regex
39 get() = supportsSource(InputDevice.SOURCE_STYLUS)
H A DInputManager.kt20 import android.view.InputDevice
40 fun InputManager.getInputDeviceSequence(): Sequence<InputDevice> =
47 fun InputManager.findInputDevice(predicate: (InputDevice) -> Boolean): InputDevice? =
59 fun InputManager.hasInputDevice(predicate: (InputDevice) -> Boolean): Boolean =
/aosp14/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/
H A DDragDetectorTest.kt22 import android.view.InputDevice
77 it.source == InputDevice.SOURCE_TOUCHSCREEN
83 it.source == InputDevice.SOURCE_TOUCHSCREEN
96 it.source == InputDevice.SOURCE_TOUCHSCREEN
109 it.source == InputDevice.SOURCE_TOUCHSCREEN
123 it.source == InputDevice.SOURCE_MOUSE
131 it.source == InputDevice.SOURCE_MOUSE
138 it.source == InputDevice.SOURCE_MOUSE
151 it.source == InputDevice.SOURCE_TOUCHSCREEN
158 it.source == InputDevice.SOURCE_TOUCHSCREEN
[all …]
/aosp14/frameworks/base/services/accessibility/java/com/android/server/accessibility/
H A DSystemActionPerformer.java32 import android.view.InputDevice;
280 sendDownAndUpKeyEvents(KeyEvent.KEYCODE_BACK, InputDevice.SOURCE_KEYBOARD); in performSystemAction()
284 sendDownAndUpKeyEvents(KeyEvent.KEYCODE_HOME, InputDevice.SOURCE_KEYBOARD); in performSystemAction()
308 InputDevice.SOURCE_KEYBOARD); in performSystemAction()
313 InputDevice.SOURCE_KEYBOARD | InputDevice.SOURCE_DPAD); in performSystemAction()
317 InputDevice.SOURCE_KEYBOARD | InputDevice.SOURCE_DPAD); in performSystemAction()
321 InputDevice.SOURCE_KEYBOARD | InputDevice.SOURCE_DPAD); in performSystemAction()
325 InputDevice.SOURCE_KEYBOARD | InputDevice.SOURCE_DPAD); in performSystemAction()
329 InputDevice.SOURCE_KEYBOARD | InputDevice.SOURCE_DPAD); in performSystemAction()
/aosp14/frameworks/base/core/tests/coretests/src/android/view/
H A DMotionEventTest.java19 import static android.view.InputDevice.SOURCE_CLASS_POINTER;
69 0, 0, 0, 0, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, displayId, 0); in testObtainWithDisplayId()
74 0 /* deviceId */, 0 /* edgeFlags */, InputDevice.SOURCE_TOUCHSCREEN, displayId); in testObtainWithDisplayId()
89 0, 0, 0, 0, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, displayId, 0); in testObtainWithDisplayId()
97 event.setSource(InputDevice.SOURCE_TOUCHSCREEN); in testCalculatesCursorPositionForTouchscreenEvents()
107 event.setSource(InputDevice.SOURCE_MOUSE); in testCalculatesCursorPositionForSimpleMouseEvents()
118 event.setSource(InputDevice.SOURCE_MOUSE); in testCalculatesCursorPositionForSimpleMouseEventsWithOffset()
144 0 /* deviceId */, 0 /* edgeFlags */, InputDevice.SOURCE_MOUSE, in testCalculatesCursorPositionForMultiTouchMouseEvents()
184 event.setSource(InputDevice.SOURCE_TOUCHSCREEN); in testEventRotation()
237 event.setSource(InputDevice.SOURCE_JOYSTICK); in testLocationOffsetOnlyAppliedToNonPointerSources()
/aosp14/frameworks/base/core/java/android/view/
H A DSearchEvent.java24 private InputDevice mInputDevice;
27 public SearchEvent(InputDevice inputDevice) { in SearchEvent()
35 public InputDevice getInputDevice() { in getInputDevice()
H A DInputDevice.java65 public final class InputDevice implements Parcelable { class
457 public static final @android.annotation.NonNull Parcelable.Creator<InputDevice> CREATOR =
458 new Parcelable.Creator<InputDevice>() {
459 public InputDevice createFromParcel(Parcel in) {
460 return new InputDevice(in);
462 public InputDevice[] newArray(int size) {
463 return new InputDevice[size];
507 private InputDevice(Parcel in) { in InputDevice() method in InputDevice
700 public InputDevice build() { in build()
701 InputDevice device = new InputDevice( in build()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
H A DAccessibilityInputFilterTest.java46 import android.view.InputDevice;
273 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers()
274 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers()
290 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForDisplayEventHandlers()
291 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForDisplayEventHandlers()
296 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_MOUSE)); in testInputEvent_shouldClearEventsForDisplayEventHandlers()
314 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers()
315 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers()
316 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers()
320 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_MOUSE)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
H A DMagnificationGestureHandlerTest.java29 import android.view.InputDevice;
71 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_isFromScreen_onMotionEventInternal()
85 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_downEvent_handleInteractionStart()
99 upEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_upEvent_handleInteractionEnd()
113 cancelEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_cancelEvent_handleInteractionEnd()
/aosp14/frameworks/base/core/tests/coretests/src/android/hardware/input/
H A DInputDeviceSensorManagerTest.java39 import android.view.InputDevice;
140 private InputDevice createInputDeviceWithSensor(int id) { in createInputDeviceWithSensor()
141 return new InputDevice.Builder() in createInputDeviceWithSensor()
157 private InputDevice getSensorDevice(int[] deviceIds) { in getSensorDevice()
159 InputDevice device = mInputManager.getInputDevice(deviceId); in getSensorDevice()
169 InputDevice device = getSensorDevice(mInputManager.getInputDeviceIds()); in getInputDeviceSensors_withExpectedType()
189 InputDevice device = getSensorDevice(mInputManager.getInputDeviceIds()); in getInputDeviceSensors_withUnexpectedType()
206 InputDevice device = getSensorDevice(mInputManager.getInputDeviceIds()); in testInputDeviceSensorListener()
H A DInputDeviceLightsManagerTest.java44 import android.view.InputDevice;
120 private InputDevice createInputDevice(int id) { in createInputDevice()
121 return new InputDevice.Builder() in createInputDevice()
135 InputDevice device = mInputManager.getInputDevice(DEVICE_ID); in testGetInputDeviceLights()
156 InputDevice device = mInputManager.getInputDevice(DEVICE_ID); in testControlMultipleLights()
208 InputDevice device = mInputManager.getInputDevice(DEVICE_ID); in testControlPlayerIdLight()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/stylus/
H A DStylusUsiPowerStartableTest.kt22 import android.view.InputDevice
44 @Mock lateinit var stylusDevice: InputDevice
45 @Mock lateinit var externalDevice: InputDevice
70 whenever(stylusDevice.supportsSource(InputDevice.SOURCE_STYLUS)).thenReturn(true)
73 whenever(externalDevice.supportsSource(InputDevice.SOURCE_STYLUS)).thenReturn(true)
/aosp14/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
H A DInteractionController.java26 import android.view.InputDevice;
192 InputDevice.SOURCE_KEYBOARD); in sendKeyAndWaitForEvent()
196 InputDevice.SOURCE_KEYBOARD); in sendKeyAndWaitForEvent()
309 event.setSource(InputDevice.SOURCE_TOUCHSCREEN);
320 event.setSource(InputDevice.SOURCE_TOUCHSCREEN);
332 event.setSource(InputDevice.SOURCE_TOUCHSCREEN);
549 InputDevice.SOURCE_KEYBOARD);
553 InputDevice.SOURCE_KEYBOARD);
718 pointerCoords, 0, 0, 1, 1, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0);
735 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0);
[all …]
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/policy/
H A DShortcutKeyTestBase.java51 import android.view.InputDevice;
104 0 /*flags*/, InputDevice.SOURCE_KEYBOARD); in sendKeyCombination()
126 InputDevice.SOURCE_KEYBOARD); in sendKeyCombination()
140 0 /*flags*/, InputDevice.SOURCE_KEYBOARD); in sendKey()
149 KeyEvent.FLAG_LONG_PRESS /*flags*/, InputDevice.SOURCE_KEYBOARD); in sendKey()
158 0 /*flags*/, InputDevice.SOURCE_KEYBOARD); in sendKey()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/input/
H A DKeyRemapperTests.kt27 import android.view.InputDevice
43 private fun createKeyboard(deviceId: Int): InputDevice =
44 InputDevice.Builder()
48 .setSources(InputDevice.SOURCE_KEYBOARD)
49 .setKeyboardType(InputDevice.KEYBOARD_TYPE_ALPHABETIC)
H A DKeyboardMetricsCollectorTests.kt22 import android.view.InputDevice
35 ): InputDevice =
36 InputDevice.Builder()
40 .setSources(InputDevice.SOURCE_KEYBOARD)
41 .setKeyboardType(InputDevice.KEYBOARD_TYPE_ALPHABETIC)
H A DKeyboardLayoutManagerTests.kt35 import android.view.InputDevice
62 ): InputDevice =
63 InputDevice.Builder()
67 .setSources(InputDevice.SOURCE_KEYBOARD)
68 .setKeyboardType(InputDevice.KEYBOARD_TYPE_ALPHABETIC)
125 private lateinit var keyboardDevice: InputDevice
126 private lateinit var vendorSpecificKeyboardDevice: InputDevice
127 private lateinit var englishDvorakKeyboardDevice: InputDevice
128 private lateinit var englishQwertyKeyboardDevice: InputDevice
822 device: InputDevice,
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/companion/virtual/
H A DInputManagerMockHelper.java31 import android.view.InputDevice;
49 private final List<InputDevice> mDevices = new ArrayList<>();
87 final InputDevice device = new InputDevice.Builder() in handleNativeOpenInputDevice()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/stylus/
H A DStylusManager.kt28 import android.view.InputDevice
110 val device: InputDevice = inputManager.getInputDevice(deviceId) ?: return
111 if (!device.supportsSource(InputDevice.SOURCE_STYLUS)) return
135 val device: InputDevice = inputManager.getInputDevice(deviceId) ?: return
136 if (!device.supportsSource(InputDevice.SOURCE_STYLUS)) return
346 val device: InputDevice = inputManager.getInputDevice(deviceId) ?: continue
347 if (device.supportsSource(InputDevice.SOURCE_STYLUS)) {
/aosp14/frameworks/base/core/java/android/hardware/input/
H A DInputDeviceVibratorManager.java28 import android.view.InputDevice;
62 InputDevice inputDevice = InputDevice.getDevice(mDeviceId); in initializeVibrators()
/aosp14/frameworks/base/services/core/java/com/android/server/vibrator/
H A DInputDeviceDelegate.java26 import android.view.InputDevice;
148 InputDevice device = mInputManager.getInputDevice(deviceId); in updateInputDeviceVibrators()
175 InputDevice device = mInputManager.getInputDevice(deviceId); in updateInputDevice()
/aosp14/frameworks/base/core/java/android/widget/
H A DButton.java21 import android.view.InputDevice;
178 && event.isFromSource(InputDevice.SOURCE_MOUSE)) { in onResolvePointerIcon()
H A DImageButton.java21 import android.view.InputDevice;
104 && event.isFromSource(InputDevice.SOURCE_MOUSE)) { in onResolvePointerIcon()

1234567