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

Commit b437428b authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera2: remove waitUntilIdle from Camera2 API"

parents 360604b4 d842fcd3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -11062,7 +11062,6 @@ package android.hardware.camera2 {
    method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
    method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
    method public abstract void waitUntilIdle() throws android.hardware.camera2.CameraAccessException;
    field public static final int TEMPLATE_PREVIEW = 1; // 0x1
    field public static final int TEMPLATE_RECORD = 3; // 0x3
    field public static final int TEMPLATE_STILL_CAPTURE = 2; // 0x2
+0 −25
Original line number Diff line number Diff line
@@ -500,31 +500,6 @@ public interface CameraDevice extends AutoCloseable {
     */
    public void stopRepeating() throws CameraAccessException;

    /**
     * <p>Wait until all the submitted requests have finished processing</p>
     *
     * <p>This method blocks until all the requests that have been submitted to
     * the camera device, either through {@link #capture capture},
     * {@link #captureBurst captureBurst},
     * {@link #setRepeatingRequest setRepeatingRequest}, or
     * {@link #setRepeatingBurst setRepeatingBurst}, have completed their
     * processing.</p>
     *
     * <p>Once this call returns successfully, the device is in an idle state,
     * and can be reconfigured with {@link #configureOutputs configureOutputs}.</p>
     *
     * <p>This method cannot be used if there is an active repeating request or
     * burst, set with {@link #setRepeatingRequest setRepeatingRequest} or
     * {@link #setRepeatingBurst setRepeatingBurst}. Call
     * {@link #stopRepeating stopRepeating} before calling this method.</p>
     *
     * @throws CameraAccessException if the camera device is no longer connected
     * @throws IllegalStateException if the camera device has been closed, the
     * device has encountered a fatal error, or if there is an active repeating
     * request or burst.
     */
    public void waitUntilIdle() throws CameraAccessException;

    /**
     * Flush all captures currently pending and in-progress as fast as
     * possible.
+1 −2
Original line number Diff line number Diff line
@@ -351,8 +351,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
        }
    }

    @Override
    public void waitUntilIdle() throws CameraAccessException {
    private void waitUntilIdle() throws CameraAccessException {

        synchronized (mLock) {
            checkIfCameraClosed();