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 ->
|
private val takePictureCallback = Camera.PictureCallback { data, cam ->
|
||||||
|
if (data.isEmpty()) {
|
||||||
|
mActivity!!.toast(R.string.unknown_error_occurred)
|
||||||
|
return@PictureCallback
|
||||||
|
}
|
||||||
|
|
||||||
isWaitingForTakePictureCallback = false
|
isWaitingForTakePictureCallback = false
|
||||||
if (!isImageCaptureIntent) {
|
if (!isImageCaptureIntent) {
|
||||||
handlePreview()
|
handlePreview()
|
||||||
|
|
Loading…
Reference in New Issue