RK3288 修改摄像头拍照和录像方向

CPU:RK3288

系统:Android 5.1

 

问题:相机预览方向是正常的,但是拍照或者录像后,相册中方向显示不正常

diff --git a/packages/apps/Camera2/src/com/android/camera/PhotoModule.java b/packages/apps/Camera2/src/com/android/camera/PhotoModule.java
index 36614c8..b1041b7 100755
--- a/packages/apps/Camera2/src/com/android/camera/PhotoModule.java
+++ b/packages/apps/Camera2/src/com/android/camera/PhotoModule.java
@@ -158,7 +158,7 @@ public class PhotoModule
     private boolean mContinuousFocusSupported;
 
     // The degrees of the device rotated clockwise from its natural orientation.
-    private int mOrientation = 180;//OrientationEventListener.ORIENTATION_UNKNOWN;
+    private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN;
 
     private static final String sTempCropFilename = "crop-temp";
 
diff --git a/packages/apps/Camera2/src/com/android/camera/VideoModule.java b/packages/apps/Camera2/src/com/android/camera/VideoModule.java
index 9c45ca1..267e8ca 100755
--- a/packages/apps/Camera2/src/com/android/camera/VideoModule.java
+++ b/packages/apps/Camera2/src/com/android/camera/VideoModule.java
@@ -179,7 +179,7 @@ public class VideoModule extends CameraModule
     private CameraProxy mCameraDevice;
 
     // The degrees of the device rotated clockwise from its natural orientation.
-    private int mOrientation = 180;//OrientationEventListener.ORIENTATION_UNKNOWN;
+    private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN;
 
     private float mZoomValue;  // The current zoom ratio.
 

 

posted @ 2021-01-28 11:11  LeeAaron  阅读(974)  评论(0编辑  收藏  举报