diff --git a/res/values/strings.xml b/res/values/strings.xml
index 06f48ce..25bacb3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2466,8 +2466,6 @@
     <string name="master_clear_final_desc">Erase all your personal information and downloaded apps? You can\'t reverse this action!</string>
     <!-- SD card & phone storage settings screen, button on screen after user selects Reset phone button -->
     <string name="master_clear_final_button_text">Erase everything</string>
-    <!-- Message to draw an unlock pattern before clearing the device -->
-    <string name="master_clear_gesture_prompt">Draw your unlock pattern</string>
     <!-- Explanation of drawing unlock pattern to reset phone -->
     <string name="master_clear_gesture_explanation">You need to draw your unlock pattern to confirm a factory data reset.</string>
     <!-- Master clear failed message -->
@@ -2504,8 +2502,6 @@
     <string name="media_format_final_desc" product="default">Erase the SD card, deleting all files stored there? You can\'t reverse this action!</string>
     <!-- SD card & phone storage settings screen, button on screen after user selects Format media button -->
     <string name="media_format_final_button_text">Erase everything</string>
-    <!-- Message to draw an unlock pattern before clearing the device -->
-    <string name="media_format_gesture_prompt">Draw your unlock pattern</string>
     <!-- Explanation of drawing unlock pattern to format card [CHAR LIMIT=NONE] -->
     <string name="media_format_gesture_explanation" product="nosdcard">You need to draw your unlock pattern to confirm that you want to erase the USB storage.</string>
     <!-- Explanation of drawing unlock pattern to format card [CHAR LIMIT=NONE] -->
@@ -3400,6 +3396,15 @@
     <string name="oem_unlock_enable">Enable OEM unlock</string>
     <!-- setting Checkbox summary whether to enable OEM unlock [CHAR_LIMIT=50] -->
     <string name="oem_unlock_enable_summary">Allow the device to be OEM unlocked</string>
+    <!-- Message to enter device PIN to enable OEM unlock -->
+    <string name="oem_unlock_enable_pin_prompt">Enter your PIN</string>
+    <!-- Explanation to enter device pin to enable OEM unlock -->
+    <string name="oem_unlock_enable_pin_description">Enter your device PIN to enable OEM unlock</string>
+    <!-- Confirmation dialog title to ensure user wishes to enable OEM unlock and disable theft protection features -->
+    <string name="confirm_enable_oem_unlock_title">Warning</string>
+    <!-- Confirmation dialog message to ensure user wishes to enable OEM unlock and disable theft protection features -->
+    <string name="confirm_enable_oem_unlock_text">Enabling OEM unlock disables theft protection features on this device and may void your warranty. Continue?</string>
+
 
     <!-- Setting Checkbox title whether to show options for wireless display certification -->
     <string name="wifi_display_certification">Wireless display certification</string>
@@ -4326,8 +4331,6 @@
     <!-- Error message for users that aren't allowed to see or modify credentials [CHAR LIMIT=none] -->
     <string name="credentials_settings_not_available">Credentials are not available for this user</string>
 
-    <!-- Message to draw an unlock pattern when installing credentials -->
-    <string name="credentials_install_gesture_prompt">Draw your unlock pattern</string>
     <!-- Explanation of drawing unlock pattern to install credentials -->
     <string name="credentials_install_gesture_explanation">You need to draw your unlock pattern to confirm credential installation.</string>
 
