Merge pull request #6809 from vector-im/fix/mna/leak-in-call

[Call] Memory leak after a call
This commit is contained in:
Maxime NATUREL 2022-08-11 16:44:33 +02:00 committed by GitHub
commit 971ad26deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

1
changelog.d/6808.misc Normal file
View File

@ -0,0 +1 @@
[Call] Memory leak after a call

View File

@ -241,6 +241,7 @@ class VectorCallActivity :
detachRenderersIfNeeded() detachRenderersIfNeeded()
turnScreenOffAndKeyguardOn() turnScreenOffAndKeyguardOn()
removeOnPictureInPictureModeChangedListener(pictureInPictureModeChangedInfoConsumer) removeOnPictureInPictureModeChangedListener(pictureInPictureModeChangedInfoConsumer)
screenCaptureServiceConnection.unbind()
super.onDestroy() super.onDestroy()
} }

View File

@ -47,6 +47,10 @@ class ScreenCaptureServiceConnection @Inject constructor(
} }
} }
fun unbind() {
callback = null
}
fun stopScreenCapturing() { fun stopScreenCapturing() {
screenCaptureAndroidService?.stopService() screenCaptureAndroidService?.stopService()
} }