If disable default proxy config, try to set another one (not disabled) as default proxy config if possible
This commit is contained in:
parent
e25a87696c
commit
f80451f031
1 changed files with 13 additions and 0 deletions
|
@ -395,6 +395,19 @@ public class LinphonePreferences {
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If default proxy config is disabled, try to set another one as default proxy
|
||||||
|
if (disabled && getLc().getDefaultProxyConfig().getIdentity().equals(prxCfg.getIdentity())) {
|
||||||
|
int count = getLc().getProxyConfigList().length;
|
||||||
|
if (count > 1) {
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
if (isAccountEnabled(i)) {
|
||||||
|
getLc().setDefaultProxyConfig(getProxyConfig(i));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAccountEnabled(int n) {
|
public boolean isAccountEnabled(int n) {
|
||||||
|
|
Loading…
Reference in a new issue