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

Commit 509ca079 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 20331

* changes:
  KeyInputQueue: get the name of the virtual-keys file from the input-device name
parents 341096ff 75b2aed2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -194,10 +194,10 @@ public abstract class KeyInputQueue {
        }
    }

    private void readVirtualKeys() {
    private void readVirtualKeys(String deviceName) {
        try {
            FileInputStream fis = new FileInputStream(
                    "/sys/board_properties/virtualkeys.synaptics-rmi-touchscreen");
                    "/sys/board_properties/virtualkeys." + deviceName);
            InputStreamReader isr = new InputStreamReader(fis);
            BufferedReader br = new BufferedReader(isr);
            String str = br.readLine();
@@ -276,7 +276,6 @@ public abstract class KeyInputQueue {

        mHapticFeedbackCallback = hapticFeedbackCallback;
        
        readVirtualKeys();
        readExcludedDevices();
        
        PowerManager pm = (PowerManager)context.getSystemService(
@@ -393,6 +392,9 @@ public abstract class KeyInputQueue {
                        synchronized (mFirst) {
                            di = newInputDevice(ev.deviceId);
                            mDevices.put(ev.deviceId, di);
                            if ((di.classes & RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
                                readVirtualKeys(di.name);
                            }
                            configChanged = true;
                        }
                    } else if (ev.type == RawInputEvent.EV_DEVICE_REMOVED) {