Fix issue on login with the check of alias
This commit is contained in:
parent
e28abd853f
commit
9d8a5ee232
1 changed files with 22 additions and 1 deletions
|
@ -169,7 +169,7 @@ private static AssistantActivity instance;
|
|||
if (getResources().getBoolean(R.bool.use_phone_number_validation)
|
||||
&& cfg.getDomain().equals(getString(R.string.default_domain))
|
||||
&& LinphoneManager.getLc().getDefaultProxyConfig() != null) {
|
||||
accountCreator.isAccountUsed();
|
||||
loadAccountCreator(cfg).isAccountUsed();
|
||||
} else {
|
||||
success();
|
||||
}
|
||||
|
@ -225,6 +225,27 @@ private static AssistantActivity instance;
|
|||
status = fragment;
|
||||
}
|
||||
|
||||
private LinphoneAccountCreator loadAccountCreator(LinphoneProxyConfig cfg) {
|
||||
LinphoneAccountCreator accountCreator =
|
||||
LinphoneCoreFactory.instance().createAccountCreator(
|
||||
LinphoneManager.getLc(),
|
||||
LinphonePreferences.instance().getXmlrpcUrl());
|
||||
LinphoneProxyConfig cfgTab[] = LinphoneManager.getLc().getProxyConfigList();
|
||||
accountCreator.setListener(this);
|
||||
int n = -1;
|
||||
for (int i = 0 ; i < cfgTab.length ; i++) {
|
||||
if (cfgTab[i].equals(cfg)) {
|
||||
n = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (n >= 0) {
|
||||
accountCreator.setDomain(mPrefs.getAccountDomain(n));
|
||||
accountCreator.setUsername(mPrefs.getAccountUsername(n));
|
||||
}
|
||||
return accountCreator;
|
||||
}
|
||||
|
||||
private void initUI() {
|
||||
back = (ImageView) findViewById(R.id.back);
|
||||
back.setOnClickListener(this);
|
||||
|
|
Loading…
Reference in a new issue