Fix the problem with the choice of country

This commit is contained in:
Erwan Croze 2016-11-28 17:28:52 +01:00
parent cb10aa43c1
commit 5a746abfac

View file

@ -116,14 +116,14 @@ public class LinphoneLoginFragment extends Fragment implements CompoundButton.On
countryCode = proxyConfig.lookupCCCFromIso(countryIso.toUpperCase());
DialPlan c = AssistantActivity.instance().getCountryListAdapter()
.getCountryFromCountryCode(String.valueOf(countryCode));
DialPlan c = AssistantActivity.instance().country;
if (c != null) {
selectCountry.setText(c.getCountryName());
dialCode.setText(c.getCountryCallingCode().contains("+") ?
c.getCountryCallingCode() : "+" + c.getCountryCallingCode());
} else {
c = AssistantActivity.instance().country;
c = AssistantActivity.instance().getCountryListAdapter()
.getCountryFromCountryCode(String.valueOf(countryCode));
if (c != null) {
selectCountry.setText(c.getCountryName());
dialCode.setText(c.getCountryCallingCode().contains("+") ?