Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc81fb88 authored by Andres Morales's avatar Andres Morales Committed by Android (Google) Code Review
Browse files

Merge "fix issue when cancelling OEM unlocking change" into nyc-dev

parents 9b67583c 8b85fbfe
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -1698,10 +1698,18 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
    }

    private void confirmEnableOemUnlock() {
        DialogInterface.OnClickListener onConfirmListener = new DialogInterface.OnClickListener() {
        DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                if (which == DialogInterface.BUTTON_POSITIVE) {
                    Utils.setOemUnlockEnabled(getActivity(), true);
                }
            }
        };

        DialogInterface.OnDismissListener onDismissListener = new DialogInterface.OnDismissListener() {
            @Override
            public void onDismiss(DialogInterface dialog) {
                updateAllOptions();
            }
        };
@@ -1709,8 +1717,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
        new AlertDialog.Builder(getActivity())
                .setTitle(R.string.confirm_enable_oem_unlock_title)
                .setMessage(R.string.confirm_enable_oem_unlock_text)
                .setPositiveButton(R.string.enable_text, onConfirmListener)
                .setPositiveButton(R.string.enable_text, onClickListener)
                .setNegativeButton(android.R.string.cancel, null)
                .setOnDismissListener(onDismissListener)
                .create()
                .show();
    }