Merge "Add support for disabling OAuth on setup flow only" into ub-mail-master
This commit is contained in:
commit
e495f17a4f
@ -26,4 +26,8 @@
|
|||||||
|
|
||||||
<!-- Boolean value indicating if quick responses are supported -->
|
<!-- Boolean value indicating if quick responses are supported -->
|
||||||
<bool name="quickresponse_supported">true</bool>
|
<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>
|
</resources>
|
@ -186,6 +186,12 @@ public class AccountSetupCredentialsFragment extends AccountSetupFragment
|
|||||||
mOfferOAuth = true;
|
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);
|
mOAuthGroup.setVisibility(mOfferOAuth ? View.VISIBLE : View.GONE);
|
||||||
mRegularPasswordText.setVisibility(mOfferOAuth ? View.GONE : View.VISIBLE);
|
mRegularPasswordText.setVisibility(mOfferOAuth ? View.GONE : View.VISIBLE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user