Disable "SIM card lock" when the SIM card is PUK-blocked
For an inserted PUK-blocked SIM card we should not allow to open lock settings. Add a check for SIM_STATE_PERM_DISABLED and disable "SIM card lock". Test: Insert a PUK blocked card and check SIM card lock Bug: 230370597 Change-Id: I8b468cefe95fb8bd66ab91d6c4569ddb01473fbe
This commit is contained in:
@@ -95,7 +95,8 @@ public class SimLockPreferenceController extends BasePreferenceController {
|
||||
for (SubscriptionInfo subInfo : subInfoList) {
|
||||
final int simState = mTelephonyManager.getSimState(subInfo.getSimSlotIndex());
|
||||
if ((simState != TelephonyManager.SIM_STATE_ABSENT)
|
||||
&& (simState != TelephonyManager.SIM_STATE_UNKNOWN)) {
|
||||
&& (simState != TelephonyManager.SIM_STATE_UNKNOWN)
|
||||
&& (simState != TelephonyManager.SIM_STATE_PERM_DISABLED)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user