fix country selector on older androids

This commit is contained in:
Daniel Gultsch 2020-01-24 10:39:50 +01:00
parent 09dff6310d
commit 18a90fde8c
2 changed files with 4 additions and 4 deletions

View file

@ -10,12 +10,12 @@
<activity
android:name=".ui.EnterPhoneNumberActivity"
android:label="@string/verify_your_phone_number"
android:launchMode="singleTask" />
android:launchMode="singleTop" />
<activity
android:name=".ui.ChooseCountryActivity"
android:label="@string/choose_a_country"
android:launchMode="singleTask" />
android:launchMode="singleTop" />
<activity
android:name=".ui.VerifyActivity"

View file

@ -170,7 +170,7 @@ public class EnterPhoneNumberActivity extends XmppActivity implements QuickConve
}
private void onSelectCountryClick(View view) {
Intent intent = new Intent(this, ChooseCountryActivity.class);
final Intent intent = new Intent(this, ChooseCountryActivity.class);
startActivityForResult(intent, REQUEST_CHOOSE_COUNTRY);
}
@ -194,7 +194,7 @@ public class EnterPhoneNumberActivity extends XmppActivity implements QuickConve
public void onActivityResult(int requestCode, int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == REQUEST_CHOOSE_COUNTRY) {
String region = data.getStringExtra("region");
final String region = data.getStringExtra("region");
if (region != null) {
this.region = region;
final int countryCode = PhoneNumberUtilWrapper.getInstance(this).getCountryCodeForRegion(region);