diff --git a/res/values/constants.xml b/res/values/constants.xml
index 945d348ff..e25d009ed 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -26,4 +26,8 @@
true
+
+
+ false
\ No newline at end of file
diff --git a/src/com/android/email/activity/setup/AccountSetupCredentialsFragment.java b/src/com/android/email/activity/setup/AccountSetupCredentialsFragment.java
index 650e98841..dcb824ab1 100644
--- a/src/com/android/email/activity/setup/AccountSetupCredentialsFragment.java
+++ b/src/com/android/email/activity/setup/AccountSetupCredentialsFragment.java
@@ -186,6 +186,12 @@ public class AccountSetupCredentialsFragment extends AccountSetupFragment
mOfferOAuth = true;
}
}
+ // We may want to disable OAuth during the new account setup flow, but allow it elsewhere
+ final boolean standalone = getArguments().getBoolean(EXTRA_STANDALONE);
+ final boolean skipOAuth = !standalone &&
+ getActivity().getResources().getBoolean(R.bool.skip_oauth_on_setup);
+ mOfferOAuth = mOfferOAuth && !skipOAuth;
+
mOAuthGroup.setVisibility(mOfferOAuth ? View.VISIBLE : View.GONE);
mRegularPasswordText.setVisibility(mOfferOAuth ? View.GONE : View.VISIBLE);