summaryrefslogtreecommitdiff
path: root/include/input/InputDevice.h
diff options
context:
space:
mode:
author Vaibhav Devmurari <vdevmurari@google.com> 2023-01-02 13:30:26 +0000
committer Vaibhav Devmurari <vdevmurari@google.com> 2023-01-04 17:43:14 +0000
commit7fb411367ff01ef737ad6dff2dcd68d60a06a09e (patch)
tree4a3e4bda8f81bb290876fc7bfbfeb220381b7d73 /include/input/InputDevice.h
parent78c84d62bdc4ebe288c7cfaf6ddf9febc47d227d (diff)
Convert country code to Layoutinfo (Language tag + Layout type)
Instead of passing country code to InputDevice.java, convert it to Language tag and Layout type on native side and pass that forward instead. We can later add support for HID language tag, that would give us better layout information than country code. This HID language tag is for Keyboard devices so, we set this country code derived language tag also for Keyboards only, even though country code could be specified for all types of devices. Moreover, we are using language tag and layout type for setting layout related info for Virtual keyboard devices too, making using country code redundant. Test: atest inputflinger_tests Bug: 259530132 Change-Id: I8eca5537a5bb44d0b8b056947cc317ac82a0901f
Diffstat (limited to 'include/input/InputDevice.h')
-rw-r--r--include/input/InputDevice.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h
index 5fa9fda64b..09933d32b1 100644
--- a/include/input/InputDevice.h
+++ b/include/input/InputDevice.h
@@ -24,7 +24,6 @@
#include <vector>
#include <android/os/IInputConstants.h>
-#include "android/hardware/input/InputDeviceCountryCode.h"
namespace android {
@@ -236,9 +235,7 @@ public:
void initialize(int32_t id, int32_t generation, int32_t controllerNumber,
const InputDeviceIdentifier& identifier, const std::string& alias,
- bool isExternal, bool hasMic,
- hardware::input::InputDeviceCountryCode countryCode =
- hardware::input::InputDeviceCountryCode::INVALID);
+ bool isExternal, bool hasMic);
inline int32_t getId() const { return mId; }
inline int32_t getControllerNumber() const { return mControllerNumber; }
@@ -250,7 +247,6 @@ public:
}
inline bool isExternal() const { return mIsExternal; }
inline bool hasMic() const { return mHasMic; }
- inline hardware::input::InputDeviceCountryCode getCountryCode() const { return mCountryCode; }
inline uint32_t getSources() const { return mSources; }
const MotionRange* getMotionRange(int32_t axis, uint32_t source) const;
@@ -310,7 +306,6 @@ private:
std::string mAlias;
bool mIsExternal;
bool mHasMic;
- hardware::input::InputDeviceCountryCode mCountryCode;
std::optional<KeyboardLayoutInfo> mKeyboardLayoutInfo;
uint32_t mSources;
int32_t mKeyboardType;