From 1d927aa2377c9e1fa57f9e2e409dc9a33d1bcc7a Mon Sep 17 00:00:00 2001 From: Chris Ye Date: Sat, 4 Jul 2020 18:22:41 -0700 Subject: Convert InputDeviceConfigurationFileType to enum class. Convert InputDeviceConfigurationFileType to enum class and the reference to it accordingly. Test: atest inputflinger_tests Change-Id: I9a7c0371aa3c519ca69cc4e019079f9645d4ff09 --- libs/input/Keyboard.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libs/input/Keyboard.cpp') diff --git a/libs/input/Keyboard.cpp b/libs/input/Keyboard.cpp index 56900c129e..25025f2963 100644 --- a/libs/input/Keyboard.cpp +++ b/libs/input/Keyboard.cpp @@ -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; } @@ -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; } -- cgit v1.2.3-59-g8ed1b