Merge "Fix crash when selecting Settings->Display->Brightness level."
diff --git a/res/layout-land/fingerprint_enroll_enrolling.xml b/res/layout-land/fingerprint_enroll_enrolling.xml
index 5c4e99b..b321519 100644
--- a/res/layout-land/fingerprint_enroll_enrolling.xml
+++ b/res/layout-land/fingerprint_enroll_enrolling.xml
@@ -66,14 +66,14 @@
                 android:layout_height="wrap_content">
 
                 <TextView
-                    style="@style/TextAppearance.FingerprintMessage"
+                    style="@style/SuwDescription.Glif"
                     android:id="@+id/start_message"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:text="@string/security_settings_fingerprint_enroll_start_message"/>
 
                 <TextView
-                    style="@style/TextAppearance.FingerprintMessage"
+                    style="@style/SuwDescription.Glif"
                     android:id="@+id/repeat_message"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
diff --git a/res/layout-land/fingerprint_enroll_find_sensor.xml b/res/layout-land/fingerprint_enroll_find_sensor.xml
index 3dadece..a43534f 100644
--- a/res/layout-land/fingerprint_enroll_find_sensor.xml
+++ b/res/layout-land/fingerprint_enroll_find_sensor.xml
@@ -65,7 +65,7 @@
                     android:layout_marginEnd="0dp" />
 
                 <TextView
-                    style="@style/TextAppearance.FingerprintMessage"
+                    style="@style/SuwDescription.Glif"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
diff --git a/res/layout-land/fingerprint_enroll_finish.xml b/res/layout-land/fingerprint_enroll_finish.xml
index 5fc0d73..ca1a2d2 100644
--- a/res/layout-land/fingerprint_enroll_finish.xml
+++ b/res/layout-land/fingerprint_enroll_finish.xml
@@ -42,14 +42,14 @@
 
             <TextView
                 android:id="@+id/message"
-                style="@style/TextAppearance.FingerprintMessage"
+                style="@style/SuwDescription.Glif"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/security_settings_fingerprint_enroll_finish_message"/>
 
             <TextView
                 android:id="@+id/message_secondary"
-                style="@style/TextAppearance.FingerprintMessage"
+                style="@style/SuwDescription.Glif"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/suw_description_glif_margin_top"
diff --git a/res/layout/choose_lock_generic_fingerprint_header.xml b/res/layout/choose_lock_generic_fingerprint_header.xml
index 6a107bf..a92b68f 100644
--- a/res/layout/choose_lock_generic_fingerprint_header.xml
+++ b/res/layout/choose_lock_generic_fingerprint_header.xml
@@ -18,9 +18,9 @@
     android:id="@+id/fingerprint_header_description"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:gravity="center_vertical"
-    android:minHeight="56dp"
     android:paddingStart="?android:attr/listPreferredItemPaddingStart"
     android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:paddingTop="@dimen/suw_description_glif_margin_top"
+    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
     android:text="@string/lock_settings_picker_fingerprint_message"
-    style="@style/FingerprintHeaderStyle" />
+    style="@style/SuwDescription.Glif" />
diff --git a/res/layout/fingerprint_enroll_enrolling_base.xml b/res/layout/fingerprint_enroll_enrolling_base.xml
index bd1e2c2..7f8eb1b 100644
--- a/res/layout/fingerprint_enroll_enrolling_base.xml
+++ b/res/layout/fingerprint_enroll_enrolling_base.xml
@@ -38,14 +38,14 @@
             android:layout_marginTop="@dimen/suw_description_glif_margin_top">
 
             <TextView
-                style="@style/TextAppearance.FingerprintMessage"
+                style="@style/SuwDescription.Glif"
                 android:id="@+id/start_message"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/security_settings_fingerprint_enroll_start_message"/>
 
             <TextView
-                style="@style/TextAppearance.FingerprintMessage"
+                style="@style/SuwDescription.Glif"
                 android:id="@+id/repeat_message"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index d38818b..60c8bc7 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -44,7 +44,7 @@
             android:clipChildren="false">
 
             <TextView
