diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java index fcbd54c34bbf..bc22319b360e 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java @@ -155,8 +155,8 @@ public class KeyguardSimPinViewController } mView.resetPasswordText(true /* animate */, /* announce */ - result.getType() != PinResult.PIN_RESULT_TYPE_SUCCESS); - if (result.getType() == PinResult.PIN_RESULT_TYPE_SUCCESS) { + result.getResult() != PinResult.PIN_RESULT_TYPE_SUCCESS); + if (result.getResult() == PinResult.PIN_RESULT_TYPE_SUCCESS) { mKeyguardUpdateMonitor.reportSimUnlocked(mSubId); mRemainingAttempts = -1; mShowDefaultMessage = true; @@ -164,7 +164,7 @@ public class KeyguardSimPinViewController true, KeyguardUpdateMonitor.getCurrentUser()); } else { mShowDefaultMessage = false; - if (result.getType() == PinResult.PIN_RESULT_TYPE_INCORRECT) { + if (result.getResult() == PinResult.PIN_RESULT_TYPE_INCORRECT) { if (result.getAttemptsRemaining() <= 2) { // this is getting critical - show dialog getSimRemainingAttemptsDialog( @@ -299,20 +299,14 @@ public class KeyguardSimPinViewController @Override public void run() { if (DEBUG) { - Log.v(TAG, "call supplyPinReportResultForSubscriber(subid=" + mSubId + ")"); + Log.v(TAG, "call supplyIccLockPin(subid=" + mSubId + ")"); } - TelephonyManager telephonyManager = - mTelephonyManager.createForSubscriptionId(mSubId); - final PinResult result = telephonyManager.supplyPinReportPinResult(mPin); - if (result == null) { - Log.e(TAG, "Error result for supplyPinReportResult."); - mView.post(() -> onSimCheckResponse(PinResult.getDefaultFailedResult())); - } else { - if (DEBUG) { - Log.v(TAG, "supplyPinReportResult returned: " + result.toString()); - } - mView.post(() -> onSimCheckResponse(result)); + TelephonyManager telephonyManager = mTelephonyManager.createForSubscriptionId(mSubId); + final PinResult result = telephonyManager.supplyIccLockPin(mPin); + if (DEBUG) { + Log.v(TAG, "supplyIccLockPin returned: " + result.toString()); } + mView.post(() -> onSimCheckResponse(result)); } } |