From 7df06f131f16ea5f31150ae101b7fd50ca46a13f Mon Sep 17 00:00:00 2001 From: Udam Saini Date: Thu, 14 Jan 2016 18:13:22 -0800 Subject: [PATCH] Only display warning to user if we are enabling OEM When we disable OEM unlocking through developer options, no need to show the warning dialog. bug:26285618 Change-Id: I476761aeb850a60f345fc2fd8cbdb4ec730cc2c9 --- src/com/android/settings/DevelopmentSettings.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);