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

Commit 0da3b85a 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 am: 5cc1f2b8 am: b962abd1

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



Change-Id: Ib72b1e195af15396b02f30d2a25054ae64d7b124
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d7590070 b962abd1
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2561,12 +2561,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);