From e58ffb9d38a73c5c0520a73aa2a985596d73bd9e Mon Sep 17 00:00:00 2001 From: Vaibhav Devmurari Date: Wed, 22 May 2024 17:38:25 +0000 Subject: Implement KeyboardClassifier interface in rust DD: go/project-imposter-android This CL includes: - Rust interface setup Next CL to include: - Basic categorization into alphabetic and non-alphabetic - Updating categorization based on key presses Test: atest --host libinput_rust_test Test: atest inputflinger_tests Bug: 263559234 Flag: com.android.input.flags.enable_keyboard_classifier_rust_impl Change-Id: I52773be992ddd8efaa9546e0af8b0a78515d931c --- libs/input/InputDevice.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libs/input/InputDevice.cpp') diff --git a/libs/input/InputDevice.cpp b/libs/input/InputDevice.cpp index bc678103c2..9333ab83a6 100644 --- a/libs/input/InputDevice.cpp +++ b/libs/input/InputDevice.cpp @@ -273,10 +273,7 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) { } void InputDeviceInfo::setKeyboardType(int32_t keyboardType) { - static_assert(AINPUT_KEYBOARD_TYPE_NONE < AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC); - static_assert(AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC < AINPUT_KEYBOARD_TYPE_ALPHABETIC); - // There can be multiple subdevices with different keyboard types, set it to the highest type - mKeyboardType = std::max(mKeyboardType, keyboardType); + mKeyboardType = keyboardType; } void InputDeviceInfo::setKeyboardLayoutInfo(KeyboardLayoutInfo layoutInfo) { -- cgit v1.2.3-59-g8ed1b