Revert "Refactor PinStorage#storePin to avoid dead lock when unl..."
Revert "Refactor PinStorage#storePin to avoid dead lock when unl..."
Revert submission 1832880-pin-storage
Reason for revert: DroidMonitor: Potential culprit for Bug 202289263 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
Ia6d8fe10d:Refactor PinStorage#storePin to avoid dead lock wh...
Ib84e75e7d:Refactor PinStorage#storePin to avoid dead lock wh...
Test: presubmit test
Change-Id: I5ec4e33755cb9946eafcfd69c0a04afab28c1734
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 7900a2a..2914235 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -185,7 +185,6 @@
import com.android.internal.telephony.uicc.IccIoResult;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.IccUtils;
-import com.android.internal.telephony.uicc.PinStorage;
import com.android.internal.telephony.uicc.SIMRecords;
import com.android.internal.telephony.uicc.UiccCard;
import com.android.internal.telephony.uicc.UiccCardApplication;
@@ -1820,9 +1819,8 @@
// If the operation is successful, update the PIN storage
Pair<String, String> passwords = (Pair<String, String>) request.argument;
int phoneId = getPhoneFromRequest(request).getPhoneId();
- PinStorage pinStorage = UiccController.getInstance().getPinStorage();
- pinStorage.storePin(passwords.second, phoneId,
- pinStorage.getIccid(phoneId));
+ UiccController.getInstance().getPinStorage()
+ .storePin(passwords.second, phoneId);
} else {
request.result = msg.arg1;
}
@@ -1846,9 +1844,8 @@
Pair<Boolean, String> enabled = (Pair<Boolean, String>) request.argument;
int phoneId = getPhoneFromRequest(request).getPhoneId();
if (enabled.first) {
- PinStorage pinStorage = UiccController.getInstance().getPinStorage();
- pinStorage.storePin(enabled.second, phoneId,
- pinStorage.getIccid(phoneId));
+ UiccController.getInstance().getPinStorage()
+ .storePin(enabled.second, phoneId);
} else {
UiccController.getInstance().getPinStorage().clearPin(phoneId);
}
@@ -2548,8 +2545,7 @@
resultArray[1] = mRetryCount;
if (mResult == PhoneConstants.PIN_RESULT_SUCCESS && pin.length() > 0) {
- PinStorage pinStorage = UiccController.getInstance().getPinStorage();
- pinStorage.storePin(pin, mPhoneId, pinStorage.getIccid(mPhoneId));
+ UiccController.getInstance().getPinStorage().storePin(pin, mPhoneId);
}
return resultArray;