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

Commit 03537f52 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Add isKeyCodeSupported hidden API to VirtualDpad

So clients can check this first to decide whether to inject a key event
to the VirtualDpad device or whether to fallback to VirtualKeyboard

Test: presubmit
Bug: 419460898
Flag: EXEMPT no-op
Change-Id: I0c66c91fe99d7c776eaf314cb87ace6c5a657872
parent 788fc5d9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -79,4 +79,12 @@ public class VirtualDpad extends VirtualInputDevice {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Returns whether the given key code is supported by this Dpad device.
     * @hide
     */
    public boolean isKeyCodeSupported(int keyCode) {
        return SUPPORTED_KEY_CODES.contains(keyCode);
    }
}