am b0a19219: am 4113c904: am 2562a4df: am 61e79746: am c845295f: Merge "Fix the text of the authentication label on rotation" into ub-gmail-ur14-dev

* commit 'b0a1921985d46e9591e2687f0faf18306f6a868f':
  Fix the text of the authentication label on rotation
This commit is contained in:
Martin Hibdon 2014-11-02 17:50:39 +00:00 committed by Android Git Automerger
commit 0916e2dc5d
1 changed files with 12 additions and 8 deletions

View File

@ -256,6 +256,17 @@ public class AccountSetupIncomingFragment extends AccountServerBaseFragment
configureEditor();
loadSettings();
final List<VendorPolicyLoader.OAuthProvider> 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<VendorPolicyLoader.OAuthProvider> 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) {