summaryrefslogtreecommitdiff
path: root/libs/input/InputDevice.cpp
diff options
context:
space:
mode:
author Vaibhav Devmurari <vdevmurari@google.com> 2024-05-22 17:38:25 +0000
committer Vaibhav Devmurari <vdevmurari@google.com> 2024-06-07 17:42:29 +0000
commite58ffb9d38a73c5c0520a73aa2a985596d73bd9e (patch)
tree42f3ccfb28ce91d686f493349e4ff47a11ddb8d6 /libs/input/InputDevice.cpp
parente274131941190091df17d19355999752662c32e6 (diff)
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
Diffstat (limited to 'libs/input/InputDevice.cpp')
-rw-r--r--libs/input/InputDevice.cpp5
1 files changed, 1 insertions, 4 deletions
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) {