diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 32ec381..49c6790 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -825,11 +825,14 @@
                 android:value="30" />
             <meta-data android:name="com.android.settings.title"
                 android:resource="@string/zen_mode_automation_suggestion_title" />
+            <meta-data android:name="com.android.settings.summary"
+                android:resource="@string/zen_mode_automation_suggestion_summary" />
         </activity>
 
         <activity android:name="Settings$WallpaperSuggestionActivity"
                 android:label="@string/wallpaper_settings_title"
                 android:exported="true"
+                android:icon="@drawable/ic_wallpaper"
                 android:taskAffinity="">
             <intent-filter android:priority="1">
                 <action android:name="android.intent.action.MAIN" />
@@ -839,6 +842,8 @@
                 android:value="com.android.settings.WallpaperTypeSettings" />
             <meta-data android:name="com.android.settings.title"
                 android:resource="@string/wallpaper_suggestion_title" />
+            <meta-data android:name="com.android.settings.summary"
+                android:resource="@string/wallpaper_suggestion_summary" />
         </activity>
 
         <activity android:name="Settings$ZenModeScheduleRuleSettingsActivity"
@@ -1553,6 +1558,8 @@
                 android:value="android.hardware.fingerprint" />
             <meta-data android:name="com.android.settings.title"
                 android:resource="@string/suggestion_additional_fingerprints" />
+            <meta-data android:name="com.android.settings.summary"
+                android:resource="@string/suggestion_additional_fingerprints_summary" />
         </activity>
 
         <activity android:name=".fingerprint.FingerprintSettings" android:exported="false"/>
@@ -2698,6 +2705,8 @@
                 android:value="10" />
             <meta-data android:name="com.android.settings.title"
                 android:resource="@string/wifi_calling_suggestion_title" />
+            <meta-data android:name="com.android.settings.summary"
+                android:resource="@string/wifi_calling_suggestion_summary" />
         </activity>
 
         <provider
diff --git a/res/drawable/ic_wallpaper.xml b/res/drawable/ic_wallpaper.xml
new file mode 100644
index 0000000..c46df83
--- /dev/null
+++ b/res/drawable/ic_wallpaper.xml
@@ -0,0 +1,25 @@
+<!--
+    Copyright (C) 2016 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24.0dp"
+        android:height="24.0dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0"
+        android:tint="?android:attr/colorAccent">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M4.0,4.0l7.0,0.0L11.0,2.0L4.0,2.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,7.0l2.0,0.0L4.0,4.0zm6.0,9.0l-4.0,5.0l12.0,0.0l-3.0,-4.0 -2.03,2.71L10.0,13.0zm7.0,-4.5c0.0,-0.83 -0.67,-1.5 -1.5,-1.5S14.0,7.67 14.0,8.5s0.67,1.5 1.5,1.5S17.0,9.33 17.0,8.5zM20.0,2.0l-7.0,0.0l0.0,2.0l7.0,0.0l0.0,7.0l2.0,0.0L22.0,4.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0zm0.0,18.0l-7.0,0.0l0.0,2.0l7.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0l0.0,-7.0l-2.0,0.0l0.0,7.0zM4.0,13.0L2.0,13.0l0.0,7.0c0.0,1.0 0.9,2.0 2.0,2.0l7.0,0.0l0.0,-2.0L4.0,20.0l0.0,-7.0z"/>
+</vector>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7e5a557..5f6327a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -162,19 +162,30 @@
     <!-- Description for the button that makes interface elements larger. [CHAR_LIMIT=NONE] -->
     <string name="font_size_make_larger_desc">Make larger</string>
 
-    <!-- Do not translate. label for font size preview.  Does not need to be translated. -->
+    <!-- Sample text for font size preview. -->
     <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string>
     <string name="font_size_preview_text_headline">Sample text</string>
