Fixed a SIM Lock UI issue

+ The SIM lock option will now appear if there is any SIM with locking
capabilities.
+ Also, if the first slot does not have a SIM in it, then the SIM lock
screen will disable the ability to lock the first slot.

Bug: 18473536
Change-Id: Ib4e0ed6e94b00bc07c9febdad433fdb3c55294b8
This commit is contained in:
PauloftheWest
2014-12-08 13:49:35 -08:00
parent 838d6dc949
commit 0b8788aae4
2 changed files with 25 additions and 3 deletions

View File

@@ -221,9 +221,13 @@ public class IccLockSettings extends PreferenceActivity
? context.getString(R.string.sim_editor_title, i + 1)
: subInfo.getDisplayName())));
}
}
final SubscriptionInfo sir = Utils.findRecordBySlotId(getBaseContext(), 0);
mPhone = PhoneFactory.getDefaultPhone();
mPhone = (sir == null) ? null
: PhoneFactory.getPhone(SubscriptionManager.getPhoneId(sir.getSubscriptionId()));
} else {
mPhone = PhoneFactory.getDefaultPhone();
}
mRes = getResources();
updatePreferences();
}