Fix PK Settings notification for non-keyboard devices

Refactoring CL ag/20500090 caused a side effect where all non-keyboard
devices also ran default layout selection logic and showed notification
to configure OK layout.
Need to filter by non-virtual and full keyboards.

Test: Manual
Bug: 261173318
Change-Id: Ib624c19e584b7d10f9d36bc852ee9ac9ed070d0e
This commit is contained in:
Vaibhav Devmurari
2022-12-06 15:08:00 +00:00
parent 91618c202d
commit 53d8776f28

View File

@@ -145,7 +145,7 @@ final class KeyboardLayoutManager implements InputManager.InputDeviceListener {
@Override
public void onInputDeviceChanged(int deviceId) {
final InputDevice inputDevice = getInputDevice(deviceId);
if (inputDevice == null) {
if (inputDevice == null || inputDevice.isVirtual() || !inputDevice.isFullKeyboard()) {
return;
}
synchronized (mDataStore) {