Merge "NPE in isTrackpadDevice" into udc-qpr-dev

This commit is contained in:
Tracy Zhou
2023-06-05 16:44:50 +00:00
committed by Android (Google) Code Review

View File

@@ -885,6 +885,9 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
private boolean isTrackpadDevice(int deviceId) {
InputDevice inputDevice = mInputManager.getInputDevice(deviceId);
if (inputDevice == null) {
return false;
}
return inputDevice.getSources() == (InputDevice.SOURCE_MOUSE
| InputDevice.SOURCE_TOUCHPAD);
}