Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bb6f70a authored by Andres Morales's avatar Andres Morales
Browse files

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
parent fb2bae95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();