Home
last modified time | relevance | path

Searched refs:buttonCode (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/core/java/android/hardware/input/
DVirtualMouseButtonEvent.java88 private VirtualMouseButtonEvent(@Action int action, @Button int buttonCode, in VirtualMouseButtonEvent() argument
91 mButtonCode = buttonCode; in VirtualMouseButtonEvent()
170 public @NonNull Builder setButtonCode(int buttonCode) { in setButtonCode() argument
171 if (buttonCode != BUTTON_PRIMARY in setButtonCode()
172 && buttonCode != BUTTON_TERTIARY in setButtonCode()
173 && buttonCode != BUTTON_SECONDARY in setButtonCode()
174 && buttonCode != BUTTON_BACK in setButtonCode()
175 && buttonCode != BUTTON_FORWARD) { in setButtonCode()
178 mButtonCode = buttonCode; in setButtonCode()
DVirtualStylusButtonEvent.java77 private VirtualStylusButtonEvent(@Action int action, @Button int buttonCode, in VirtualStylusButtonEvent() argument
80 mButtonCode = buttonCode; in VirtualStylusButtonEvent()
162 public Builder setButtonCode(@Button int buttonCode) { in setButtonCode() argument
163 if (buttonCode != BUTTON_PRIMARY && buttonCode != BUTTON_SECONDARY) { in setButtonCode()
165 "Unsupported stylus button code : " + buttonCode); in setButtonCode()
167 mButtonCode = buttonCode; in setButtonCode()
/frameworks/native/services/inputflinger/tests/
DHardwareProperties_test.cpp77 for (const auto& buttonCode : buttonCodes) { in setButtonsPresent() local
78 EXPECT_CALL(mMockEventHub, hasScanCode(EVENTHUB_ID, buttonCode)) in setButtonsPresent()
/frameworks/base/services/companion/java/com/android/server/companion/virtual/
DInputController.java457 private static native boolean nativeWriteButtonEvent(long ptr, int buttonCode, int action, in nativeWriteButtonEvent() argument
468 private static native boolean nativeWriteStylusButtonEvent(long ptr, int buttonCode, int action, in nativeWriteStylusButtonEvent() argument
512 public boolean writeButtonEvent(long ptr, int buttonCode, int action, in writeButtonEvent() argument
514 return nativeWriteButtonEvent(ptr, buttonCode, action, eventTimeNanos); in writeButtonEvent()
541 public boolean writeStylusButtonEvent(long ptr, int buttonCode, int action, in writeStylusButtonEvent() argument
543 return nativeWriteStylusButtonEvent(ptr, buttonCode, action, eventTimeNanos); in writeStylusButtonEvent()
/frameworks/base/services/core/jni/
Dcom_android_server_companion_virtual_InputController.cpp347 static bool nativeWriteButtonEvent(JNIEnv* env, jobject thiz, jlong ptr, jint buttonCode, in nativeWriteButtonEvent() argument
350 return virtualMouse->writeButtonEvent(buttonCode, action, in nativeWriteButtonEvent()
377 static bool nativeWriteStylusButtonEvent(JNIEnv* env, jobject thiz, jlong ptr, jint buttonCode, in nativeWriteStylusButtonEvent() argument
380 return virtualStylus->writeButtonEvent(buttonCode, action, in nativeWriteStylusButtonEvent()
/frameworks/base/services/tests/servicestests/src/com/android/server/companion/virtual/
DVirtualDeviceManagerServiceTest.java1329 final int buttonCode = VirtualMouseButtonEvent.BUTTON_BACK; in sendButtonEvent_hasFd_writesEvent() local
1337 .setButtonCode(buttonCode) in sendButtonEvent_hasFd_writesEvent()
1342 verify(mNativeWrapperMock).writeButtonEvent(fd, buttonCode, action, eventTimeNanos); in sendButtonEvent_hasFd_writesEvent()