Loading include/android/input.h +0 −2 Original line number Diff line number Diff line Loading @@ -849,7 +849,6 @@ enum { * Refer to the documentation on the MotionEvent class for descriptions of each button. */ enum { // LINT.IfChange(AMOTION_EVENT_BUTTON) /** primary */ AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0, /** secondary */ Loading @@ -862,7 +861,6 @@ enum { AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5, AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6, // LINT.ThenChange(/frameworks/native/libs/input/rust/input.rs) }; /** Loading include/input/InputVerifier.h +2 −3 Original line number Diff line number Diff line Loading @@ -47,10 +47,9 @@ public: InputVerifier(const std::string& name); android::base::Result<void> processMovement(int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, uint32_t pointerCount, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags, int32_t buttonState); const PointerCoords* pointerCoords, int32_t flags); void resetDevice(int32_t deviceId); Loading libs/input/Android.bp +0 −7 Original line number Diff line number Diff line Loading @@ -91,13 +91,6 @@ rust_bindgen { "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT", "--allowlist-var=AMOTION_EVENT_BUTTON_PRIMARY", "--allowlist-var=AMOTION_EVENT_BUTTON_SECONDARY", "--allowlist-var=AMOTION_EVENT_BUTTON_TERTIARY", "--allowlist-var=AMOTION_EVENT_BUTTON_BACK", "--allowlist-var=AMOTION_EVENT_BUTTON_FORWARD", "--allowlist-var=AMOTION_EVENT_BUTTON_STYLUS_PRIMARY", "--allowlist-var=AMOTION_EVENT_BUTTON_STYLUS_SECONDARY", "--allowlist-var=MAX_POINTER_ID", "--allowlist-var=AINPUT_SOURCE_CLASS_NONE", "--allowlist-var=AINPUT_SOURCE_CLASS_BUTTON", Loading libs/input/InputTransport.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -651,9 +651,9 @@ status_t InputPublisher::publishMotionEvent( const status_t status = mChannel->sendMessage(&msg); if (status == OK && verifyEvents()) { Result<void> result = mInputVerifier.processMovement(deviceId, source, action, actionButton, pointerCount, pointerProperties, pointerCoords, flags, buttonState); Result<void> result = mInputVerifier.processMovement(deviceId, source, action, pointerCount, pointerProperties, pointerCoords, flags); if (!result.ok()) { LOG(ERROR) << "Bad stream: " << result.error(); return BAD_VALUE; Loading libs/input/InputVerifier.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -34,10 +34,9 @@ InputVerifier::InputVerifier(const std::string& name) : mVerifier(android::input::verifier::create(rust::String::lossy(name))){}; Result<void> InputVerifier::processMovement(DeviceId deviceId, int32_t source, int32_t action, int32_t actionButton, uint32_t pointerCount, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags, int32_t buttonState) { const PointerCoords* pointerCoords, int32_t flags) { std::vector<RustPointerProperties> rpp; for (size_t i = 0; i < pointerCount; i++) { rpp.emplace_back(RustPointerProperties{.id = pointerProperties[i].id}); Loading @@ -45,9 +44,7 @@ Result<void> InputVerifier::processMovement(DeviceId deviceId, int32_t source, i rust::Slice<const RustPointerProperties> properties{rpp.data(), rpp.size()}; rust::String errorMessage = android::input::verifier::process_movement(*mVerifier, deviceId, source, action, actionButton, properties, static_cast<uint32_t>(flags), static_cast<uint32_t>(buttonState)); properties, static_cast<uint32_t>(flags)); if (errorMessage.empty()) { return {}; } else { Loading Loading
include/android/input.h +0 −2 Original line number Diff line number Diff line Loading @@ -849,7 +849,6 @@ enum { * Refer to the documentation on the MotionEvent class for descriptions of each button. */ enum { // LINT.IfChange(AMOTION_EVENT_BUTTON) /** primary */ AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0, /** secondary */ Loading @@ -862,7 +861,6 @@ enum { AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5, AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6, // LINT.ThenChange(/frameworks/native/libs/input/rust/input.rs) }; /** Loading
include/input/InputVerifier.h +2 −3 Original line number Diff line number Diff line Loading @@ -47,10 +47,9 @@ public: InputVerifier(const std::string& name); android::base::Result<void> processMovement(int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, uint32_t pointerCount, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags, int32_t buttonState); const PointerCoords* pointerCoords, int32_t flags); void resetDevice(int32_t deviceId); Loading
libs/input/Android.bp +0 −7 Original line number Diff line number Diff line Loading @@ -91,13 +91,6 @@ rust_bindgen { "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT", "--allowlist-var=AMOTION_EVENT_BUTTON_PRIMARY", "--allowlist-var=AMOTION_EVENT_BUTTON_SECONDARY", "--allowlist-var=AMOTION_EVENT_BUTTON_TERTIARY", "--allowlist-var=AMOTION_EVENT_BUTTON_BACK", "--allowlist-var=AMOTION_EVENT_BUTTON_FORWARD", "--allowlist-var=AMOTION_EVENT_BUTTON_STYLUS_PRIMARY", "--allowlist-var=AMOTION_EVENT_BUTTON_STYLUS_SECONDARY", "--allowlist-var=MAX_POINTER_ID", "--allowlist-var=AINPUT_SOURCE_CLASS_NONE", "--allowlist-var=AINPUT_SOURCE_CLASS_BUTTON", Loading
libs/input/InputTransport.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -651,9 +651,9 @@ status_t InputPublisher::publishMotionEvent( const status_t status = mChannel->sendMessage(&msg); if (status == OK && verifyEvents()) { Result<void> result = mInputVerifier.processMovement(deviceId, source, action, actionButton, pointerCount, pointerProperties, pointerCoords, flags, buttonState); Result<void> result = mInputVerifier.processMovement(deviceId, source, action, pointerCount, pointerProperties, pointerCoords, flags); if (!result.ok()) { LOG(ERROR) << "Bad stream: " << result.error(); return BAD_VALUE; Loading
libs/input/InputVerifier.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -34,10 +34,9 @@ InputVerifier::InputVerifier(const std::string& name) : mVerifier(android::input::verifier::create(rust::String::lossy(name))){}; Result<void> InputVerifier::processMovement(DeviceId deviceId, int32_t source, int32_t action, int32_t actionButton, uint32_t pointerCount, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags, int32_t buttonState) { const PointerCoords* pointerCoords, int32_t flags) { std::vector<RustPointerProperties> rpp; for (size_t i = 0; i < pointerCount; i++) { rpp.emplace_back(RustPointerProperties{.id = pointerProperties[i].id}); Loading @@ -45,9 +44,7 @@ Result<void> InputVerifier::processMovement(DeviceId deviceId, int32_t source, i rust::Slice<const RustPointerProperties> properties{rpp.data(), rpp.size()}; rust::String errorMessage = android::input::verifier::process_movement(*mVerifier, deviceId, source, action, actionButton, properties, static_cast<uint32_t>(flags), static_cast<uint32_t>(buttonState)); properties, static_cast<uint32_t>(flags)); if (errorMessage.empty()) { return {}; } else { Loading