summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
index e39622a..9accbb4 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
@@ -46,9 +46,10 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
implements KeyguardSecurityView, OnEditorActionListener, TextWatcher {
private static final String LOG_TAG = "KeyguardSimPinView";
private static final boolean DEBUG = KeyguardViewMediator.DEBUG;
+ public static final String TAG = "KeyguardSimPinView";
private ProgressDialog mSimUnlockProgressDialog = null;
- private volatile boolean mSimCheckInProgress;
+ private CheckSimPin mCheckSimPinThread;
private AlertDialog mRemainingAttemptsDialog;
@@ -169,14 +170,17 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
@Override
public void run() {
try {
+ Log.v(TAG, "call supplyPinReportResult()");
final int[] result = ITelephony.Stub.asInterface(ServiceManager
.checkService("phone")).supplyPinReportResult(mPin);
+ Log.v(TAG, "supplyPinReportResult returned: " + result[0] + " " + result[1]);
post(new Runnable() {
public void run() {
onSimCheckResponse(result[0], result[1]);
}
});
} catch (RemoteException e) {
+ Log.e(TAG, "RemoteException for supplyPinReportResult:", e);
post(new Runnable() {
public void run() {
onSimCheckResponse(PhoneConstants.PIN_GENERAL_FAILURE, -1);
@@ -229,9 +233,8 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
getSimUnlockProgressDialog().show();
- if (!mSimCheckInProgress) {
- mSimCheckInProgress = true; // there should be only one
- new CheckSimPin(mPasswordEntry.getText().toString()) {
+ if (mCheckSimPinThread == null) {
+ mCheckSimPinThread = new CheckSimPin(mPasswordEntry.getText().toString()) {
void onSimCheckResponse(final int result, final int attemptsRemaining) {
post(new Runnable() {
public void run() {
@@ -263,11 +266,12 @@ public class KeyguardSimPinView extends KeyguardAbsKeyInputView
mPasswordEntry.setText("");
}
mCallback.userActivity(0);
- mSimCheckInProgress = false;
+ mCheckSimPinThread = null;
}
});
}
- }.start();
+ };
+ mCheckSimPinThread.start();
}
}
}