show an error if Data returned from the camera after capturing a photo is empty
This commit is contained in:
parent
b65420cceb
commit
59da992442
|
@ -323,6 +323,11 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
|||
}
|
||||
|
||||
private val takePictureCallback = Camera.PictureCallback { data, cam ->
|
||||
if (data.isEmpty()) {
|
||||
mActivity!!.toast(R.string.unknown_error_occurred)
|
||||
return@PictureCallback
|
||||
}
|
||||
|
||||
isWaitingForTakePictureCallback = false
|
||||
if (!isImageCaptureIntent) {
|
||||
handlePreview()
|
||||
|
|
Loading…
Reference in New Issue