Camera: Allow non-session parameters in SessionConfiguration
Also remove a workaround in VTS test
Test: Build
Bug: 309627704
Change-Id: I0ed266e837f5d0bec6197ff9f725a897048038ae
diff --git a/camera/device/aidl/android/hardware/camera/device/ICameraDevice.aidl b/camera/device/aidl/android/hardware/camera/device/ICameraDevice.aidl
index 01009ad..da3d5df 100644
--- a/camera/device/aidl/android/hardware/camera/device/ICameraDevice.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/ICameraDevice.aidl
@@ -365,16 +365,20 @@
* isStreamCombinationWithSettingsSupported:
*
* This is the same as isStreamCombinationSupported with below exceptions:
- *
* 1. The input StreamConfiguration parameter may contain session parameters
- * supported by this camera device. When checking if the particular StreamConfiguration
- * is supported, the camera HAL must take the session parameters into consideration.
+ * as well as additional CaptureRequest keys. See the comment
+ * sections below on what additional capture request keys are passed in
+ * StreamConfiguration::sessionParameters for each interface version. When checking if
+ * the particular StreamConfiguration is supported, the camera HAL must take all
+ * the keys in sessionParameters into consideration.
*
* 2. For version 3 of this interface, the camera compliance test will verify that
* isStreamCombinationWithSettingsSupported behaves properly for all combinations of
* below features. This function must return true for all supported combinations,
* and return false for non-supported feature combinations. The list of features
- * required may grow in future versions.
+ * required may grow in future versions. The additional metadata entries in
+ * StreamConfiguration::sessionParameters are {CONTROL_AE_TARGET_FPS_RANGE,
+ * CONTROL_VIDEO_STABILIZATION_MODE}.
*
* - Stream Combinations (a subset of LEGACY device mandatory stream combinations):
* {
@@ -429,7 +433,7 @@
* 4032 x 3024, the camera compliance test will verify both
* {PRIV, 1920 x 1440, JPEG, 4032 x 3024} and {PRIV, 2560 x 1440, JPEG, 4032 x 2268}.
*
- * @param streams The StreamConfiguration to be tested, with optional session parameters.
+ * @param streams The StreamConfiguration to be tested, with optional CaptureRequest parameters.
*
* @return true in case the stream combination is supported, false otherwise.
*
diff --git a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
index 197d9af..0f5bad9 100644
--- a/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
+++ b/camera/device/aidl/android/hardware/camera/device/StreamConfiguration.aidl
@@ -59,6 +59,14 @@
* pipeline updates. The field is optional, clients can choose to ignore it and avoid
* including any initial settings. If parameters are present, then hal must examine
* their values and configure the internal camera pipeline accordingly.
+ *
+ * A null pointer is equivalent to a valid CameraMetadata object with zero entries.
+ *
+ * For a StreamConfiguration passed to ICameraDevice.isStreamCombinationWithSettingsSupported
+ * or ICameraDevice.getSessionCharacteristics, this variable may also contain keys
+ * that are not session parameters, but are used to specify certain features for a
+ * session. For example, CONTROL_VIDEO_STABILIZATION_MODE may be included even if it's not a
+ * session parameter.
*/
CameraMetadata sessionParams;
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index 6a08f58..b7115d8 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -1919,13 +1919,8 @@
if (supportFeatureCombinationQuery) {
ret = device->isStreamCombinationWithSettingsSupported(config,
&streamCombinationSupported);
- // TODO: Do not allow OPERATION_NOT_SUPPORTED once HAL
- // implementation is in place.
- ASSERT_TRUE(ret.isOk() || static_cast<Status>(ret.getServiceSpecificError()) ==
- Status::OPERATION_NOT_SUPPORTED);
- if (ret.isOk()) {
- ASSERT_EQ(expectedStatus, streamCombinationSupported);
- }
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(expectedStatus, streamCombinationSupported);
}
}
}