-    <string name="font_size_preview_text_title">Twenty Thousand Leagues Under The Sea</string>
-    <string name="font_size_preview_text_subtitle">Chapter 23: The Coral Kingdom</string>
-    <string name="font_size_preview_text_body">
-    The next day I woke with my head singularly clear. To my great surprise, I was in my own room. My companions,
-    no doubt, had been reinstated in their cabin, without having perceived it any more than I. Of what had passed
-    during the night they were as ignorant as I was, and to penetrate this mystery I only reckoned upon the chances
-    of the future.\nI then thought of quitting my room. Was I free again or a prisoner? Quite free. I opened the door,
-    went to the half deck, went up the central stairs. The panels, shut the evening before, were open. I went on to
-    the platform.\nNed Land and Conseil waited there for me. I questioned them; they knew nothing. Lost in a heavy
-    sleep in which they had been totally unconscious, they had been astonished at finding themselves in their cabin.</string>
+    <string name="font_size_preview_text_title"
+            translation_description="Title text in sample text used to illustrate how the currently selected font size will appear to the user. NOTE: Translate manually. No not adopt any copyrighted material for translation.">
+        The Wonderful Wizard of Oz
+    </string>
+    <string name="font_size_preview_text_subtitle"
+            translation_description="Subtitle text in sample text used to illustrate how the currently selected font size will appear to the user. NOTE: Translate manually. No not adopt any copyrighted material for translation.">
+        Chapter 11: The Wonderful Emerald City of Oz</string>
+    <string name="font_size_preview_text_body"
+            translation_description="Text in sample text used to illustrate how the currently selected font size will appear to the user. NOTE: Translate manually. No not adopt any copyrighted material for translation.">
+        Even with eyes protected by the green spectacles Dorothy and her friends were at first dazzled by the brilliancy of the wonderful City.
+        The streets were lined with beautiful houses all built of green marble and studded everywhere with sparkling emeralds.
+        They walked over a pavement of the same green marble, and where the blocks were joined together were rows of emeralds, set closely, and glittering in the brighness of the sun.
+        The window panes were of green glass; even the sky above the City had a green tint, and the rays of the sun were green.
+        \n\nThere were many people, men, women and children, walking about, and these were all dressed in green clothes and had greenish skins.
+        They looked at Dorothy and her strangely assorted company with wondering eyes, and the children all ran away and hid behind their mothers when they saw the Lion; but no one spoke to them.
+        Many shops stood in the street, and Dorothy saw that everything in them was green.
+        Green candy and green pop-corn were offered for sale, as well as green shoes, green hats and green clothes of all sorts.
+        At one place a man was selling green lemonade, and when the children bought it Dorothy could see that they paid for it with green pennies.
+        \n\nThere seemed to be no horses nor animals of any kind; the men carried things around in little green carts, which they pushed before them.
+        Everyone seeemed happy and contented and prosperous.
+    </string>
     <!-- Button. Chosen when they want to save the chosen text size. -->
     <string name="font_size_save">OK</string>
 
@@ -1966,7 +1977,9 @@
     <!-- Wireless networks, item title to go into the WFC settings [CHAR LIMIT=30] -->
     <string name="wifi_calling_settings_title">Wi-Fi calling</string>
     <!-- Title of suggestion to turn on wifi calling [CHAR LIMIT=30] -->
-    <string name="wifi_calling_suggestion_title">Enable Wi-Fi Calling</string>
+    <string name="wifi_calling_suggestion_title">Turn on Wi-Fi Calling</string>
+    <!-- Summary of suggestion to turn on wifi calling [CHAR LIMIT=60] -->
+    <string name="wifi_calling_suggestion_summary">Use Wi-Fi instead of mobile network</string>
     <!-- WFC mode [CHAR LIMIT=30] -->
     <string name="wifi_calling_mode_title">Calling preference</string>
     <!-- WFC mode dialog [CHAR LIMIT=30] -->
@@ -2131,7 +2144,9 @@
     <!-- Wallpaper settings title [CHAR LIMIT=30] -->
     <string name="wallpaper_settings_title">Wallpaper</string>
     <!-- Wallpaper suggestion title [CHAR LIMIT=30] -->
-    <string name="wallpaper_suggestion_title">Set up wallpaper</string>
+    <string name="wallpaper_suggestion_title">Change wallpaper</string>
+    <!-- Wallpaper suggestion title [CHAR LIMIT=60] -->
+    <string name="wallpaper_suggestion_summary">Personalize your screen</string>
     <!-- Wallpaper settings fragment title [CHAR LIMIT=30] -->
     <string name="wallpaper_settings_fragment_title">Choose wallpaper from</string>
     <!-- Display settings screen, trigger for screen saver options -->
@@ -5866,7 +5881,10 @@
     <string name="zen_mode_automation_settings_title">Automatic rules</string>
 
     <!--  Do not disturb: Title for the zen mode automation option Suggestion. [CHAR LIMIT=30] -->
-    <string name="zen_mode_automation_suggestion_title">Set up Do Not Disturb Schedule</string>
+    <string name="zen_mode_automation_suggestion_title">Set Do Not Disturb Schedule</string>
+
+    <!--  Do not disturb: Summary for the zen mode automation option Suggestion. [CHAR LIMIT=30] -->
+    <string name="zen_mode_automation_suggestion_summary">Silence your device at certain times</string>
 
     <!--  Do not disturb: Zen mode option: Important interruptions [CHAR LIMIT=60] -->
     <string name="zen_mode_option_important_interruptions">Priority only</string>
@@ -5955,14 +5973,20 @@
     <string name="notification_importance_default">Normal: Silently show these notifications</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
-    <string name="notification_importance_high">High: Show at the top of the notifications list and make sound</string>
+    <string name="notification_importance_high">High: Show at the top of the notifications list and allow sound</string>
 
     <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
