diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java index cce63c3f632cec245cd33d66ad6cd36fd50b98cf..30d9521fd4bfafb114a3bee0d48c07aab8df0f9c 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -198,6 +198,7 @@ public class AccountSetupBasics extends K9Activity if (split.length == 2) { String domain = split[1]; xoauth2 = OAuth2Provider.Companion.isXOAuth2(domain); + } } @@ -306,12 +307,13 @@ public class AccountSetupBasics extends K9Activity onManualSetup(); return; } - if(xoauth2){ + String email = mEmailView.getText().toString(); + + if(OAuth2Provider.Companion.getProvider(email).toString().trim().equals("GMAIL")){ Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT); startActivity(intent); } else { - String email = mEmailView.getText().toString(); ConnectionSettings extraConnectionSettings = ExtraAccountDiscovery.discover(email); if (extraConnectionSettings != null) { finishAutoSetup(extraConnectionSettings);