Merge "Fix crash from isTrackpadDevice" into main
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user