diff --git a/res/values/strings.xml b/res/values/strings.xml
index c6b278c..ab4a9ab 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7499,13 +7499,10 @@
     <string name="button_confirm_convert_fbe">Wipe and convert</string>
 
     <!-- Reset rate-limiting in the system service ShortcutManager. [CHAR_LIMIT=none] -->
-    <string name="reset_shortcut_manager_throttling">Reset ShortcutManager rate-limiting counters</string>
+    <string name="reset_shortcut_manager_throttling">Reset ShortcutManager rate-limiting</string>
 
-    <!-- Title of the dialog box to confirm resetting rate-limiting in the system service ShortcutManager. [CHAR_LIMIT=none] -->
-    <string name="confirm_reset_shortcut_manager_throttling_title">Reset ShortcutManager rate-limiting?</string>
-
-    <!-- Message of the dialog box to confirm resetting rate-limiting in the system service ShortcutManager. [CHAR_LIMIT=none] -->
-    <string name="confirm_reset_shortcut_manager_throttling_message">Reset ShortcutManager rate-limiting counters?</string>
+    <!-- Toast message shown when "Reset ShortcutManager rate-limiting" has been performed. [CHAR_LIMIT=none] -->
+    <string name="reset_shortcut_manager_throttling_complete">ShortcutManager rate-limiting has been reset</string>
 
     <!-- Title of notification suggestion during optional steps of setup. [CHAR_LIMIT=60] -->
     <string name="notification_suggestion_title">Control lock screen notifications</string>
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index 29363ad..2288520 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -372,6 +372,10 @@
             android:key="force_resizable_activities"
             android:title="@string/force_resizable_activities"
             android:summary="@string/force_resizable_activities_summary"/>
+
+        <Preference
+            android:key="reset_shortcut_manager_throttling"
+            android:title="@string/reset_shortcut_manager_throttling" />
      </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java
index 5a8960c..801f008 100644
--- a/src/com/android/settings/ChooseLockPassword.java
+++ b/src/com/android/settings/ChooseLockPassword.java
@@ -290,10 +290,7 @@
         @Override
         public View onCreateView(LayoutInflater inflater, ViewGroup container,
                 Bundle savedInstanceState) {
-            GlifLayout layout = (GlifLayout) inflater.inflate(
-                    R.layout.choose_lock_password, container, false);
-            layout.setHeaderText(getActivity().getTitle());
-            return layout;
+            return inflater.inflate(R.layout.choose_lock_password, container, false);
         }
 
         @Override
@@ -365,6 +362,7 @@
                         : R.string.lockpassword_choose_your_pin_header;
                 CharSequence title = getText(id);
                 sa.setTitle(title);
+                ((GlifLayout) view).setHeaderText(title);
             }
         }
 
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 934e752..db6a373b 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -1911,7 +1911,7 @@
         } else if (preference == mWebViewMultiprocess) {
             writeWebViewMultiprocessOptions();
         } else if (SHORTCUT_MANAGER_RESET_KEY.equals(preference.getKey())) {
-            confirmResetShortcutManagerThrottling();
+            resetShortcutManagerThrottling();
         } else {
             return super.onPreferenceTreeClick(preference);
         }
@@ -2153,30 +2153,18 @@
                 }
             };
 
-    private void confirmResetShortcutManagerThrottling() {
+    private void resetShortcutManagerThrottling() {
         final IShortcutService service = IShortcutService.Stub.asInterface(
                 ServiceManager.getService(Context.SHORTCUT_SERVICE));
-
-        DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialog, int which) {
-                if (which == DialogInterface.BUTTON_POSITIVE) {
-                    try {
-                        service.resetThrottling();
-                    } catch (RemoteException e) {
-                    }
-                }
+        if (service != null) {
+            try {
+                service.resetThrottling();
+                Toast.makeText(getActivity(), R.string.reset_shortcut_manager_throttling_complete,
+                        Toast.LENGTH_SHORT).show();
+            } catch (RemoteException e) {
+                Log.e(TAG, "Failed to reset rate limiting", e);
             }
-        };
-
-        new AlertDialog.Builder(getActivity())
-                .setTitle(R.string.confirm_reset_shortcut_manager_throttling_title)
-                .setMessage(R.string.confirm_reset_shortcut_manager_throttling_message)
-                .setPositiveButton(R.string.okay, onClickListener)
-                .setNegativeButton(android.R.string.cancel, null)
-                .create()
-                .show();
-
+        }
     }
 
     private void updateOemUnlockSettingDescription() {
diff --git a/src/com/android/settings/vpn2/AppManagementFragment.java b/src/com/android/settings/vpn2/AppManagementFragment.java
index 99d2f55..b306577 100644
--- a/src/com/android/settings/vpn2/AppManagementFragment.java
+++ b/src/com/android/settings/vpn2/AppManagementFragment.java
@@ -80,7 +80,7 @@
         public void onForget() {
             // Unset always-on-vpn when forgetting the VPN
             if (isVpnAlwaysOn()) {
-                setAlwaysOnVpnByUI(false);
+                setAlwaysOnVpn(false);
             }
             // Also dismiss and go back to VPN list
             finish();
@@ -187,14 +187,18 @@
         if (mUserId == UserHandle.USER_SYSTEM) {
             VpnUtils.clearLockdownVpn(getContext());
         }
-        final boolean success = mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
-                isEnabled ? mPackageName : null, /* lockdownEnabled */ false);
+        final boolean success = setAlwaysOnVpn(isEnabled);
         if (isEnabled && (!success || !isVpnAlwaysOn())) {
             CannotConnectFragment.show(this, mVpnLabel);
         }
         return success;
     }
 
+    private boolean setAlwaysOnVpn(boolean isEnabled) {
+         return mConnectivityManager.setAlwaysOnVpnPackageForUser(mUserId,
+                isEnabled ? mPackageName : null, /* lockdownEnabled */ false);
+    }
+
     private boolean checkTargetVersion() {
         if (mPackageInfo == null || mPackageInfo.applicationInfo == null) {
             return true;
