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

Commit d61289f3 authored by Zhijun He's avatar Zhijun He Committed by Android Git Automerger
Browse files

am 9552f9b8: Merge "Camera2: remove CameraDevice#getProperties" into klp-dev

* commit '9552f9b8':
  Camera2: remove CameraDevice#getProperties
parents 23df7474 9552f9b8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10951,7 +10951,6 @@ package android.hardware.camera2 {
    method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
    method public abstract void flush() throws android.hardware.camera2.CameraAccessException;
    method public abstract java.lang.String getId();
    method public abstract android.hardware.camera2.CameraCharacteristics getProperties() throws android.hardware.camera2.CameraAccessException;
    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;
+2 −17
Original line number Diff line number Diff line
@@ -16,11 +16,9 @@

package android.hardware.camera2;

import android.view.Surface;
import android.os.Handler;
import android.util.Log;
import android.view.Surface;

import java.lang.AutoCloseable;
import java.util.List;

/**
@@ -127,23 +125,10 @@ public interface CameraDevice extends AutoCloseable {
     * @return the ID for this camera device
     *
     * @see CameraManager#getCameraCharacteristics
     * @see CameraManager#getDeviceIdList
     * @see CameraManager#getCameraIdList
     */
    public String getId();

    /**
     * Get the static properties for this camera. These are identical to the
     * properties returned by {@link CameraManager#getCameraCharacteristics}.
     *
     * @return the static properties of the camera
     *
     * @throws CameraAccessException if the camera device is no longer connected or has
     *                               encountered a fatal error
     * @throws IllegalStateException if the camera device has been closed
     *
     * @see CameraManager#getCameraCharacteristics
     */
    public CameraCharacteristics getProperties() throws CameraAccessException;
    /**
     * <p>Set up a new output set of Surfaces for the camera device.</p>
     *
+0 −18
Original line number Diff line number Diff line
@@ -87,24 +87,6 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
        return mCameraId;
    }

    @Override
    public CameraCharacteristics getProperties() throws CameraAccessException {

        CameraMetadataNative info = new CameraMetadataNative();

        try {
            mRemoteDevice.getCameraInfo(/*out*/info);
        } catch(CameraRuntimeException e) {
            throw e.asChecked();
        } catch(RemoteException e) {
            // impossible
            return null;
        }

        CameraCharacteristics properties = new CameraCharacteristics(info);
        return properties;
    }

    @Override
    public void configureOutputs(List<Surface> outputs) throws CameraAccessException {
        synchronized (mLock) {