Don't try to set OEM checkbox if not available

Bug: 16199128
Change-Id: I09765de60d60a2351f915607e737db90fbd90c9e
This commit is contained in:
Andres Morales
2014-07-10 09:47:30 -07:00
parent d17a15bbc4
commit 7568392c00

View File

@@ -290,6 +290,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
mEnableOemUnlock = findAndInitCheckboxPref(ENABLE_OEM_UNLOCK); mEnableOemUnlock = findAndInitCheckboxPref(ENABLE_OEM_UNLOCK);
if (!showEnableOemUnlockPreference()) { if (!showEnableOemUnlockPreference()) {
removePreference(mEnableOemUnlock); removePreference(mEnableOemUnlock);
mEnableOemUnlock = null;
} }
mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION); mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION);
mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD); mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD);
@@ -510,7 +511,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0); Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
updateCheckBox(mBtHciSnoopLog, Settings.Secure.getInt(cr, updateCheckBox(mBtHciSnoopLog, Settings.Secure.getInt(cr,
Settings.Secure.BLUETOOTH_HCI_LOG, 0) != 0); Settings.Secure.BLUETOOTH_HCI_LOG, 0) != 0);
if (mEnableOemUnlock != null) {
updateCheckBox(mEnableOemUnlock, Utils.isOemUnlockEnabled(getActivity())); updateCheckBox(mEnableOemUnlock, Utils.isOemUnlockEnabled(getActivity()));
}
updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr, updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr,
Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0); Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
updateHdcpValues(); updateHdcpValues();