Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26ccedcd authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

Camera2: Document exception when SessionConfiguration is not supported

CameraDeviceSetup#getSessionCharacteristics currently has undefined
behavior if the SessionConfiguration is not supported by the HAL.

This patch documents that cameraservice will raise an
IllegalArgumentException if the passed SessionConfiguration is
not supported by the HAL.

Bug: 327008530
Test: atest android.hardware.camera2.cts.CameraDeviceSetupTest passes
Change-Id: Id1c6675692954cf383d3c83ec203df5ba0afe1ed
parent 316f8d2f
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -1768,7 +1768,10 @@ public abstract class CameraDevice implements AutoCloseable {
         * @param sessionConfig The session configuration for which characteristics are fetched.
         * @param sessionConfig The session configuration for which characteristics are fetched.
         * @return CameraCharacteristics specific to a given session configuration.
         * @return CameraCharacteristics specific to a given session configuration.
         *
         *
         * @throws IllegalArgumentException      if the session configuration is invalid
         * @throws IllegalArgumentException if the session configuration is invalid or if
         *                                  {@link #isSessionConfigurationSupported} returns
         *                                  {@code false} for the provided
         *                                  {@link SessionConfiguration}
         * @throws CameraAccessException    if the camera device is no longer connected or has
         * @throws CameraAccessException    if the camera device is no longer connected or has
         *                                  encountered a fatal error
         *                                  encountered a fatal error
         *
         *