don't toggle OEM unlocking if the preference is not enabled
Toggling the top-level switch is bypassing the disabled state of the switch and leaving it in an inconsistent and unrecoverable state. Bug: 26863852 Change-Id: I9fed626b743fd6aac2c20910493bdec4778cc629
This commit is contained in:
@@ -1836,7 +1836,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB) : 0);
|
||||
} else if (preference == mBtHciSnoopLog) {
|
||||
writeBtHciSnoopLogOptions();
|
||||
} else if (preference == mEnableOemUnlock) {
|
||||
} else if (preference == mEnableOemUnlock && mEnableOemUnlock.isEnabled()) {
|
||||
if (mEnableOemUnlock.isChecked()) {
|
||||
if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) {
|
||||
confirmEnableOemUnlock();
|
||||
|
Reference in New Issue
Block a user