Merge "Only display warning to user if we are enabling OEM"

This commit is contained in:
Udam Saini
2016-01-19 17:24:28 +00:00
committed by Android (Google) Code Review

View File

@@ -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);