Fixed default proxy config removal causing Not Connected state if there are more than 1 proxy config

This commit is contained in:
Sylvain Berfini 2019-05-23 11:17:10 +02:00
parent 153cbb0c95
commit 9ec717776d

View file

@ -548,6 +548,15 @@ public class AccountSettingsFragment extends Fragment {
core.removeAuthInfo(mAuthInfo);
}
}
// Set a new default proxy config if the current one has been removed
if (core != null && core.getDefaultProxyConfig() == null) {
ProxyConfig[] proxyConfigs = core.getProxyConfigList();
if (proxyConfigs.length > 0) {
core.setDefaultProxyConfig(proxyConfigs[0]);
}
}
LinphoneActivity.instance().displaySettings();
LinphoneActivity.instance().refreshAccounts();
}