@@ -46,6 +46,7 @@ public class CheckPhoneNumberFragment extends FragmentBase implements View.OnCli
4646 private TextInputLayout mPhoneInputLayout ;
4747 private EditText mPhoneEditText ;
4848 private TextView mSmsTermsText ;
49+ private TextView mFooterText ;
4950
5051
5152 public static CheckPhoneNumberFragment newInstance (Bundle params ) {
@@ -81,6 +82,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
8182 mPhoneInputLayout = view .findViewById (R .id .phone_layout );
8283 mPhoneEditText = view .findViewById (R .id .phone_number );
8384 mSmsTermsText = view .findViewById (R .id .send_sms_tos );
85+ mFooterText = view .findViewById (R .id .email_footer_tos_and_pp_text );
8486
8587 mSmsTermsText .setText (getString (R .string .fui_sms_terms_of_service ,
8688 getString (R .string .fui_verify_phone_number )));
@@ -97,7 +99,7 @@ public void onDonePressed() {
9799 });
98100 mSubmitButton .setOnClickListener (this );
99101
100- setupPrivacyDisclosures (view .< TextView > findViewById ( R . id . email_footer_tos_and_pp_text ) );
102+ setupPrivacyDisclosures ();
101103 setupCountrySpinner ();
102104 }
103105
@@ -171,17 +173,20 @@ private String getPseudoValidPhoneNumber() {
171173 everythingElse , mCountryListSpinner .getSelectedCountryInfo ());
172174 }
173175
174- private void setupPrivacyDisclosures (TextView footerText ) {
176+ private void setupPrivacyDisclosures () {
175177 FlowParameters params = getFlowParams ();
176178
177- if (!params .shouldShowProviderChoice ()) {
179+ boolean termsAndPrivacyUrlsProvided = params .isTermsOfServiceUrlProvided ()
180+ && params .isPrivacyPolicyUrlProvided ();
181+
182+ if (!params .shouldShowProviderChoice () && termsAndPrivacyUrlsProvided ) {
178183 PrivacyDisclosureUtils .setupTermsOfServiceAndPrivacyPolicySmsText (requireContext (),
179184 params ,
180185 mSmsTermsText );
181186 } else {
182187 PrivacyDisclosureUtils .setupTermsOfServiceFooter (requireContext (),
183188 params ,
184- footerText );
189+ mFooterText );
185190
186191 String verifyText = getString (R .string .fui_verify_phone_number );
187192 mSmsTermsText .setText (getString (R .string .fui_sms_terms_of_service , verifyText ));
0 commit comments