From 606213ea022c75e156249c37d4374e8ceb4d2340 Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Mon, 8 Sep 2014 12:54:49 -0700 Subject: [PATCH] Fix the text of the authentication label on rotation b/17410251 Change-Id: I1e902da85a8525e597d205d3be520e6eb6db7f50 --- .../setup/AccountSetupIncomingFragment.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java b/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java index 7ae2c38e8..b403fbf26 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java +++ b/src/com/android/email/activity/setup/AccountSetupIncomingFragment.java @@ -256,6 +256,17 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment configureEditor(); loadSettings(); + + final List oauthProviders = + AccountSettingsUtils.getAllOAuthProviders(getActivity()); + final boolean offerOAuth = (mServiceInfo.offerOAuth && oauthProviders.size() > 0); + if (mAuthenticationLabel != null) { + if (offerOAuth) { + mAuthenticationLabel.setText(R.string.authentication_label); + } else { + mAuthenticationLabel.setText(R.string.account_setup_basics_password_label); + } + } } /** @@ -342,16 +353,9 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment mServiceInfo = mSetupData.getIncomingServiceInfo(getActivity()); final List oauthProviders = AccountSettingsUtils.getAllOAuthProviders(getActivity()); - final boolean offerOAuth = (mServiceInfo.offerOAuth && oauthProviders.size() > 0); + final boolean offerOAuth = (mServiceInfo.offerOAuth && oauthProviders.size() > 0); mAuthenticationView.setAuthInfo(offerOAuth, recvAuth); - if (mAuthenticationLabel != null) { - if (offerOAuth) { - mAuthenticationLabel.setText(R.string.authentication_label); - } else { - mAuthenticationLabel.setText(R.string.account_setup_basics_password_label); - } - } final String username = recvAuth.mLogin; if (username != null) {