History log of /frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
438559e18314847a0529d6839a6a5332a2d81b17 31-May-2017 Tyler Gunn <tgunn@google.com> Ensure null/empty phone number does not crash international number check.

Add empty/null check for isInternationalNumber.

Test: Added unit tests.
Bug: 62162029
Change-Id: I779a1f78cbbe11adeefeca7fc83cfc1cfa431c61
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
7e4602519977b6bb9c41afc91a44ca782e716e40 11-Mar-2017 Sanket Padawe <sanketpadawe@google.com> Change 'idx' to 'index' in SubscriptionManager & TelephonyManager apis.

Bug: 35767068
Test: No build failure.
Change-Id: I3b15901ff18742b5e99f03e74a6412d352461458
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
14bcec27a02b1c58e7405d47cadc0ab3875a779f 15-Mar-2017 Joachim Sauer <jsauer@google.com> Merge "Change Czech Republic to Czechia"
am: 027a67062e

Change-Id: I51fc6fde5647b1fd8ecc677da7f6ec7a248a3b38
8416a4dfd10abacea58ed109a4c1c04ad38176b6 08-Mar-2017 Joachim Sauer <jsauer@google.com> Change Czech Republic to Czechia

This commit only contains changes to comments.

Bug: 34964100
Test: m buildcheck
Change-Id: I174eb8bf8ed7ac36198bd40bda925c6274933315
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
b455f0deed3dd38dea5c89984d1c0e47f17cbf08 01-Mar-2017 Tyler Gunn <tgunn@google.com> resolve merge conflicts of 81a28efd1b16 to stage-aosp-master

Change-Id: Ic4c1ca055db8e70db49d9fc91dfc705da6136a5d
ef5a401b7e3a68b0411886572c1a18b948f00c3d 17-Feb-2017 Tyler Gunn <tgunn@google.com> Support confirmation of international calls while on WFC only.

Add new carrier config which enables a confirmation message when the user
dials an international number while on WFC only.

Add new @hide PhoneNumberUtils method which is used to determine if a
number dialed is an international number.

Test: Manual, unit.
Bug: 33272455
Merged-In: Ia7ffe10eee7d782ddc3355db616af0a48f19556e
Change-Id: Ia7ffe10eee7d782ddc3355db616af0a48f19556e
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
8ac499fbe68c969fa929e9428cae4dc8d49d75f0 27-Feb-2017 Tyler Gunn <tgunn@google.com> Merge "Format Japanese numbers using national format when in Japan."
am: 050e5ddb4f

Change-Id: I996a79c2b3158e1fd6999330e0b0b21f8e4c8b4b
3b8f62b6027200932676fed5246cf3ee2afe863a 13-Feb-2017 Tyler Gunn <tgunn@google.com> Format Japanese numbers using national format when in Japan.

Similar to the like change for Korean phone numbers, ensure that when the
user is in Japan, Japanese phone numbers are formatted using the national
format rather than the international format.

Test: Unit
Bug: 27090466
Change-Id: I3487eea9fddbe7ee15c03da3f03d53f9dcea0834
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
88c68423afc52dfa4c560604c3fd08bfba761ee0 06-Dec-2016 Jordan Liu <jminjie@google.com> Treat the mdn as an additional voicemail number
am: 360d5674bd

Change-Id: Idbfdf0086d101e6c246ecee7572c6dbf2702574e
360d5674bd68cab21ee4a6959ea7ef2d9aced085 09-Nov-2016 Jordan Liu <jminjie@google.com> Treat the mdn as an additional voicemail number

Use carrier config to specify whether the carrier treats the mdn as an
additonal voicemail number.

Change-Id: I7192a3505da87d6b50a100e041d2b502cf37e113
Merged-In: I7192a3505da87d6b50a100e041d2b502cf37e113
Fix: 29145323
Test: build and flash on device
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
ca0844d104f386d4a9d76a8ad1ac78572f433c3e 09-Sep-2016 Hall Liu <hallliu@google.com> resolve merge conflicts of 6369889 to nyc-mr1-dev-plus-aosp

Change-Id: Ied1a005f663517e69c3992c3ce49255af63c3e75
20c747c038f191f020cc3aacec870ff17370e968 03-Feb-2016 Wei Huang <wei.x.huang@sonymobile.com> Add configurable emergency call number support

In some region, when user dials emergency numbers, the call will go to
IVR system first and then to emergency center. This behavior causes
delay to let consumer to get help from center. Due to region/operator
requirements, some emergency numbers are required to be set-up as non
emeregency numbers on device. On such device, coverting original number
to emergency number is required under the conditions where only
emergency call is allowed - e.g. no SIM. This patch implements this auto
converting logic and its configurations.
E.g. For Taiwan, 110 and 119 need to be converted to 112 under not
in-service state.

Bug: 28123861
Change-Id: I01b3072ae272c1af8d4a19b2fb6ae451b7268821
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
7a63216d83f90e4a392fc2a500245a50d3de34f0 18-May-2016 Tyler Gunn <tgunn@google.com> Merge "Continued multi-endpoint work." into nyc-mr1-dev
am: beb8c4954d

* commit 'beb8c4954db199412a8e59b45198b0c2ac449bfd':
Continued multi-endpoint work.

Change-Id: I1090df296dd4f0824202f5173e88ba8d6570db5f
825da238c5e7441425682a01fdc05297eee26ef4 11-May-2016 Tyler Gunn <tgunn@google.com> Continued multi-endpoint work.

1. Adding telephony disconnet cause for use when a call was pulled.
2. Added helped method to phone number utils which can be used to reformat
a telephony number stored as a SIP URI into a tel URI.