-    <string name="notification_importance_max">Urgent: Peek onto the screen and make sound</string>
+    <string name="notification_importance_max">Urgent: Peek onto the screen and allow sound</string>
 
     <!-- [CHAR LIMIT=60] Notification importance reset button -->
     <string name="importance_reset">Reset</string>
 
+    <!-- [CHAR LIMIT=40] Notification importance title -->
+    <string name="show_silently">Show silently</string>
+
+    <!-- [CHAR LIMIT=180] Notification importance summary -->
+    <string name="show_silently_summary">Don\'t make sound, vibrate, or peek these notifications into view on the current screen.</string>
+
     <!-- Default Apps > Default notification assistant -->
     <string name="default_notification_assistant">Notification assistant</string>
 
@@ -7177,7 +7201,10 @@
     <string name="lockpattern_settings_require_password_before_startup_summary">Require password to start up your device. While off, this device can\'t receive calls, messages, notifications, or alarms.</string>
 
     <!-- Title for suggestion adding more fingerprints [CHAR LIMIT=30] -->
-    <string name="suggestion_additional_fingerprints">Additional Fingerprints</string>
+    <string name="suggestion_additional_fingerprints">Add another fingerprint</string>
+
+    <!-- Summary for suggestion adding more fingerprints [CHAR LIMIT=60] -->
+    <string name="suggestion_additional_fingerprints_summary">Unlock with a different fingerprint</string>
 
     <!-- Summary of battery saver when on [CHAR LIMIT=NONE] -->
     <string name="battery_saver_on_summary">On / <xliff:g name="automatic_state" example="Never turn on automatically">%1$s</xliff:g></string>
diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml
index 1a2584a..37c4426 100644
--- a/res/xml/app_notification_settings.xml
+++ b/res/xml/app_notification_settings.xml
@@ -19,31 +19,44 @@
         android:key="app_notification_settings">
 
     <!-- Importance -->
+    <!-- Block -->
+    <com.android.settingslib.RestrictedSwitchPreference
+            android:key="block"
+            android:title="@string/app_notification_block_title"
+            android:summary="@string/app_notification_block_summary"
+            android:order="2" />
+    <!-- Silent -->
+    <com.android.settingslib.RestrictedSwitchPreference
+            android:key="silent"
+            android:title="@string/show_silently"
+            android:summary="@string/show_silently_summary"
+            android:order="3" />
+    <!-- Slider -->
     <com.android.settingslib.RestrictedPreference
             android:key="importance_title"
             android:title="@string/notification_importance_title"
-            android:order="2" />
+            android:order="4"/>
     <com.android.settings.notification.ImportanceSeekBarPreference
             android:key="importance"
-            android:order="3"/>
+            android:order="5"/>
 
     <com.android.settings.applications.LayoutPreference
             android:key="importance_reset_button"
             android:layout="@layout/two_buttons_panel"
-            android:order="4" />
+            android:order="6" />
 
     <!-- Sensitive -->
     <com.android.settingslib.RestrictedSwitchPreference
             android:key="sensitive"
             android:title="@string/app_notification_sensitive_title"
             android:summary="@string/app_notification_sensitive_summary"
-            android:order="5" />
+            android:order="7" />
 
     <!-- Bypass DND -->
     <com.android.settingslib.RestrictedSwitchPreference
             android:key="bypass_dnd"
             android:title="@string/app_notification_override_dnd_title"
             android:summary="@string/app_notification_override_dnd_summary"
-            android:order="6" />
+            android:order="8" />
 
 </PreferenceScreen>
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 1720a6b..068d534 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -821,13 +821,15 @@
                 mBtHciSnoopLog.isChecked() ? 1 : 0);
     }
 
