Commit Graph

112 Commits

Author SHA1 Message Date
Paul Duffin
f1adce018d Merge "Replace usages of ShortNumberUtil with ShortNumberInfo"
am: 8405e5cd3b

* commit '8405e5cd3b3b2491b5f487cbe26d9e1550e55370':
  Replace usages of ShortNumberUtil with ShortNumberInfo
2016-02-09 16:56:50 +00:00
Paul Duffin
c2884fe259 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
2016-02-09 16:40:53 +00:00
Jack Yu
87f47e9991 Reduced more radio log spam
Reduced more radio log spam

bug: 25956251
Change-Id: Ib870bb508c55ab009197fd7fcfa48e62fe3f7b6b
2016-01-26 10:24:56 -08:00
Shishir Agrawal
3a86d3d534 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
2016-01-26 09:29:24 -08:00
Jack Yu
6714030083 merge from master
Change-Id: Ic03669db3f4595336a7dbc13ffc77d055d11acf9
2015-12-10 12:27:58 -08:00
Roshan Pius
a9acb4c2b5 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
2015-09-01 09:24:32 -07:00
Roshan Pius
672b2cc05c 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
2015-08-26 10:00:49 -07:00
Roshan Pius
93018a4d98 Handle exceptions when accessing Content providers.
BUG: 21638129
Change-Id: I88f7dcf67e395f49136a1f434fbd9c75e15cddad
2015-07-14 11:20:42 -07:00
Yorke Lee
1249bdbe90 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
2015-06-30 10:15:40 -07:00
Brian Attwell
115c04410e Rename PhoneNumberUtils APIs
In response to more API review.

Bug: 21571895
Change-Id: Ia1fa69da07a3427997919ba61c77fcbad7e79f2a
2015-06-02 21:34:33 +00:00
Brian Attwell
1a15ab91bc Rename "end" to "endExclusive" in addPhoneTtsSpan
Bug: 21209482
Change-Id: If505acecf5ca398560a9a23ea23ff8dd741e4025
2015-05-28 16:23:37 -07:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Sanket Padawe
b15c00a551 am 0a4c2646: am 04db9797: Merge "Suppress phone number from logcat." into lmp-mr1-dev automerge: 4eed340
* commit '0a4c2646f4b72fdc78299dbb3dd86a7aecefff08':
  Suppress phone number from logcat.
2015-02-05 23:16:46 +00:00
Sanket Padawe
0a4c2646f4 am 04db9797: Merge "Suppress phone number from logcat." into lmp-mr1-dev
automerge: 4eed340

* commit '4eed340437d23a9b4fabf2881557325b863af23c':
  Suppress phone number from logcat.
2015-02-05 23:10:57 +00:00
Brian Attwell
c6dbe3be2c 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
2015-02-05 14:32:03 -08:00
Sanket Padawe
1acdd4b1f4 Suppress phone number from logcat.
Bug: 19251204
Change-Id: I042bc3c0a89967eeae547b059f06cf05de005b25
2015-02-05 11:45:27 -08:00
Robert Greenwalt
af7454bafb am 0cdd4560: am fabf0e0b: Merge "Fixing up the formatting code which is already merged"
automerge: 21475c6

