diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2021-01-26 09:47:33 +0900 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2021-01-29 19:30:19 +0900 |
commit | 958c80a4f1c28301ce19112e04de55a6a5102dad (patch) | |
tree | ec5420c85a85b8d81784b8a75f0e26075f4b50c8 /src | |
parent | ab72e6641c56e876f91edee57a8969982a3ab9b7 (diff) |
android: camera_device: Set AE precapture trigger according to request
Set the AE precapture triggler tag in the android result metadata
according to what was passed in the request metadata.
This allows the following CTS test to pass:
- android.hardware.camera2.cts.StillCaptureTest#testAePrecaptureTriggerCancelJpegCapture
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/android/camera_device.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 82bf0d3a..741dc8cf 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1927,6 +1927,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor, int64_t timestamp) { const ControlList &metadata = descriptor->request_->metadata(); + camera_metadata_ro_entry_t entry; /* * \todo Keep this in sync with the actual number of entries. @@ -1965,8 +1966,10 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor, aeFpsTarget.data(), aeFpsTarget.size()); value = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE; + /* \todo Handle IPA appropriately */ + bool ret = descriptor->settings_.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry); resultMetadata->addEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, - &value, 1); + ret ? entry.data.u8 : &value, 1); value = ANDROID_CONTROL_AE_STATE_CONVERGED; resultMetadata->addEntry(ANDROID_CONTROL_AE_STATE, &value, 1); @@ -2010,8 +2013,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor, value = ANDROID_FLASH_STATE_UNAVAILABLE; resultMetadata->addEntry(ANDROID_FLASH_STATE, &value, 1); - camera_metadata_ro_entry_t entry; - int ret = descriptor->settings_.getEntry(ANDROID_LENS_APERTURE, &entry); + ret = descriptor->settings_.getEntry(ANDROID_LENS_APERTURE, &entry); if (ret) resultMetadata->addEntry(ANDROID_LENS_APERTURE, entry.data.f, 1); |