Bug: 27458894
Change-Id: Idef25bbc7b80258b361eb913d4c94b8bb34d7a4a
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
f1adce018dcaa2819d51128f681643028f3341fc 09-Feb-2016 Paul Duffin <paulduffin@google.com> Merge "Replace usages of ShortNumberUtil with ShortNumberInfo"
am: 8405e5cd3b

* commit '8405e5cd3b3b2491b5f487cbe26d9e1550e55370':
Replace usages of ShortNumberUtil with ShortNumberInfo
c2884fe2597e4db2879c62f101da9c40d3cb2435 09-Feb-2016 Paul Duffin <paulduffin@google.com> Replace usages of ShortNumberUtil with ShortNumberInfo

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
87f47e9991c7c9e291eadc4e0d14426416a1c61e 06-Jan-2016 Jack Yu <jackyu@google.com> Reduced more radio log spam

Reduced more radio log spam

bug: 25956251
Change-Id: Ib870bb508c55ab009197fd7fcfa48e62fe3f7b6b
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
3a86d3d5349bc463d5c99fc4c3a4a47092617c6b 25-Jan-2016 Shishir Agrawal <shishir@google.com> DO NOT MERGE : Unhiding MSIM APIs.

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
6714030083b1d8ec5b2df6dfef08034d0d30c2fe 10-Dec-2015 Jack Yu <jackyu@google.com> merge from master

Change-Id: Ic03669db3f4595336a7dbc13ffc77d055d11acf9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
a9acb4c2b55fe1bf4f5eeb96971e46697eaeffe9 31-Aug-2015 Roshan Pius <rpius@google.com> Reformat only KR numbers with leading "+82".

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
672b2cc05c26aa2a8fdb3def896367684b1b9920 25-Aug-2015 Roshan Pius <rpius@google.com> Reformat local Korean numbers in national format.

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
93018a4d983f0c7063fd0b243436364cd191e0a9 13-Jul-2015 Roshan Pius <rpius@google.com> Handle exceptions when accessing Content providers.

BUG: 21638129
Change-Id: I88f7dcf67e395f49136a1f434fbd9c75e15cddad
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1249bdbe90102172f6e678993516203bb3a493bf 30-Jun-2015 Yorke Lee <yorkelee@google.com> Fix TelecomManager.isVoicemailNumber

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
115c04410ec276f9fe7e364f9ac082cad5bce8d0 02-Jun-2015 Brian Attwell <brianattwell@google.com> Rename PhoneNumberUtils APIs

In response to more API review.

Bug: 21571895
Change-Id: Ia1fa69da07a3427997919ba61c77fcbad7e79f2a
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1a15ab91bcdf780f0d109f4a4d18701195ffdb49 29-May-2015 Brian Attwell <brianattwell@google.com> Rename "end" to "endExclusive" in addPhoneTtsSpan

Bug: 21209482
Change-Id: If505acecf5ca398560a9a23ea23ff8dd741e4025
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
b15c00a551cc5b4d1688ed6b73c6c0f5c0ff7a9f 06-Feb-2015 Sanket Padawe <sanketpadawe@google.com> am 0a4c2646: am 04db9797: Merge "Suppress phone number from logcat." into lmp-mr1-dev automerge: 4eed340

* commit '0a4c2646f4b72fdc78299dbb3dd86a7aecefff08':
Suppress phone number from logcat.
0a4c2646f4b72fdc78299dbb3dd86a7aecefff08 06-Feb-2015 Sanket Padawe <sanketpadawe@google.com> am 04db9797: Merge "Suppress phone number from logcat." into lmp-mr1-dev
automerge: 4eed340

* commit '4eed340437d23a9b4fabf2881557325b863af23c':
Suppress phone number from logcat.
c6dbe3be2cc6d9e1755d43dc56739b71ce7469f3 04-Feb-2015 Brian Attwell <brianattwell@google.com> Unhide and rename PhoneNumberUtils tts methods

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1acdd4b1f4e4111f347afe7ebfd45c2eba045e75 05-Feb-2015 Sanket Padawe <sanketpadawe@google.com> Suppress phone number from logcat.

Bug: 19251204
Change-Id: I042bc3c0a89967eeae547b059f06cf05de005b25
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
af7454bafb99248caa9f02cf96195118d59afeab 02-Feb-2015 Robert Greenwalt <rgreenwalt@google.com> am 0cdd4560: am fabf0e0b: Merge "Fixing up the formatting code which is already merged"
automerge: 21475c6

* commit '21475c6a92b893f5d078ba23f06f0be6edaaacbd':
21475c6a92b893f5d078ba23f06f0be6edaaacbd 02-Feb-2015 Robert Greenwalt <rgreenwalt@google.com> am 0cdd4560: am fabf0e0b: Merge "Fixing up the formatting code which is already merged"

* commit '0cdd4560dac5784dda169863eb844d489bdc79d5':
3c6e38d3b5c7c5c209dca4f99526109e352a5392 21-Jan-2015 Robert Greenwalt <rgreenwalt@google.com> Fixing up the formatting code which is already merged

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
3165abfd3471a83e0544337f0ccbaee92fa57136 30-Jan-2015 Stuart Scott <stuartscott@google.com> am 712d5b3d: am 147b6a35: Merge "[DS] Correct the access method for telephony system property" into lmp-mr1-dev
automerge: 2e233d3

* commit '2e233d30662d26846a42c298967842d2e8537653':
[DS] Correct the access method for telephony system property
2e233d30662d26846a42c298967842d2e8537653 30-Jan-2015 Stuart Scott <stuartscott@google.com> am 712d5b3d: am 147b6a35: Merge "[DS] Correct the access method for telephony system property" into lmp-mr1-dev