-    private void writeWebViewProviderOptions(Object newValue) {
+    private boolean writeWebViewProviderOptions(Object newValue) {
         try {
-            mWebViewUpdateService.changeProviderAndSetting(
+            String updatedProvider = mWebViewUpdateService.changeProviderAndSetting(
                     newValue == null ? "" : newValue.toString());
             updateWebViewProviderOptions();
+            return newValue != null && newValue.equals(updatedProvider);
         } catch(RemoteException e) {
         }
+        return false;
     }
 
     private void writeDebuggerOptions() {
@@ -1942,18 +1944,6 @@
         return false;
     }
 
-    private void enableAndSetWebViewPackage(String packageName) {
-        getActivity().getPackageManager().setApplicationEnabledSetting(packageName,
-                PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
-        mWebViewProvider.setValue(packageName);
-        writeWebViewProviderOptions(packageName);
-    }
-
-    private void showEnableWebViewProviderAlert(final String packageName) {
-        EnableWebViewProviderDialogFragment.newInstance(packageName).show(
-                getChildFragmentManager(), EnableWebViewProviderDialogFragment.TAG);
-    }
-
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
         if (HDCP_CHECKING_KEY.equals(preference.getKey())) {
@@ -1966,19 +1956,15 @@
                 Log.e(TAG, "Tried to set a null WebView provider");
                 return false;
             }
-            String newWebViewPackageName = (String) newValue;
-            if (isPackageEnabled(newWebViewPackageName)) {
-                writeWebViewProviderOptions(newValue);
+            if (writeWebViewProviderOptions(newValue)) {
                 return true;
+            } else {
+                // The user chose a package that became invalid since the list was last updated,
+                // show a Toast to explain the situation.
+                Toast toast = Toast.makeText(getActivity(),
+                        R.string.select_webview_provider_toast_text, Toast.LENGTH_SHORT);
+                toast.show();
             }
-            // Package is disabled or uninstalled, if it is simply disabled, check if the user wants
-            // to enable it
-            if (isPackageInstalled(getActivity(), newWebViewPackageName)) {
-                showEnableWebViewProviderAlert(newWebViewPackageName);
-                return false;
-            }
-            // Package has been uninstalled (could happen if the package was uninstalled between
-            // opening and closing the setting).
             return false;
         } else if (preference == mLogdSize) {
             writeLogdSizeOption(newValue);
@@ -2137,36 +2123,6 @@
         }
     }
 
-    public static class EnableWebViewProviderDialogFragment extends DialogFragment {
-        public static final String TAG = "EnableWebViewProviderDialogFragment";
-        private static final String PACKAGE_NAME_TAG = "packageName";
-
-        public static EnableWebViewProviderDialogFragment newInstance(String packageName) {
-            EnableWebViewProviderDialogFragment fragment
-                = new EnableWebViewProviderDialogFragment();
-            Bundle args = new Bundle();
-            args.putString(PACKAGE_NAME_TAG, packageName);
-            fragment.setArguments(args);
-            return fragment;
-        }
-
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            final String packageName = getArguments().getString(PACKAGE_NAME_TAG);
-
-            return new AlertDialog.Builder(getActivity())
-                .setMessage(R.string.select_webview_provider_confirmation_text)
-                .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialog, int id) {
-                        ((DevelopmentSettings)getParentFragment()).enableAndSetWebViewPackage(
-                            packageName);
-                    }
-                })
-                .setNegativeButton(android.R.string.cancel, null)
-                .create();
-        }
-    }
-
 
     /**
      * For Search.
diff --git a/src/com/android/settings/DeviceAdminSettings.java b/src/com/android/settings/DeviceAdminSettings.java
index 3adce15..ed68119 100644
--- a/src/com/android/settings/DeviceAdminSettings.java
+++ b/src/com/android/settings/DeviceAdminSettings.java
@@ -18,6 +18,7 @@
 
 import android.app.Activity;
 import android.app.AlertDialog;
+import android.app.AppGlobals;
 import android.app.ListFragment;
 import android.app.admin.DeviceAdminInfo;
 import android.app.admin.DeviceAdminReceiver;
@@ -27,11 +28,15 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
+import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.util.Log;
@@ -356,7 +361,7 @@
                             resolveInfo.activityInfo.name);
             if (alreadyAddedComponents == null
                     || !alreadyAddedComponents.contains(riComponentName)) {
-                DeviceAdminInfo deviceAdminInfo =  createDeviceAdminInfo(resolveInfo);
+                DeviceAdminInfo deviceAdminInfo =  createDeviceAdminInfo(resolveInfo.activityInfo);
                 // add only visible ones (note: active admins are added regardless of visibility)
                 if (deviceAdminInfo != null && deviceAdminInfo.isVisible()) {
                     if (!deviceAdminInfo.getActivityInfo().applicationInfo.isInternal()) {
@@ -383,27 +388,31 @@
             final int profileId) {
         if (activeAdmins != null) {
             final PackageManager packageManager = getActivity().getPackageManager();
+            final IPackageManager iPackageManager = AppGlobals.getPackageManager();
             final int n = activeAdmins.size();
             for (int i = 0; i < n; ++i) {
-                ComponentName activeAdmin = activeAdmins.get(i);
-                List<ResolveInfo> resolved = packageManager.queryBroadcastReceiversAsUser(
-                        new Intent().setComponent(activeAdmin), PackageManager.GET_META_DATA
-                                | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, profileId);
-                if (resolved != null) {
-                    final int resolvedMax = resolved.size();
-                    for (int j = 0; j < resolvedMax; ++j) {
-                        DeviceAdminInfo deviceAdminInfo = createDeviceAdminInfo(resolved.get(j));
-                        if (deviceAdminInfo != null) {
-                            // Don't do the applicationInfo.isInternal() check here; if an active
-                            // admin is already on SD card, just show it.
-                            DeviceAdminListItem item = new DeviceAdminListItem();
-                            item.info = deviceAdminInfo;
-                            item.name = deviceAdminInfo.loadLabel(packageManager).toString();
-                            item.active = true;
-                            mAdmins.add(item);
-                        }
-                    }
+                final ComponentName activeAdmin = activeAdmins.get(i);
+                final ActivityInfo ai;
+                try {
+                    ai = iPackageManager.getReceiverInfo(activeAdmin,
+                            PackageManager.GET_META_DATA |
+                            PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
+                            PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE, profileId);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "Unable to load component: " + activeAdmin);
+                    continue;
                 }
+                final DeviceAdminInfo deviceAdminInfo = createDeviceAdminInfo(ai);
+                if (deviceAdminInfo == null) {
+                    continue;
+                }
+                // Don't do the applicationInfo.isInternal() check here; if an active
+                // admin is already on SD card, just show it.
+                final DeviceAdminListItem item = new DeviceAdminListItem();
+                item.info = deviceAdminInfo;
+                item.name = deviceAdminInfo.loadLabel(packageManager).toString();
+                item.active = true;
+                mAdmins.add(item);
             }
         }
     }
@@ -412,16 +421,14 @@
      * Creates a device admin info object for the resolved intent that points to the component of
      * the device admin.
      *
-     * @param resolved resolved intent.
+     * @param ai ActivityInfo for the admin component.
      * @return new {@link DeviceAdminInfo} object or null if there was an error.
      */
