fix: rear camera rotation
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
nyyu 2022-12-04 10:40:15 +01:00
parent 930fba2a76
commit 4a9760ccf4
3 changed files with 29 additions and 25 deletions

View File

@ -1,22 +0,0 @@
From 94afc13b04146a3adc77378b0022216b27f82ea0 Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sat, 3 Sep 2022 11:38:43 +0200
Subject: [PATCH] Camera2: Disable CaptureModule for legacy device
---
.../camera/one/config/OneCameraFeatureConfigCreator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/com/android/camera/one/config/OneCameraFeatureConfigCreator.java b/src/com/android/camera/one/config/OneCameraFeatureConfigCreator.java
index dc7f9003f7..474494082e 100644
--- a/src/com/android/camera/one/config/OneCameraFeatureConfigCreator.java
+++ b/src/com/android/camera/one/config/OneCameraFeatureConfigCreator.java
@@ -41,7 +41,7 @@ public class OneCameraFeatureConfigCreator {
public static OneCameraFeatureConfig createDefault(ContentResolver contentResolver,
MemoryManager memoryManager) {
// Enable CaptureModule on all M devices.
- boolean useCaptureModule = true;
+ boolean useCaptureModule = false;
Log.i(TAG, "CaptureModule? " + useCaptureModule);
// HDR+ has multiple levels of support.

View File

@ -0,0 +1,24 @@
From d2022bc573e304388ec55b8f2ba710e8d960c18b Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sun, 4 Dec 2022 10:25:36 +0100
Subject: [PATCH] fix: rear camera rotation
---
camera/CameraUtils.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/camera/CameraUtils.cpp b/camera/CameraUtils.cpp
index af3c492762..8967bfca77 100644
--- a/camera/CameraUtils.cpp
+++ b/camera/CameraUtils.cpp
@@ -69,7 +69,7 @@ status_t CameraUtils::getRotationTransform(const CameraMetadata& staticInfo,
flags = NATIVE_WINDOW_TRANSFORM_ROT_180;
break;
case 270:
- flags = NATIVE_WINDOW_TRANSFORM_ROT_270;
+ flags = NATIVE_WINDOW_TRANSFORM_ROT_90;
break;
default:
ALOGE("%s: Invalid HAL android.sensor.orientation value: %d",
--
2.38.1

View File

@ -43,9 +43,6 @@ cd $TOPDIR
cd packages/apps/Trebuchet cd packages/apps/Trebuchet
git am $DRONE_WORKSPACE_BASE/fix-enable-more-grids-for-tablet.patch || git am --abort git am $DRONE_WORKSPACE_BASE/fix-enable-more-grids-for-tablet.patch || git am --abort
cd $TOPDIR cd $TOPDIR
cd packages/apps/Camera2
git am $DRONE_WORKSPACE_BASE/fix-camera2-legacy.patch || git am --abort
cd $TOPDIR
#qcom wlan #qcom wlan
repopick -f 336676 336677 336678 336679 336680 repopick -f 336676 336677 336678 336679 336680
@ -71,6 +68,11 @@ cd packages/modules/Connectivity
git am $DRONE_WORKSPACE_BASE/fix-NetworkStats-disable-BPF.patch || git am --abort git am $DRONE_WORKSPACE_BASE/fix-NetworkStats-disable-BPF.patch || git am --abort
cd $TOPDIR cd $TOPDIR
#av
cd frameworks/av
git am $DRONE_WORKSPACE_BASE/fix-rear-camera-rotation.patch || git am --abort
cd $TOPDIR
#safetynet #safetynet
repopick -f 334348 -P system/core repopick -f 334348 -P system/core
repopick -f 334343 334344 -P frameworks/base repopick -f 334343 334344 -P frameworks/base