Skip to content

Remove phone number validation on the client side #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 1, 2017

Conversation

samtstern
Copy link
Contributor

See #812

@ashwinraghav is this the intended behavior? The libphonenumber call is only made for SmartLock hints but not for manually entered phone numbers.

See #812

Change-Id: Iba4867e65e838842e2b6a8ce30ff514895bb6fd4
@samtstern
Copy link
Contributor Author

cc: @isaisachen

@ashwinraghav
Copy link
Contributor

;tldr
It was intentional, but the wrong decision in hindsight.

Here was how we thought of this:

  1. Smartlock hints needed it (at the time) since the phone number formats returned were not in the E164 format. We started using telephony's normalization (assuming it would somehow be updated regularly enough since libPhoneNumber that backs it changes every week).
  2. We piggybacked on the phone number normalization for manually entered phone numbers to save on service calls for fat-fingered phone numbers.

To state the obvious, both 1 and 2 are yielding false negatives since the lib is not updated as often as we would like. I would be ok getting rid of this validation for both 1 and 2 or just 2.


// TODO(samstern): Remove this call once the next version of Play servics is released
// estimated timelime August 10th
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding a (known bug) to the commend that hint selector is still susceptible to the false negatives of this method.

@ashwinraghav
Copy link
Contributor

LGTM

Change-Id: I477509197ddecd974e87976b5ad3ecc97b006b81
Change-Id: Ic7e2271adf53c09a535ee628bd6a1956a36aaf9d
@samtstern samtstern merged commit d2c7ed7 into version-2.1.2-dev Aug 1, 2017
@samtstern samtstern deleted the fix-phone-validation branch August 2, 2017 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants