Merge "Fix crash from isTrackpadDevice" into main

This commit is contained in:
Tracy Zhou
2024-06-11 21:22:35 +00:00
committed by Android (Google) Code Review
@@ -510,6 +510,9 @@ public class TouchInteractionService extends Service {
private boolean isTrackpadDevice(int deviceId) {
InputDevice inputDevice = mInputManager.getInputDevice(deviceId);
if (inputDevice == null) {
return false;
}
return inputDevice.getSources() == (InputDevice.SOURCE_MOUSE
| InputDevice.SOURCE_TOUCHPAD);
}