fix: Check if session is still valid before resetting AF after focus (#2550)
* fix: Check if session is still valid before resetting AF after focus * Update PersistentCameraCaptureSession.kt
This commit is contained in:
parent
a2a2e94865
commit
b7e24c444e
@ -238,6 +238,10 @@ class PersistentCameraCaptureSession(private val cameraManager: CameraManager, p
|
||||
// this job got canceled from the outside
|
||||
return@launch
|
||||
}
|
||||
if (!isRunning || this@PersistentCameraCaptureSession.session != session) {
|
||||
// the view/session has already been destroyed in the meantime
|
||||
return@launch
|
||||
}
|
||||
Log.i(TAG, "Resetting focus to auto-focus...")
|
||||
// 6. Reset AF/AE/AWB to continuous auto-focus again, which is the default here.
|
||||
repeatingRequest.createCaptureRequest(device, deviceDetails, outputs).also { request ->
|
||||
|
Loading…
Reference in New Issue
Block a user