CameraService: Update rotate and crop dynamically on fold/unfold.
Currently, rotate and crop is set in response to overrideToPortrait
only when a camera connection is first established. Since on fold/unfold
we may switch to a camera with a different sensor orientation, rotate and
crop needs to be updated dynamically. This sets rotate and crop when
we detect a change in the physical id of a logical multi-camera.
Bug: 265024179
Test: Skype / WhatsApp video meeting checking fold/unfold behavior.
Change-Id: I3c0b86f2a3468b8ba09496b33eafbd746b9d4f65
diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h
index 7ffff31..cd214f6 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.h
+++ b/services/camera/libcameraservice/device3/Camera3Device.h
@@ -1357,6 +1357,9 @@
// app compatibility reasons.
bool mOverrideToPortrait;
+ // Current active physical id of the logical multi-camera, if any
+ std::string mActivePhysicalId;
+
// The current minimum expected frame duration based on AE_TARGET_FPS_RANGE
nsecs_t mMinExpectedDuration = 0;
// Whether the camera device runs at fixed frame rate based on AE_MODE and