The ShortNumberInfo class appears to support the exact same
methods as the ShortNumberUtil class (at least in terms of the
methods used by this project) but is a singleton and so
instances cannot be created directly but instead must be
retrieved using the static getInstance() method.
The ShortNumberUtil class was deprecated in version 5.8 and
removed in 7.2.3 of libphonenumber. This change is required in
order to allow libphonenumber to be upgraded to 7.2.4.
Bug: 26975810
Change-Id: Ide40c65d12cb44453f84600fc4b5ad1ee1088470
1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.
Bug: 26772894
Change-Id: Ibebab7379ea79c8e4812bbd190342827048e30e2
Looks like the phonenumber util can figure out the country code of a
phone number to format from the localization data even if it is not
explicitly present in the phone number string. So, adding an explicit
check to make sure that the country code(+82) was fetched from the
original number string which was the intention of the fix for
b/22862845.
BUG: 23661668
Change-Id: I26ba03d759e0ec35a195ba51bf60d09eff8de090
Korean carriers don't want the country codes displayed for local calls.
However the network returns the entire phone number including the
country code for Volte calls. According to the Koean phone numbering
scheme (https://en.wikipedia.org/wiki/Telephone_numbers_in_South_Korea),
we need to replace the country code +82 with a 0 prepended to the
carrier code to format it as a national number.
BUG: 22862845
Change-Id: Ifbb9eb8d5379608b4ea9d95ae7744779340b188e
Provide an overload of PhoneNumberUtil.isVoiceMailNumber that
takes a context to prevent an NPE.
This does not fix PhoneNumberUtil.isVoicemailNumber(String number),
that will require a follow up CL.
Bug: 22184528
Change-Id: I300b70948e5ff7230989bb887ad17e222c61685d
Renamed ttsSpanAsPhoneNumber #1 -> getPhoneTtsSpannable
Renamed ttsSpanAsPhoneNumber #2 -> addPhoneTtsSpan
Added getPhoneTtsSpan
Instead of removing the original hidden methods, I deprecated them.
Since Telephony changes initially get checked into wireless-dev
branch and dialer/contacts changes get checked into master branch,
immediately deleting the ttsSpanAsPhoneNumber methods would break
builds.
In ContactsCommon, I plan on removing
ContactDisplayUtils#getTelephoneTtsSpannable and instead using
these Telephony APIs. Numbers I tested worked in ToT master talkback:
911, (650) 215 3111, 22222222222, 333-3333, 013334612234, +1 905 471 8484,
001 39 02 444 4444. The changes in this diff cause the numbers
to be talked-back at least as well as before.
Some context: go/question-about-telephonys-ttsspan
Bug: 18777272
Change-Id: I3a6ead3ee9c030761bde903cf88f4aa4fc7a3460
I just apply google coding guide like space.
Uploading the same code about + handling just apply the Google Coding Guide.
The previous code is "https://android-review.googlesource.com/#/c/122770/"
This code is about + plus number converting logic for international NANP.
Change-Id: I23e4709294c603b387b28b3c2a56c932d838c666
Revise the method to access telephony system property.
Add several PROPERTY_XXX_XXX_MSIM for MSIM type system properties. If
caller use the old one, it will be dispatched to new one and get by
default phone id.
Ex. PROPERTY_ICC_OPERATOR_NUMERIC
Bug: 18675498
Change-Id: I008a7390fefbbcd9f6569f059d48eedf1da28de0
When sending SMS from international CDMA NANP country, outgoing SMS is failed due to + code converting.
(Send a SMS text message: to an international phone number using the plus code (+)).
In kitkat, when user send a sms with plus code, the "+" converted to 011(NANP_IDP_STRING). And it works well.
However, in lollipop, the "+" converted to current IDP, not NANP_IDP_STRING. And it failed to send the SMS.
I think, we need to seperate SMS and Call logic like cdmaCheckAndProcessPlusCodeForSms and cdmaCheckAndProcessPlusCode.
sohryun.shin@lge.com
Change-Id: Ie9d402cbeb4de4ac30299d5820b33909d0e40320
The normalizeNumber method in PhoneNumberUtils preserves a leading "+"
but only if it's the first character in the string. Thus it gets
dropped if there is leading punctuation such as "(". This patch
preserves the leading "+" as long as it would be the first character
in the normalized phone number.
Bug: 18418335
Change-Id: Ifcb1d3dd6c2943c729f570e7f3c90d1da9ee8b4b
Emergency numbers are slot specific. This change is to read emergency
numbers for slotId 0 if slotId is unknown/invalid.
Bug: 18656027
Change-Id: Ibaeb720955f6abc421b84d3cb32eb812b6c55a34
This is special for VZW requirement. Follow the specificaitons
of assisted dialing of MO SMS while traveling on VZW CDMA,
international CDMA or GSM markets.
Change-Id: I34a531b817095f4ce035f3f49a3bf7d6e2e8bc13
Since most of CDMA network do not support phone number with "+" for
international dialing, current AOSP support the "+" handling for
NANP CDMA network, this part add the support for non-NANP CDMA Network,
convert "+" to right IDD(International Direct Dialing) code. And adding
a new property for current IDD.
Bug: 17210134
Change-Id: I369083169bb3504f8de9774b65f3993dd561c525
Getting the voicemail number will be done in Telephony instead of in
PhoneNumberUtils which is called by Telecomm.
Bug: 17317190
Change-Id: Ia88a56516b4f57ac62dc5696ae359fd042fec040
* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber
Bug: 15432083
Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
The original change was submitted into lmp-preview-dev and should
not have been auto-merged to master.
This reverts commit 80327f7a31b19213ec48e1ab66e6bdc8e76cb0fe.
Change-Id: I9ff8a868ffa3135583c52ef97b15311107716899
* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber
* Hide DisconnectCause
Bug: 15432083
Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
Unhide the following methods:
PhoneNumberFormattingTextWatcher(String countryCode)
formatNumber(String phoneNumber, String defaultCountryIso)
formatNumber(String phoneNumber, String phoneNumberE164, String defaultCountryISO)
formatNumberToE164(String phoneNumber, String defaultCountryIso)
(The previous 3 formatting methods use an instance of PhoneNumberUtil to do the formatting)
isLocalEmergencyNumber(String number, Context context)
isVoicemailNumber(String number)
replaceUnicodeDigits(String number)
normalizeNumber(String phoneNumber)
Deprecate the following methods. These formatting-related methods don't use
PhoneNumberUtil to perform the formatting, and so are considered broken:
formatNumber(String source)
formatNumber(String source, int defaultFormattingType)
getFormatTypeForLocale(Locale locale)
formatNumber(Editable text, int defaultFormattingType)
formatNanpNumber(Editable text)
formatJapaneseNumber(Editable text)
Change-Id: Ibf854092b7db05f7e3e9401cc909c9f1ed4997b0
For CDMA networks, convert "+" prefix to "011" if the home network
is using the North American Numbering Plan (NANP). New method is
only used for MO SMS messages.
Bug: 11360679
Change-Id: I534e0322b566de3fb49d7333bfcf62cfbfafb78a