Reworked CoreContext order at startup

This commit is contained in:
Sylvain Berfini 2021-12-20 17:22:37 +01:00
parent 43e6e14654
commit c63a8cf2fd
2 changed files with 7 additions and 5 deletions

View file

@ -286,8 +286,6 @@ class CoreContext(val context: Context, coreConfig: Config) {
fun start(isPush: Boolean = false) {
Log.i("[Context] Starting")
notificationsManager.onCoreReady()
core.addListener(listener)
// CoreContext listener must be added first!
@ -308,14 +306,18 @@ class CoreContext(val context: Context, coreConfig: Config) {
core.enterBackground()
}
core.start()
configureCore()
core.start()
initPhoneStateListener()
notificationsManager.onCoreReady()
EmojiCompat.init(BundledEmojiCompatConfig(context))
collator.strength = Collator.NO_DECOMPOSITION
Log.i("[Context] Started")
}
fun stop() {

View file

@ -124,7 +124,7 @@ class NotificationsManager(private val context: Context) {
return
}
when (state) {
when (call.state) {
Call.State.IncomingEarlyMedia, Call.State.IncomingReceived -> displayIncomingCallNotification(call)
Call.State.End, Call.State.Error -> dismissCallNotification(call)
Call.State.Released -> {