mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
use a background thread for restarting the camera after recording
This commit is contained in:
@ -746,8 +746,10 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
|||||||
mIsRecording = false
|
mIsRecording = false
|
||||||
mMediaRecorder!!.stop()
|
mMediaRecorder!!.stop()
|
||||||
mMediaRecorder!!.reset()
|
mMediaRecorder!!.reset()
|
||||||
|
Thread {
|
||||||
closeCamera()
|
closeCamera()
|
||||||
openCamera(mTextureView.width, mTextureView.height)
|
openCamera(mTextureView.width, mTextureView.height)
|
||||||
|
}.start()
|
||||||
mActivity.setRecordingState(false)
|
mActivity.setRecordingState(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user