diff options
| author | Yorke Lee <yorkelee@google.com> | 2014-06-05 15:47:11 -0700 |
|---|---|---|
| committer | Yorke Lee <yorkelee@google.com> | 2014-06-05 22:55:49 +0000 |
| commit | 8c2d8c0c27ebd155e9e9d2c066df0297f265b5a6 (patch) | |
| tree | 0402692e3ae17c2247ee546fd8c63226c5ac5fd4 /telephony | |
| parent | eaa55cdc8731b13b18ca7eb5c6c1835164c86f01 (diff) | |
| download | frameworks_base-8c2d8c0c27ebd155e9e9d2c066df0297f265b5a6.zip frameworks_base-8c2d8c0c27ebd155e9e9d2c066df0297f265b5a6.tar.gz frameworks_base-8c2d8c0c27ebd155e9e9d2c066df0297f265b5a6.tar.bz2 | |
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
Diffstat (limited to 'telephony')
4 files changed, 19 insertions, 15 deletions
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java index 604b895..d2044be 100644 --- a/telephony/java/android/telephony/DisconnectCause.java +++ b/telephony/java/android/telephony/DisconnectCause.java @@ -18,8 +18,6 @@ package android.telephony; /** * Contains disconnect call causes generated by the framework and the RIL. - * - * @hide */ public class DisconnectCause { diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 6996659..9da032a 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1742,14 +1742,16 @@ public class PhoneNumberUtils /** * Checks if a given number is an emergency number for the country that the user is in. - * @param context the specific context which the number should be checked against - * @param number the number to look up. * + * @param number the number to look up. + * @param context the specific context which the number should be checked against * @return true if the specified number is an emergency number for the country the user * is currently in. */ - public static boolean isLocalEmergencyNumber(Context context, String number) { - return isLocalEmergencyNumberInternal(context, number, true /* useExactMatch */); + public static boolean isLocalEmergencyNumber(String number, Context context) { + return isLocalEmergencyNumberInternal(number, + context, + true /* useExactMatch */); } /** @@ -1765,24 +1767,27 @@ public class PhoneNumberUtils * This method is intended for internal use by the phone app when * deciding whether to allow ACTION_CALL intents from 3rd party apps * (where we're required to *not* allow emergency calls to be placed.) - * @param context the specific context which the number should be checked against - * @param number the number to look up. * + * @param number the number to look up. + * @param context the specific context which the number should be checked against * @return true if the specified number is an emergency number for a local country, based on the * CountryDetector. * * @see android.location.CountryDetector * @hide */ - public static boolean isPotentialLocalEmergencyNumber(Context context, String number) { - return isLocalEmergencyNumberInternal(context, number, false /* useExactMatch */); + public static boolean isPotentialLocalEmergencyNumber(String number, Context context) { + return isLocalEmergencyNumberInternal(number, + context, + false /* useExactMatch */); } /** * Helper function for isLocalEmergencyNumber() and * isPotentialLocalEmergencyNumber(). - * @param context the specific context which the number should be checked against + * * @param number the number to look up. + * @param context the specific context which the number should be checked against * @param useExactMatch if true, consider a number to be an emergency * number only if it *exactly* matches a number listed in * the RIL / SIM. If false, a number is considered to be an @@ -1794,8 +1799,9 @@ public class PhoneNumberUtils * * @see android.location.CountryDetector */ - private static boolean isLocalEmergencyNumberInternal(Context context, String number, - boolean useExactMatch) { + private static boolean isLocalEmergencyNumberInternal(String number, + Context context, + boolean useExactMatch) { String countryIso; CountryDetector detector = (CountryDetector) context.getSystemService( Context.COUNTRY_DETECTOR); diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java index f8dd7cf..f6143ed 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfo.java +++ b/telephony/java/com/android/internal/telephony/CallerInfo.java @@ -276,7 +276,7 @@ public class CallerInfo { // Change the callerInfo number ONLY if it is an emergency number // or if it is the voicemail number. If it is either, take a // shortcut and skip the query. - if (PhoneNumberUtils.isLocalEmergencyNumber(context, number)) { + if (PhoneNumberUtils.isLocalEmergencyNumber(number, context)) { return new CallerInfo().markAsEmergency(context); } else if (PhoneNumberUtils.isVoiceMailNumber(number)) { return new CallerInfo().markAsVoiceMail(); diff --git a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java index 34fed5e..74f73b5 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +++ b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java @@ -399,7 +399,7 @@ public class CallerInfoAsyncQuery { cw.number = number; // check to see if these are recognized numbers, and use shortcuts if we can. - if (PhoneNumberUtils.isLocalEmergencyNumber(context, number)) { + if (PhoneNumberUtils.isLocalEmergencyNumber(number, context)) { cw.event = EVENT_EMERGENCY_NUMBER; } else if (PhoneNumberUtils.isVoiceMailNumber(number)) { cw.event = EVENT_VOICEMAIL_NUMBER; |
