summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Biswarup Pal <biswarupp@google.com> 2024-01-17 13:52:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-01-17 13:52:51 +0000
commitb900c94f20de89b02c144a1cb72a774638465a29 (patch)
treedc569b76b8e6c116597e7ba3ac3fe3cb2edbdfe6
parent4b60fe723f6223a5ad6e880dc3d67d50721a9c69 (diff)
parent231e81113f6bb6c1d72f266a06ada0556ec71dc7 (diff)
Merge "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." into main
-rw-r--r--services/core/java/com/android/server/input/KeyboardLayoutManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/input/KeyboardLayoutManager.java b/services/core/java/com/android/server/input/KeyboardLayoutManager.java
index 6236e2b933bc..46668de042d4 100644
--- a/services/core/java/com/android/server/input/KeyboardLayoutManager.java
+++ b/services/core/java/com/android/server/input/KeyboardLayoutManager.java
@@ -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) {