summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2013-10-23 15:44:26 -0700
committerWink Saville <wink@google.com>2013-10-23 15:44:26 -0700
commitb896b9f74225d61af67c2661f44eceadb9e22013 (patch)
tree59c47d7ebd3f4d5d030aa5c5d1c283a4514c2e05 /telephony
parent82f31701141f5c3057b162cba1d57f78cbad5091 (diff)
downloadframeworks_base-b896b9f74225d61af67c2661f44eceadb9e22013.zip
frameworks_base-b896b9f74225d61af67c2661f44eceadb9e22013.tar.gz
frameworks_base-b896b9f74225d61af67c2661f44eceadb9e22013.tar.bz2
Enhance pin/puk support
Add supplyPinReportResult & supplyPukReportResult that returns the result code and attempts remaining. Display "Attempts remaining" in Keyguard Bug: 9928717 Change-Id: Ibad0635dd1375fabce11ba2b7b9f95f8868489e6
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl20
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneConstants.java8
2 files changed, 28 insertions, 0 deletions
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;