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...
Change-Id: I5ec4e33755cb9946eafcfd69c0a04afab28c1734
Merged-In: I5ec4e33755cb9946eafcfd69c0a04afab28c1734
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 5fc8f86..f0a6a69 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -183,7 +183,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;
@@ -1717,9 +1716,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;
}
@@ -1743,9 +1741,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);
}
@@ -2447,8 +2444,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;