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

Commit 41a6efb4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 0af2cf25 ea12b554
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()]);
    }