-    private DeviceAdminInfo createDeviceAdminInfo(ResolveInfo resolved) {
+    private DeviceAdminInfo createDeviceAdminInfo(ActivityInfo ai) {
         try {
-            return new DeviceAdminInfo(getActivity(), resolved);
-        } catch (XmlPullParserException e) {
-            Log.w(TAG, "Skipping " + resolved.activityInfo, e);
-        } catch (IOException e) {
-            Log.w(TAG, "Skipping " + resolved.activityInfo, e);
+            return new DeviceAdminInfo(getActivity(), ai);
+        } catch (XmlPullParserException|IOException e) {
+            Log.w(TAG, "Skipping " + ai, e);
         }
         return null;
     }
diff --git a/src/com/android/settings/UserCredentialsSettings.java b/src/com/android/settings/UserCredentialsSettings.java
index 41bcf43..e688450 100644
--- a/src/com/android/settings/UserCredentialsSettings.java
+++ b/src/com/android/settings/UserCredentialsSettings.java
@@ -27,8 +27,13 @@
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.os.RemoteException;
 import android.security.Credentials;
+import android.security.IKeyChainService;
+import android.security.KeyChain;
+import android.security.KeyChain.KeyChainConnection;
 import android.security.KeyStore;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -120,21 +125,49 @@
                     .setNegativeButton(R.string.trusted_credentials_remove_label,
                             new DialogInterface.OnClickListener() {
                                 @Override public void onClick(DialogInterface dialog, int id) {
-                                    final KeyStore ks = KeyStore.getInstance();
-                                    Credentials.deleteAllTypesForAlias(ks, item.alias);
+                                    new RemoveCredentialsTask(getContext(), getTargetFragment())
+                                            .execute(item.alias);
                                     dialog.dismiss();
                                 }
                             })
                     .create();
         }
 
-        @Override
-        public void onDismiss(DialogInterface dialog) {
-            final Fragment target = getTargetFragment();
-            if (target instanceof UserCredentialsSettings) {
-                ((UserCredentialsSettings) target).refreshItems();
+        private class RemoveCredentialsTask extends AsyncTask<String, Void, Void> {
+            private Context context;
+            private Fragment targetFragment;
+
+            public RemoveCredentialsTask(Context context, Fragment targetFragment) {
+                this.context = context;
+                this.targetFragment = targetFragment;
             }
-            super.onDismiss(dialog);
+
+            @Override
+            protected Void doInBackground(String... aliases) {
+                try {
+                    final KeyChainConnection conn = KeyChain.bind(getContext());
+                    try {
+                        IKeyChainService keyChain = conn.getService();
+                        for (String alias : aliases) {
+                            keyChain.removeKeyPair(alias);
+                        }
+                    } catch (RemoteException e) {
+                        Log.w(TAG, "Removing credentials", e);
+                    } finally {
+                        conn.close();
+                    }
+                } catch (InterruptedException e) {
+                    Log.w(TAG, "Connecting to keychain", e);
+                }
+                return null;
+            }
+
+            @Override
+            protected void onPostExecute(Void result) {
+                if (targetFragment instanceof UserCredentialsSettings) {
+                    ((UserCredentialsSettings) targetFragment).refreshItems();
+                }
+            }
         }
     }
 
diff --git a/src/com/android/settings/applications/DefaultEmergencyPreference.java b/src/com/android/settings/applications/DefaultEmergencyPreference.java
index 2a37633..1d23263 100644
--- a/src/com/android/settings/applications/DefaultEmergencyPreference.java
+++ b/src/com/android/settings/applications/DefaultEmergencyPreference.java
@@ -111,11 +111,9 @@
                 continue;
             }
 
