diff options
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
| -rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 3054cec52..630844a45 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -1761,7 +1761,9 @@ public class DevelopmentSettings extends SettingsPreferenceFragment DialogInterface.OnClickListener onConfirmListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - Utils.setOemUnlockEnabled(getActivity(), true); + if (which == DialogInterface.BUTTON_POSITIVE) { + Utils.setOemUnlockEnabled(getActivity(), true); + } updateAllOptions(); } }; @@ -1770,7 +1772,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment .setTitle(R.string.confirm_enable_oem_unlock_title) .setMessage(R.string.confirm_enable_oem_unlock_text) .setPositiveButton(R.string.enable_text, onConfirmListener) - .setNegativeButton(android.R.string.cancel, null) + .setNegativeButton(android.R.string.cancel, onConfirmListener) .create() .show(); } |
