Loading libs/input/InputDevice.cpp +14 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <ctype.h> #include <input/InputDevice.h> #include <input/InputEventLabels.h> namespace android { Loading Loading @@ -87,11 +88,16 @@ String8 getInputDeviceConfigurationFilePathByName( const String8& name, InputDeviceConfigurationFileType type) { // Search system repository. String8 path; path.setTo(getenv("ANDROID_ROOT")); // Treblized input device config files will be located /odm/usr or /vendor/usr. char *rootsForPartition[] {"/odm", "/vendor", getenv("ANDROID_ROOT")}; for (size_t i = 0; i < size(rootsForPartition); i++) { path.setTo(rootsForPartition[i]); path.append("/usr/"); appendInputDeviceConfigurationFileRelativePath(path, name, type); #if DEBUG_PROBE ALOGD("Probing for system provided input device configuration file: path='%s'", path.string()); ALOGD("Probing for system provided input device configuration file: path='%s'", path.string()); #endif if (!access(path.string(), R_OK)) { #if DEBUG_PROBE Loading @@ -99,6 +105,7 @@ String8 getInputDeviceConfigurationFilePathByName( #endif return path; } } // Search user repository. // TODO Should only look here if not in safe mode. Loading Loading
libs/input/InputDevice.cpp +14 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <ctype.h> #include <input/InputDevice.h> #include <input/InputEventLabels.h> namespace android { Loading Loading @@ -87,11 +88,16 @@ String8 getInputDeviceConfigurationFilePathByName( const String8& name, InputDeviceConfigurationFileType type) { // Search system repository. String8 path; path.setTo(getenv("ANDROID_ROOT")); // Treblized input device config files will be located /odm/usr or /vendor/usr. char *rootsForPartition[] {"/odm", "/vendor", getenv("ANDROID_ROOT")}; for (size_t i = 0; i < size(rootsForPartition); i++) { path.setTo(rootsForPartition[i]); path.append("/usr/"); appendInputDeviceConfigurationFileRelativePath(path, name, type); #if DEBUG_PROBE ALOGD("Probing for system provided input device configuration file: path='%s'", path.string()); ALOGD("Probing for system provided input device configuration file: path='%s'", path.string()); #endif if (!access(path.string(), R_OK)) { #if DEBUG_PROBE Loading @@ -99,6 +105,7 @@ String8 getInputDeviceConfigurationFilePathByName( #endif return path; } } // Search user repository. // TODO Should only look here if not in safe mode. Loading