-                style="@style/TextAppearance.FingerprintMessage"
+                style="@style/SuwDescription.Glif"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/suw_description_glif_margin_top"
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index 99c96ad..db099c3 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -32,7 +32,7 @@
 
         <TextView
             android:id="@+id/message"
-            style="@style/TextAppearance.FingerprintMessage"
+            style="@style/SuwDescription.Glif"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/suw_description_glif_margin_top"
@@ -40,7 +40,7 @@
 
         <TextView
             android:id="@+id/message_secondary"
-            style="@style/TextAppearance.FingerprintMessage"
+            style="@style/SuwDescription.Glif"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/suw_description_glif_margin_top"
diff --git a/res/layout/setup_choose_lock_generic_fingerprint_header.xml b/res/layout/setup_choose_lock_generic_fingerprint_header.xml
index b19bec1..4c696f3 100644
--- a/res/layout/setup_choose_lock_generic_fingerprint_header.xml
+++ b/res/layout/setup_choose_lock_generic_fingerprint_header.xml
@@ -16,14 +16,11 @@
 -->
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:minHeight="56dp"
-        android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
-        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-        android:paddingTop="@dimen/suw_description_glif_margin_top"
-        android:text="@string/setup_lock_settings_picker_fingerprint_message"
-        android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
-        android:textAppearance="?android:attr/textAppearanceListItem" />
+    style="@style/SuwDescription.Glif"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:paddingTop="@dimen/suw_description_glif_margin_top"
+    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
+    android:text="@string/setup_lock_settings_picker_fingerprint_message" />
diff --git a/res/layout/setup_choose_lock_generic_header.xml b/res/layout/setup_choose_lock_generic_header.xml
index 9a3547d..8875e1f 100644
--- a/res/layout/setup_choose_lock_generic_header.xml
+++ b/res/layout/setup_choose_lock_generic_header.xml
@@ -16,14 +16,11 @@
 -->
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical"
-        android:minHeight="56dp"
-        android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
-        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-        android:paddingTop="@dimen/suw_description_glif_margin_top"
-        android:text="@string/setup_lock_settings_picker_message"
-        android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
-        android:textAppearance="?android:attr/textAppearanceListItem" />
+    style="@style/SuwDescription.Glif"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:paddingTop="@dimen/suw_description_glif_margin_top"
+    android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
+    android:text="@string/setup_lock_settings_picker_message" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d0a8bdd..9c2c964 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1612,8 +1612,6 @@
     <string name="wifi_starting">Turning Wi\u2011Fi on\u2026</string>
     <!-- Summary text when turning Wi-Fi or bluetooth off -->
     <string name="wifi_stopping">Turning off Wi\u2011Fi\u2026</string>
-    <!-- Title of Button to show all Wi-Fi networks in the picker. [CHAR LIMIT=30] -->
-    <string name="wifi_see_all_networks_button_title">See all networks</string>
     <!-- Summary text when Wi-Fi or bluetooth has error -->
     <string name="wifi_error">Error</string>
     <!-- Summary text when wifi SoftAP started failed due to no legal usable channel allowed in this region by regulatory -->
@@ -4454,6 +4452,8 @@
 
     <!-- Title for the background activity setting, which allows a user to control whether an app can run in the background [CHAR_LIMIT=40] -->
     <string name="background_activity_title">Background activity</string>
+    <!-- Summary for the background activity [CHAR_LIMIT=120] -->
+    <string name="background_activity_summary">Allow the app to run in the background</string>
     <!-- Summary for the background activity when it is on [CHAR_LIMIT=120] -->
     <string name="background_activity_summary_on">App can run in the background when not in use</string>
     <!-- Summary for the background activity when it is off [CHAR_LIMIT=120] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0cb2249..e9d25ff 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -319,22 +319,6 @@
         <item name="android:textSize">14sp</item>
     </style>
 
