diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2013-12-05 13:10:46 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2013-12-05 13:10:46 -0800 |
commit | ebcb32f58a6220802ca129ea33f47b4b69931a10 (patch) | |
tree | 32b57c1d6ba9180ae63979e06d7421e107a9aa6c /telephony/java/com | |
parent | 6e2d0c1d91f644ab50e0c0b7cae4306262a4ca41 (diff) | |
parent | bac61807d3bcfff957b358cb9ad77850bd373689 (diff) | |
download | frameworks_base-ebcb32f58a6220802ca129ea33f47b4b69931a10.zip frameworks_base-ebcb32f58a6220802ca129ea33f47b4b69931a10.tar.gz frameworks_base-ebcb32f58a6220802ca129ea33f47b4b69931a10.tar.bz2 |
Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
Diffstat (limited to 'telephony/java/com')
4 files changed, 33 insertions, 4 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java index e3c664b..f6143ed 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfo.java +++ b/telephony/java/com/android/internal/telephony/CallerInfo.java @@ -581,6 +581,10 @@ public class CallerInfo { return countryIso; } + protected static String getCurrentCountryIso(Context context) { + return getCurrentCountryIso(context, Locale.getDefault()); + } + /** * @return a string debug representation of this instance. */ diff --git a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java index dd5f644..c63be91 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +++ b/telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java @@ -20,7 +20,6 @@ import android.content.AsyncQueryHandler; import android.content.Context; import android.database.Cursor; import android.database.SQLException; -import android.location.CountryDetector; import android.net.Uri; import android.os.Handler; import android.os.Looper; @@ -271,11 +270,9 @@ public class CallerInfoAsyncQuery { // Use the number entered by the user for display. if (!TextUtils.isEmpty(cw.number)) { - CountryDetector detector = (CountryDetector) mQueryContext.getSystemService( - Context.COUNTRY_DETECTOR); mCallerInfo.phoneNumber = PhoneNumberUtils.formatNumber(cw.number, mCallerInfo.normalizedNumber, - detector.detectCountry().getCountryIso()); + CallerInfo.getCurrentCountryIso(mQueryContext)); } } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 584411b..7bd2c84 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -155,6 +155,26 @@ interface ITelephony { boolean supplyPuk(String puk, String pin); /** + * Supply a pin to unlock the SIM. Blocks until a result is determined. + * Returns a specific success/error code. + * @param pin The pin to check. + * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code + * retValue[1] = number of attempts remaining if known otherwise -1 + */ + int[] supplyPinReportResult(String pin); + + /** + * Supply puk to unlock the SIM and set SIM pin to new pin. + * Blocks until a result is determined. + * Returns a specific success/error code + * @param puk The puk to check + * pin The pin to check. + * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code + * retValue[1] = number of attempts remaining if known otherwise -1 + */ + int[] supplyPukReportResult(String puk, String pin); + + /** * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated * without SEND (so <code>dial</code> is not appropriate). * diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index 4a4a62b..4163255 100644 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -86,6 +86,14 @@ public class PhoneConstants { public static final String REASON_LINK_PROPERTIES_CHANGED = "linkPropertiesChanged"; /** + * Return codes for supplyPinReturnResult and + * supplyPukReturnResult APIs + */ + public static final int PIN_RESULT_SUCCESS = 0; + public static final int PIN_PASSWORD_INCORRECT = 1; + public static final int PIN_GENERAL_FAILURE = 2; + + /** * Return codes for <code>enableApnType()</code> */ public static final int APN_ALREADY_ACTIVE = 0; |