diff options
| author | 2023-06-13 00:17:31 +0000 | |
|---|---|---|
| committer | 2023-06-13 00:17:31 +0000 | |
| commit | c40394448a3adb940b32b22b860923f400309aef (patch) | |
| tree | afdd44c6279e2d7a7de2a850d95bca6e9417d726 | |
| parent | f062971ed3dd864ded08278ef25050dc2defc12d (diff) | |
| parent | caeb150e5495f05c9f3e021491f11360c7ae54da (diff) | |
Merge "Get input-port-associations config files from ODM partition" am: caeb150e54
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2583451
Change-Id: Iafdd35b374b25b5011cd168571c10560b952a4fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/input/InputManagerService.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index 139217b91bd0..a614b6574e34 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -3105,12 +3105,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); |