-    <style name="TextAppearance.FingerprintMessage"
-        parent="android:TextAppearance.Material.Subhead">
-        <item name="android:lineSpacingExtra">@dimen/suw_description_line_spacing_extra</item>
-    </style>
-
-    <style name="Button.FingerprintButton"
-        parent="android:Widget.Material.Button.Borderless">
-        <item name="android:lineSpacingExtra">@dimen/suw_description_line_spacing_extra</item>
-        <item name="android:textColor">?android:attr/colorAccent</item>
-    </style>
-
-    <style name="TextAppearance.FingerprintLink"
-           parent="TextAppearance.FingerprintMessage">
-        <item name="android:textColor">?android:attr/colorAccent</item>
-    </style>
-
     <style name="TextAppearance.FingerprintErrorText"
         parent="android:TextAppearance.Material.Body1">
         <item name="android:textColor">?android:attr/colorError</item>
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 93f06fa..e9204f9 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -139,10 +139,6 @@
     // should Next button only be enabled when we have a connection?
     private boolean mEnableNextOnConnection;
 
-    // should see all networks instead of collapsing networks and showing mSeeAllNetworksPreference.
-    private boolean mSeeAllNetworks;
-    private static final int NETWORKS_TO_INITIALLY_SHOW = 5;
-
     // Save the dialog details
     private int mDialogMode;
     private AccessPoint mDlgAccessPoint;
@@ -160,7 +156,6 @@
     private PreferenceCategory mAccessPointsPreferenceCategory;
     private PreferenceCategory mAdditionalSettingsPreferenceCategory;
     private Preference mAddPreference;
-    private Preference mSeeAllNetworksPreference;
     private Preference mConfigureWifiSettingsPreference;
     private Preference mSavedNetworksPreference;
     private LinkablePreference mStatusMessagePreference;
@@ -210,10 +205,6 @@
         mAddPreference = new Preference(prefContext);
         mAddPreference.setIcon(R.drawable.ic_menu_add_inset);
         mAddPreference.setTitle(R.string.wifi_add_network);
-        mSeeAllNetworksPreference = new Preference(prefContext);
-        mSeeAllNetworksPreference.setIcon(R.drawable.ic_arrow_down_24dp);
-        mSeeAllNetworksPreference.setTitle(R.string.wifi_see_all_networks_button_title);
-        mSeeAllNetworks = false;
         mStatusMessagePreference = new LinkablePreference(prefContext);
 
         mUserBadgeCache = new AccessPointPreference.UserBadgeCache(getPackageManager());
@@ -525,9 +516,6 @@
             }
         } else if (preference == mAddPreference) {
             onAddNetworkPressed();
-        } else if (preference == mSeeAllNetworksPreference) {
-            mSeeAllNetworks = true;
-            onAccessPointsChanged();
         } else {
             return super.onPreferenceTreeClick(preference);
         }
@@ -671,12 +659,8 @@
 
         int index =
                 configureConnectedAccessPointPreferenceCategory(accessPoints) ? 1 : 0;
-        boolean fewerNetworksThanLimit =
-                accessPoints.size() <= index + NETWORKS_TO_INITIALLY_SHOW;
-        int numAccessPointsToShow = mSeeAllNetworks || fewerNetworksThanLimit
-                ? accessPoints.size() : index + NETWORKS_TO_INITIALLY_SHOW;
-
-        for (; index < numAccessPointsToShow; index++) {
+        int numAccessPoints = accessPoints.size();
+        for (; index < numAccessPoints; index++) {
             AccessPoint accessPoint = accessPoints.get(index);
             // Ignore access points that are out of range.
             if (accessPoint.isReachable()) {
@@ -707,15 +691,8 @@
             }
         }
         removeCachedPrefs(mAccessPointsPreferenceCategory);
-        if (mSeeAllNetworks || fewerNetworksThanLimit) {
-            mAccessPointsPreferenceCategory.removePreference(mSeeAllNetworksPreference);
-            mAddPreference.setOrder(index);
-            mAccessPointsPreferenceCategory.addPreference(mAddPreference);
-        } else {
-            mAccessPointsPreferenceCategory.removePreference(mAddPreference);
-            mSeeAllNetworksPreference.setOrder(index);
-            mAccessPointsPreferenceCategory.addPreference(mSeeAllNetworksPreference);
-        }
+        mAddPreference.setOrder(index);
+        mAccessPointsPreferenceCategory.addPreference(mAddPreference);
         setConfigureWifiSettingsVisibility();
 
         if (!hasAvailableAccessPoints) {