Add missing validation in IInputMethodWrapper

The case handling DO_SET_STYLUS_WINDOW_IDLE_TIMEOUT was missing
the validation check, which could lead to NullPointerExceptions.

Test: n/a
Bug: 278853086
Change-Id: I998e20df74b618396cfe3b1fa5d7d4e7d13e054c
This commit is contained in:
Cosmin Băieș
2023-04-19 14:14:50 +02:00
parent ca08538cd3
commit c1863f8887

View File

@@ -304,7 +304,9 @@ class IInputMethodWrapper extends IInputMethod.Stub
return;
}
case DO_SET_STYLUS_WINDOW_IDLE_TIMEOUT: {
inputMethod.setStylusWindowIdleTimeoutForTest((long) msg.obj);
if (isValid(inputMethod, target, "DO_SET_STYLUS_WINDOW_IDLE_TIMEOUT")) {
inputMethod.setStylusWindowIdleTimeoutForTest((long) msg.obj);
}
return;
}
}