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

Commit ea12b554 authored by Tsukasa Hashimoto's avatar Tsukasa Hashimoto Committed by akihiro miura
Browse files

Enable excluded-input-devices settings for vendor

Currently excluded-input-devices settings file is available
only on the system image. This change enables that settings
with the vendor image also.

Bug: 115603053

Change-Id: I575298baee8e7186d1fcf8c29db09a0f247999c3
parent 241aa86e
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()]);
    }