Do not remove AuthInfo on registrationStateChanged cb when state is Cleared

This commit is contained in:
Sylvain Berfini 2018-02-23 14:36:36 +01:00
parent bbb5a04e52
commit bfa64e44ec

View file

@ -239,12 +239,6 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
@Override @Override
public void onRegistrationStateChanged(Core lc, ProxyConfig proxy, RegistrationState state, String smessage) { public void onRegistrationStateChanged(Core lc, ProxyConfig proxy, RegistrationState state, String smessage) {
AuthInfo authInfo = lc.findAuthInfo(proxy.getRealm(), proxy.getIdentityAddress().getUsername(), proxy.getDomain()); AuthInfo authInfo = lc.findAuthInfo(proxy.getRealm(), proxy.getIdentityAddress().getUsername(), proxy.getDomain());
if (state.equals(RegistrationState.Cleared)) {
if (lc != null) {
if (authInfo != null)
lc.removeAuthInfo(authInfo);
}
}
refreshAccounts(); refreshAccounts();