Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 131d8dd6 authored by Daniel Norman's avatar Daniel Norman Committed by Automerger Merge Worker
Browse files

Merge "Updates InputDevice.cpp to read input configs from an APEX." am: ad23373a

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1836694

Change-Id: I2e070322fd580157ba542a9a4e0a6270dcb13e43
parents 5f85eb1d ad23373a
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -89,8 +89,15 @@ std::string getInputDeviceConfigurationFilePathByName(


    // Treblized input device config files will be located /product/usr, /system_ext/usr,
    // Treblized input device config files will be located /product/usr, /system_ext/usr,
    // /odm/usr or /vendor/usr.
    // /odm/usr or /vendor/usr.
    const char* rootsForPartition[]{"/product", "/system_ext", "/odm", "/vendor",
    // These files may also be in the com.android.input.config APEX.
                                    getenv("ANDROID_ROOT")};
    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++) {
    for (size_t i = 0; i < size(rootsForPartition); i++) {
        if (rootsForPartition[i] == nullptr) {
        if (rootsForPartition[i] == nullptr) {
            continue;
            continue;