diff options
| author | 2021-10-08 16:31:03 -0700 | |
|---|---|---|
| committer | 2021-10-08 16:31:03 -0700 | |
| commit | 54283d65974e8eebc0b65dddfcaad3ccfdaa8482 (patch) | |
| tree | 027f99060c357a9ba26e71dde1bbe364e2b40e50 /libs/input/InputDevice.cpp | |
| parent | cfd046033588758691c01aa652a82db24c967845 (diff) | |
Updates InputDevice.cpp to read input configs from an APEX.
Devices that include these files in an APEX must ensure it is named
as expected by this file: com.android.input.config.
Bug: 197881714
Test: Tested with an input config apex for cuttlefish
Change-Id: Iccccc9bb57e25013aadec6aa0de8e58cbd5c9e68
Diffstat (limited to 'libs/input/InputDevice.cpp')
| -rw-r--r-- | libs/input/InputDevice.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/input/InputDevice.cpp b/libs/input/InputDevice.cpp index 30c42a3daa..fcbc16f9c7 100644 --- a/libs/input/InputDevice.cpp +++ b/libs/input/InputDevice.cpp @@ -89,8 +89,15 @@ std::string getInputDeviceConfigurationFilePathByName( // Treblized input device config files will be located /product/usr, /system_ext/usr, // /odm/usr or /vendor/usr. - const char* rootsForPartition[]{"/product", "/system_ext", "/odm", "/vendor", - getenv("ANDROID_ROOT")}; + // These files may also be in the com.android.input.config APEX. + const char* rootsForPartition[]{ + "/product", + "/system_ext", + "/odm", + "/vendor", + "/apex/com.android.input.config/etc", + getenv("ANDROID_ROOT"), + }; for (size_t i = 0; i < size(rootsForPartition); i++) { if (rootsForPartition[i] == nullptr) { continue; |