Merge "Check that InputDevice isn't null and add annotations" into tm-dev am: 94bba02785
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17546183 Change-Id: I72fe3385f39bf5023ec603eae26bf14e02044e60 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -98,7 +98,7 @@ public class InputDeviceSensorManager implements InputManager.InputDeviceListene
|
|||||||
*/
|
*/
|
||||||
private void updateInputDeviceSensorInfoLocked(int deviceId) {
|
private void updateInputDeviceSensorInfoLocked(int deviceId) {
|
||||||
final InputDevice inputDevice = InputDevice.getDevice(deviceId);
|
final InputDevice inputDevice = InputDevice.getDevice(deviceId);
|
||||||
if (inputDevice.hasSensor()) {
|
if (inputDevice != null && inputDevice.hasSensor()) {
|
||||||
final InputSensorInfo[] sensorInfos =
|
final InputSensorInfo[] sensorInfos =
|
||||||
mInputManager.getSensorList(deviceId);
|
mInputManager.getSensorList(deviceId);
|
||||||
populateSensorsForInputDeviceLocked(deviceId, sensorInfos);
|
populateSensorsForInputDeviceLocked(deviceId, sensorInfos);
|
||||||
|
|||||||
Reference in New Issue
Block a user