summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/current.txt2
-rw-r--r--core/java/android/hardware/camera2/params/SessionConfiguration.java4
-rw-r--r--core/java/android/hardware/camera2/params/StreamConfigurationMap.java16
3 files changed, 19 insertions, 3 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index e72e758d592e..8a61f4a14b50 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -20236,10 +20236,10 @@ package android.hardware.camera2.params {
method public android.hardware.camera2.CaptureRequest getSessionParameters();
method public int getSessionType();
method public android.hardware.camera2.CameraCaptureSession.StateCallback getStateCallback();
- method @FlaggedApi("com.android.internal.camera.flags.camera_device_setup") public void setCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraCaptureSession.StateCallback);
method public void setColorSpace(@NonNull android.graphics.ColorSpace.Named);
method public void setInputConfiguration(@NonNull android.hardware.camera2.params.InputConfiguration);
method public void setSessionParameters(android.hardware.camera2.CaptureRequest);
+ method @FlaggedApi("com.android.internal.camera.flags.camera_device_setup") public void setStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraCaptureSession.StateCallback);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.camera2.params.SessionConfiguration> CREATOR;
field public static final int SESSION_HIGH_SPEED = 1; // 0x1
diff --git a/core/java/android/hardware/camera2/params/SessionConfiguration.java b/core/java/android/hardware/camera2/params/SessionConfiguration.java
index b0f354fac009..3b2913c81d49 100644
--- a/core/java/android/hardware/camera2/params/SessionConfiguration.java
+++ b/core/java/android/hardware/camera2/params/SessionConfiguration.java
@@ -133,7 +133,7 @@ public final class SessionConfiguration implements Parcelable {
* {@link CameraDeviceSetup.isSessionConfigurationSupported} and {@link
* CameraDeviceSetup.getSessionCharacteristics} to query a camera device's feature
* combination support and session specific characteristics. For the SessionConfiguration
- * object to be used to create a capture session, {@link #setCallback} must be called to
+ * object to be used to create a capture session, {@link #setStateCallback} must be called to
* specify the state callback function, and any incomplete OutputConfigurations must be
* completed via {@link OutputConfiguration#addSurface} or
* {@link OutputConfiguration#setSurfacesForMultiResolutionOutput} as appropriate.</p>
@@ -419,7 +419,7 @@ public final class SessionConfiguration implements Parcelable {
* @param cb A state callback interface implementation.
*/
@FlaggedApi(Flags.FLAG_CAMERA_DEVICE_SETUP)
- public void setCallback(
+ public void setStateCallback(
@NonNull @CallbackExecutor Executor executor,
@NonNull CameraCaptureSession.StateCallback cb) {
mStateCallback = cb;
diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
index b067095668b2..978a8f9200ba 100644
--- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
+++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
@@ -1473,6 +1473,11 @@ public final class StreamConfigurationMap {
* <li>ImageFormat.DEPTH_JPEG => HAL_DATASPACE_DYNAMIC_DEPTH
* <li>ImageFormat.HEIC => HAL_DATASPACE_HEIF
* <li>ImageFormat.JPEG_R => HAL_DATASPACE_JPEG_R
+ * <li>ImageFormat.YUV_420_888 => HAL_DATASPACE_JFIF
+ * <li>ImageFormat.RAW_SENSOR => HAL_DATASPACE_ARBITRARY
+ * <li>ImageFormat.RAW_OPAQUE => HAL_DATASPACE_ARBITRARY
+ * <li>ImageFormat.RAW10 => HAL_DATASPACE_ARBITRARY
+ * <li>ImageFormat.RAW12 => HAL_DATASPACE_ARBITRARY
* <li>others => HAL_DATASPACE_UNKNOWN
* </ul>
* </p>
@@ -1511,6 +1516,11 @@ public final class StreamConfigurationMap {
return HAL_DATASPACE_JPEG_R;
case ImageFormat.YUV_420_888:
return HAL_DATASPACE_JFIF;
+ case ImageFormat.RAW_SENSOR:
+ case ImageFormat.RAW_PRIVATE:
+ case ImageFormat.RAW10:
+ case ImageFormat.RAW12:
+ return HAL_DATASPACE_ARBITRARY;
default:
return HAL_DATASPACE_UNKNOWN;
}
@@ -2005,6 +2015,12 @@ public final class StreamConfigurationMap {
private static final int HAL_DATASPACE_RANGE_SHIFT = 27;
private static final int HAL_DATASPACE_UNKNOWN = 0x0;
+
+ /**
+ * @hide
+ */
+ public static final int HAL_DATASPACE_ARBITRARY = 0x1;
+
/** @hide */
public static final int HAL_DATASPACE_V0_JFIF =
(2 << HAL_DATASPACE_STANDARD_SHIFT) |