fix: Close CameraSession in onDetachedFromWindow() (#1962)

* Close camera session in onDetachedFromWindow

* Remove cache folder

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
This commit is contained in:
Vahid Hasani 2023-10-10 20:31:54 +03:30 committed by GitHub
parent 1e7059ca8f
commit 02726d47f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,6 +125,7 @@ class CameraView(context: Context) :
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
cameraSession.close()
launch { updateLifecycle() }
}