Fix settings when trying to remove proxy from proxyconfig

This commit is contained in:
Sylvain Berfini 2013-11-08 16:35:47 +01:00
parent d6a77bd794
commit 71dfd2a0f2
2 changed files with 5 additions and 1 deletions

View file

@ -92,7 +92,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
mPrefs.setAccountProxy(n, newValue.toString());
preference.setSummary(newValue.toString());
preference.setSummary(mPrefs.getAccountProxy(n));
return true;
}
};

View file

@ -272,9 +272,13 @@ public class LinphonePreferences {
}
public void setAccountProxy(int n, String proxy) {
if (proxy == null || proxy.length() <= 0) {
proxy = getAccountDomain(n);
}
if (!proxy.startsWith("sip:")) {
proxy = "sip:" + proxy;
}
try {
LinphoneProxyConfig prxCfg = getProxyConfig(n);
prxCfg.setProxy(proxy);