Loading include/input/InputDevice.h +4 −4 Original line number Diff line number Diff line Loading @@ -144,10 +144,10 @@ private: }; /* Types of input device configuration files. */ enum InputDeviceConfigurationFileType { INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION = 0, /* .idc file */ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_LAYOUT = 1, /* .kl file */ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP = 2, /* .kcm file */ enum class InputDeviceConfigurationFileType : int32_t { CONFIGURATION = 0, /* .idc file */ KEY_LAYOUT = 1, /* .kl file */ KEY_CHARACTER_MAP = 2, /* .kcm file */ }; /* Loading libs/input/InputDevice.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -46,9 +46,9 @@ static bool isValidNameChar(char ch) { static void appendInputDeviceConfigurationFileRelativePath(std::string& path, const std::string& name, InputDeviceConfigurationFileType type) { path += CONFIGURATION_FILE_DIR[type]; path += CONFIGURATION_FILE_DIR[static_cast<int32_t>(type)]; path += name; path += CONFIGURATION_FILE_EXTENSION[type]; path += CONFIGURATION_FILE_EXTENSION[static_cast<int32_t>(type)]; } std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( Loading libs/input/Keyboard.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -105,8 +105,7 @@ bool KeyMap::probeKeyMap(const InputDeviceIdentifier& deviceIdentifier, status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier, const std::string& name) { std::string path(getPath(deviceIdentifier, name, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_LAYOUT)); std::string path(getPath(deviceIdentifier, name, InputDeviceConfigurationFileType::KEY_LAYOUT)); if (path.empty()) { return NAME_NOT_FOUND; } Loading @@ -122,8 +121,8 @@ status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier, status_t KeyMap::loadKeyCharacterMap(const InputDeviceIdentifier& deviceIdentifier, const std::string& name) { std::string path = getPath(deviceIdentifier, name, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP); std::string path = getPath(deviceIdentifier, name, InputDeviceConfigurationFileType::KEY_CHARACTER_MAP); if (path.empty()) { return NAME_NOT_FOUND; } Loading services/inputflinger/host/InputDriver.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -217,8 +217,10 @@ input_property_map_t* InputDriver::inputGetDevicePropertyMap(input_device_identi idi.product = id->productId; idi.version = id->version; std::string configFile = getInputDeviceConfigurationFilePathByDeviceIdentifier( idi, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); std::string configFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(idi, InputDeviceConfigurationFileType:: CONFIGURATION); if (configFile.empty()) { ALOGD("No input device configuration file found for device '%s'.", idi.name.c_str()); Loading services/inputflinger/reader/EventHub.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1613,8 +1613,10 @@ void EventHub::addDeviceLocked(Device* device) { } void EventHub::loadConfigurationLocked(Device* device) { device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier( device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(device->identifier, InputDeviceConfigurationFileType:: CONFIGURATION); if (device->configurationFile.empty()) { ALOGD("No input device configuration file found for device '%s'.", device->identifier.name.c_str()); Loading Loading
include/input/InputDevice.h +4 −4 Original line number Diff line number Diff line Loading @@ -144,10 +144,10 @@ private: }; /* Types of input device configuration files. */ enum InputDeviceConfigurationFileType { INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION = 0, /* .idc file */ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_LAYOUT = 1, /* .kl file */ INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP = 2, /* .kcm file */ enum class InputDeviceConfigurationFileType : int32_t { CONFIGURATION = 0, /* .idc file */ KEY_LAYOUT = 1, /* .kl file */ KEY_CHARACTER_MAP = 2, /* .kcm file */ }; /* Loading
libs/input/InputDevice.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -46,9 +46,9 @@ static bool isValidNameChar(char ch) { static void appendInputDeviceConfigurationFileRelativePath(std::string& path, const std::string& name, InputDeviceConfigurationFileType type) { path += CONFIGURATION_FILE_DIR[type]; path += CONFIGURATION_FILE_DIR[static_cast<int32_t>(type)]; path += name; path += CONFIGURATION_FILE_EXTENSION[type]; path += CONFIGURATION_FILE_EXTENSION[static_cast<int32_t>(type)]; } std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( Loading
libs/input/Keyboard.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -105,8 +105,7 @@ bool KeyMap::probeKeyMap(const InputDeviceIdentifier& deviceIdentifier, status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier, const std::string& name) { std::string path(getPath(deviceIdentifier, name, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_LAYOUT)); std::string path(getPath(deviceIdentifier, name, InputDeviceConfigurationFileType::KEY_LAYOUT)); if (path.empty()) { return NAME_NOT_FOUND; } Loading @@ -122,8 +121,8 @@ status_t KeyMap::loadKeyLayout(const InputDeviceIdentifier& deviceIdentifier, status_t KeyMap::loadKeyCharacterMap(const InputDeviceIdentifier& deviceIdentifier, const std::string& name) { std::string path = getPath(deviceIdentifier, name, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_KEY_CHARACTER_MAP); std::string path = getPath(deviceIdentifier, name, InputDeviceConfigurationFileType::KEY_CHARACTER_MAP); if (path.empty()) { return NAME_NOT_FOUND; } Loading
services/inputflinger/host/InputDriver.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -217,8 +217,10 @@ input_property_map_t* InputDriver::inputGetDevicePropertyMap(input_device_identi idi.product = id->productId; idi.version = id->version; std::string configFile = getInputDeviceConfigurationFilePathByDeviceIdentifier( idi, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); std::string configFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(idi, InputDeviceConfigurationFileType:: CONFIGURATION); if (configFile.empty()) { ALOGD("No input device configuration file found for device '%s'.", idi.name.c_str()); Loading
services/inputflinger/reader/EventHub.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1613,8 +1613,10 @@ void EventHub::addDeviceLocked(Device* device) { } void EventHub::loadConfigurationLocked(Device* device) { device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier( device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(device->identifier, InputDeviceConfigurationFileType:: CONFIGURATION); if (device->configurationFile.empty()) { ALOGD("No input device configuration file found for device '%s'.", device->identifier.name.c_str()); Loading