Merge "[PK Setting] Add null check on NewKeyboardSettingUtils.getInputDevice()" into main

This commit is contained in:
Shaowei Shen
2023-11-22 08:11:10 +00:00
committed by Android (Google) Code Review

View File

@@ -110,7 +110,8 @@ public class NewKeyboardSettingsUtils {
}
static InputDevice getInputDevice(InputManager im, InputDeviceIdentifier identifier) {
return im.getInputDeviceByDescriptor(identifier.getDescriptor());
return identifier == null ? null : im.getInputDeviceByDescriptor(
identifier.getDescriptor());
}
static KeyboardLayout[] getKeyboardLayouts(InputManager inputManager, int userId,