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
This commit is contained in:
Udam Saini
2016-01-14 18:13:22 -08:00
parent 4ccc2c3537
commit 7df06f131f

View File

@@ -1762,12 +1762,12 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
} else if (preference == mBtHciSnoopLog) { } else if (preference == mBtHciSnoopLog) {
writeBtHciSnoopLogOptions(); writeBtHciSnoopLogOptions();
} else if (preference == mEnableOemUnlock) { } 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(); confirmEnableOemUnlock();
} else {
Utils.setOemUnlockEnabled(getActivity(), false);
} }
} else {
Utils.setOemUnlockEnabled(getActivity(), false);
} }
} else if (preference == mMockLocationAppPref) { } else if (preference == mMockLocationAppPref) {
Intent intent = new Intent(getActivity(), AppPicker.class); Intent intent = new Intent(getActivity(), AppPicker.class);