fix: Cancel focus on session close (#2578)

This commit is contained in:
Marc Rousavy 2024-02-19 14:11:14 +01:00 committed by GitHub
parent 2c52fb01e4
commit 9af6e61dc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,7 @@ class PersistentCameraCaptureSession(private val cameraManager: CameraManager, p
get() = isActive && session != null && device != null && !didDestroyFromOutside
override fun close() {
focusJob?.cancel()
session?.tryAbortCaptures()
device?.close()
}