forked from jens/Automation
magnetometer
This commit is contained in:
parent
195a60cfe0
commit
13fd4c2aae
@ -93,9 +93,6 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
||||
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
hasMagneticSensor = sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
|
||||
if(!hasMagneticSensor)
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user