Use DesktopWindowing flag for Camera Compat for Freeform.
Flag: com.android.window.flags.enable_camera_compat_for_desktop_windowing
Fixes: 344567658
Test: Desktop mode on large screen device
Change-Id: Idbbc039bd20db782b7006cfbdfc105b00bf727ee
diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.cpp b/services/camera/libcameraservice/common/Camera2ClientBase.cpp
index 352c6f8..18069fe 100644
--- a/services/camera/libcameraservice/common/Camera2ClientBase.cpp
+++ b/services/camera/libcameraservice/common/Camera2ClientBase.cpp
@@ -358,7 +358,7 @@
bool landscapeSensor = (orientation == 0 || orientation == 180);
if (((TClientBase::mRotationOverride ==
ICameraService::ROTATION_OVERRIDE_OVERRIDE_TO_PORTRAIT) && landscapeSensor) ||
- ((wm_flags::camera_compat_for_freeform() &&
+ ((wm_flags::enable_camera_compat_for_desktop_windowing() &&
TClientBase::mRotationOverride ==
ICameraService::ROTATION_OVERRIDE_ROTATION_ONLY)
&& !landscapeSensor)) {
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index a7c7cee..a03d199 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -2800,7 +2800,7 @@
hardware::CameraInfo *info) const {
if (info == nullptr) return BAD_VALUE;
- bool freeform_compat_enabled = wm_flags::camera_compat_for_freeform();
+ bool freeform_compat_enabled = wm_flags::enable_camera_compat_for_desktop_windowing();
if (!freeform_compat_enabled &&
rotationOverride > hardware::ICameraService::ROTATION_OVERRIDE_OVERRIDE_TO_PORTRAIT) {
ALOGW("Camera compat freeform flag disabled but rotation override is %d", rotationOverride);