diff --git a/src/com/android/settings/CredentialStorage.java b/src/com/android/settings/CredentialStorage.java
index 57b5384..2e917f5 100644
--- a/src/com/android/settings/CredentialStorage.java
+++ b/src/com/android/settings/CredentialStorage.java
@@ -376,8 +376,7 @@
     private boolean confirmKeyGuard() {
         Resources res = getResources();
         boolean launched = new ChooseLockSettingsHelper(this)
-                .launchConfirmationActivity(CONFIRM_KEY_GUARD_REQUEST,
-                                            res.getText(R.string.credentials_install_gesture_prompt),
+                .launchConfirmationActivity(CONFIRM_KEY_GUARD_REQUEST, null,
                                             res.getText(R.string.credentials_install_gesture_explanation),
                                             true);
         return launched;
diff --git a/src/com/android/settings/CryptKeeperSettings.java b/src/com/android/settings/CryptKeeperSettings.java
index c572738..d962446 100644
--- a/src/com/android/settings/CryptKeeperSettings.java
+++ b/src/com/android/settings/CryptKeeperSettings.java
@@ -16,8 +16,6 @@
 
 package com.android.settings;
 
-import com.android.internal.widget.LockPatternUtils;
-
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Fragment;
@@ -81,7 +79,7 @@
      * is no keyguard available, we prompt the user to set a password.
      */
     private Button.OnClickListener mInitiateListener = new Button.OnClickListener() {
-
+        @Override
         public void onClick(View v) {
             if (!runKeyguardConfirmation(KEYGUARD_REQUEST)) {
                 // TODO replace (or follow) this dialog with an explicit launch into password UI
@@ -162,8 +160,7 @@
             return true;
         }
 
-        return helper.launchConfirmationActivity(request,
-                res.getText(R.string.master_clear_gesture_prompt),
+        return helper.launchConfirmationActivity(request, null,
                 res.getText(R.string.crypt_keeper_confirm_encrypt),
                 true);
     }
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index d410366..4af2baf 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -31,6 +31,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
 import android.hardware.usb.IUsbManager;
 import android.net.wifi.WifiManager;
 import android.os.AsyncTask;
@@ -162,6 +163,8 @@
 
     private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
 
+    private static final int REQUEST_CODE_ENABLE_OEM_UNLOCK = 0;
+
     private static String DEFAULT_LOG_RING_BUFFER_SIZE_IN_BYTES = "262144"; // 256K
 
     private IWindowManager mWindowManager;
@@ -1276,6 +1279,24 @@
                 getActivity().getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0);
     }
 
+    private void confirmEnableOemUnlock() {
+        DialogInterface.OnClickListener onConfirmListener = new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                Utils.setOemUnlockEnabled(getActivity(), true);
+                updateAllOptions();
+            }
+        };
+
+        new AlertDialog.Builder(getActivity())
+                .setTitle(R.string.confirm_enable_oem_unlock_title)
+                .setMessage(R.string.confirm_enable_oem_unlock_text)
+                .setPositiveButton(R.string.yes, onConfirmListener)
+                .setNegativeButton(android.R.string.cancel, null)
+                .create()
+                .show();
+    }
+
     @Override
     public void onSwitchChanged(Switch switchView, boolean isChecked) {
         if (switchView != mSwitchBar.getSwitch()) {
@@ -1311,6 +1332,14 @@
                 writeDebuggerOptions();
                 updateDebuggerOptions();
             }
+        } else if (requestCode == REQUEST_CODE_ENABLE_OEM_UNLOCK) {
+            if (resultCode == Activity.RESULT_OK) {
+                if (mEnableOemUnlock.isChecked()) {
+                    confirmEnableOemUnlock();
+                } else {
+                    Utils.setOemUnlockEnabled(getActivity(), false);
+                }
+            }
         } else {
             super.onActivityResult(requestCode, resultCode, data);
         }
@@ -1364,7 +1393,13 @@
         } else if (preference == mBtHciSnoopLog) {
             writeBtHciSnoopLogOptions();
         } else if (preference == mEnableOemUnlock) {
-            Utils.setOemUnlockEnabled(getActivity(), mEnableOemUnlock.isChecked());
+            if (!showKeyguardConfirmation(getResources(), REQUEST_CODE_ENABLE_OEM_UNLOCK)) {
+                if (mEnableOemUnlock.isChecked()) {
+                    confirmEnableOemUnlock();
+                } else {
+                    Utils.setOemUnlockEnabled(getActivity(), false);
+                }
+            }
         } else if (preference == mAllowMockLocation) {
             Settings.Secure.putInt(getActivity().getContentResolver(),
                     Settings.Secure.ALLOW_MOCK_LOCATION,
@@ -1426,6 +1461,13 @@
         return false;
     }
 
+    private boolean showKeyguardConfirmation(Resources resources, int requestCode) {
+        return new ChooseLockSettingsHelper(getActivity(), this)
+                .launchConfirmationActivity(requestCode,
+                        resources.getString(R.string.oem_unlock_enable_pin_prompt),
+                        resources.getString(R.string.oem_unlock_enable_pin_description));
+    }
+
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
         if (HDCP_CHECKING_KEY.equals(preference.getKey())) {
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index a2ca554..1c9fe5c 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -72,8 +72,7 @@
     private boolean runKeyguardConfirmation(int request) {
         Resources res = getActivity().getResources();
         return new ChooseLockSettingsHelper(getActivity(), this)
-                .launchConfirmationActivity(request,
-                        res.getText(R.string.master_clear_gesture_prompt),
+                .launchConfirmationActivity(request, null,
                         res.getText(R.string.master_clear_gesture_explanation));
     }
 
diff --git a/src/com/android/settings/MediaFormat.java b/src/com/android/settings/MediaFormat.java
index dc495ec..20dac8e 100644
--- a/src/com/android/settings/MediaFormat.java
+++ b/src/com/android/settings/MediaFormat.java
@@ -73,8 +73,7 @@
      */
     private boolean runKeyguardConfirmation(int request) {
         return new ChooseLockSettingsHelper(this)
-                .launchConfirmationActivity(request,
-                        getText(R.string.media_format_gesture_prompt),
+                .launchConfirmationActivity(request, null,
                         getText(R.string.media_format_gesture_explanation));
     }
 
diff --git a/src/com/android/settings/sim/SimSettings.java b/src/com/android/settings/sim/SimSettings.java
index 2d5fdc5..379232f 100644
--- a/src/com/android/settings/sim/SimSettings.java
+++ b/src/com/android/settings/sim/SimSettings.java
@@ -574,7 +574,8 @@
                     String displayName = nameText.getText().toString();
                     int subId = mSubInfoRecord.getSubscriptionId();
                     mSubInfoRecord.setDisplayName(displayName);
-                    SubscriptionManager.setDisplayName(displayName, subId);
+                    SubscriptionManager.setDisplayName(displayName, subId,
+                            SubscriptionManager.NAME_SOURCE_USER_INPUT);
                     findRecordBySubId(subId).setDisplayName(displayName);
 
                     final int colorSelected = colorSpinner.getSelectedItemPosition();
