Use isOemUnlockEnabled to drive oem unlocking toggle.

Bug: 31031467
Test: manually turned on/off persistent_data_block

Change-Id: I21d18a898a220f9e46a53715d4b4fa01c7116e7f
This commit is contained in:
Fan Zhang
2016-08-23 15:13:22 -07:00
parent 124251d54e
commit 83f91f61ae

View File

@@ -1035,7 +1035,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
private void updateOemUnlockOptions() {
if (mEnableOemUnlock != null) {
updateSwitchPreference(mEnableOemUnlock, isBootloaderUnlocked());
updateSwitchPreference(mEnableOemUnlock, Utils.isOemUnlockEnabled(getActivity()));
updateOemUnlockSettingDescription();
// Showing mEnableOemUnlock preference as device has persistent data block.
mEnableOemUnlock.setDisabledByAdmin(null);