Merge "Remove PIN/PUK keyguard when SIM is removed/ready" into oc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9938901bbc
@@ -60,9 +60,19 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
|
|||||||
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
|
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSimStateChanged(int subId, int slotId, State simState) {
|
public void onSimStateChanged(int subId, int slotId, State simState) {
|
||||||
if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")");
|
if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")");
|
||||||
resetState();
|
switch(simState) {
|
||||||
};
|
// If the SIM is removed, then we must remove the keyguard. It will be put up
|
||||||
|
// again when the PUK locked SIM is re-entered.
|
||||||
|
case ABSENT: {
|
||||||
|
KeyguardUpdateMonitor.getInstance(getContext()).reportSimUnlocked(mSubId);
|
||||||
|
mCallback.dismiss(true, KeyguardUpdateMonitor.getCurrentUser());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
resetState();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public KeyguardSimPinView(Context context) {
|
public KeyguardSimPinView(Context context) {
|
||||||
|
|||||||
@@ -62,9 +62,23 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
|
|||||||
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
|
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSimStateChanged(int subId, int slotId, State simState) {
|
public void onSimStateChanged(int subId, int slotId, State simState) {
|
||||||
if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")");
|
if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")");
|
||||||
resetState();
|
switch(simState) {
|
||||||
};
|
// If the SIM is removed, then we must remove the keyguard. It will be put up
|
||||||
|
// again when the PUK locked SIM is re-entered.
|
||||||
|
case ABSENT:
|
||||||
|
// intentional fall-through
|
||||||
|
// If the SIM is unlocked via a key sequence through the emergency dialer, it will
|
||||||
|
// 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());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
resetState();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public KeyguardSimPukView(Context context) {
|
public KeyguardSimPukView(Context context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user