Try to get sensor changes faster

This commit is contained in:
Victor Shcherb 2013-01-11 13:11:40 +01:00
parent a3916abba3
commit 5182f7fb61

View file

@ -798,7 +798,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
SensorManager sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE); SensorManager sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE);
Sensor s = sensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION); Sensor s = sensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION);
if (s != null) { if (s != null) {
if(!sensorMgr.registerListener(this, s, SensorManager.SENSOR_DELAY_NORMAL)) { if(!sensorMgr.registerListener(this, s, SensorManager.SENSOR_DELAY_FASTEST)) {
Log.e(LogUtil.TAG, "Sensor could not be enabled"); Log.e(LogUtil.TAG, "Sensor could not be enabled");
} }
} }