fix: Close CameraSession
if the View is removed (#2174)
* fix: Close `CameraSession` if the View is removed * fix: Use ViewManager's `onDropViewInstance` instead * fix: Only stop repeating if we have a session * fix: Reset `configuration` on `close()`
This commit is contained in:
@@ -131,6 +131,10 @@ class CameraView(context: Context) :
|
||||
super.onDetachedFromWindow()
|
||||
}
|
||||
|
||||
fun destroy() {
|
||||
cameraSession.close()
|
||||
}
|
||||
|
||||
fun update() {
|
||||
Log.i(TAG, "Updating CameraSession...")
|
||||
|
||||
|
Reference in New Issue
Block a user