* commit '712d5b3d582dfe8f7fb855ba98704c98e9441836':
[DS] Correct the access method for telephony system property
85973dcf8cd7d7a964ba746875a0c572685d1807 29-Jan-2015 Legler Wu <legler.wu@mediatek.com> [DS] Correct the access method for telephony system property

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
fe0e33495c63542ea04be3879b97c03119c2f88b 21-Jan-2015 Robert Greenwalt <rgreenwalt@google.com> am b73f431d: Merge "Add + code handling logic for SMS Global Roaming" automerge: f19176f
automerge: 52f25f7

* commit '52f25f7b30b684a46814cff60538e6a7636ed618':
Add + code handling logic for SMS Global Roaming
52f25f7b30b684a46814cff60538e6a7636ed618 21-Jan-2015 Robert Greenwalt <rgreenwalt@google.com> am b73f431d: Merge "Add + code handling logic for SMS Global Roaming" automerge: f19176f

* commit 'b73f431dddc0ba9260a342f2322e818460cf6f34':
Add + code handling logic for SMS Global Roaming
a423a279f6297bb9422fc8841651348c2fcc7b7a 12-Jan-2015 sohryun.shin <sohryun.shin@lge.com> Add + code handling logic for SMS Global Roaming

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
95cde2dc211f51deed6da2836d1bc7b23988782d 09-Jan-2015 Ben Gilad <gilad@google.com> API to satisfy the dependency in https://go/contacthandler1135

Bug: 17586396
Change-Id: I10bad15b4db3ec8928316507119c529c5d1f304b
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
50e922849399f12d2411a29b2199d8202087492d 16-Dec-2014 Raph Levien <raph@google.com> Preserve leading "+" in phone numbers

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
d9835f0c16b01847b7b3f6a1d4620912fb4206c2 12-Dec-2014 Amit Mahajan <amitmahajan@google.com> Change to treat slotId 0 emergency numbers as default.

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
0855e7aea22e863f21a546b87acf38b7c3912e2e 05-Dec-2014 Ihab Awad <ihab@google.com> Add Text-to-Speech annotations for phone number displays (1/3)

Bug: 17321294
Change-Id: Id7e48e683694e2f9ea2a7dd7fa7d69acc727489d
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
63f03dd94c43c22f2c77306059b5748e5e1e0e3c 23-Oct-2014 Wink Saville <wink@google.com> Change subId to int from long

Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
5dd345286cbf0de2a4983e624cc930d178dd710e 09-Sep-2014 Amit Mahajan <amitmahajan@google.com> am 034fe21c: Merge "Assisted dialing support of MO SMS" into lmp-dev

* commit '034fe21c638960d8d67711f446c818b93e41641e':
Assisted dialing support of MO SMS
4009b98f73628043f0b3db4c7ace1aa71a191a6b 09-Sep-2014 Amit Mahajan <amitmahajan@google.com> Merge "Assisted dialing support of MO SMS" into lmp-dev
77ea3ee5ec0fbd4bc98dbd8c1d62702cff9daa34 22-Jul-2014 Xia Ying <yingxia@motorola.com> Assisted dialing support of MO SMS

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
e30eeb5f560db080c2ef72c0c7dd66f2ad8f0e5e 06-Sep-2014 Vineeta Srivastava <vsrivastava@google.com> am a8ceba1c: Merge "Plus code handling for non-NANP CDMA carrier" into lmp-dev

* commit 'a8ceba1cb610c2ce166d4cdcbdb6eaec08886aa9':
Plus code handling for non-NANP CDMA carrier
9b656ee3201ee85e1bb3374ea2877aad4adab82b 10-Jul-2014 Steven Liu <stevenliu@motorola.com> Plus code handling for non-NANP CDMA carrier

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
c7880d3f985f90dbfc348e3d3d1a9305d9f0248d 04-Sep-2014 Nancy Chen <nancychen@google.com> am c27868a6: Merge "Remove check for voicemail number when parsing URI phone number." into lmp-dev

* commit 'c27868a6d085f10f6ca4f4a83c382078648f21e7':
Remove check for voicemail number when parsing URI phone number.
fe99099ea7dda76031343c8e412bd9f7cb816987 03-Sep-2014 Nancy Chen <nancychen@google.com> Remove check for voicemail number when parsing URI phone number.

Getting the voicemail number will be done in Telephony instead of in
PhoneNumberUtils which is called by Telecomm.

Bug: 17317190
Change-Id: Ia88a56516b4f57ac62dc5696ae359fd042fec040
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
05e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851 01-Sep-2014 Wink Saville <wink@google.com> ksd to lmp-sprout-dev

Change-Id: I94eb65c62231b5831570bb0cbbbd9c916bee0a37
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
83749f347938d3955c887588756aa7b4fcb32c78 22-Aug-2014 giseok.seo <giseok.seo@lge.com> Use proper ril.ecclist when no sim state

Bug: 17139446
Signed-off-by: giseok.seo <giseok.seo@lge.com>
Change-Id: I2f420973b29092b8a6cceb8cf4bd77d0ee8372bd
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
fb40dd4d00bd3361b2535bc866e6c21eadc52558 13-Jun-2014 Wink Saville <wink@google.com> Merge kwd to master

Add initial IMS and MSIM support from klp-wireless-dev-mirror

Change-Id: Idb607c0aa32f80fe4fe1539aedea7a221e9e7f04
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
282129fd3f789739c47fe5506bcf29c1a2712b3e 05-Jun-2014 Yorke Lee <yorkelee@google.com> API changes to Telephony per API review

* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber

Bug: 15432083

Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
8c2d8c0c27ebd155e9e9d2c066df0297f265b5a6 06-Jun-2014 Yorke Lee <yorkelee@google.com> Revert "API changes to Telephony per API review"

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
d8819baf858b294bab16ea811da4acf39dc4552c 05-Jun-2014 Yorke Lee <yorkelee@google.com> API changes to Telephony per API review

* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber

* Hide DisconnectCause
Bug: 15432083

Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
b31c310fcf9739729ef2e64eaf49ce2e86a8a058 14-May-2014 Andrew Lee <anwlee@google.com> Handle normalization of a "null" phone number.

Bug: 14900155
Change-Id: I1c4c5c6dec4c4c470b436102c72a7476d3d5237c
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
99d16995167f076b385aadb6f383c0ac62d5dd27 16-Nov-2013 Yorke Lee <yorkelee@google.com> PhoneNumberUtils API changes

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
921bf624622962ad862e470c11e0f6cc508f25a8 05-Nov-2013 Jake Hamby <jhamby@google.com> Add PhoneNumberUtils method for CDMA SMS number formatting.

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
04dfb5ec3cb9f5a1dac737b429919a3e82768aab 28-Aug-2013 Santos Cordon <santoscordon@google.com> Protecting against NPE with null country detector.

bug:10514454
Change-Id: I316c47eddbe4929599866a3f9da9129d0056e3e2
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
2227067d99af771e86ce507e952fd5ff5d429a89 06-Feb-2013 Magnus Karlsson <magnus3.karlsson@sonymobile.com> Fixing crash in PhoneNumberUtils getNumberFromIntent

Handling intent with no data when trying to retrieve number from
intent.

Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
22b1e80c24c5fbd702a19f2511ee2897baaf3e98 07-Dec-2012 Wink Saville <wink@google.com> Use Rlog

Change-Id: I44919126606cd55f7dce7c942027ed0d914f04bd
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
e69ec2253cd2e151a6a98e87d1bbf5d5cfa05bed 09-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Remove STOPSHIP part of the logging in telephony

We still need the log itself to trap the exceptional case.

Bug: 6201805
Change-Id: I62d12f6a1ed41817ee12c0f5c7fc4aa0a967a60f
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
0205537536431204b11459e9d2d2eccf3924c6cd 24-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Add debug log for 5914560 and 6383850

This won't be shown in usual condition since in most cases the method
will just use the block just above the logging and return true/false
there. On the other hand this might be useful if the case is truely
exceptional and thus this path is really used.

Bug: 5914560
Bug: 6383850
Change-Id: I2242f93a9b905b5a39d997aa30d9fd6f5bfbdf49
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
f80310d3c56387091ccd4111b698c09f76b8c53d 13-Jan-2012 jshin <jgsin@samsung.com> Added API to replace unicoded digits to ascii numbers

Users can enter arabic phone number or click arabic phone number
to send MMS. Works for generic Unicode digits (full-width, etc.).

bug:5615791
Change-Id: Ieec8c5c6c3736ee2b4ac8ddf17f8c41b2001460e

Signed-off-by: Jake Hamby <jhamby@google.com>
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
e333c82da35119cfa25109328c3db98fa84f965e 13-Jan-2012 Jake Hamby <jhamby@google.com> Convert Arabic phone numbers to ASCII when sending SMS.

Modify PhoneNumberUtils to automatically convert non-ASCII digits,
such as Arabic-Indic numbers, CJK full-width digits, etc., to ASCII
in normalizeNumber(), extractNetworkPortion(), and stripSeparators().

This enables the SMS application to support sending SMS's to phone
numbers written with Arabic, or other non-ASCII digits. The number will
be converted to ASCII digits and formatted for the user according to the
country formatting rules.

Bug: 5615791
Change-Id: I42039285db5795b1dda22e4251f54af302e27f13

Signed-off-by: Jake Hamby <jhamby@google.com>
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
510db8feb611a924d235b9b8a1d55ebbd36e9022 15-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> Introduce convertAndStrip()

Phone app will use this for actual phone calling, coping with
IccProvider, etc.

Add unit tests for the method, and stripSeparators() which is missing

Bug: 5546664
Change-Id: I49b996abe7a44f7db4301b62f667189281fc40e9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
26cd243601fc05c5ed39c2d1e3ab203a8eb97c25 02-Feb-2012 Shaopeng Jia <shaopengjia@google.com> Fix the 3-parameter formatNumber to correctly handle IDDs.

Also added more unittests.

Bug: 5726454

Change-Id: I7fd96b47e7b0c34b66a2fe698308342e125ec0f3
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
ab971d3c26346cfd94a37e40591318bf3b3ae4fd 20-Nov-2011 Shaopeng Jia <shaopengjia@google.com> Add support for country specific emergency number handling.

Bug: 5247602, 5615428
Change-Id: I1bdfbc987f45e0f2ebbe68adaab215395c83ca35
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
158f116eb7fdc23a12d6822d34a549f33605bc8c 17-Nov-2011 David Brown <dab@google.com> Fix a crash caused by SIP addresses containing "%40" instead of "@"

CallerInfo.doSecondaryLookupIfNecessary() was assuming that SIP addresses
would always contain the character '@', but that's not always true since
the username/domainname delimiter can actually be "%40" (the URI-escaped
equivalent.)

This would cause the in-call UI to crash if you ever called a SIP address
like "xyz%40example.com".

TESTED:
- Make an outgoing call to the SIP address "xyz%40example.com"
==> The call ultimately fails, but the in-call UI no longer crashes when
it first comes up.

Bug: 5637074
Change-Id: I62d15a7ccd509924d38b780b92e657b9efa26125
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
277b13e091aa81ddaf4ac40b9cf4073d997ea4fb 17-Nov-2011 David Brown <dab@google.com> SIP addresses containing "911" shouldn't be considered emergency calls

This change updates isEmergencyNumberInternal() to always return false if
you pass in a SIP address, since the concept of "emergency numbers" is
only meaningful for calls placed over the cell network.

