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

Commit 5cc1f2b8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Get input-port-associations config files from ODM partition" am:...

Merge "Get input-port-associations config files from ODM partition" am: caeb150e am: c4039444 am: b54f672c am: 59f1177a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2583451



Change-Id: Iad8b6727aa2de4d6e5146d18a533dde1e7d996d8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 57ff3723 59f1177a
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2560,12 +2560,17 @@ public class InputManagerService extends IInputManager.Stub
    }

    /**
     * Ports are highly platform-specific, so only allow these to be specified in the vendor
     * Ports are highly platform-specific, so allow these to be specified in the odm/vendor
     * directory.
     */
    private static Map<String, Integer> loadStaticInputPortAssociations() {
        final File baseDir = Environment.getVendorDirectory();
        final File confFile = new File(baseDir, PORT_ASSOCIATIONS_PATH);
        File baseDir = Environment.getOdmDirectory();
        File confFile = new File(baseDir, PORT_ASSOCIATIONS_PATH);

        if (!confFile.exists()) {
            baseDir = Environment.getVendorDirectory();
            confFile = new File(baseDir, PORT_ASSOCIATIONS_PATH);
        }

        try (final InputStream stream = new FileInputStream(confFile)) {
            return ConfigurationProcessor.processInputPortAssociations(stream);