diff options
| author | 2017-10-10 17:14:35 +0000 | |
|---|---|---|
| committer | 2017-10-10 17:14:35 +0000 | |
| commit | ad545464c2d543a7847cf2cacea11dc604d1c919 (patch) | |
| tree | b9de707030e649d1b1f3d022e87cb062fab0fde1 | |
| parent | c4a0b34248eebcd3061eae0c544082c30a2a63e0 (diff) | |
| parent | 3311859a489a5f01e2f84c6220f3a7cf6044e526 (diff) | |
Merge "Fix NPE when removing PIN locked SIM during E911 call" into oc-mr1-dev
| -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: |