Merge "Fix NPE when removing PIN locked SIM during E911 call" am: b7dc3a3b21

am: 4910739237

Change-Id: I7a0be565cebff2f87b136a6c29484ee43ca116ab
This commit is contained in:
Brad Ebinger
2017-10-06 04:03:51 +00:00
committed by android-build-merger
2 changed files with 10 additions and 2 deletions

View File

@@ -66,7 +66,11 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
// again when the PUK locked SIM is re-entered. // again when the PUK locked SIM is re-entered.
case ABSENT: { case ABSENT: {
KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked(mSubId); 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; break;
} }
default: default:

View File

@@ -72,7 +72,11 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
// move into the READY state and the PUK lock keyguard should be removed. // move into the READY state and the PUK lock keyguard should be removed.
case READY: { case READY: {
KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked(mSubId); 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; break;
} }
default: default: