Merge "Fix crash from isTrackpadDevice" into main

This commit is contained in:
Tracy Zhou authored and Android (Google) Code Review committed 2024-06-11 21:22:35 +00:00
commit 16b2656ecf
1 file changed
+3
@@ -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);
}