Skip to content

Commit 7bf70dd

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Fix alpha value for device orientation" into jb-mr1-dev
2 parents 7c964e7 + d5be055 commit 7bf70dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/webkit/DeviceOrientationService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void getOrientationUsingGetRotationMatrix() {
123123
// The angles are in radians
124124
float[] rotationAngles = new float[3];
125125
SensorManager.getOrientation(deviceRotationMatrix, rotationAngles);
126-
double alpha = Math.toDegrees(-rotationAngles[0]) - 90.0;
126+
double alpha = Math.toDegrees(-rotationAngles[0]);
127127
while (alpha < 0.0) { alpha += 360.0; } // [0, 360)
128128
double beta = Math.toDegrees(-rotationAngles[1]);
129129
while (beta < -180.0) { beta += 360.0; } // [-180, 180)

0 commit comments

Comments
 (0)