Fix settings when trying to remove proxy from proxyconfig
This commit is contained in:
parent
d6a77bd794
commit
71dfd2a0f2
2 changed files with 5 additions and 1 deletions
|
@ -92,7 +92,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
mPrefs.setAccountProxy(n, newValue.toString());
|
mPrefs.setAccountProxy(n, newValue.toString());
|
||||||
preference.setSummary(newValue.toString());
|
preference.setSummary(mPrefs.getAccountProxy(n));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -272,9 +272,13 @@ public class LinphonePreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAccountProxy(int n, String proxy) {
|
public void setAccountProxy(int n, String proxy) {
|
||||||
|
if (proxy == null || proxy.length() <= 0) {
|
||||||
|
proxy = getAccountDomain(n);
|
||||||
|
}
|
||||||
if (!proxy.startsWith("sip:")) {
|
if (!proxy.startsWith("sip:")) {
|
||||||
proxy = "sip:" + proxy;
|
proxy = "sip:" + proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
||||||
prxCfg.setProxy(proxy);
|
prxCfg.setProxy(proxy);
|
||||||
|
|
Loading…
Reference in a new issue