From 8a4dcf23343558454716f5c3e8d8789310a764fa Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 12 Jul 2021 16:13:52 +0300 Subject: [PATCH] try fixing error that was originally registered here. Are you missing a call to unregisterReceiver()? --- android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt | 2 +- .../com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt b/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt index a2c0f742..3c879350 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/MainActivity.kt @@ -269,7 +269,7 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler, private fun unbindService() { if (bound) { - videoStreamService!!.videoCallResponseListener = null // unregister + videoStreamService?.videoCallResponseListener = null // unregister // videoStreamService!!.mActivity = null unbindService(serviceConnection) bound = false diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt b/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt index 3c4a5dc1..cdd9ebc0 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt @@ -833,6 +833,7 @@ class VideoStreamFloatingWidgetService : Service(), Session.SessionListener, } if (mSubscriber != null) { + mSubscriber!!.subscribeToAudio = false // mosa added for error that was originally registered here. Are you missing a call to unregisterReceiver()? mSubscriberViewContainer.removeView(mSubscriber!!.view) mSession!!.unsubscribe(mSubscriber) mSubscriber!!.destroy()