With the latest version of the external/libphonenumber library
<https://android-git.corp.google.com/g/117190> we now have real data for
the PhoneNumberOfflineGeocoder.getDescriptionForNumber() feature.
So enable it in the CallerInfo query. This means that the incoming call
UI will now show a geo description like "California" or "Maryland" (along
with the number) for unknown incoming numbers.
I also needed to work around an issue with the latest phonenumber library:
The new library apparently requires countryIso to be uppercase (e.g. "US")
but the CountryDetector.detectCountry().getCountryIso() call currently
returns "us", which causes PhoneNumberUtil.parse() to fail. (This also
broke some ContactsProvider tests too.) So force the countryIso to
uppercase for now.
TESTED (on Crespo):
- Incoming calls from an unknown number:
==> State name is now displayed.
- Incoming calls from a number that matches a contact:
==> no change in behavior
Bug: 4595580
Change-Id: I03126e1eee99d428e76bbbad5b3856be3874f549
...and disable the lookup for now, since we don't have the latest
PhoneNumberOfflineGeocoder (from the libphonenumber library) integrated
into our tree yet.
Bug: 4595580
Change-Id: I7391cbf1558b5a23eebfff6c4ad1f6363213c9a3
As of change https://android-git.corp.google.com/g/111296 the
libphonenumber library now provides an API ("PhoneNumberOfflineGeocoder")
to look up a geographical description string for a given number.
This change adds a new CallerInfo field called "geoDescription", and
uses the PhoneNumberOfflineGeocoder to look it up (if the contact lookup
fails) during the CallerInfoAsyncQuery sequence.
See https://android-git.corp.google.com/g/114715 for the corresponding
change under apps/Phone, to display this string (along with the raw
number) in the incoming-call UI.
Also some other minor cleanup:
- fixed spelling of the "normalizedNumber" field
- tiny javadoc and code style cleanup
- slight CallManager and CallerInfo debug output cleanup
Bug: 4595580
Change-Id: I900d8f48e953d1b24983602cb5467a5c6a6c518a
Merge commit 'd691b36cdea314585b6aa17556ed4c35bb65a69e'
* commit 'd691b36cdea314585b6aa17556ed4c35bb65a69e':
Do another contact lookup if the first one fails and...
it's a SIP call and the peer's username is all numeric. The all-numeric username
could be a PSTN number.
Bug: 3105116 (case #2)
Change-Id: I1de9cfac3aab1c4c89935176264d07693adb5e7d
Remember, the system and main logs are
- Shared resources
- Primarily for recording problems
- To be used only for large grained events during normal operation
Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
CallerInfoAsyncQuery can now handle SIP addresses in addition to regular
phone numbers: if the number passed in to startQuery() is actually a "URI
number", we now treat it as a SIP address and look it up directly in the
Data table.
If it's a regular phone number, the behavior is unchanged: we use the
PhoneLookup table as before.
This piece of the fix covers only the contact lookup for incoming calls;
we still need some more cleanup of the CallerInfo class in order to get
the call log working.
Bug: 3004127
Change-Id: I0fcb80f9de5b8ecf99d31ee92e0889ddb07216fd
- Fix typos in Javadoc and comments.
- Fix Javadoc @link references to other classes/methods.
- Rename MISSING_UKNOWN_APN to MISSING_UNKNOWN_APN in DataConnection.
- Remove unused (and misspelled) RETRYIES_* consts in RetryManager.
Change-Id: I3b44ac8320d6c1e4c350be600c7ef266aaf735e4
Refactored common code between CallerInfo and CallerInfoAsyncQuery that deal
with voicemail number comparison.
In CallerInfo.java added a new field mIsVoiceMail to indicate this is a
voicemail call.
Added a new method to convert the CallerInfo into a VM instance.
Added a new method to generate a debug string from an instance.
PhoneNumberUtils has a new method "isVoiceMailNumber" to check if a number
is a VM one. I left the method as hidden. Previously any security exception
failure was cached in a static variable. I removed that and
privilege the optmistic scenario. I am not sure if the security exception
is only for the 'regular' telephony layer and if it applies if a 3rd party
VM app is installed (e.g googlevoice), hence i removed the cashing to make
sure we can pick up new voicemail providers when installed/enabled/disabled.
Bug:2112640
Fixed a bug in the sync call, the photo resource was not set to picture_emergency.
Added tests to check the correct emergency fields are set in the caller info instance.
Bug 2112640