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

Commit c6b92c3a authored by Tsukasa Hashimoto's avatar Tsukasa Hashimoto Committed by android-build-merger
Browse files

Merge "Enable excluded-input-devices settings for vendor"

am: 41a6efb4

Change-Id: I6e444834fca3ed1ee58bcc2b2123fc6ed8eb3282
parents 34c40737 41a6efb4
Loading
Loading
Loading
Loading
+28 −22
Original line number Diff line number Diff line
@@ -1879,7 +1879,12 @@ public class InputManagerService extends IInputManager.Stub
        // Read partner-provided list of excluded input devices
        XmlPullParser parser = null;
        // Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or "/system".
        File confFile = new File(Environment.getRootDirectory(), EXCLUDED_DEVICES_PATH);
        final File[] baseDirs = {
            Environment.getRootDirectory(),
            Environment.getVendorDirectory()
        };
        for (File baseDir: baseDirs) {
            File confFile = new File(baseDir, EXCLUDED_DEVICES_PATH);
            FileReader confreader = null;
            try {
                confreader = new FileReader(confFile);
@@ -1904,6 +1909,7 @@ public class InputManagerService extends IInputManager.Stub
            } finally {
                try { if (confreader != null) confreader.close(); } catch (IOException e) { }
            }
        }

        return names.toArray(new String[names.size()]);
    }