String orientationSupported =
Configuration.getProperty(ORIENTATION_SUPPORTED);
if (orientationSupported.equals("true")) {
Util.checkForPermission(Permissions.ORIENTATION);
OrientationProvider provider = OrientationProvider.getInstance();
if (provider != null) {
return provider.getOrientation();
}
} else {
throw new LocationException("Orientation retrieval not supported");
}
return null;