summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-03-08 16:13:58 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-03-09 08:59:02 +0100
commit2c34991d16caf54a7bc32eb607a712b8b973c1eb (patch)
tree4f112c0b96b9c907b180e12506fddf73225692dd /src
parentd150860129c3bfee4a480da78fde4e5736a2e654 (diff)
android: camera_device: Refuse unsupported templates
The current implementation of constructDefaultRequestSettings() returns the same capture template for all the capture intent. As the correctness of the generated template is verified by CTS it is better to return an error for unsupported capture use cases. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/android/camera_device.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 970a8bf5..3c408a68 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1485,14 +1485,11 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
case CAMERA3_TEMPLATE_VIDEO_SNAPSHOT:
captureIntent = ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT;
break;
+ /* \todo Implement templates generation for the remaining use cases. */
case CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG:
- captureIntent = ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG;
- break;
case CAMERA3_TEMPLATE_MANUAL:
- captureIntent = ANDROID_CONTROL_CAPTURE_INTENT_MANUAL;
- break;
default:
- LOG(HAL, Error) << "Invalid template request type: " << type;
+ LOG(HAL, Error) << "Unsupported template request type: " << type;
return nullptr;
}