use a background thread for closing the camera on pause
This commit is contained in:
parent
f6a2b0f112
commit
a713f8aba6
|
@ -99,7 +99,10 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
|
||||||
if (mPreview?.getCameraState() == STATE_PICTURE_TAKEN) {
|
if (mPreview?.getCameraState() == STATE_PICTURE_TAKEN) {
|
||||||
toast(R.string.photo_not_saved)
|
toast(R.string.photo_not_saved)
|
||||||
}
|
}
|
||||||
mPreview?.onPaused()
|
|
||||||
|
ensureBackgroundThread {
|
||||||
|
mPreview?.onPaused()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
|
Loading…
Reference in New Issue