diff options
author | Scott Lobdell <slobdell@google.com> | 2020-11-16 12:06:52 -0800 |
---|---|---|
committer | Justin DeMartino <jjdemartino@google.com> | 2020-11-17 08:25:32 -0800 |
commit | d3ff2de786af936a9af8739f5c98972804dd5823 (patch) | |
tree | b7e582570fca298b4876aa354f668b9df334e67b /packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java | |
parent | f2b9cf60566ebee53ce8453a093e964b60444c05 (diff) | |
parent | 5ba20685f9b25bcec335ed842f0da7f567cff5e9 (diff) |
Merge SP1A.201116.001
Change-Id: I51f7864ca57206ba4034be7db7ae9f36d5c53f59
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java index 3d499e660f3d..008c301b4fa2 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java @@ -267,8 +267,8 @@ public class KeyguardSimPukViewController } 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; @@ -277,7 +277,7 @@ public class KeyguardSimPukViewController true, KeyguardUpdateMonitor.getCurrentUser()); } else { mShowDefaultMessage = false; - if (result.getType() == PinResult.PIN_RESULT_TYPE_INCORRECT) { + if (result.getResult() == PinResult.PIN_RESULT_TYPE_INCORRECT) { // show message mMessageAreaController.setMessage(mView.getPukPasswordErrorMessage( result.getAttemptsRemaining(), false, @@ -390,23 +390,15 @@ public class KeyguardSimPukViewController @Override public void run() { - if (DEBUG) Log.v(TAG, "call supplyPukReportResult()"); + if (DEBUG) { + Log.v(TAG, "call supplyIccLockPuk(subid=" + mSubId + ")"); + } TelephonyManager telephonyManager = mTelephonyManager.createForSubscriptionId(mSubId); - final PinResult result = telephonyManager.supplyPukReportPinResult(mPuk, mPin); - if (result == null) { - Log.e(TAG, "Error result for supplyPukReportResult."); - mView.post(() -> onSimLockChangedResponse(PinResult.getDefaultFailedResult())); - } else { - if (DEBUG) { - Log.v(TAG, "supplyPukReportResult returned: " + result.toString()); - } - mView.post(new Runnable() { - @Override - public void run() { - onSimLockChangedResponse(result); - } - }); + final PinResult result = telephonyManager.supplyIccLockPuk(mPuk, mPin); + if (DEBUG) { + Log.v(TAG, "supplyIccLockPuk returned: " + result.toString()); } + mView.post(() -> onSimLockChangedResponse(result)); } } |