summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-03-10 14:00:50 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-03-22 08:59:12 +0100
commit5154e14b3e682eb0ad313d060ae12f95357f3a07 (patch)
treea9221a6b9b975f0f4ddaa4a78d8b138a07e2550d /src/android
parent285d36518682b2c7cf8b932af4e8be23cbc7f6fa (diff)
android: camera_device: Do not default External to Front
Now that the camera location is not defaulted anymore in the library but doesn't get registered if the firmware interface does not provide the information, do not default it to FRONT if LocationExternal is reported. To maintain compatibility with CTS requirements, default location to FRONT only if the camera property is not available. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_device.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index a81e3c90..72a89258 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -376,13 +376,15 @@ int CameraDevice::initialize()
facing_ = CAMERA_FACING_BACK;
break;
case properties::CameraLocationExternal:
- /*
- * \todo Set this to EXTERNAL once we support
- * HARDWARE_LEVEL_EXTERNAL
- */
- facing_ = CAMERA_FACING_FRONT;
+ facing_ = CAMERA_FACING_EXTERNAL;
break;
}
+ } else {
+ /*
+ * \todo Retrieve the camera location from configuration file
+ * if not available from the library.
+ */
+ facing_ = CAMERA_FACING_FRONT;
}
/*