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

Commit 231e8111 authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Fix case where VDM is not connected, ignore isVirtuaDevice().

Previous CL ag/25851197 doesn't consider case where VDM is not connected, so fixing it with this CL.

Test: atest KeyboardLayoutManagerTests
Bug: 293459291
Change-Id: I9993bc50d4d81c2b92aa7f026e3eb89ae006b9b7
parent 92daab22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1370,7 +1370,7 @@ class KeyboardLayoutManager implements InputManager.InputDeviceListener {
    public boolean isVirtualDevice(int deviceId) {
        VirtualDeviceManagerInternal vdm = LocalServices.getService(
                VirtualDeviceManagerInternal.class);
        return vdm == null || vdm.isInputDeviceOwnedByVirtualDevice(deviceId);
        return vdm != null && vdm.isInputDeviceOwnedByVirtualDevice(deviceId);
    }

    private static int[] getScriptCodes(@Nullable Locale locale) {