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 dbd04292e4
commit 1ec45b7308

View file

@ -221,12 +221,6 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
@Override @Override
public void registrationState(LinphoneCore lc, LinphoneProxyConfig proxy, LinphoneCore.RegistrationState state, String smessage) { public void registrationState(LinphoneCore lc, LinphoneProxyConfig proxy, LinphoneCore.RegistrationState state, String smessage) {
LinphoneAuthInfo authInfo = lc.findAuthInfo(proxy.getIdentity(), proxy.getRealm(), proxy.getDomain()); LinphoneAuthInfo authInfo = lc.findAuthInfo(proxy.getIdentity(), proxy.getRealm(), proxy.getDomain());
if (state.equals(RegistrationState.RegistrationCleared)) {
if (lc != null) {
if (authInfo != null)
lc.removeAuthInfo(authInfo);
}
}
refreshAccounts(); refreshAccounts();