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

Commit ac1e3152 authored by Bharatt Kukreja's avatar Bharatt Kukreja Committed by Shuzhen Wang
Browse files

Camera: Add getSessionCharacteristics API

Add API to fetch characteristics for a given session configuration.

Test: Build
Bug: 303645857
Change-Id: I07cb6eb3b0d63454899b2df1497ba120aa762142
parent 3046ac8a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,4 +45,5 @@ interface ICameraDevice {
  int getTorchStrengthLevel();
  android.hardware.camera.device.CameraMetadata constructDefaultRequestSettings(in android.hardware.camera.device.RequestTemplate type);
  boolean isStreamCombinationWithSettingsSupported(in android.hardware.camera.device.StreamConfiguration streams);
  android.hardware.camera.device.CameraMetadata getSessionCharacteristics(in android.hardware.camera.device.StreamConfiguration sessionConfig);
}
+30 −0
Original line number Diff line number Diff line
@@ -435,4 +435,34 @@ interface ICameraDevice {
     *
     */
    boolean isStreamCombinationWithSettingsSupported(in StreamConfiguration streams);

    /**
     * getSessionCharacteristics
     *
     * Gets the session characteristics associated with a particular session
     * configuration by the CameraDevice.
     *
     * For Android 15, the characteristics which need to be set are:
     *   - ANDROID_CONTROL_ZOOM_RATIO_RANGE
     *
     * A service specific error will be returned on the following conditions
     *     INTERNAL_ERROR:
     *         The camera device cannot be opened due to an internal
     *         error.
     *     CAMERA_DISCONNECTED:
     *         An external camera device has been disconnected, and is no longer
     *         available. This camera device interface is now stale, and a new
     *         instance must be acquired if the device is reconnected. All
     *         subsequent calls on this interface must return
     *         CAMERA_DISCONNECTED.
     *     ILLEGAL_ARGUMENT:
     *         If the given session configuration is not supported.
     *
     * @param sessionConfig: The session configuration for which the
     * characteristics are being fetched.
     *
     * @return The static metadata for this particular session config, or an
     * empty metadata structure if a service specific error is returned.
     */
    CameraMetadata getSessionCharacteristics(in StreamConfiguration sessionConfig);
}