commit | 16b2656ecfa9f3364695720b28174c8cf87f4d2e | [log] [tgz] |
---|---|---|
author | Tracy Zhou <tracyzhou@google.com> | Tue Jun 11 21:22:35 2024 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue Jun 11 21:22:35 2024 +0000 |
tree | 47ddaccb5d3588023f7600b890c40e2795fe564d | |
parent | 27471df69c50924261d6e22647bad0054690027e [diff] | |
parent | 1deac6777b169dce21745a1e407ec9956cf3e4cc [diff] |
Merge "Fix crash from isTrackpadDevice" into main
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index e9046b9..c2691fe 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -510,6 +510,9 @@ private boolean isTrackpadDevice(int deviceId) { InputDevice inputDevice = mInputManager.getInputDevice(deviceId); + if (inputDevice == null) { + return false; + } return inputDevice.getSources() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHPAD); }