Add support for disabling OAuth on setup flow only
b/16633826 Change-Id: Iea984ae656fbf3fe44de7598fdb9357a18d52a74
This commit is contained in:
parent
7063124d1d
commit
e96791403e
|
@ -26,4 +26,8 @@
|
|||
|
||||
<!-- Boolean value indicating if quick responses are supported -->
|
||||
<bool name="quickresponse_supported">true</bool>
|
||||
|
||||
<!-- Boolean value indicating whether we should show the OAuth option on initial account setup
|
||||
(not settings) -->
|
||||
<bool name="skip_oauth_on_setup">false</bool>
|
||||
</resources>
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue