diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java | 6 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java index 7225ba99f51c..432b4061b5d0 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java @@ -66,7 +66,11 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView { // again when the PUK locked SIM is re-entered. case ABSENT: { KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked(mSubId); - mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser()); + // onSimStateChanged callback can fire when the SIM PIN lock is not currently + // active and mCallback is null. + if (mCallback != null) { + mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser()); + } break; } default: diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java index 171cf23696ff..7f79008b7c91 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java @@ -72,7 +72,11 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView { // move into the READY state and the PUK lock keyguard should be removed. case READY: { KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked(mSubId); - mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser()); + // mCallback can be null if onSimStateChanged callback is called when keyguard + // isn't active. + if (mCallback != null) { + mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser()); + } break; } default: |