Loading include/android/input.h +1 −0 Original line number Diff line number Diff line Loading @@ -877,6 +877,7 @@ enum { * Keyboard types. * * Refer to the documentation on android.view.InputDevice for more details. * Note: When adding a new keyboard type here InputDeviceInfo::setKeyboardType needs to be updated. */ enum { /** none */ Loading include/input/InputDevice.h +1 −1 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ public: void addBatteryInfo(const InputDeviceBatteryInfo& info); void addLightInfo(const InputDeviceLightInfo& info); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } void setKeyboardType(int32_t keyboardType); inline int32_t getKeyboardType() const { return mKeyboardType; } inline void setKeyCharacterMap(const std::shared_ptr<KeyCharacterMap> value) { Loading libs/input/InputDevice.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,13 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) { mLights.insert_or_assign(info.id, 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); } std::vector<InputDeviceSensorInfo> InputDeviceInfo::getSensors() { std::vector<InputDeviceSensorInfo> infos; infos.reserve(mSensors.size()); Loading Loading
include/android/input.h +1 −0 Original line number Diff line number Diff line Loading @@ -877,6 +877,7 @@ enum { * Keyboard types. * * Refer to the documentation on android.view.InputDevice for more details. * Note: When adding a new keyboard type here InputDeviceInfo::setKeyboardType needs to be updated. */ enum { /** none */ Loading
include/input/InputDevice.h +1 −1 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ public: void addBatteryInfo(const InputDeviceBatteryInfo& info); void addLightInfo(const InputDeviceLightInfo& info); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } void setKeyboardType(int32_t keyboardType); inline int32_t getKeyboardType() const { return mKeyboardType; } inline void setKeyCharacterMap(const std::shared_ptr<KeyCharacterMap> value) { Loading
libs/input/InputDevice.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,13 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) { mLights.insert_or_assign(info.id, 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); } std::vector<InputDeviceSensorInfo> InputDeviceInfo::getSensors() { std::vector<InputDeviceSensorInfo> infos; infos.reserve(mSensors.size()); Loading