rns-nativecall 0.7.0 → 0.7.1
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.
|
@@ -26,15 +26,29 @@ class CallMessagingService : FirebaseMessagingService() {
|
|
|
26
26
|
val type = data["type"] ?: ""
|
|
27
27
|
|
|
28
28
|
if (type == "CANCEL") {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
NativeCallManager.stopRingtone()
|
|
30
|
+
CallState.markCanceled(uuid)
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
// Direct disk-level cleanup of AsyncStorage
|
|
34
|
+
val prefs = context.getSharedPreferences("RKStorage", Context.MODE_PRIVATE)
|
|
35
|
+
prefs.edit()
|
|
36
|
+
.remove("pending_call_uuid")
|
|
37
|
+
.remove("offer_$uuid")
|
|
38
|
+
.apply()
|
|
39
|
+
|
|
40
|
+
// Kill the 'Connecting...' service if it's visible
|
|
41
|
+
context.stopService(Intent(context, CallForegroundService::class.java))
|
|
42
|
+
} catch (e: Exception) {
|
|
43
|
+
e.printStackTrace()
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (CallState.getCurrent() == uuid) {
|
|
47
|
+
CallState.clear(uuid)
|
|
48
|
+
}
|
|
49
|
+
showMissedCallNotification(context, data, uuid)
|
|
50
|
+
return
|
|
51
|
+
}
|
|
38
52
|
|
|
39
53
|
// Inside onMessageReceived
|
|
40
54
|
if (!CallState.setCurrent(uuid)) {
|