-            // Get earliest installed app, but prioritize system apps.
-            if (bestMatch == null
-                    || !isSystemApp(bestMatch) && isSystemApp(packageInfo)
-                    || isSystemApp(bestMatch) == isSystemApp(packageInfo)
-                    && bestMatch.firstInstallTime > packageInfo.firstInstallTime) {
+            // Get earliest installed system app.
+            if (isSystemApp(packageInfo) && (bestMatch == null ||
+                    bestMatch.firstInstallTime > packageInfo.firstInstallTime)) {
                 bestMatch = packageInfo;
             }
         }
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index a8f0fd0..0e47547 100755
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -65,6 +65,7 @@
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.webkit.IWebViewUpdateService;
 import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.TextView;
@@ -258,6 +259,16 @@
             enabled = false;
         }
 
+        try {
+            IWebViewUpdateService webviewUpdateService =
+                IWebViewUpdateService.Stub.asInterface(ServiceManager.getService("webviewupdate"));
+            if (webviewUpdateService.isFallbackPackage(mAppEntry.info.packageName)) {
+                enabled = false;
+            }
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+
         mUninstallButton.setEnabled(enabled);
         if (enabled) {
             // Register listener
diff --git a/src/com/android/settings/applications/ResetAppsHelper.java b/src/com/android/settings/applications/ResetAppsHelper.java
index 5d87204..ddcb244 100644
--- a/src/com/android/settings/applications/ResetAppsHelper.java
+++ b/src/com/android/settings/applications/ResetAppsHelper.java
@@ -30,6 +30,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.UserHandle;
+import android.webkit.IWebViewUpdateService;
 
 import com.android.settings.R;
 
@@ -46,6 +47,7 @@
     private final PackageManager mPm;
     private final IPackageManager mIPm;
     private final INotificationManager mNm;
+    private final IWebViewUpdateService mWvus;
     private final NetworkPolicyManager mNpm;
     private final AppOpsManager mAom;
     private final Context mContext;
@@ -58,6 +60,7 @@
         mIPm = IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
         mNm = INotificationManager.Stub.asInterface(
                 ServiceManager.getService(Context.NOTIFICATION_SERVICE));
+        mWvus = IWebViewUpdateService.Stub.asInterface(ServiceManager.getService("webviewupdate"));
         mNpm = NetworkPolicyManager.from(context);
         mAom = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
     }
@@ -118,7 +121,8 @@
                     }
                     if (!app.enabled) {
                         if (mPm.getApplicationEnabledSetting(app.packageName)
-                                == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER) {
+                                == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER
+                                && !isNonEnableableFallback(app.packageName)) {
                             mPm.setApplicationEnabledSetting(app.packageName,
                                     PackageManager.COMPONENT_ENABLED_STATE_DEFAULT,
                                     PackageManager.DONT_KILL_APP);
@@ -142,4 +146,12 @@
             }
         });
     }
+
+    private boolean isNonEnableableFallback(String packageName) {
+        try {
+            return mWvus.isFallbackPackage(packageName);
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+    }
 }
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 9aa14fc..7db915f 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -496,8 +496,9 @@
 
         @Override
         public void setListening(boolean listening) {
+            BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter();
+            if (defaultAdapter == null) return;
             if (listening) {
-                BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter();
                 mEnabled = defaultAdapter.isEnabled();
                 mConnected =
                         defaultAdapter.getConnectionState() == BluetoothAdapter.STATE_CONNECTED;
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index 8f30f59..f04cf2f 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -26,23 +26,15 @@
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.service.notification.NotificationListenerService.Ranking;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.Preference.OnPreferenceChangeListener;
-import android.support.v7.preference.Preference.OnPreferenceClickListener;
-import android.support.v7.preference.PreferenceCategory;
 import android.util.ArrayMap;
 import android.util.Log;
 
-import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.AppHeader;
 import com.android.settings.R;
-import com.android.settings.Utils;
-import com.android.settings.applications.AppInfoBase;
 import com.android.settings.applications.LayoutPreference;
 import com.android.settings.notification.NotificationBackend.AppRow;
-import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.RestrictedSwitchPreference;
 import com.android.settingslib.RestrictedPreference;
 
@@ -86,6 +78,8 @@
                 (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BYPASS_DND);
         mSensitive =
                 (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_SENSITIVE);
+        mBlock = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BLOCK);
+        mSilent = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_SILENT);
 
         mAppRow = mBackend.loadAppRow(mPm, mPkgInfo);
 
@@ -98,7 +92,7 @@
         rows.put(mAppRow.pkg, mAppRow);
         collectConfigActivities(rows);
 
-        setupImportancePrefs(mAppRow.systemApp, mAppRow.appImportance);
+        setupImportancePrefs(mAppRow.systemApp, mAppRow.appImportance, mAppRow.banned);
         setupPriorityPref(mAppRow.appBypassDnd);
         setupSensitivePref(mAppRow.appSensitive);
         updateDependents(mAppRow.appImportance);
