use a background thread for closing the camera on pause

This commit is contained in:
tibbi 2020-12-29 17:38:47 +01:00
parent f6a2b0f112
commit a713f8aba6
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,10 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener {
if (mPreview?.getCameraState() == STATE_PICTURE_TAKEN) {
toast(R.string.photo_not_saved)
}
mPreview?.onPaused()
ensureBackgroundThread {
mPreview?.onPaused()
}
}
override fun onDestroy() {