avoid shutter actions when not in state_preview state

This commit is contained in:
tibbi 2018-06-08 13:54:46 +02:00
parent b4cb2dd0bb
commit ac3a09dd85
1 changed files with 4 additions and 0 deletions

View File

@ -802,6 +802,10 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
}
override fun tryTakePicture() {
if (mCameraState != STATE_PREVIEW) {
return
}
if (mIsFocusSupported && mActivity.config.focusBeforeCapture) {
lockFocus()
} else {