Java Code Examples for android.hardware.camera2.CameraManager#throwAsPublicException()

The following examples show how to use android.hardware.camera2.CameraManager#throwAsPublicException() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public CameraMetadataNative createDefaultRequest(int templateId) throws CameraAccessException {
    try {
        return mRemoteDevice.createDefaultRequest(templateId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 2
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void finalizeOutputConfigurations(int streamId, OutputConfiguration deferredConfig)
        throws CameraAccessException {
    try {
        mRemoteDevice.finalizeOutputConfigurations(streamId, deferredConfig);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 3
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void updateOutputConfiguration(int streamId, OutputConfiguration config)
        throws CameraAccessException {
    try {
        mRemoteDevice.updateOutputConfiguration(streamId, config);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 4
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void prepare2(int maxCount, int streamId) throws CameraAccessException {
    try {
        mRemoteDevice.prepare2(maxCount, streamId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 5
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void tearDown(int streamId) throws CameraAccessException {
    try {
        mRemoteDevice.tearDown(streamId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 6
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void prepare(int streamId) throws CameraAccessException {
    try {
        mRemoteDevice.prepare(streamId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 7
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public long flush() throws CameraAccessException {
    try {
        return mRemoteDevice.flush();
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 8
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void waitUntilIdle() throws CameraAccessException {
    try {
        mRemoteDevice.waitUntilIdle();
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 9
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public CameraMetadataNative getCameraInfo() throws CameraAccessException {
    try {
        return mRemoteDevice.getCameraInfo();
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 10
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public SubmitInfo submitRequest(CaptureRequest request, boolean streaming)
        throws CameraAccessException  {
    try {
        return mRemoteDevice.submitRequest(request, streaming);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 11
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public Surface getInputSurface() throws CameraAccessException {
    try {
        return mRemoteDevice.getInputSurface();
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 12
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public int createInputStream(int width, int height, int format) throws CameraAccessException {
    try {
        return mRemoteDevice.createInputStream(width, height, format);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 13
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public int createStream(OutputConfiguration outputConfiguration)
        throws CameraAccessException {
    try {
        return mRemoteDevice.createStream(outputConfiguration);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 14
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void deleteStream(int streamId) throws CameraAccessException {
    try {
        mRemoteDevice.deleteStream(streamId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 15
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void endConfigure(int operatingMode, CameraMetadataNative sessionParams)
       throws CameraAccessException {
    try {
        mRemoteDevice.endConfigure(operatingMode, (sessionParams == null) ?
                new CameraMetadataNative() : sessionParams);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 16
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public void beginConfigure() throws CameraAccessException {
    try {
        mRemoteDevice.beginConfigure();
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 17
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public long cancelRequest(int requestId) throws CameraAccessException {
    try {
        return mRemoteDevice.cancelRequest(requestId);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}
 
Example 18
Source File: ICameraDeviceUserWrapper.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
public SubmitInfo submitRequestList(CaptureRequest[] requestList, boolean streaming)
        throws CameraAccessException {
    try {
        return mRemoteDevice.submitRequestList(requestList, streaming);
    } catch (Throwable t) {
        CameraManager.throwAsPublicException(t);
        throw new UnsupportedOperationException("Unexpected exception", t);
    }
}