CameraExceptionHandlerpublic class CameraExceptionHandler extends Object A handler for all camera api runtime exceptions.
The default behavior is to throw the runtime exception. |
Fields Summary |
---|
private android.os.Handler | mHandler | private CameraExceptionCallback | mCallback |
Constructors Summary |
---|
public CameraExceptionHandler(CameraExceptionCallback callback, android.os.Handler handler)Construct a new instance of {@link CameraExceptionHandler} with a custom callback which will
be executed on a specific {@link Handler}.
mHandler = handler;
mCallback = callback;
| public CameraExceptionHandler(android.os.Handler handler)Construct a new instance of {@link CameraExceptionHandler} with a default callback which will
be executed on a specific {@link Handler}.
mHandler = handler;
|
Methods Summary |
---|
public void | onCameraError(int errorCode)Invoke @{link CameraExceptionCallback} when an error is reported by Android camera framework.
mHandler.post(new Runnable() {
@Override
public void run() {
mCallback.onCameraError(errorCode);
}
});
| public void | onCameraException(java.lang.RuntimeException ex, java.lang.String commandHistory, int action, int state)Invoke @{link CameraExceptionCallback} when a runtime exception is thrown by Android camera
framework.
mHandler.post(new Runnable() {
@Override
public void run() {
mCallback.onCameraException(ex, commandHistory, action, state);
}
});
| public void | onDispatchThreadException(java.lang.RuntimeException ex)Invoke @{link CameraExceptionCallback} when a runtime exception is thrown by
mHandler.post(new Runnable() {
@Override
public void run() {
mCallback.onDispatchThreadException(ex);
}
});
|
|