mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Make sure after a remote provisioning a default account has been set
This commit is contained in:
parent
7366e9a560
commit
adc7bfbe8d
1 changed files with 10 additions and 0 deletions
|
|
@ -256,6 +256,16 @@ class CoreContext
|
|||
) {
|
||||
Log.i("$TAG Configuring state changed [$status], message is [$message]")
|
||||
if (status == ConfiguringState.Successful) {
|
||||
val accounts = core.accountList
|
||||
if (core.defaultAccount == null && accounts.isNotEmpty()) {
|
||||
val firstAccount = accounts.firstOrNull()
|
||||
if (firstAccount != null) {
|
||||
Log.w("$TAG Default account is null but account list isn't empty, using account [${firstAccount.
|
||||
params.identityAddress?.asStringUriOnly()}] as default")
|
||||
core.defaultAccount = firstAccount
|
||||
}
|
||||
}
|
||||
|
||||
provisioningAppliedEvent.postValue(Event(true))
|
||||
corePreferences.firstLaunch = false
|
||||
showGreenToastEvent.postValue(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue