Fixed a bug with the orientation calculation.

This commit is contained in:
2014-06-26 13:01:39 -04:30
parent 81d8a81b7e
commit a9285a684f

View File

@@ -67,7 +67,7 @@ public abstract class Utils{
* @return True if the device can detect it's orientation and it's within range. False otherwise.
*/
public static boolean isDeviceRollValid(){
boolean rollValid = false;
boolean rollValid = true;
float azimuth, pitch;
if(deviceHasOrientationSensors()){
@@ -79,7 +79,8 @@ public abstract class Utils{
if(rollValid && (azimuth < MIN_AZIMUTH || azimuth > MAX_AZIMUTH))
rollValid = false;
}
}else
rollValid = false;
return rollValid;
}