From 3d39df27a79385c6a8006a2ae29555e36720b8fd Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Thu, 11 Feb 2021 17:51:48 +0900 Subject: android: camera_device: Set the camera location to Front if External MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our android HAL implementation currently does not support external cameras, so if the camera location property is external, set it to front. This allows the following CTS test to pass: - android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetDeviceIdList Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/android/camera_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/android') diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 1e2a5b5f..16cb8c6d 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -405,7 +405,11 @@ int CameraDevice::initialize() facing_ = CAMERA_FACING_BACK; break; case properties::CameraLocationExternal: - facing_ = CAMERA_FACING_EXTERNAL; + /* + * \todo Set this to EXTERNAL once we support + * HARDWARE_LEVEL_EXTERNAL + */ + facing_ = CAMERA_FACING_FRONT; break; } } -- cgit v1.2.1