@@ -111,9 +105,13 @@
         final boolean lockscreenNotificationsEnabled = getLockscreenNotificationsEnabled();
         final boolean allowPrivate = getLockscreenAllowPrivateNotifications();
 
-        setVisible(mPriority, checkCanBeVisible(Ranking.IMPORTANCE_DEFAULT, importance)
+        if (getPreferenceScreen().findPreference(mBlock.getKey()) != null) {
+            setVisible(mSilent, checkCanBeVisible(Ranking.IMPORTANCE_LOW, importance));
+            mSilent.setChecked(importance == Ranking.IMPORTANCE_DEFAULT);
+        }
+        setVisible(mPriority, checkCanBeVisible(Ranking.IMPORTANCE_LOW, importance)
                 && !mDndVisualEffectsSuppressed);
-        setVisible(mSensitive, checkCanBeVisible(Ranking.IMPORTANCE_LOW, importance)
+        setVisible(mSensitive, checkCanBeVisible(Ranking.IMPORTANCE_HIGH, importance)
                 && lockscreenSecure && lockscreenNotificationsEnabled && allowPrivate);
     }
 
@@ -121,7 +119,7 @@
         if (importance == Ranking.IMPORTANCE_UNSPECIFIED) {
             return true;
         }
-        return importance > minImportanceVisible;
+        return importance >= minImportanceVisible;
     }
 
     private boolean getLockscreenNotificationsEnabled() {
diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java
index a58edf7..895d38d 100644
--- a/src/com/android/settings/notification/NotificationSettingsBase.java
+++ b/src/com/android/settings/notification/NotificationSettingsBase.java
@@ -46,12 +46,15 @@
 abstract public class NotificationSettingsBase extends SettingsPreferenceFragment {
     private static final String TAG = "NotifiSettingsBase";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+    private static final String TUNER_SETTING = "show_importance_slider";
 
     protected static final String KEY_BYPASS_DND = "bypass_dnd";
     protected static final String KEY_SENSITIVE = "sensitive";
     protected static final String KEY_IMPORTANCE = "importance";
     protected static final String KEY_IMPORTANCE_TITLE = "importance_title";
     protected static final String KEY_IMPORTANCE_RESET = "importance_reset_button";
+    protected static final String KEY_BLOCK = "block";
+    protected static final String KEY_SILENT = "silent";
 
     protected PackageManager mPm;
     protected final NotificationBackend mBackend = new NotificationBackend();
@@ -66,7 +69,10 @@
     protected LayoutPreference mImportanceReset;
     protected RestrictedSwitchPreference mPriority;
     protected RestrictedSwitchPreference mSensitive;
+    protected RestrictedSwitchPreference mBlock;
+    protected RestrictedSwitchPreference mSilent;
     protected EnforcedAdmin mSuspendedAppsAdmin;
+    protected boolean mShowSlider = false;
 
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
@@ -119,6 +125,7 @@
 
         mSuspendedAppsAdmin = RestrictedLockUtils.checkIfApplicationIsSuspended(
                 mContext, mPkg, mUserId);
+        mShowSlider = Settings.Secure.getInt(getContentResolver(), TUNER_SETTING, 0) == 1;
     }
 
     @Override
@@ -143,54 +150,94 @@
         if (mImportanceTitle != null) {
             mImportanceTitle.setDisabledByAdmin(mSuspendedAppsAdmin);
         }
+        if (mBlock != null) {
+            mBlock.setDisabledByAdmin(mSuspendedAppsAdmin);
+        }
+        if (mSilent != null) {
+            mSilent.setDisabledByAdmin(mSuspendedAppsAdmin);
+        }
     }
 