Previously we *did* try to compare SIP addresses against the list of known
emergency numbers, which caused bad behavior with SIP addresses that even
contained "911"/"112"/etc as a substring (since we were filtering out
non-dialable characters before doing the comparison!)

TESTED:

- Before this change, calls to "abc911def@example.com" or
"911abcdef@example.com" were incorrectly detected as emergency
numbers, and fail.

- After this change, SIP addresses like "abc911def@example.com" and
"911abcdef@example.com" work fine.

- Also, confirmed that this change doesn't break the restriction that
3rd party apps shouldn't be able to make emergency calls.

Specifically, I fired off ACTION_CALL intents (using the CallDialTest
activity) for a bunch of numbers *similar* to emergency numbers, and
confirmed that none of them actually resulted in an emergency call
being placed.
The specific ACTION_CALL intents I tested were:
"911" ==> Didn't place the call; brought up dialer instead
"tel:911" ==> Didn't place the call; brought up dialer instead
"911@foo" ==> Tried to start a SIP call (which failed)
"911%40foo" ==> Tried to start a SIP call (which failed)
"tel:911@foo" ==> Tried to start a SIP call (which failed)
"tel:911%40foo" ==> Tried to start a SIP call (which failed)
"911@example.com" ==> Tried to start a SIP call (which failed)
"sip:911" ==> Didn't place the call; brought up dialer instead
"sip:911@foo" ==> Tried to start a SIP call (which failed)
"sip:911%40foo" ==> Tried to start a SIP call (which failed)

Bug: 5515452
Change-Id: I6f9f8690b08564c53c7a76f480654477b475d94d
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1a811695f9ae2ac806a64fd3b6c440c83262dc52 08-Nov-2011 David Brown <dab@google.com> Add "potential" variants for PhoneNumberUtils.isEmergencyNumber()

The phone app needs a way to distinguish between (a) numbers that are
definitely emergency numbers, and (b) numbers that *might* result in an
emergency call being dialed, but aren't specifically emergency numbers
themselves.

(The phone app needs this distinction in order to enforce the restriction
that 3rd party apps should not be allowed to make emergency calls using
the ACTION_CALL intent, while still making sure that the in-call UI only
displays the "emergency call" state for numbers that are *definitely*
emergency numbers. See bug 5493790 for the full details;)

So this change adds a full set of "isPotentialEmergencyNumber()" methods
to go along with the "isEmergencyNumber()" methods we've had all along.
The "potential" variants behave identically to the original methods,
*except* that they ultimately use number.startsWith() rather than
number.equals() when comparing against the list of emergency numbers.

TESTED:

- Unit test 'PhoneNumberUtilsTest#testIsEmergencyNumber' passes.
(The PhoneNumberUtilsTest class doesn't pass in its entirety, but it was
broken before this change also.)

- Also see the commit description of change
Ib949fea3c0ce6b341a90e617a03ba3f22c69018b for the exact tests I ran
against the phone app.

This change should be submitted along with
Change-Id: Ib949fea3c0ce6b341a90e617a03ba3f22c69018b
in apps/Phone (but this change must go in first to avoid breaking the
build.)

Bug: 5493790
Change-Id: Ic528cfcc555734cdaf4ca8a18a50199771ba49b1
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
2613e0064b4a43b7de4205d5a6aaae64416972ed 26-Sep-2011 Flavio Lerda <flerda@google.com> Do not format numbers starting with hash or star.

If the user asks to format a number that starts with either a hash or a
star symbol, do not further format the phone number since we are not
actually able to parse such a number correctly and current this results
in the star or hash being dropped.

Bug: 5362177
Change-Id: Iff8d317c087d0ca07f2b107459ce8c47882ef367
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
c6027ee46486bcc6e0df457c5678eb697d6ed321 22-Sep-2011 Shaopeng Jia <shaopengjia@google.com> Temp fix to the problem of incorrectly classifying Brazilian local
numbers as emergency numbers.

Bug: 5247602
Change-Id: Ib1626ef25ced2e149c526601bfac72de39e3f1b9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
6b7c3f8a1cd8b638defc28a3249746e99b8039ae 14-Sep-2011 Shaopeng Jia <shaopengjia@google.com> Update code to use location aware isEmergencyNumber.

Bug: 5247602
Change-Id: Ieeda4a17464795b3591db754bc991759609f88c2
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
9683f990a282776ac8a588a9d5e1a73b61f43dcf 07-Sep-2011 Shaopeng Jia <shaopengjia@google.com> Adding isEmergencyNumber which also takes in a defaultCountryIso.

Also update CallerInfo and CallerInfoAsyncQuery to use the new method.

Bug: 5247602
Change-Id: I2bbb0806ad2787d53b19bc1e9bdfb0ee8be26980
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
4eb45cc98bdcee575cc21f5ad5754cde57197a81 12-Aug-2011 inshik <inshik.shin@samsung.com> Add utility functions for pause and tonewait pause.

Add a function that converts a string with RFC3601 defintion
of pause and wait into android representation.

Change-Id: Id8a17c3a166422d62247acb227506549990ace12
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
e713576292fc72086de47066981b86ad2f27ab0f 12-Aug-2011 Shaopeng Jia <shaopengjia@google.com> Renaming com.google.i18n.phonenumbers to com.android.i18n.phonenumbers
to avoid name collision.

Bug: 5157607
Change-Id: Ic397f371e381a71f17b0b70b955e89d08f7a9867
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1234ce117adc6fef495688ed8032c43e77445f90 07-Dec-2010 Nick Kralevich <nnk@google.com> Modify emergency number detection

It's possible for an application to dial an emergency
number by appending extra digits to the phone number.

For example, one could dial "9111" instead of "911",
and a strict .equals wouldn't detect this as an emergency
number.

Replace .equals() with .startsWith()

Change-Id: I87f34fc2b9bbee2c4fa6be511bcc3b955559e0a9
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
a23935ab334b2dec47735608383608ca3093b4b2 12-Oct-2010 David Brown <dab@google.com> am bd6d5098: am d07833f5: Don\'t manually create CallerInfo objects from SipPhone

Merge commit 'bd6d5098a7995429713ae0ae43b3f666f7b9aed3'

* commit 'bd6d5098a7995429713ae0ae43b3f666f7b9aed3':
Don't manually create CallerInfo objects from SipPhone
bd6d5098a7995429713ae0ae43b3f666f7b9aed3 11-Oct-2010 David Brown <dab@google.com> am d07833f5: Don\'t manually create CallerInfo objects from SipPhone

Merge commit 'd07833f54b6e8e361b666ae16efa15fdf60159de' into gingerbread-plus-aosp

* commit 'd07833f54b6e8e361b666ae16efa15fdf60159de':
Don't manually create CallerInfo objects from SipPhone
d07833f54b6e8e361b666ae16efa15fdf60159de 08-Oct-2010 David Brown <dab@google.com> Don't manually create CallerInfo objects from SipPhone

Currently the SipPhone class manually creates a CallerInfo object, and
populates it with very basic info from the SIP address, when making an
outgoing call.

