From 57f8f0d7f9ff9e7a916ada7efaf2f59931de89b1 Mon Sep 17 00:00:00 2001 From: Brian Attwell Date: Wed, 4 Feb 2015 10:38:12 -0800 Subject: Unhide and rename PhoneNumberUtils tts methods Renamed ttsSpanAsPhoneNumber #1 -> getPhoneTtsSpan Renamed ttsSpanAsPhoneNumber #2 -> addPhoneTtsSpan 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 --- api/current.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api') diff --git a/api/current.txt b/api/current.txt index a37ed40..91b2b7b 100644 --- a/api/current.txt +++ b/api/current.txt @@ -28466,6 +28466,7 @@ package android.telephony { public class PhoneNumberUtils { ctor public PhoneNumberUtils(); + method public static void addPhoneTtsSpan(android.text.Spannable, int, int); method public static java.lang.String calledPartyBCDFragmentToString(byte[], int, int); method public static java.lang.String calledPartyBCDToString(byte[], int, int); method public static boolean compare(java.lang.String, java.lang.String); @@ -28482,6 +28483,8 @@ package android.telephony { method public static java.lang.String formatNumberToE164(java.lang.String, java.lang.String); method public static deprecated int getFormatTypeForLocale(java.util.Locale); method public static java.lang.String getNumberFromIntent(android.content.Intent, android.content.Context); + method public static android.text.style.TtsSpan getPhoneTtsSpan(java.lang.String); + method public static java.lang.CharSequence getPhoneTtsSpannable(java.lang.CharSequence); method public static java.lang.String getStrippedReversed(java.lang.String); method public static final boolean is12Key(char); method public static final boolean isDialable(char); -- cgit v1.1