aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/com/android/internal/telephony/uicc/PinStorage.java8
-rw-r--r--src/java/com/android/internal/telephony/uicc/UiccProfile.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/android/internal/telephony/uicc/PinStorage.java b/src/java/com/android/internal/telephony/uicc/PinStorage.java
index b348c61286..28851247c2 100644
--- a/src/java/com/android/internal/telephony/uicc/PinStorage.java
+++ b/src/java/com/android/internal/telephony/uicc/PinStorage.java
@@ -250,14 +250,14 @@ public class PinStorage extends Handler {
}
/**
- * Return the cached pin for the {@code slotId}, or an empty string if it is not available.
+ * Return the cached pin for the SIM card identified by {@code slotId} and {@code iccid}, or
+ * an empty string if it is not available.
*
* The method returns the PIN only if the state is VERIFICATION_READY. If the PIN is found,
* its state changes to AVAILABLE, so that it cannot be retrieved a second time during the
* same boot cycle. If the PIN verification fails, it will be removed after the failed attempt.
*/
- public synchronized String getPin(int slotId) {
- String iccid = getIccid(slotId);
+ public synchronized String getPin(int slotId, String iccid) {
if (!validateSlotId(slotId) || !validateIccid(iccid)) {
return "";
}
@@ -874,7 +874,7 @@ public class PinStorage extends Handler {
private void verifyPendingPin(int slotId) {
// We intentionally invoke getPin() here, as it updates the status and makes sure that
// same PIN is not used more than once
- String pin = getPin(slotId);
+ String pin = getPin(slotId, getIccid(slotId));
if (pin.isEmpty()) {
// PIN is not available for verification: return.
return;
diff --git a/src/java/com/android/internal/telephony/uicc/UiccProfile.java b/src/java/com/android/internal/telephony/uicc/UiccProfile.java
index 542043752c..9b601853f3 100644
--- a/src/java/com/android/internal/telephony/uicc/UiccProfile.java
+++ b/src/java/com/android/internal/telephony/uicc/UiccProfile.java
@@ -630,7 +630,7 @@ public class UiccProfile extends IccCard {
// If the PIN code is required and an available cached PIN is available, intercept
// the update of external state and perform an internal PIN verification.
if (lockedState == IccCardConstants.State.PIN_REQUIRED) {
- String pin = mPinStorage.getPin(mPhoneId);
+ String pin = mPinStorage.getPin(mPhoneId, mIccRecords.getFullIccId());
if (!pin.isEmpty()) {
log("PIN_REQUIRED[" + mPhoneId + "] - Cache present");
mCi.supplyIccPin(pin, mHandler.obtainMessage(EVENT_SUPPLY_ICC_PIN_DONE));