But this is no longer needed, now that we do caller-id lookup properly for
SIP addresses (based on real data from the contacts database -- see
bug 3004127 and change https://android-git.corp.google.com/g/70555).
And in fact the presence of this initial CallerInfo object actually
*disabled* contacts lookup for outgoing calls (bug 3072731).

This change removes all that CallerInfo-related stuff from SipPhone.

(Thus SipPhone is now consistent with the other phone objects, like
GSMPhone and CDMAPhone, in that it doesn't muck with CallerInfo data at
all, but instead lets the phone app do it.)

Also, update isUriNumber() to handle "%40" in case the passed-in string is
URI-escaped. (Nobody depends on that now, but it may be needed in the
future, and it's certainly safe to say that "%40" will never be found in a
legal PSTN number.)

TESTED:
- Outgoing SIP call:
- In-call UI shows correct contact info
- After the call, Call Log shows correct contact info

- Incoming SIP call:
- In-call UI shows correct contact info
- After the call, Call Log shows correct contact info

- PSTN calls:
- correct contact info everywhere

Bug: 3072731

Change-Id: I51434e4e5ad66d2e8ff51fc220001fb74485f0f5
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
7e0598d066e58ad9cadbd2c654a42563e56adbab 08-Sep-2010 Chung-yih Wang <cywang@google.com> am 4f24aed2: am 66907078: Merge "Fix the dialing from contact for internet address." into gingerbread

Merge commit '4f24aed2a13d9ba89e2402894353176e19571e6e'

* commit '4f24aed2a13d9ba89e2402894353176e19571e6e':
Fix the dialing from contact for internet address.
4f24aed2a13d9ba89e2402894353176e19571e6e 08-Sep-2010 Chung-yih Wang <cywang@google.com> am 66907078: Merge "Fix the dialing from contact for internet address." into gingerbread

Merge commit '669070787cc10377c2e5c3fa187babc728d96245' into gingerbread-plus-aosp

* commit '669070787cc10377c2e5c3fa187babc728d96245':
Fix the dialing from contact for internet address.
6f0f870f16003adc60e0c5f37c86b2d5e7895940 08-Sep-2010 Chung-yih Wang <cywang@google.com> Fix the dialing from contact for internet address.

the bug is http://b/issue?id=2982290

+Log outbound proxy address if exists for debugging.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
2a4e96067d074ef78aeafea13469a85690346b60 25-Aug-2010 Bai Tao <michaelbai@google.com> Added new method to format the phone number when neccessary.

Change-Id: I90fb38c1d36dc1ccf7eaa3b4cc34cd29f5151493
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
3e4b7c332fcdeb3adf359b5fcf8cba08c474c9c0 13-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Keep the '+' when normalizing the phone number

Change-Id: I24731735ed18dbc92a643a0d99d35a1b58be40c8
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
c178b95c1fbd4644a088ca9739d173d5bf69939c 13-Aug-2010 John Wang <johnwang@google.com> am 2835391c: am 686a9505: Merge "Update switch call and accept call." into gingerbread

Merge commit '2835391c1709a2b655940200dab0fc74ef08512d'

* commit '2835391c1709a2b655940200dab0fc74ef08512d':
Update switch call and accept call.
2835391c1709a2b655940200dab0fc74ef08512d 13-Aug-2010 John Wang <johnwang@google.com> am 686a9505: Merge "Update switch call and accept call." into gingerbread

Merge commit '686a95055896c221c62fe7f4c3dda137809df91e' into gingerbread-plus-aosp

* commit '686a95055896c221c62fe7f4c3dda137809df91e':
Update switch call and accept call.
c159c84699d4b739a14cdfb22c5807f419e1754f 11-Aug-2010 John Wang <johnwang@google.com> Update switch call and accept call.

Change-Id: Ifdd1af77e3eca08f6c931605ecfb275835b78709
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
ae2036a8f9365cec0f343f2668424e8e964a971c 02-Aug-2010 Wink Saville <wink@google.com> am 7472c219: am 1540a7ea: am c69f5be0: Add PhoneSubInfo.getCompleteVoiceMailNumber.

Merge commit '7472c219a13e3f9f74d9a4adf1478e9c4f9248a2'

* commit '7472c219a13e3f9f74d9a4adf1478e9c4f9248a2':
Add PhoneSubInfo.getCompleteVoiceMailNumber.
7472c219a13e3f9f74d9a4adf1478e9c4f9248a2 02-Aug-2010 Wink Saville <wink@google.com> am 1540a7ea: am c69f5be0: Add PhoneSubInfo.getCompleteVoiceMailNumber.

Merge commit '1540a7ea1afcb772b5fcf90f635153f6489eb8ed' into gingerbread-plus-aosp

* commit '1540a7ea1afcb772b5fcf90f635153f6489eb8ed':
Add PhoneSubInfo.getCompleteVoiceMailNumber.
1540a7ea1afcb772b5fcf90f635153f6489eb8ed 02-Aug-2010 Wink Saville <wink@google.com> am c69f5be0: Add PhoneSubInfo.getCompleteVoiceMailNumber.

Merge commit 'c69f5be0ed3529564e5db6874de52775c2c99007' into gingerbread

* commit 'c69f5be0ed3529564e5db6874de52775c2c99007':
Add PhoneSubInfo.getCompleteVoiceMailNumber.
c69f5be0ed3529564e5db6874de52775c2c99007 02-Aug-2010 Wink Saville <wink@google.com> Add PhoneSubInfo.getCompleteVoiceMailNumber.

PhoneSubInfo.getVoiceMailNumber now returns only the network
portion of the voicemail number. Use the new method
PhoneSubInfo.getCompleteVoiceMailNumber to get the netowrk
portion and the post dial portion.

Bug: 2881483
Change-Id: I7637d4fa0ffa046b4eebc4d599719bb668c940b5
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
fae6ec9e9673e96085fdbde69866a41b5491fa0d 28-Jul-2010 Bai Tao <michaelbai@google.com> Added country based formatNumber methods

a. Format the number to E164.
b. Format the number based on country convention.
c. Normailize the number.

Change-Id: I39d59b99aa1a5136371dd20c74d9d9c8ec855369
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
1b1f0bc1f8725901a34d05cf741ed3d91b1b8cbd 16-Jul-2010 The Android Open Source Project <initial-contribution@android.com> am 4248d588: merge from open-source master

Merge commit '4248d5887bf9d7d65b649a9ca0c7ba623135eed5'

* commit '4248d5887bf9d7d65b649a9ca0c7ba623135eed5':
Makes PhoneNumberUtils support international numbers after a CLIR command.
adff0ad3cdae6c9bf043ab40fb0f40a54d5151ac 08-Apr-2010 Babis Triantafyllou <babis.triantafyllou.x@sonyericsson.com> Makes PhoneNumberUtils support international numbers after a CLIR command.

Makes PhoneNumberUtils.java support numbers in international
format (starting with ‘+’ character) after a CLIR command.

Previously a plus character would always be removed unless it
occupied the first position of the number string. In this case,
when the number is preceded by #31# (CLIR), the plus character
will be removed as well.

This is an error, prohibiting a type approval of the phone.

This change will detect the plus character after the CLIR command
and will insert it at the right position.

Change-Id: Ib220aee7b3eda30cde960db8c7470523dc5fd313
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
d994dcbd816d5431dfaa59de7457e28bdfc8f523 08-Jun-2010 The Android Open Source Project <initial-contribution@android.com> am cefdedc3: merge from froyo-plus-aosp
7ad843d66d3ebb9250f00e836f0e8e9502d7287b 08-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I56de40bad4be52a06300bfc310e16d27b2fb14df
47633f86279bc1854660d95a0b02bfa5ff14ad04 08-Feb-2010 Lars Dunemark <lars.dunemark@sonyericsson.com> Removes dashes when locale and number is not NANP or Japan

Removes all dashes if locale isn't NANP or Japan and the number
don't have there country code.

Use case: If adding a number starting with 1nnnnnn and then
trying to add a country code before (ex +46) we will first
trigger NANP formatting with +1-nnn-nnn so when we get
+41-nnn-nnn we will still have the old NANP formatting.
This number should be shown as +461nnnnnn.

Change-Id: I5cab830350d785a58367eba79e268d9e8ee16aac
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
a4bb6410403d7cc4e5cac82243ad2cc3fc1d3c60 13-May-2010 The Android Open Source Project <initial-contribution@android.com> am 1331ded8: am e28776bb: am b1110149: merge from open-source master
b1110149cccc3b99e59ead34ca46e5ac026f6db9 13-May-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I88a580162b34a80d1e3e7987b7a301c253afa0e8
ce2a97aeb82d3f34a63472720ee9d53e53c248c2 24-Feb-2010 Samuel Holmberg <samuel.holmberg@sonyericsson.com> Preserve '+' in phone numbers imported from SIM.

Contacts with phonenumbers beginning with '+' lose the '+' in the
phonebook when imported from SIM.

This was only noticable on ADN-records with unknown NPI-values which
isn't very usual.

Change-Id: I181249759ae3d4181dd3cf627c7a588394b80419
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
bcd573229e5ec6d59bb7931a84a2baa86e0d200a 24-Apr-2010 Jake Hamby <jhamby@google.com> Fix some more typos, remove unused imports, and remove unnecessary cast.

More minor code cleanups in the telephony framework.

Change-Id: I27abe11e02fc6fea12885eea4fe275240a546332
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
145ff609de3206b585819ef974fab20cdc2d9f5e 16-Apr-2010 Jake Hamby <jhamby@google.com> Spelling corrections and other minor cosmetic cleanups.

- Fixed a bunch of typos in comments (plus a few variable names)
- Removed unused import lines from telephony classes
- Added @Override attribute to overriding methods
- Made SmsMessage.PduParser inner class private & deleted unused constructor
- Added type specifiers to declarations of ArrayList and HashMap
- SimulatedCommands.getRegistrationState() had an ArrayIndexOutOfBoundsException
trying to write to index 14 of a 14-element array. I removed the
out-of-bounds assignment.

Change-Id: I054b5156aa64ab6639028d5b45a7e688b2deee08
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
0bd36175fbdf4f1506c5dcf93b43f3559837e207 04-Mar-2010 John Wang <johnwang@google.com> Add r-w property of emergency number list.

Currently, the emergency calls are put into an readonly property ro.ril.ecclist.

It is possible that ecclist has to be changed before and after SIM pin lock.

And ecclist can also be changed after network broadcasts the local emgergency numbers.

So add r-w property ril.ecclist to make emergency number list changable, while still

check r-o property to make old RIL work.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
7ae17760462e4c16ef0ea4289612c5950258d5da 17-Feb-2010 Kenny Root <kroot@google.com> Correct use of logical AND

A bitwise AND was use when a logical AND was meant to be used.

Change-Id: I4e5529ff9fce1e6397d7cd9483268766fc92dcf5
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
d95a02c2a652ffe35dcc0336a3e35d91b1027d54 27-Oct-2009 Daisuke Miyakawa <dmiyakawa@google.com> Fix test breakage in Zaku. Modification to PhoneNumberUtils included.

Also add method String formatNumber(String source, int defaultFormattingType) with @hide tag.

Internal Issue number: 2217362
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
fd7b4f1d12779a0363e98a37e7f5a7ccacba5ee8 23-Oct-2009 Wei Huang <weih@google.com> bug #2180646: make comparing "404-04" and "40404" return true in PhoneNumberUtils.compare().

- when comparing two numbers whose dialable char length is less than the MIN_MATCH (7), treat them as equal if the dialable portion of the numbers match.
- update unit test.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
9e534153264138cfee383c626db92b934fafc1af 19-Oct-2009 Tammo Spalink <tammo@google.com> Let PLUS occur once anywhere in dial-str network portion.

Create a new extractNetworkPortion() function, since the old one is
public, that does effectively the same thing but is more flexible as
just mentioned.

Addresses issue:
http://buganizer/issue?id=2013998

Change-Id: Ie5df08ef9c871881e8728a44abf0385908000823
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
db1f4993989bb03cae2f3e008d4db3e49577aa73 29-Sep-2009 Evan Millar <emillar@google.com> Add PhoneNumberUtils.compare() method that uses a resource to determine strictness.

Change-Id: I49fbfc683f7089f052671b567ad3e19203a568f0
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
694bd8bf733aee372705e00d13964a20e5b16209 24-Sep-2009 Peng Zhu <w46254@motorola.com> Add null check at isEmergencyNumber().

Change-Id: I7eca1ba1ce42e02c7506a7d969e4865778bb49cc
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
02b5948a4375dba5d287a59ba023eaf1e02b45dc 21-Sep-2009 Wei Huang <weih@google.com> make PhoneNumberUtils.compareLoosely use MIN_MATCH of 7 instead of 5.

Change-Id: Id4a08c3834b727e253ab189293d5715ffbbe8f35
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
9a24bc563f28d8489c7178b93ff05f02e8b8a893 19-Sep-2009 Daisuke Miyakawa <dmiyakawa@google.com> Implement compareStrictly() using phone_number_compare() written in C.

As per several discussions, we stick to the default behavior now.
In stead, we provide compareStrictly() as a hidden method, so that some
internal components are able to use the method if needed.

Since these are static methods, they cannot refer to the configuration files,
whose values can be obtained only via Resources object.

Please make callers' side if you want to use strict version of compare().

Internal issue number: 1892808
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
60d45f0f0320801a16db2ad038453c098e98966c 16-Sep-2009 Nicolas Catania <niko@google.com> Added a field to track if the call is to a voicemail instance.

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
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
7850cdde66705152b859aafda875833acdda9653 18-Aug-2009 Libin Tang <Libin.Tang@motorola.com> Fix +NANP issue and cleanup plus code conversion.

This patch includes the plus code conversion clean up.
1. change the plus code conversion based on the current and default
number systems retrieved from MCC.
2. for format such as +NANP, replace the '+' with the current IDP (011).
3. comments changes.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
18e7b98c1c7e3cf340e39e93be67b777e7036cc4 04-Aug-2009 Tang@Motorola.com <Tang@Motorola.com> Fix the issue of incorrect conversion of the plus sign in a dial string.

The issue is that the plus sign in a dial string is always converted
to the IDP (International Dial Prefix).

This fix implements a plus sign conversion mechanism based on the default
telephone numbering system that the phone is activated and the current telephone
number system that the phone is camped on. Currently, we only support the cases
where the default and current telephone numbering system are NANP.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
f28ca902ad07ca3cf9c2f2e5d2d20dd58c0f13e5 09-Aug-2009 Jeff Sharkey <jsharkey@android.com> Update getNumberFromIntent() to read from both providers.

This method is used by the Phone app to decode ACTION_CALL
Intents, resolving to a real phone number. Because the
columns are changing with the new provider, I added logic
to query using the correct columns for the authority of the
requested Uri.
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
4a301cb49527dfe941a8f6ac3c65a14ee42e01d1 01-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 8aadf7ae: Merge change 5359 into donut

Merge commit '8aadf7ae278961926de5452a46863503303735cf'

* commit '8aadf7ae278961926de5452a46863503303735cf':
fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
3a08cec99e104f74f28ba2463f00c8d4e6d1967e 25-Jun-2009 Tammo Spalink <tammo@google.com> fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper

addresses http://buganizer/issue?id=1489784
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
5214376d2b1ce082765f766be1c7d56b50df74a7 27-May-2009 Ficus Kirkpatrick <ficus@android.com> Stop the NANP number formatter from putting dashes in shortcodes.

This changes the result of PhoneNumberUtils.formatNumber("46645") from
"466-45" to "46645".
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/telephony/java/android/telephony/PhoneNumberUtils.java