mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-28 22:16:22 +00:00
Improved hide notification when not needed
This commit is contained in:
parent
d568dec559
commit
c8d5c588b7
1 changed files with 11 additions and 0 deletions
|
|
@ -121,6 +121,17 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
||||||
Log.i("[Context] Global state changed [$state]")
|
Log.i("[Context] Global state changed [$state]")
|
||||||
if (state == GlobalState.On) {
|
if (state == GlobalState.On) {
|
||||||
contactsManager.fetchContactsAsync()
|
contactsManager.fetchContactsAsync()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAccountRegistrationStateChanged(
|
||||||
|
core: Core,
|
||||||
|
account: Account,
|
||||||
|
state: RegistrationState?,
|
||||||
|
message: String
|
||||||
|
) {
|
||||||
|
Log.i("[Context] Account [${account.params.identityAddress?.asStringUriOnly()}] registration state changed [$state]")
|
||||||
|
if (state == RegistrationState.Ok && account == core.defaultAccount) {
|
||||||
notificationsManager.stopForegroundNotificationIfPossible()
|
notificationsManager.stopForegroundNotificationIfPossible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue