Fix account not removed issue
This commit is contained in:
parent
176f98c9df
commit
66f49a3ab6
1 changed files with 5 additions and 9 deletions
|
@ -565,12 +565,13 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initAccounts() throws LinphoneCoreException {
|
public void initAccounts() throws LinphoneCoreException {
|
||||||
boolean cleanBefore = true;
|
mLc.clearAuthInfos();
|
||||||
|
mLc.clearProxyConfigs();
|
||||||
|
|
||||||
for (int i = 0; i < getPrefExtraAccountsNumber(); i++) {
|
for (int i = 0; i < getPrefExtraAccountsNumber(); i++) {
|
||||||
String key = i == 0 ? "" : String.valueOf(i);
|
String key = i == 0 ? "" : String.valueOf(i);
|
||||||
if (!getPrefBoolean(getString(R.string.pref_disable_account_key) + key, false)) {
|
if (!getPrefBoolean(getString(R.string.pref_disable_account_key) + key, false)) {
|
||||||
initAccount(key, cleanBefore, i == getPrefInt(R.string.pref_default_account_key, 0));
|
initAccount(key, i == getPrefInt(R.string.pref_default_account_key, 0));
|
||||||
cleanBefore = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -587,12 +588,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initAccount(String key, boolean cleanBefore, boolean defaultAccount) throws LinphoneCoreException {
|
private void initAccount(String key, boolean defaultAccount) throws LinphoneCoreException {
|
||||||
if (cleanBefore) {
|
|
||||||
mLc.clearAuthInfos();
|
|
||||||
mLc.clearProxyConfigs();
|
|
||||||
}
|
|
||||||
|
|
||||||
String username = getPrefString(getString(R.string.pref_username_key) + key, null);
|
String username = getPrefString(getString(R.string.pref_username_key) + key, null);
|
||||||
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
|
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
|
||||||
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
|
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
|
||||||
|
|
Loading…
Reference in a new issue