Reworked CoreContext order at startup
This commit is contained in:
parent
43e6e14654
commit
c63a8cf2fd
2 changed files with 7 additions and 5 deletions
|
@ -286,8 +286,6 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
||||||
fun start(isPush: Boolean = false) {
|
fun start(isPush: Boolean = false) {
|
||||||
Log.i("[Context] Starting")
|
Log.i("[Context] Starting")
|
||||||
|
|
||||||
notificationsManager.onCoreReady()
|
|
||||||
|
|
||||||
core.addListener(listener)
|
core.addListener(listener)
|
||||||
|
|
||||||
// CoreContext listener must be added first!
|
// CoreContext listener must be added first!
|
||||||
|
@ -308,14 +306,18 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
||||||
core.enterBackground()
|
core.enterBackground()
|
||||||
}
|
}
|
||||||
|
|
||||||
core.start()
|
|
||||||
|
|
||||||
configureCore()
|
configureCore()
|
||||||
|
|
||||||
|
core.start()
|
||||||
|
|
||||||
initPhoneStateListener()
|
initPhoneStateListener()
|
||||||
|
|
||||||
|
notificationsManager.onCoreReady()
|
||||||
|
|
||||||
EmojiCompat.init(BundledEmojiCompatConfig(context))
|
EmojiCompat.init(BundledEmojiCompatConfig(context))
|
||||||
collator.strength = Collator.NO_DECOMPOSITION
|
collator.strength = Collator.NO_DECOMPOSITION
|
||||||
|
|
||||||
|
Log.i("[Context] Started")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stop() {
|
fun stop() {
|
||||||
|
|
|
@ -124,7 +124,7 @@ class NotificationsManager(private val context: Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
when (state) {
|
when (call.state) {
|
||||||
Call.State.IncomingEarlyMedia, Call.State.IncomingReceived -> displayIncomingCallNotification(call)
|
Call.State.IncomingEarlyMedia, Call.State.IncomingReceived -> displayIncomingCallNotification(call)
|
||||||
Call.State.End, Call.State.Error -> dismissCallNotification(call)
|
Call.State.End, Call.State.Error -> dismissCallNotification(call)
|
||||||
Call.State.Released -> {
|
Call.State.Released -> {
|
||||||
|
|
Loading…
Reference in a new issue