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

Commit 59d81479 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

am: c6b92c3a

Change-Id: I7d3640809ac1bb0670e29438a6ec04545c39baa5
parents d8379876 c6b92c3a
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()]);
    }