From d4e59f706bddd195497d2a7af1b77f48cd0e4ab8 Mon Sep 17 00:00:00 2001 From: nyyu Date: Sun, 4 Dec 2022 11:42:14 +0100 Subject: [PATCH] fix: rear camera rotation --- fix-rear-camera-rotation.patch | 24 ++++++++++++++++++++++++ sync.sh | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 fix-rear-camera-rotation.patch diff --git a/fix-rear-camera-rotation.patch b/fix-rear-camera-rotation.patch new file mode 100644 index 0000000..3bcfa71 --- /dev/null +++ b/fix-rear-camera-rotation.patch @@ -0,0 +1,24 @@ +From d2022bc573e304388ec55b8f2ba710e8d960c18b Mon Sep 17 00:00:00 2001 +From: nyyu +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 \ No newline at end of file diff --git a/sync.sh b/sync.sh index 5ba88cb..a276df0 100644 --- a/sync.sh +++ b/sync.sh @@ -44,6 +44,9 @@ cd $TOPDIR cd packages/apps/Camera2 git am $DRONE_WORKSPACE_BASE/fix-camera2-legacy.patch || git am --abort cd $TOPDIR +cd frameworks/av +git am $DRONE_WORKSPACE_BASE/fix-rear-camera-rotation.patch || git am --abort +cd $TOPDIR repopick -t twelve-colors -i -r cd frameworks/base git reset --hard losul/lineage-19.1