@@ -46,6 +46,7 @@ public class CheckPhoneNumberFragment extends FragmentBase implements View.OnCli
46
46
private TextInputLayout mPhoneInputLayout ;
47
47
private EditText mPhoneEditText ;
48
48
private TextView mSmsTermsText ;
49
+ private TextView mFooterText ;
49
50
50
51
51
52
public static CheckPhoneNumberFragment newInstance (Bundle params ) {
@@ -81,6 +82,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
81
82
mPhoneInputLayout = view .findViewById (R .id .phone_layout );
82
83
mPhoneEditText = view .findViewById (R .id .phone_number );
83
84
mSmsTermsText = view .findViewById (R .id .send_sms_tos );
85
+ mFooterText = view .findViewById (R .id .email_footer_tos_and_pp_text );
84
86
85
87
mSmsTermsText .setText (getString (R .string .fui_sms_terms_of_service ,
86
88
getString (R .string .fui_verify_phone_number )));
@@ -97,7 +99,7 @@ public void onDonePressed() {
97
99
});
98
100
mSubmitButton .setOnClickListener (this );
99
101
100
- setupPrivacyDisclosures (view .< TextView > findViewById ( R . id . email_footer_tos_and_pp_text ) );
102
+ setupPrivacyDisclosures ();
101
103
setupCountrySpinner ();
102
104
}
103
105
@@ -171,17 +173,20 @@ private String getPseudoValidPhoneNumber() {
171
173
everythingElse , mCountryListSpinner .getSelectedCountryInfo ());
172
174
}
173
175
174
- private void setupPrivacyDisclosures (TextView footerText ) {
176
+ private void setupPrivacyDisclosures () {
175
177
FlowParameters params = getFlowParams ();
176
178
177
- if (!params .shouldShowProviderChoice ()) {
179
+ boolean termsAndPrivacyUrlsProvided = params .isTermsOfServiceUrlProvided ()
180
+ && params .isPrivacyPolicyUrlProvided ();
181
+
182
+ if (!params .shouldShowProviderChoice () && termsAndPrivacyUrlsProvided ) {
178
183
PrivacyDisclosureUtils .setupTermsOfServiceAndPrivacyPolicySmsText (requireContext (),
179
184
params ,
180
185
mSmsTermsText );
181
186
} else {
182
187
PrivacyDisclosureUtils .setupTermsOfServiceFooter (requireContext (),
183
188
params ,
184
- footerText );
189
+ mFooterText );
185
190
186
191
String verifyText = getString (R .string .fui_verify_phone_number );
187
192
mSmsTermsText .setText (getString (R .string .fui_sms_terms_of_service , verifyText ));
0 commit comments