* commit '21475c6a92b893f5d078ba23f06f0be6edaaacbd':
2015-02-02 17:33:09 +00:00
Robert Greenwalt
21475c6a92 am 0cdd4560: am fabf0e0b: Merge "Fixing up the formatting code which is already merged"
* commit '0cdd4560dac5784dda169863eb844d489bdc79d5':
2015-02-02 17:29:21 +00:00
Robert Greenwalt
3c6e38d3b5 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
2015-02-02 15:04:56 +09:00
Stuart Scott
3165abfd34 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
2015-01-30 22:26:27 +00:00
Stuart Scott
2e233d3066 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
2015-01-30 22:24:25 +00:00
Legler Wu
85973dcf8c [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
2015-01-29 19:02:55 -08:00
Robert Greenwalt
fe0e33495c 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
2015-01-21 20:05:30 +00:00
Robert Greenwalt
52f25f7b30 am b73f431d: Merge "Add + code handling logic for SMS Global Roaming" automerge: f19176f
* commit 'b73f431dddc0ba9260a342f2322e818460cf6f34':
  Add + code handling logic for SMS Global Roaming
2015-01-21 20:01:50 +00:00
sohryun.shin
a423a279f6 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
2015-01-12 14:14:18 +09:00
Ben Gilad
95cde2dc21 API to satisfy the dependency in https://go/contacthandler1135
Bug: 17586396
Change-Id: I10bad15b4db3ec8928316507119c529c5d1f304b
2015-01-08 17:56:28 -08:00
Raph Levien
50e9228493 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
2014-12-15 15:46:17 -08:00
Amit Mahajan
d9835f0c16 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
2014-12-15 10:38:27 -08:00
Ihab Awad
0855e7aea2 Add Text-to-Speech annotations for phone number displays (1/3)
Bug: 17321294
Change-Id: Id7e48e683694e2f9ea2a7dd7fa7d69acc727489d
2014-12-05 15:27:08 -08:00
Wink Saville
63f03dd94c Change subId to int from long
Change-Id: Idae6335e63e7b1e4e714bc17e71b1a4705e38474
2014-10-23 21:54:09 -07:00
Amit Mahajan
5dd345286c am 034fe21c: Merge "Assisted dialing support of MO SMS" into lmp-dev
* commit '034fe21c638960d8d67711f446c818b93e41641e':
  Assisted dialing support of MO SMS
2014-09-09 00:04:47 +00:00
Amit Mahajan
4009b98f73 Merge "Assisted dialing support of MO SMS" into lmp-dev 2014-09-08 23:56:31 +00:00
Xia Ying
77ea3ee5ec 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
2014-09-05 16:52:56 -07:00
Vineeta Srivastava
e30eeb5f56 am a8ceba1c: Merge "Plus code handling for non-NANP CDMA carrier" into lmp-dev
* commit 'a8ceba1cb610c2ce166d4cdcbdb6eaec08886aa9':
  Plus code handling  for non-NANP CDMA carrier
2014-09-05 23:03:22 +00:00
Steven Liu
9b656ee320 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
2014-09-05 22:13:11 +00:00
Nancy Chen
c7880d3f98 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.
2014-09-04 19:29:51 +00:00
Nancy Chen
fe99099ea7 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
2014-09-03 11:05:31 -07:00
Wink Saville
05e6dde3a0 ksd to lmp-sprout-dev
Change-Id: I94eb65c62231b5831570bb0cbbbd9c916bee0a37
2014-09-01 05:38:31 +00:00
giseok.seo
83749f3479 Use proper ril.ecclist when no sim state
Bug: 17139446
Signed-off-by: giseok.seo <giseok.seo@lge.com>
Change-Id: I2f420973b29092b8a6cceb8cf4bd77d0ee8372bd
2014-08-22 20:27:20 +00:00
Wink Saville
fb40dd4d00 Merge kwd to master
Add initial IMS and MSIM support from klp-wireless-dev-mirror

Change-Id: Idb607c0aa32f80fe4fe1539aedea7a221e9e7f04
2014-06-13 13:30:57 +00:00
Yorke Lee
282129fd3f API changes to Telephony per API review
* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber

Bug: 15432083

Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
2014-06-06 09:29:32 -07:00
Yorke Lee
8c2d8c0c27 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
2014-06-05 22:55:49 +00:00
Yorke Lee
d8819baf85 API changes to Telephony per API review
* Make context the first argument for isLocalEmergencyNumber and
isPotentialLocalEmergencyNumber

* Hide DisconnectCause
Bug: 15432083

Change-Id: I88b5ace925e3704bd032dc9694b0c2dd871b9cf9
2014-06-05 13:48:12 -07:00
Andrew Lee
b31c310fcf Handle normalization of a "null" phone number.
Bug: 14900155
Change-Id: I1c4c5c6dec4c4c470b436102c72a7476d3d5237c
2014-05-14 13:00:28 -07:00
Yorke Lee
99d1699516 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
2013-12-02 13:06:30 -08:00
Jake Hamby
921bf62462 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
2013-11-04 15:22:55 -08:00
Santos Cordon
04dfb5ec3c Protecting against NPE with null country detector.
bug:10514454
Change-Id: I316c47eddbe4929599866a3f9da9129d0056e3e2
2013-08-27 16:45:37 -07:00
Magnus Karlsson
2227067d99 Fixing crash in PhoneNumberUtils getNumberFromIntent
Handling intent with no data when trying to retrieve number from
intent.

Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
2013-05-02 09:59:29 +02:00
Wink Saville
22b1e80c24 Use Rlog
Change-Id: I44919126606cd55f7dce7c942027ed0d914f04bd
2012-12-08 09:06:51 -08:00
Daisuke Miyakawa
e69ec2253c Remove STOPSHIP part of the logging in telephony
We still need the log itself to trap the exceptional case.

Bug: 6201805
Change-Id: I62d12f6a1ed41817ee12c0f5c7fc4aa0a967a60f
2012-05-09 11:44:58 -07:00