Change registration state on dialer's status bar after removing an account
This commit is contained in:
parent
cb7e2925ad
commit
0e437a4a32
2 changed files with 8 additions and 6 deletions
|
@ -135,12 +135,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
|
|||
return true;
|
||||
}
|
||||
};
|
||||
OnPreferenceChangeListener deleteChangedListener = new OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
private void manageAccountPreferencesFields(PreferenceScreen parent) {
|
||||
boolean isDefaultAccount = mPrefs.getDefaultAccountIndex() == n;
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.linphone.core.LinphoneAuthInfo;
|
|||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCore.FirewallPolicy;
|
||||
import org.linphone.core.LinphoneCore.MediaEncryption;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.core.LinphoneCore.Transports;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreFactory;
|
||||
|
@ -402,6 +403,13 @@ public class LinphonePreferences {
|
|||
LinphoneProxyConfig proxyCfg = getProxyConfig(n);
|
||||
if (proxyCfg != null)
|
||||
getLc().removeProxyConfig(proxyCfg);
|
||||
|
||||
if (getLc().getProxyConfigList().length == 0) {
|
||||
// TODO: remove once issue http://bugs.linphone.org/view.php?id=984 will be fixed
|
||||
LinphoneActivity.instance().getStatusFragment().registrationStateChanged(RegistrationState.RegistrationNone);
|
||||
} else {
|
||||
getLc().refreshRegisters();
|
||||
}
|
||||
}
|
||||
// End of accounts settings
|
||||
|
||||
|
|
Loading…
Reference in a new issue