diff options
author | zachh <zachh@google.com> | 2018-01-08 14:13:07 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-08 17:12:35 -0800 |
commit | c40c2d996479d926b174777d7186347e7776ccc5 (patch) | |
tree | 6afa7f36f322e3d300be2df58872721701b65ab6 /java/com/android/dialer/about/res/values-iw | |
parent | fdbf2a0d7124af3e3026acbe39873bd2deea13ed (diff) |
Use ContactsContract.PhoneLookup for invalid numbers in Cp2PhoneLookup.
"Invalid" numbers are identified according to PhoneNumberUtil.isValidNumber.
This is necessary to support loose matching for such numbers. However, ContactsContract.PhoneLookup only supports looking up individual numbers, which means that we cannot issue batch queries and must issue individiual queries for each invalid number.
The hope is that these numbers won't appear frequently so performance should still be acceptable.
However, as a failsafe, if there are more than 5 invalid numbers we just give up trying to bulk update the invalid numbers and signal that those numbers are INCOMPLETE so that the UI can query for their CP2 information on the fly (the UI will be updated in a future CL).
It was necessary to convert much of the class to use futures to support parallelization of the queries.
Bug: 71504246
Test: unit
PiperOrigin-RevId: 181216674
Change-Id: I3bec477d305772b4ca3e46d0bd326cfebf9fa313
Diffstat (limited to 'java/com/android/dialer/about/res/values-iw')
0 files changed, 0 insertions, 0 deletions