Created
January 12, 2012 12:28
-
-
Save adumont/1600222 to your computer and use it in GitHub Desktop.
SuperOSR HTC Chacha - Camera.apk - Fix for 90º issue (temporal)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is my fix for the Camera.apk. For the moment it's getting the job done, but it's ugly, Later I'll put in place a system property for example and read from it. | |
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java | |
index d308d33..5399c7c 100644 | |
--- a/src/com/android/camera/Camera.java | |
+++ b/src/com/android/camera/Camera.java | |
@@ -825,7 +825,7 @@ public class Camera extends BaseCamera implements View.OnClickListener, | |
info.orientation != 90) { | |
rotation = (info.orientation - mOrientation + 360) % 360; | |
} else { // back-facing camera (or acting like it) | |
- rotation = (info.orientation + mOrientation) % 360; | |
+ rotation = (info.orientation + mOrientation - 90 ) % 360; | |
} | |
} | |
mParameters.setRotation(rotation); | |
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java | |
index d2b6b84..2912be2 100644 | |
--- a/src/com/android/camera/VideoCamera.java | |
+++ b/src/com/android/camera/VideoCamera.java | |
@@ -1119,7 +1119,7 @@ public class VideoCamera extends BaseCamera | |
if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { | |
rotation = (info.orientation - mOrientation + 360) % 360; | |
} else { // back-facing camera | |
- rotation = (info.orientation + mOrientation) % 360; | |
+ rotation = (info.orientation + mOrientation - 90 ) % 360; | |
} | |
} | |
mMediaRecorder.setOrientationHint(rotation); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment