欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

android 骁龙相机预览宽度方向全屏

程序员文章站 2022-05-08 22:36:21
...
diff --git a/packages/apps/SnapdragonCamera/src/com/android/camera/PhotoUI.java b/packages/apps/SnapdragonCamera/src/com/android/camera/PhotoUI.java
old mode 100644
new mode 100755
index e87ec6a..95bdf09
--- a/packages/apps/SnapdragonCamera/src/com/android/camera/PhotoUI.java
+++ b/packages/apps/SnapdragonCamera/src/com/android/camera/PhotoUI.java
@@ -429,7 +429,10 @@ public class PhotoUI implements PieListener,
                     }
                 } else {
                     if(Math.max(height, width * mAspectRatio) > height) {
-                        scaledTextureWidth = height / mAspectRatio;
+                        /*meig:jicong.wang modify for bug 7729 start {@*/
+                        //scaledTextureWidth = height / mAspectRatio;
+                        scaledTextureWidth = mMaxPreviewWidth;
+                       /*meig:jicong.wang modify for bug 7729 end @}*/
                         scaledTextureHeight = height;
                     } else {
                         scaledTextureWidth = width;
diff --git a/packages/apps/SnapdragonCamera/src/com/android/camera/VideoUI.java b/packages/apps/SnapdragonCamera/src/com/android/camera/VideoUI.java
index f07ddeb..3ef2643 100755
--- a/packages/apps/SnapdragonCamera/src/com/android/camera/VideoUI.java
+++ b/packages/apps/SnapdragonCamera/src/com/android/camera/VideoUI.java
@@ -457,7 +457,10 @@ public class VideoUI implements PieRenderer.PieListener,
                     }
                 } else {
                     if(Math.max(height, width * mAspectRatio) > height) {
-                        scaledTextureWidth = height / mAspectRatio;
+                        /*meig:jicong.wang modify for bug 7729 start{@*/
+                        //scaledTextureWidth = height / mAspectRatio;
+                        scaledTextureWidth = mMaxPreviewWidth;
+                        /*meig:jicong.wang modify for bug 7729 end @}*/
                         scaledTextureHeight = height;
                     } else {
                         scaledTextureWidth = width;