diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 34bf00ebbd5..3185aae6f04 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -1762,12 +1762,12 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } else if (preference == mBtHciSnoopLog) { writeBtHciSnoopLogOptions(); } else if (preference == mEnableOemUnlock) { - if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) { - if (mEnableOemUnlock.isChecked()) { + if (mEnableOemUnlock.isChecked()) { + if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) { confirmEnableOemUnlock(); - } else { - Utils.setOemUnlockEnabled(getActivity(), false); } + } else { + Utils.setOemUnlockEnabled(getActivity(), false); } } else if (preference == mMockLocationAppPref) { Intent intent = new Intent(getActivity(), AppPicker.class);