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:
parent
1e7059ca8f
commit
02726d47f7
@ -125,6 +125,7 @@ class CameraView(context: Context) :
|
|||||||
|
|
||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
super.onDetachedFromWindow()
|
super.onDetachedFromWindow()
|
||||||
|
cameraSession.close()
|
||||||
launch { updateLifecycle() }
|
launch { updateLifecycle() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user