try private

This commit is contained in:
sonora 2015-01-06 11:22:31 +01:00
parent 0b71031e6a
commit 0f7fddeae0

View file

@ -807,10 +807,10 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
}
//Looks like screenOrientation correction must not be applied for devices without compass?
// Sensor s = ((SensorManager) getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
// if (s == null) {
// screenOrientation = 0;
// }
private Sensor s = ((SensorManager) getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
if (s == null) {
screenOrientation = 0;
}
draw.setAngle(mes[1] - a + 180 + screenOrientation);