-    protected void setupImportancePrefs(boolean isSystemApp, int importance) {
-        mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
-        mImportanceTitle.setDisabledByAdmin(mSuspendedAppsAdmin);
-        if (importance == Ranking.IMPORTANCE_UNSPECIFIED) {
-            mImportance.setVisible(false);
-            mImportanceReset.setVisible(false);
-            mImportanceTitle.setOnPreferenceClickListener(showEditableImportance);
-        } else {
-            mImportanceTitle.setOnPreferenceClickListener(null);
-        }
-
-        mImportanceTitle.setSummary(getProgressSummary(importance));
-        mImportance.setSystemApp(isSystemApp);
-        mImportance.setMinimumProgress(
-                isSystemApp ? Ranking.IMPORTANCE_LOW : Ranking.IMPORTANCE_NONE);
-        mImportance.setMax(Ranking.IMPORTANCE_MAX);
-        mImportance.setProgress(importance);
-        mImportance.setCallback(new ImportanceSeekBarPreference.Callback() {
-            @Override
-            public void onImportanceChanged(int progress) {
-                mBackend.setImportance(mPkg, mUid, progress);
-                mImportanceTitle.setSummary(getProgressSummary(progress));
-                updateDependents(progress);
-            }
-        });
-
-        Button button = (Button) mImportanceReset.findViewById(R.id.left_button);
-        button.setText(R.string.importance_reset);
-        button.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (mSuspendedAppsAdmin != null) {
-                    RestrictedLockUtils.sendShowAdminSupportDetailsIntent(
-                            getActivity(), mSuspendedAppsAdmin);
-                    return;
-                }
-
-                mBackend.setImportance(mPkg, mUid, Ranking.IMPORTANCE_UNSPECIFIED);
-                mImportanceReset.setVisible(false);
+    protected void setupImportancePrefs(boolean isSystemApp, int importance, boolean banned) {
+        if (mShowSlider) {
+            setVisible(mBlock, false);
+            setVisible(mSilent, false);
+            mImportance.setDisabledByAdmin(mSuspendedAppsAdmin);
+            mImportanceTitle.setDisabledByAdmin(mSuspendedAppsAdmin);
+            if (importance == Ranking.IMPORTANCE_UNSPECIFIED) {
                 mImportance.setVisible(false);
+                mImportanceReset.setVisible(false);
                 mImportanceTitle.setOnPreferenceClickListener(showEditableImportance);
-                mImportanceTitle.setSummary(getProgressSummary(Ranking.IMPORTANCE_UNSPECIFIED));
-                updateDependents(Ranking.IMPORTANCE_UNSPECIFIED);
+            } else {
+                mImportanceTitle.setOnPreferenceClickListener(null);
             }
-        });
-        mImportanceReset.findViewById(R.id.right_button).setVisibility(View.INVISIBLE);
+
+            mImportanceTitle.setSummary(getProgressSummary(importance));
+            mImportance.setSystemApp(isSystemApp);
+            mImportance.setMinimumProgress(
+                    isSystemApp ? Ranking.IMPORTANCE_LOW : Ranking.IMPORTANCE_NONE);
+            mImportance.setMax(Ranking.IMPORTANCE_MAX);
+            mImportance.setProgress(importance);
+            mImportance.setCallback(new ImportanceSeekBarPreference.Callback() {
+                @Override
+                public void onImportanceChanged(int progress) {
+                    mBackend.setImportance(mPkg, mUid, progress);
+                    mImportanceTitle.setSummary(getProgressSummary(progress));
+                    updateDependents(progress);
+                }
+            });
+
+            Button button = (Button) mImportanceReset.findViewById(R.id.left_button);
+            button.setText(R.string.importance_reset);
+            button.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (mSuspendedAppsAdmin != null) {
+                        RestrictedLockUtils.sendShowAdminSupportDetailsIntent(
+                                getActivity(), mSuspendedAppsAdmin);
+                        return;
+                    }
+
+                    mBackend.setImportance(mPkg, mUid, Ranking.IMPORTANCE_UNSPECIFIED);
+                    mImportanceReset.setVisible(false);
+                    mImportance.setVisible(false);
+                    mImportanceTitle.setOnPreferenceClickListener(showEditableImportance);
+                    mImportanceTitle.setSummary(getProgressSummary(Ranking.IMPORTANCE_UNSPECIFIED));
+                    updateDependents(Ranking.IMPORTANCE_UNSPECIFIED);
+                }
+            });
+            mImportanceReset.findViewById(R.id.right_button).setVisibility(View.INVISIBLE);
+        } else {
+            setVisible(mImportance, false);
+            setVisible(mImportanceReset, false);
+            setVisible(mImportanceTitle, false);
+            boolean blocked = importance == Ranking.IMPORTANCE_NONE || banned;
+            mBlock.setChecked(blocked);
+            mBlock.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+                @Override
+                public boolean onPreferenceChange(Preference preference, Object newValue) {
+                    final boolean blocked = (Boolean) newValue;
+                    final int importance =
+                            blocked ? Ranking.IMPORTANCE_NONE :Ranking.IMPORTANCE_UNSPECIFIED;
+                    mBackend.setImportance(mPkgInfo.packageName, mUid, importance);
+                    updateDependents(importance);
+                    return true;
+                }
+            });
+
+            mSilent.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
+                @Override
+                public boolean onPreferenceChange(Preference preference, Object newValue) {
+                    final boolean silenced = (Boolean) newValue;
+                    final int importance =
+                            silenced ? Ranking.IMPORTANCE_DEFAULT : Ranking.IMPORTANCE_UNSPECIFIED;
+                    mBackend.setImportance(mPkgInfo.packageName, mUid, importance);
+                    updateDependents(importance);
+                    return true;
+                }
+            });
+            updateDependents(banned ? Ranking.IMPORTANCE_NONE : importance);
+        }
     }
 
     private String getProgressSummary(int progress) {
