Merge "Check that InputDevice isn't null and add annotations" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
94bba02785
@@ -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