mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-17 03:40:38 +01:00
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…
x
Reference in New Issue
Block a user