From 67bd17109ea02cb94e66f3b3ba4e3df429fb36ed Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Tue, 3 May 2022 22:20:41 +0530 Subject: [PATCH] update redirect condition check only for Google Domain not all xoauth --- .../java/com/fsck/k9/activity/setup/AccountSetupBasics.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 cce63c3f63..30d9521fd4 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); -- GitLab