@SuppressWarnings("deprecation")
    public static boolean hasOrientationSensor(final Context context) {
        return ((SensorManager) context.getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_ORIENTATION) != null;
    }
Orientation values from deprecated Android-Sensor {@link Sensor#TYPE_LOW_LATENCY_OFFBODY_DETECT}.
Kept only for backward compatibility (and only used if user explicitely wants it via Settings)
main/src/main/java/cgeo/geocaching/sensors/OrientationProvider.java