make sure the flash is not on Torch mode when toggling to auto
This commit is contained in:
parent
a7981fe7df
commit
ffc89a8970
|
@ -472,9 +472,16 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
|||
}
|
||||
|
||||
fun autoFlash() {
|
||||
mParameters!!.flashMode = Camera.Parameters.FLASH_MODE_OFF
|
||||
mCamera!!.parameters = mParameters
|
||||
|
||||
Handler().postDelayed({
|
||||
mActivity.runOnUiThread {
|
||||
mParameters!!.flashMode = Camera.Parameters.FLASH_MODE_AUTO
|
||||
mCamera!!.parameters = mParameters
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
fun initPhotoMode() {
|
||||
stopRecording()
|
||||
|
|
Loading…
Reference in New Issue