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

Commit ee154875 authored by Austin Borger's avatar Austin Borger Committed by Automerger Merge Worker
Browse files

Merge "Camera: Set CONTROL_CAPTURE_INTENT to STILL_CAPTURE for reprocessing"...

Merge "Camera: Set CONTROL_CAPTURE_INTENT to STILL_CAPTURE for reprocessing" into udc-dev am: 8f09c446

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22557606



Change-Id: Iacd71a48129be0c847267b025395cbc98ef5d850
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6bc4794d 8f09c446
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1310,6 +1310,10 @@ public abstract class CameraDevice implements AutoCloseable {
     * {@link Surface}, submitting a reprocess {@link CaptureRequest} with multiple
     * output targets will result in a {@link CaptureFailure}.
     *
     * From Android 14 onward, {@link CaptureRequest#CONTROL_CAPTURE_INTENT} will be set to
     * {@link CameraMetadata#CONTROL_CAPTURE_INTENT_STILL_CAPTURE} by default. Prior to Android 14,
     * apps will need to explicitly set this key themselves.
     *
     * @param inputResult The capture result of the output image or one of the output images used
     *                       to generate the reprocess input image for this capture request.
     *
+8 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CameraExtensionCharacteristics;
import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.CameraOfflineSession;
import android.hardware.camera2.CaptureFailure;
import android.hardware.camera2.CaptureRequest;
@@ -861,8 +862,13 @@ public class CameraDeviceImpl extends CameraDevice
            CameraMetadataNative resultMetadata = new
                    CameraMetadataNative(inputResult.getNativeCopy());

            return new CaptureRequest.Builder(resultMetadata, /*reprocess*/true,
                    inputResult.getSessionId(), getId(), /*physicalCameraIdSet*/ null);
            CaptureRequest.Builder builder = new CaptureRequest.Builder(resultMetadata,
                    /*reprocess*/true, inputResult.getSessionId(), getId(),
                    /*physicalCameraIdSet*/ null);
            builder.set(CaptureRequest.CONTROL_CAPTURE_INTENT,
                    CameraMetadata.CONTROL_CAPTURE_INTENT_STILL_CAPTURE);

            return builder;
        }
    }