-
- All Implemented Interfaces:
-
java.io.Serializable
public class CameraException extends RuntimeException
Holds an error with the camera configuration.
-
-
Field Summary
Fields Modifier and Type Field Description public final static intREASON_UNKNOWNpublic final static intREASON_FAILED_TO_CONNECTpublic final static intREASON_FAILED_TO_START_PREVIEWpublic final static intREASON_DISCONNECTEDpublic final static intREASON_PICTURE_FAILEDpublic final static intREASON_VIDEO_FAILEDpublic final static intREASON_NO_CAMERAprivate intreason
-
Constructor Summary
Constructors Constructor Description CameraException(Throwable cause)CameraException(Throwable cause, int reason)CameraException(int reason)
-
Method Summary
Modifier and Type Method Description intgetReason()booleanisUnrecoverable()Whether this error is unrecoverable. -
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getReason
int getReason()
-
isUnrecoverable
boolean isUnrecoverable()
Whether this error is unrecoverable. If this function returns true,the Camera has been closed (or will be soon) and it is likely showing a black preview.This is the right moment to show an error dialog to the user.
-
-
-
-