[Android][Autofill] Make optional required fields check in AddressEditor
Prior to this change, it was impossible to save an Autofill profile until every required field is filled. Now it depends on the use case (purpose argument): - if opened from Autofill Settings (purpose = AUTOFILL_SETTINGS), no fields are marked as required and empty values are acceptable; - if opened from Payment Request or Autofill Assistant (purpose = PAYMENT_REQUEST), the behavior is the same as before: an error message is shown when the required field is not filled. Note, that phone number validation is still enabled for both cases. However, an empty value is allowed only for the first case. Change the test accordingly and add another test for phone number validation. Also explicilty focus the first text field in the testKeyboardShownOnDpadCenter test. Previously it was focused because it was the first required field and after the change it didn't get focused by default. Change-Id: Ib476af34b2d755236cf88a29bcf3a2ba4977ccc5 Bug: 1149568 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537670 Commit-Queue: Elizabeth Popova <lizapopova@google.com> Reviewed-by:Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by:
Matthias Körber <koerber@google.com> Reviewed-by:
Christoph Schwering <schwering@google.com> Cr-Commit-Position: refs/heads/master@{#827904}
Showing
Please register or sign in to comment