@qusaieilouti99/call-manager 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,25 +9,25 @@ class CallManager : HybridCallManagerSpec() {
|
|
|
9
9
|
private var currentListener: ((CallEventType, String) -> Unit)? = null
|
|
10
10
|
|
|
11
11
|
override fun endCall(callId: String) {
|
|
12
|
-
CallEngine.endCall(CallEngine.
|
|
12
|
+
CallEngine.endCall(CallEngine.getAppContext() ?: return, callId)
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
override fun silenceRingtone() {
|
|
16
|
-
CallEngine.cancelIncomingCallUI(CallEngine.
|
|
16
|
+
CallEngine.cancelIncomingCallUI(CallEngine.getAppContext() ?: return)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
override fun getAudioDevices(): Array<String> {
|
|
20
|
-
val context = CallEngine.
|
|
20
|
+
val context = CallEngine.getAppContext() ?: throw IllegalStateException("App context not set")
|
|
21
21
|
return CallEngine.getAudioDevices(context).toTypedArray()
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
override fun setAudioRoute(route: String) {
|
|
25
|
-
val context = CallEngine.
|
|
25
|
+
val context = CallEngine.getAppContext() ?: throw IllegalStateException("App context not set")
|
|
26
26
|
CallEngine.setAudioRoute(context, route)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
override fun keepScreenAwake(keepAwake: Boolean) {
|
|
30
|
-
val context = CallEngine.
|
|
30
|
+
val context = CallEngine.getAppContext() ?: throw IllegalStateException("App context not set")
|
|
31
31
|
CallEngine.keepScreenAwake(context, keepAwake)
|
|
32
32
|
}
|
|
33
33
|
|