Merge "Set min height of zen radio button to 48dp"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1b4304b..cc7f909 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3044,6 +3044,9 @@
 
         <activity
             android:name=".wifi.dpp.WifiDppConfiguratorActivity"/>
+
+        <activity android:name=".homepage.contextualcards.ContextualCardFeedbackDialog"
+                  android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert" />
         <!-- This is the longest AndroidManifest.xml ever. -->
     </application>
 </manifest>
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index 1a69b13..efbb2c6 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -169,6 +169,22 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="  &lt;color name=&quot;homepage_accessibility_background&quot;>#783BE5&lt;/color>"
+        errorLine2="  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values-night/colors.xml"
+            line="22"
+            column="3"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="    &lt;color name=&quot;material_empty_color_light&quot;>#FFCED7DB&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -185,6 +201,22 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="  &lt;color name=&quot;homepage_support_background&quot;>#3F5FBD&lt;/color>"
+        errorLine2="  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values-night/colors.xml"
+            line="23"
+            column="3"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="    &lt;color name=&quot;bluetooth_dialog_text_color&quot;>#8a000000&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -937,27 +969,11 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="    &lt;color name=&quot;status_bar_color&quot;>#3c3c3c&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="99"
-            column="5"/>
-    </issue>
-
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="    &lt;color name=&quot;shortcut_background&quot;>#fff5f5f5&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="102"
+            line="100"
             column="5"/>
     </issue>
 
@@ -973,23 +989,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="105"
-            column="5"/>
-    </issue>
-
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="    &lt;color name=&quot;fallback_tintColor&quot;>#89000000&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="108"
+            line="103"
             column="5"/>
     </issue>
 
@@ -1005,7 +1005,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="111"
+            line="106"
             column="5"/>
     </issue>
 
@@ -1021,7 +1021,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="112"
+            line="107"
             column="5"/>
     </issue>
 
@@ -1037,7 +1037,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="115"
+            line="110"
             column="5"/>
     </issue>
 
@@ -1053,7 +1053,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="116"
+            line="111"
             column="5"/>
     </issue>
 
@@ -1069,7 +1069,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="117"
+            line="112"
             column="5"/>
     </issue>
 
@@ -1085,7 +1085,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="118"
+            line="113"
             column="5"/>
     </issue>
 
@@ -1101,7 +1101,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="119"
+            line="114"
             column="5"/>
     </issue>
 
@@ -1117,7 +1117,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="120"
+            line="115"
             column="5"/>
     </issue>
 
@@ -1133,7 +1133,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="121"
+            line="116"
             column="5"/>
     </issue>
 
@@ -1149,7 +1149,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="122"
+            line="117"
             column="5"/>
     </issue>
 
@@ -1165,7 +1165,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="123"
+            line="118"
             column="5"/>
     </issue>
 
@@ -1177,11 +1177,11 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="    &lt;color name=&quot;homepage_accessibility_background&quot;>#783BE5&lt;/color>"
+        errorLine1="    &lt;color name=&quot;homepage_accessibility_background&quot;>#5011C1&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="124"
+            line="119"
             column="5"/>
     </issue>
 
@@ -1197,7 +1197,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="125"
+            line="120"
             column="5"/>
     </issue>
 
@@ -1209,11 +1209,11 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="    &lt;color name=&quot;homepage_support_background&quot;>#3F5FBD&lt;/color>"
+        errorLine1="    &lt;color name=&quot;homepage_support_background&quot;>#26459C&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="126"
+            line="121"
             column="5"/>
     </issue>
 
@@ -1229,7 +1229,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="127"
+            line="122"
             column="5"/>
     </issue>
 
@@ -1245,7 +1245,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="128"
+            line="123"
             column="5"/>
     </issue>
 
@@ -1261,7 +1261,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="129"
+            line="124"
             column="5"/>
     </issue>
 
@@ -1277,7 +1277,23 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="130"
+            line="125"
+            column="5"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="    &lt;color name=&quot;homepage_card_stroke_color&quot;>#1f000000&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="126"
             column="5"/>
     </issue>
 
@@ -1293,7 +1309,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="134"
+            line="130"
             column="5"/>
     </issue>
 
@@ -1309,7 +1325,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="139"
+            line="135"
             column="5"/>
     </issue>
 
@@ -1325,7 +1341,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="140"
+            line="136"
             column="5"/>
     </issue>
 
@@ -1341,7 +1357,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="141"
+            line="137"
             column="5"/>
     </issue>
 
@@ -1357,7 +1373,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="142"
+            line="138"
             column="5"/>
     </issue>
 
@@ -1373,7 +1389,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="143"
+            line="139"
             column="5"/>
     </issue>
 
@@ -1389,7 +1405,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="144"
+            line="140"
             column="5"/>
     </issue>
 
@@ -1405,7 +1421,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="147"
+            line="143"
             column="5"/>
     </issue>
 
@@ -1421,7 +1437,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="148"
+            line="144"
             column="5"/>
     </issue>
 
@@ -1437,7 +1453,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="149"
+            line="145"
             column="5"/>
     </issue>
 
@@ -1453,7 +1469,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="150"
+            line="146"
             column="5"/>
     </issue>
 
@@ -1469,7 +1485,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="151"
+            line="147"
             column="5"/>
     </issue>
 
@@ -1801,6 +1817,22 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="                android:color=&quot;@color/homepage_accessibility_background&quot; />"
+        errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/drawable/ic_homepage_accessibility.xml"
+            line="23"
+            column="17"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="                android:color=&quot;@color/homepage_accounts_background&quot; />"
         errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -2009,6 +2041,22 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="                android:color=&quot;@color/homepage_support_background&quot; />"
+        errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/drawable/ic_homepage_support.xml"
+            line="23"
+            column="17"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="                android:color=&quot;@color/homepage_system_background&quot; />"
         errorLine2="                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -2621,7 +2669,7 @@
         errorLine2="                                   ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/strings.xml"
-            line="5902"
+            line="5907"
             column="36"/>
     </issue>
 
@@ -2637,7 +2685,7 @@
         errorLine2="                                        ^">
         <location
             file="res/values/styles.xml"
-            line="179"
+            line="174"
             column="41"/>
     </issue>
 
@@ -2653,7 +2701,7 @@
         errorLine2="                                           ^">
         <location
             file="res/values/styles.xml"
-            line="448"
+            line="427"
             column="44"/>
     </issue>
 
@@ -2669,7 +2717,7 @@
         errorLine2="                                           ^">
         <location
             file="res/values/styles.xml"
-            line="454"
+            line="433"
             column="44"/>
     </issue>
 
@@ -2685,7 +2733,7 @@
         errorLine2="                                           ^">
         <location
             file="res/values/styles.xml"
-            line="455"
+            line="434"
             column="44"/>
     </issue>
 
@@ -2697,6 +2745,22 @@
         priority="4"
         summary="Using hardcoded color"
         explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+        errorLine1="        &lt;item name=&quot;strokeColor&quot;>@color/homepage_card_stroke_color&lt;/item>"
+        errorLine2="                                 ^">
+        <location
+            file="res/values/styles.xml"
+            line="461"
+            column="34"/>
+    </issue>
+
+    <issue
+        id="HardCodedColor"
+        severity="Error"
+        message="Avoid using hardcoded color"
+        category="Correctness"
+        priority="4"
+        summary="Using hardcoded color"
+        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
         errorLine1="        &lt;item name=&quot;batteryGoodColor&quot;>@color/battery_good_color_light&lt;/item>"
         errorLine2="                                      ^">
         <location
@@ -3089,68 +3153,4 @@
             column="5"/>
     </issue>
 
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="            android:background=&quot;@color/divider_color&quot;"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml"
-            line="71"
-            column="13"/>
-    </issue>
-
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="            android:background=&quot;@color/divider_color&quot;"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml"
-            line="71"
-            column="13"/>
-    </issue>
-
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="        android:background=&quot;@color/divider_color&quot; />  &lt;!-- TODO: fix this -->"
-        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml"
-            line="178"
-            column="9"/>
-    </issue>
-
-    <issue
-        id="HardCodedColor"
-        severity="Error"
-        message="Avoid using hardcoded color"
-        category="Correctness"
-        priority="4"
-        summary="Using hardcoded color"
-        explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
-        errorLine1="        android:background=&quot;@color/divider_color&quot; />  &lt;!-- TODO: fix this -->"
-        errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml"
-            line="178"
-            column="9"/>
-    </issue>
-
 </issues>
diff --git a/res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml b/res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml
deleted file mode 100644
index 70d868a..0000000
--- a/res/layout-sw600dp-land/wifi_settings_for_setup_wizard_xl.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
-  -->
-
-<RelativeLayout
-    android:id="@+id/layout_root"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:paddingTop="60dip"
-    android:paddingStart="@dimen/screen_margin_sides"
-    android:paddingEnd="@dimen/screen_margin_sides"
-    android:paddingBottom="0dip" >
-
-    <FrameLayout
-        android:id="@+id/top_padding_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true">
-        <!-- Set to gone when software keyboard appears -->
-        <View
-             android:id="@+id/top_padding"
-             android:layout_width="match_parent"
-             android:layout_height="94dip" />
-    </FrameLayout>
-
-    <TextView
-        android:id="@+id/wifi_setup_title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:minHeight="48dip"
-        android:layout_alignParentStart="true"
-        android:layout_centerVertical="true"
-        android:layout_marginStart="16dip"
-        android:layout_below="@id/top_padding_layout"
-        android:textSize="32dip"
-        android:textColor="@color/title_color"
-        android:text="@string/wifi_setup_title"
-        android:gravity="bottom"/>
-
-    <!-- Divider -->
-    <FrameLayout
-        android:id="@+id/top_divider"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/wifi_setup_title">
-        <ProgressBar
-            android:id="@+id/scanning_progress_bar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            style="?android:attr/progressBarStyleHorizontal" />
-        <View
-            android:id="@+id/top_divider_no_progress"
-            android:layout_width="match_parent"
-            android:layout_height="3dip"
-            android:layout_marginTop="6dip"
-            android:layout_marginBottom="0dip"
-            android:background="@color/divider_color"
-            android:visibility="gone" />
-    </FrameLayout>
-
-    <!-- Dummy view to have the left edge of following Views.
-         @id/content needs to have layout_width="match_parent" to accommodate
-         every views inside @id/wifi_config_ui while sometimes config ui becomes
-         very wide. -->
-    <View
-        android:id="@+id/dummy_for_left_edge"
-        android:layout_width="716dip"
-        android:layout_height="0dip"
-        android:layout_below="@id/top_divider"
-        android:layout_centerHorizontal="true" />
-
-    <RelativeLayout
-        android:id="@+id/content"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/top_divider"
-        android:layout_alignStart="@id/dummy_for_left_edge"
-        android:layout_centerHorizontal="true">
-
-        <!-- Padding for @id/content shown when keyboard isn't available -->
-        <View
-            android:id="@+id/content_padding"
-            android:layout_width="match_parent"
-            android:layout_height="370dip"
-            android:visibility="gone" />
-
-        <FrameLayout
-            android:id="@+id/wifi_settings_fragment_layout"
-            android:layout_width="716dip"
-            android:layout_height="370dip">
-            <fragment
-                class="com.android.settings.wifi.WifiSettings"
-                android:id="@+id/wifi_setup_fragment"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-        </FrameLayout>
-        <FrameLayout
-            android:id="@+id/wifi_config_ui"
-            android:layout_width="wrap_content"
-            android:minWidth="406dip"
-            android:layout_height="wrap_content"
-            android:minHeight="160dip"
-            android:layout_marginTop="10dip"
-            android:layout_alignParentStart="true"
-            android:visibility="gone" />
-        <LinearLayout
-            android:id="@+id/connecting_status_layout"
-            android:layout_width="716dip"
-            android:layout_height="360dip"
-            android:layout_marginTop="10dip"
-            android:visibility="gone">
-            <TextView
-                android:id="@+id/connecting_status"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:lineSpacingExtra="10dip"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20sp" />
-        </LinearLayout>
-
-    </RelativeLayout>
-
-    <!-- Shown when @id/top_divider is using View instead of ProgressBar.
-         We need this padding to place @id/bottom_divider at the same position
-         regardless of @id/top_divider state.
-
-         Detail:
-         When ProgressBar is used in @id/top_divider, we have 7dip implicit
-         padding inside the ProgressBar object, while we don't have the
-         padding when View is used. As a result, all the objects below it
-         including @id/bottom_divider moves up/down in 7dip between those
-         two states. It is WAI for @id/content, but not for the others.
-
-         Note that we cannot let bottom dividers/buttons align with parent's
-         bottom edge using layout_alignParentBottom="true", since we'd like
-         to control bottom margin between @id/bottom_buttons and the edge
-         depending on software keyboard is shown/hidden.
-
-         We need to enclose @id/bottom_padding with @id/bottom_padding_layout
-         to let @id/bottom_divider use android:layout_below.
-         android:visibility="gone" really let the object go away,
-         causing @id/bottom_divider to lose the target for android:layout_below.
-      -->
-    <FrameLayout
-        android:id="@+id/bottom_padding_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/content">
-        <View
-             android:id="@+id/bottom_padding"
-             android:layout_width="match_parent"
-             android:layout_height="7dip"
-             android:visibility="gone" />
-    </FrameLayout>
-
-    <!-- Divider -->
-    <View
-        android:id="@+id/bottom_divider"
-        android:layout_width="match_parent"
-        android:layout_height="3dip"
-        android:layout_marginBottom="16dip"
-        android:layout_below="@id/bottom_padding_layout"
-        android:layout_alignStart="@id/content"
-        android:background="@color/divider_color" />  <!-- TODO: fix this -->
-
-    <RelativeLayout
-        android:id="@+id/bottom_buttons"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/bottom_divider"
-        android:layout_alignStart="@id/bottom_divider"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentBottom="true">
-
-        <Button
-            android:id="@+id/wifi_setup_add_network"
-            style="@style/setup_wizard_button"
-            android:layout_alignParentStart="true"
-            android:text="@string/wifi_setup_add_network"
-            android:enabled="false" />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentEnd="true"
-            android:orientation="horizontal">
-
-            <!-- This misleading name is for keeping consistency between non-XL
-                 layouts -->
-            <Button android:id="@+id/wifi_setup_cancel"
-                    style="@style/setup_wizard_button"
-                    android:text="@string/wifi_setup_back"
-                    android:visibility="gone" />
-
-            <Button android:id="@+id/wifi_setup_connect"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginStart="16dip"
-                    android:text="@string/wifi_setup_connect"
-                    android:enabled="false"
-                    android:visibility="gone" />
-
-            <Button android:id="@+id/wifi_setup_refresh_list"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginStart="16dip"
-                    android:text="@string/wifi_setup_refresh_list"
-                    android:enabled="false" />
-
-            <Button android:id="@+id/wifi_setup_skip_or_next"
-                    style="@style/setup_wizard_button"
-                    android:layout_marginStart="16dip"
-                    android:text="@string/wifi_setup_skip" />
-        </LinearLayout>
-    </RelativeLayout>
-</RelativeLayout>
diff --git a/res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml b/res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml
deleted file mode 100644
index 94833e8..0000000
--- a/res/layout-sw600dp/wifi_settings_for_setup_wizard_xl.xml
+++ /dev/null
@@ -1,238 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
-  -->
-
-<RelativeLayout
-    android:id="@+id/layout_root"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:paddingTop="60dip"
-    android:paddingStart="@dimen/screen_margin_sides"
-    android:paddingEnd="@dimen/screen_margin_sides"
-    android:paddingBottom="0dip" >
-
-    <FrameLayout
-        android:id="@+id/top_padding_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true">
-        <!-- Set to gone when software keyboard appears -->
-        <View
-             android:id="@+id/top_padding"
-             android:layout_width="match_parent"
-             android:layout_height="94dip" />
-    </FrameLayout>
-
-    <TextView
-        android:id="@+id/wifi_setup_title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:minHeight="48dip"
-        android:layout_alignParentStart="true"
-        android:layout_centerVertical="true"
-        android:layout_marginStart="16dip"
-        android:layout_below="@id/top_padding_layout"
-        android:textSize="32dip"
-        android:textColor="@color/title_color"
-        android:text="@string/wifi_setup_title"
-        android:gravity="bottom"/>
-
-    <!-- Divider -->
-    <FrameLayout
-        android:id="@+id/top_divider"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/wifi_setup_title">
-        <ProgressBar
-            android:id="@+id/scanning_progress_bar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            style="?android:attr/progressBarStyleHorizontal" />
-        <View
-            android:id="@+id/top_divider_no_progress"
-            android:layout_width="match_parent"
-            android:layout_height="3dip"
-            android:layout_marginTop="6dip"
-            android:layout_marginBottom="0dip"
-            android:background="@color/divider_color"
-            android:visibility="gone" />
-    </FrameLayout>
-
-    <!-- Dummy view to have the left edge of following Views.
-         @id/content needs to have layout_width="match_parent" to accommodate
-         every views inside @id/wifi_config_ui while sometimes config ui becomes
-         very wide. -->
-    <View
-        android:id="@+id/dummy_for_left_edge"
-        android:layout_width="716dip"
-        android:layout_height="0dip"
-        android:layout_below="@id/top_divider"
-        android:layout_centerHorizontal="true" />
-
-    <RelativeLayout
-        android:id="@+id/content"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/top_divider"
-        android:layout_alignStart="@id/dummy_for_left_edge"
-        android:layout_centerHorizontal="true">
-
-        <!-- Padding for @id/content shown when keyboard isn't available -->
-        <View
-            android:id="@+id/content_padding"
-            android:layout_width="match_parent"
-            android:layout_height="370dip"
-            android:visibility="gone" />
-
-        <FrameLayout
-            android:id="@+id/wifi_settings_fragment_layout"
-            android:layout_width="716dip"
-            android:layout_height="377dip">
-            <fragment
-                class="com.android.settings.wifi.WifiSettings"
-                android:id="@+id/wifi_setup_fragment"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content" />
-        </FrameLayout>
-        <FrameLayout
-            android:id="@+id/wifi_config_ui"
-            android:layout_width="wrap_content"
-            android:minWidth="406dip"
-            android:layout_height="wrap_content"
-            android:minHeight="160dip"
-            android:layout_marginTop="10dip"
-            android:layout_alignParentStart="true"
-            android:visibility="gone" />
-        <LinearLayout
-            android:id="@+id/connecting_status_layout"
-            android:layout_width="716dip"
-            android:layout_height="360dip"
-            android:layout_marginTop="10dip"
-            android:visibility="gone">
-            <TextView
-                android:id="@+id/connecting_status"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:lineSpacingExtra="10dip"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20sp" />
-        </LinearLayout>
-
-    </RelativeLayout>
-
-    <!-- Shown when @id/top_divider is using View instead of ProgressBar.
-         We need this padding to place @id/bottom_divider at the same position
-         regardless of @id/top_divider state.
-
-         Detail:
-         When ProgressBar is used in @id/top_divider, we have 7dip implicit
-         padding inside the ProgressBar object, while we don't have the
-         padding when View is used. As a result, all the objects below it
-         including @id/bottom_divider moves up/down in 7dip between those
-         two states. It is WAI for @id/content, but not for the others.
-
-         Note that we cannot let bottom dividers/buttons align with parent's
-         bottom edge using layout_alignParentBottom="true", since we'd like
-         to control bottom margin between @id/bottom_buttons and the edge
-         depending on software keyboard is shown/hidden.
-
-         We need to enclose @id/bottom_padding with @id/bottom_padding_layout
-         to let @id/bottom_divider use android:layout_below.
-         android:visibility="gone" really let the object go away,
-         causing @id/bottom_divider to lose the target for android:layout_below.
-      -->
-    <FrameLayout
-        android:id="@+id/bottom_padding_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/content">
-        <View
-             android:id="@+id/bottom_padding"
-             android:layout_width="match_parent"
-             android:layout_height="7dip"
-             android:visibility="gone" />
-    </FrameLayout>
-
-    <!-- Divider -->
-    <View
-        android:id="@+id/bottom_divider"
-        android:layout_width="match_parent"
-        android:layout_height="3dip"
-        android:layout_marginBottom="16dip"
-        android:layout_below="@id/bottom_padding_layout"
-        android:layout_alignStart="@id/content"
-        android:background="@color/divider_color" />  <!-- TODO: fix this -->
-
-    <LinearLayout
-        android:id="@+id/bottom_buttons"
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/bottom_divider"
-        android:layout_alignStart="@id/bottom_divider">
-
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_below="@id/bottom_divider"
-            android:layout_alignStart="@id/bottom_divider"
-            android:layout_alignParentEnd="true"
-            android:layout_alignParentBottom="true">
-
-            <Button
-                android:id="@+id/wifi_setup_add_network"
-                style="@style/setup_wizard_button"
-                android:layout_alignParentStart="true"
-                android:text="@string/wifi_setup_add_network"
-                android:enabled="false" />
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
-                android:orientation="horizontal">
-
-                <!-- This misleading name is for keeping consistency between non-XL
-                     layouts -->
-                <Button android:id="@+id/wifi_setup_cancel"
-                        style="@style/setup_wizard_button"
-                        android:text="@string/wifi_setup_back"
-                        android:visibility="gone" />
-
-                <Button android:id="@+id/wifi_setup_connect"
-                        style="@style/setup_wizard_button"
-                        android:layout_marginStart="16dip"
-                        android:text="@string/wifi_setup_connect"
-                        android:enabled="false"
-                        android:visibility="gone" />
-
-                <Button android:id="@+id/wifi_setup_skip_or_next"
-                        style="@style/setup_wizard_button"
-                        android:layout_marginStart="16dip"
-                        android:text="@string/wifi_setup_skip" />
-            </LinearLayout>
-
-        </RelativeLayout>
-
-        <Button android:id="@+id/wifi_setup_refresh_list"
-                style="@style/setup_wizard_button"
-                android:layout_alignParentEnd="true"
-                android:text="@string/wifi_setup_refresh_list"
-                android:enabled="false" />
-
-    </LinearLayout>
-</RelativeLayout>
diff --git a/res/layout/homepage_condition_full_tile.xml b/res/layout/homepage_condition_full_tile.xml
index 415defc..4b12625 100644
--- a/res/layout/homepage_condition_full_tile.xml
+++ b/res/layout/homepage_condition_full_tile.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 
-<androidx.cardview.widget.CardView
+<com.google.android.material.card.MaterialCardView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -71,4 +71,4 @@
 
     </LinearLayout>
 
-</androidx.cardview.widget.CardView>
+</com.google.android.material.card.MaterialCardView>
diff --git a/res/layout/homepage_condition_half_tile.xml b/res/layout/homepage_condition_half_tile.xml
index 0b7eec7..fb83389 100644
--- a/res/layout/homepage_condition_half_tile.xml
+++ b/res/layout/homepage_condition_half_tile.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 
-<androidx.cardview.widget.CardView
+<com.google.android.material.card.MaterialCardView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="@dimen/homepage_condition_half_card_height"
@@ -65,4 +65,4 @@
 
     </LinearLayout>
 
-</androidx.cardview.widget.CardView>
\ No newline at end of file
+</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
diff --git a/res/layout/homepage_condition_header.xml b/res/layout/homepage_condition_header.xml
index a440d7f..8f3a92c 100644
--- a/res/layout/homepage_condition_header.xml
+++ b/res/layout/homepage_condition_header.xml
@@ -15,7 +15,7 @@
   limitations under the License.
   -->
 
-<androidx.cardview.widget.CardView
+<com.google.android.material.card.MaterialCardView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -49,4 +49,4 @@
 
     </LinearLayout>
 
-</androidx.cardview.widget.CardView>
\ No newline at end of file
+</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
diff --git a/res/layout/homepage_slice_tile.xml b/res/layout/homepage_slice_tile.xml
index e062dba..9165abc 100644
--- a/res/layout/homepage_slice_tile.xml
+++ b/res/layout/homepage_slice_tile.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 
-<androidx.cardview.widget.CardView
+<com.google.android.material.card.MaterialCardView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -70,4 +70,4 @@
             </LinearLayout>
         </LinearLayout>
     </ViewFlipper>
-</androidx.cardview.widget.CardView>
\ No newline at end of file
+</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
diff --git a/res/layout/homepage_suggestion_tile.xml b/res/layout/homepage_suggestion_tile.xml
index 36ad45c..5d3a79c 100644
--- a/res/layout/homepage_suggestion_tile.xml
+++ b/res/layout/homepage_suggestion_tile.xml
@@ -15,7 +15,7 @@
   limitations under the License.
   -->
 
-<androidx.cardview.widget.CardView
+<com.google.android.material.card.MaterialCardView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/suggestion_card"
     android:layout_width="match_parent"
@@ -67,4 +67,4 @@
 
     </LinearLayout>
 
-</androidx.cardview.widget.CardView>
\ No newline at end of file
+</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
diff --git a/res/layout/settings_homepage_container.xml b/res/layout/settings_homepage_container.xml
index 42b78b4..0223573 100644
--- a/res/layout/settings_homepage_container.xml
+++ b/res/layout/settings_homepage_container.xml
@@ -29,6 +29,7 @@
 
 
     <androidx.core.widget.NestedScrollView
+        android:id="@+id/main_content_scrollable_container"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         app:layout_behavior="@string/appbar_scrolling_view_behavior">
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index 595f429..bc06f47 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -19,5 +19,7 @@
   <color name="switch_bar_background">#dadce0</color>
   <color name="switchbar_switch_track_tint">#82000000</color>
   <color name="switchbar_switch_thumb_tint">@android:color/black</color>
+  <color name="homepage_accessibility_background">#783BE5</color>
+  <color name="homepage_support_background">#3F5FBD</color>
 </resources>
 
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index b132f9f..27b31be 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -20,12 +20,4 @@
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <style name="setup_wizard_button">
-        <item name="android:layout_width">wrap_content</item>
-        <item name="android:minWidth">208dip</item>
-        <item name="android:layout_height">48dip</item>
-        <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
-        <item name="android:textSize">20sp</item>
-    </style>
-
 </resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index f470610..6a6a2b3 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -96,17 +96,12 @@
     <!-- Gestures settings -->
     <color name="gestures_setting_background_color">#ffffff</color>
 
-    <color name="status_bar_color">#3c3c3c</color>
-
     <!-- Color for the background of the shortcut icons.-->
     <color name="shortcut_background">#fff5f5f5</color>
 
     <!-- Color for preference icons on the Wifi Network Details page -->
     <color name="wifi_details_icon_color">#8A000000</color>
 
-    <!-- The fallback color for tinting icons. Only used when colorControlNormal is unavailable -->
-    <color name="fallback_tintColor">#89000000</color>
-
     <!-- Suggestion/condition colors -->
     <color name="suggestion_condition_background">#f2f2f2</color>
     <color name="condition_card_background">#f8f8f8</color>
@@ -121,13 +116,14 @@
     <color name="homepage_storage_background">#C14CE6</color>
     <color name="homepage_security_background">#0F9D58</color>
     <color name="homepage_accounts_background">#F15B8D</color>
-    <color name="homepage_accessibility_background">#783BE5</color>
+    <color name="homepage_accessibility_background">#5011C1</color>
     <color name="homepage_system_background">#9E9E9E</color>
-    <color name="homepage_support_background">#3F5FBD</color>
+    <color name="homepage_support_background">#26459C</color>
     <color name="homepage_generic_icon_background">#1A73E8</color>
     <color name="homepage_location_background">#2EC7DC</color>
     <color name="homepage_about_background">#9FA8DA</color>
     <color name="homepage_privacy_background">#5E97F6</color>
+    <color name="homepage_card_stroke_color">#1f000000</color>
     <!-- End of dashboard/homepage icon background colors -->
 
     <color name="switchbar_text_color">@android:color/white</color>
diff --git a/res/values/config.xml b/res/values/config.xml
index 917f14d..6b0a10e 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -160,4 +160,6 @@
         android.settings.EDIT_EMERGENCY_INFO
     </string>
 
+    <!-- Email address for the homepage contextual cards feedback -->
+    <string name="config_contextual_card_feedback_email" translatable="false"></string>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 075979d..f55ef10 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -327,8 +327,6 @@
 
     <!-- Homepage cards size and padding -->
     <dimen name="homepage_card_icon_size">24dp</dimen>
-    <dimen name="homepage_card_corner_radius">8dp</dimen>
-    <dimen name="homepage_card_elevation">2dp</dimen>
     <dimen name="homepage_card_vertical_margin">8dp</dimen>
     <dimen name="homepage_card_side_margin">4dp</dimen>
     <dimen name="homepage_card_padding_start">16dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9c69bd1..5b6321a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5721,116 +5721,14 @@
     <!-- Message displayed to let the user know that some of the options are disabled by admin. [CHAR LIMIT=NONE] -->
     <string name="admin_disabled_other_options">Other options are disabled by your admin</string>
     <string name="admin_more_details">More details</string>
-
-    <string name="sound_category_sound_title">General</string>
     <string name="notification_log_title">Notification log</string>
 
     <!-- Category title for phone call's ringtone and vibration settings in the Sound Setting.
          [CHAR LIMIT=40] -->
     <string name="sound_category_call_ringtone_vibrate_title">Call ringtone &amp; vibrate</string>
-
-    <!-- Category title for system-wide notification and feedback settings in the Sound Setting.
-         [CHAR LIMIT=40] -->
-    <string name="sound_category_system_title">System</string>
-
-    <!-- Wifi Setup For Setup Wizard with XL screen -->
-    <!-- Title shown in Wifi Setup Wizard with XL screen -->
-    <string name="wifi_setup_title">Wi\u2011Fi setup</string>
-    <!-- Title shown in Wifi Setup Wizard with XL screen when
-         a user is configuring password for a network.
-         The argument should be the name of the network.
-         [CHAR LIMIT=50] -->
-    <string name="wifi_setup_title_editing_network">Connect to Wi\u2011Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g></string>
-    <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
-         the device is connecting a network the user specified.
-         The argument should be the name of the network.
-         [CHAR LIMIT=50] -->
-    <string name="wifi_setup_title_connecting_network">Connecting to Wi\u2011Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g>\u2026</string>
-    <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
-         the device successfully connected to a network the user specified.
-         The argument should be the name of the network.
-         [CHAR LIMIT=50] -->
-    <string name="wifi_setup_title_connected_network">Connected to Wi\u2011Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g></string>
-    <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
-         a user is adding a network.
-         [CHAR LIMIT=50] -->
-    <string name="wifi_setup_title_add_network">Add a network</string>
-    <!-- Text message shown when Wifi is not connected.
-         Used in Wifi Setup For Setup Wizard with XL screen. -->
-    <string name="wifi_setup_not_connected">Not connected</string>
-    <!-- Button message shown on the button adding manual setting.
-         Used in Wifi Setup For Setup Wizard with XL screen. -->
-    <string name="wifi_setup_add_network">Add network</string>
-    <!-- Button message shown on the button refreshing a list of network.
-         Used in Wifi Setup For Setup Wizard with XL screen. -->
-    <string name="wifi_setup_refresh_list">Refresh list</string>
-    <!-- Button message shown on the button enabling users skip Wifi Setup.
-         Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=10] -->
-    <string name="wifi_setup_skip">Skip</string>
-    <!-- Button message shown on the button enabling users go the next step.
-         Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=10] -->
-    <string name="wifi_setup_next">Next</string>
-    <!-- Button label to go back to previous screen. Used in SetupWizard for
-      XLarge screen [CHAR LIMIT=10] -->
-    <string name="wifi_setup_back">Back</string>
     <!-- Button label to show detailed dialog for a selected Wi-Fi settings.
          Used in SetupWizard for XLarge screen [CHAR LIMIT=20] -->
     <string name="wifi_setup_detail">Network details</string>
-    <!-- Button label to connect to a Wi-Fi network.
-         Used in SetupWizard for XLarge screen [CHAR LIMIT=10] -->
-    <string name="wifi_setup_connect">Connect</string>
-    <!-- Button label to delete a Wi-Fi network.
-         Used in SetupWizard for XLarge screen [CHAR LIMIT=10] -->
-    <string name="wifi_setup_forget">Forget</string>
-    <!-- Button label to save a Wi-Fi network configuration.
-         Used in SetupWizard for XLarge screen [CHAR LIMIT=10] -->
-    <string name="wifi_setup_save">Save</string>
-    <!-- Button label to dismiss the dialog.
-         Used in SetupWizard for XLarge screen [CHAR LIMIT=10] -->
-    <string name="wifi_setup_cancel">Cancel</string>
-
-    <!-- The message shown above available networks when the device is scanning
-         available networks [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_scanning">Scanning networks\u2026</string>
-    <!-- Message shown above available network when there's no connected network.
-         Used in Wifi Setup For Setup Wizard with XL screen. -->
-    <string name="wifi_setup_status_select_network">Tap a network to connect to it</string>
-    <!-- Message shown above available networks when a user clicked one of available
-         networks and the UI is showing one possible existing network.
-         Used in Wifi Setup. -->
-    <string name="wifi_setup_status_existing_network">Connect to existing network</string>
-    <!-- Message shown above available networks when a user clicked one of available
-         networks and the network doesn't require configuration (e.g. password)
-         Used in Wifi Setup with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_unsecured_network">Connect to unsecured network</string>
-    <!-- Message shown above available networks when a user clicked one of available
-         networks and the UI is prompting the user to edit the network configuration
-         if needed. Used in Wifi Setup with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_edit_network">Type network configuration</string>
-    <!-- The message shown above available networks when a user clicked "Add network"
-         button. Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_new_network">Connect to new network</string>
-    <!-- The message shown above available networks when a user clicked one of available
-         networks or created another profile and he/she is waiting for the connection
-         is established.
-         Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_connecting">Connecting\u2026</string>
-    <!-- The message shown above available networks when connection is established,
-         letting a user to proceed to the next step of the SetupWizard.
-         Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_proceed_to_next">Go to the next step</string>
-    <!-- The message shown above available networks when a user clicked a network secured by
-         EAP. We don't allow the user to connect it.
-         Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
-    <string name="wifi_setup_status_eap_not_supported">EAP isn\u2019t supported.</string>
-    <!-- Message shown when users select EAP in Wi-Fi settings for SetupWizard,
-         saying EAP can't be configured in SetupWizard flow.
-         [CHAR LIMIT=NONE] -->
-    <string name="wifi_setup_eap_not_supported">You can\u2019t configure an EAP Wi\u2011Fi connection during setup. After setup, you can do that in Settings &gt; Wireless &amp; networks.</string>
-    <!-- Message shown when the device is connecting a network [CHAR LIMIT=NONE] -->
-    <string name="wifi_setup_description_connecting">Connecting can take a few minutes\u2026</string>
-    <!-- Message shown when the device is connected to a network [CHAR LIMIT=NONE] -->
-    <string name="wifi_setup_description_connected">Tap <b>Next</b> to continue with setup.\n\nTap <b>Back</b> to connect to a different Wi\u2011Fi network.</string>
 
     <!-- Do not translate. This is a stub which will be removed soon. -->
     <string name="time_zone_auto_stub" translatable="false">Select Time Zone</string>
@@ -9991,6 +9889,11 @@
     <!-- UI debug setting: preference summary - describes the behavior of forcing full raw GNSS satellite measurements [CHAR LIMIT=NONE] -->
     <string name="enable_gnss_raw_meas_full_tracking_summary">Track all GNSS constellations and frequencies with no duty cycling</string>
 
+    <!-- UI debug setting: preference title - allow background activity starts [CHAR LIMIT=60] -->
+    <string name="allow_background_activity_starts">Allow background activity starts</string>
+    <!-- UI debug setting: preference summary - describes the behavior of allowing background activity starts [CHAR LIMIT=NONE] -->
+    <string name="allow_background_activity_starts_summary">Allows all background activity starts</string>
+
     <!-- UI debug setting: preference title - show all crash dialogs [CHAR LIMIT=60] -->
     <string name="show_first_crash_dialog">Always show crash dialog</string>
     <!-- UI debug setting: preference summary - describes the behavior of showing a dialog every time an app crashes [CHAR LIMIT=NONE] -->
@@ -10351,4 +10254,9 @@
 
     <!-- Summary for low storage slice. [CHAR LIMIT=NONE] -->
     <string name="low_storage_summary">Storage is low. <xliff:g id="percentage" example="54%">%1$s</xliff:g> used - <xliff:g id="free_space" example="32GB">%2$s</xliff:g> free</string>
-</resources>
\ No newline at end of file
+
+    <!-- Label for button in contextual card feedback dialog for users to send feedback [CHAR LIMIT=30] -->
+    <string name="contextual_card_feedback_send">Send feedback</string>
+    <!-- String for contextual card feedback dialog [CHAR LIMIT=NONE] -->
+    <string name="contextual_card_feedback_confirm_message">Would you like to give us feedback on this suggestion?</string>
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c2ce0e7..1b311aa 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -164,11 +164,6 @@
         <item name="android:orientation">vertical</item>
     </style>
 
-    <style name="setup_wizard_button">
-        <item name="android:layout_width">wrap_content</item>
-        <item name="android:layout_height">wrap_content</item>
-    </style>
-
     <style name="ConfirmDeviceCredentialsAnimationStyle"
            parent="@*android:style/Animation.Material.Activity">
         <item name="android:activityOpenEnterAnimation">@anim/confirm_credential_open_enter</item>
@@ -464,8 +459,10 @@
         <item name="android:layout_marginBottom">@dimen/homepage_card_vertical_margin</item>
         <item name="android:layout_marginStart">@dimen/homepage_card_side_margin</item>
         <item name="android:layout_marginEnd">@dimen/homepage_card_side_margin</item>
-        <item name="cardCornerRadius">@dimen/homepage_card_corner_radius</item>
-        <item name="cardElevation">@dimen/homepage_card_elevation</item>
+        <item name="cardCornerRadius">8dp</item>
+        <item name="cardElevation">0dp</item>
+        <item name="strokeColor">@color/homepage_card_stroke_color</item>
+        <item name="strokeWidth">1dp</item>
     </style>
 
     <style name="ConditionCardBorderlessButton"
diff --git a/res/xml/app_info_settings.xml b/res/xml/app_info_settings.xml
index c13215a..8f99ce1 100644
--- a/res/xml/app_info_settings.xml
+++ b/res/xml/app_info_settings.xml
@@ -182,6 +182,7 @@
         android:selectable="false"
         android:order="9999"
         settings:controller="com.android.settings.applications.appinfo.AppVersionPreferenceController"
-        settings:allowDividerAbove="true" />
+        settings:allowDividerAbove="true"
+        settings:enableCopying="true"/>
 
 </PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml
index cc724b8..a0f019d 100644
--- a/res/xml/development_settings.xml
+++ b/res/xml/development_settings.xml
@@ -485,6 +485,11 @@
             android:title="@string/background_check_pref" />
 
         <SwitchPreference
+            android:key="allow_background_activity_starts"
+            android:title="@string/allow_background_activity_starts"
+            android:summary="@string/allow_background_activity_starts_summary" />
+
+        <SwitchPreference
             android:key="show_first_crash_dialog"
             android:title="@string/show_first_crash_dialog"
             android:summary="@string/show_first_crash_dialog_summary" />
diff --git a/res/xml/my_device_info.xml b/res/xml/my_device_info.xml
index 998a2f9..950c2da 100644
--- a/res/xml/my_device_info.xml
+++ b/res/xml/my_device_info.xml
@@ -32,7 +32,8 @@
         android:key="device_name"
         android:order="1"
         android:title="@string/my_device_info_device_name_preference_title"
-        android:summary="@string/summary_placeholder"/>
+        android:summary="@string/summary_placeholder"
+        settings:enableCopying="true" />
 
     <!-- Account name -->
     <Preference
@@ -50,7 +51,8 @@
         android:selectable="false"
         settings:allowDynamicSummaryInSlice="true"
         settings:controller=
-            "com.android.settings.deviceinfo.PhoneNumberPreferenceController" />
+            "com.android.settings.deviceinfo.PhoneNumberPreferenceController"
+        settings:enableCopying="true" />
 
     <Preference
         android:key="emergency_info"
@@ -129,7 +131,8 @@
         android:title="@string/wifi_ip_address"
         android:summary="@string/summary_placeholder"
         android:selectable="false"
-        settings:allowDividerAbove="true"/>
+        settings:allowDividerAbove="true"
+        settings:enableCopying="true" />
 
     <!-- Wi-Fi MAC address -->
     <Preference
@@ -137,7 +140,8 @@
         android:order="35"
         android:title="@string/status_wifi_mac_address"
         android:summary="@string/summary_placeholder"
-        android:selectable="false"/>
+        android:selectable="false"
+        settings:enableCopying="true" />
 
     <!-- Bluetooth address -->
     <Preference
@@ -145,7 +149,8 @@
         android:order="36"
         android:title="@string/status_bt_address"
         android:summary="@string/summary_placeholder"
-        android:selectable="false"/>
+        android:selectable="false"
+        settings:enableCopying="true" />
 
     <!-- Device up time -->
     <Preference
@@ -183,6 +188,7 @@
         android:order="43"
         android:title="@string/build_number"
         android:summary="@string/summary_placeholder"
-        settings:allowDividerAbove="true"/>
+        settings:allowDividerAbove="true"
+        settings:enableCopying="true" />
 
-</PreferenceScreen>
\ No newline at end of file
+</PreferenceScreen>
diff --git a/res/xml/wifi_network_details_fragment.xml b/res/xml/wifi_network_details_fragment.xml
index 45e7349..8b027e2 100644
--- a/res/xml/wifi_network_details_fragment.xml
+++ b/res/xml/wifi_network_details_fragment.xml
@@ -34,18 +34,18 @@
     <!-- General Details Category -->
     <PreferenceCategory
             android:key="general_details_category" >
-        <com.android.settings.wifi.WifiDetailPreference
+        <Preference
                 android:key="signal_strength"
                 android:title="@string/wifi_signal"
                 android:selectable="false"/>
 
-        <com.android.settings.wifi.WifiDetailPreference
+        <Preference
                 android:key="frequency"
                 android:icon="@drawable/ic_frequency_antenna"
                 android:title="@string/wifi_frequency"
                 android:selectable="false"/>
 
-        <com.android.settings.wifi.WifiDetailPreference
+        <Preference
                 android:key="security"
                 android:icon="@drawable/ic_security_lock_24dp"
                 android:title="@string/wifi_security"
@@ -69,30 +69,36 @@
     <PreferenceCategory
             android:key="ip_details_category"
             android:title="@string/wifi_setup_detail">
-        <com.android.settings.wifi.WifiDetailPreference
-            android:key="mac_address"
-            android:title="@string/wifi_advanced_mac_address_title"
-            android:selectable="false"/>
-        <com.android.settings.wifi.WifiDetailPreference
+        <Preference
+                android:key="mac_address"
+                android:title="@string/wifi_advanced_mac_address_title"
+                android:selectable="false"
+                settings:enableCopying="true"/>
+        <Preference
                 android:key="ip_address"
                 android:title="@string/wifi_ip_address"
-                android:selectable="false"/>
-        <com.android.settings.wifi.WifiDetailPreference
+                android:selectable="false"
+                settings:enableCopying="true"/>
+        <Preference
                 android:key="gateway"
                 android:title="@string/wifi_gateway"
-                android:selectable="false"/>
-        <com.android.settings.wifi.WifiDetailPreference
+                android:selectable="false"
+                settings:enableCopying="true"/>
+        <Preference
                 android:key="subnet_mask"
                 android:title="@string/wifi_details_subnet_mask"
-                android:selectable="false"/>
-        <com.android.settings.wifi.WifiDetailPreference
+                android:selectable="false"
+                settings:enableCopying="true"/>
+        <Preference
                 android:key="dns"
                 android:title="@string/wifi_details_dns"
-                android:selectable="false"/>
-        <com.android.settings.wifi.WifiDetailPreference
+                android:selectable="false"
+                settings:enableCopying="true"/>
+        <Preference
                 android:key="link_speed"
                 android:title="@string/wifi_speed"
-                android:selectable="false"/>
+                android:selectable="false"
+                settings:enableCopying="true"/>
     </PreferenceCategory>
 
     <!-- IPv6 Details -->
@@ -102,6 +108,7 @@
             android:selectable="false">
         <Preference
                 android:key="ipv6_addresses"
-                android:selectable="false"/>
+                android:selectable="false"
+                settings:enableCopying="true"/>
     </PreferenceCategory>
 </PreferenceScreen>
diff --git a/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceController.java b/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceController.java
new file mode 100644
index 0000000..ea47f35
--- /dev/null
+++ b/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceController.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+package com.android.settings.development;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settingslib.development.DeveloperOptionsPreferenceController;
+
+import androidx.preference.Preference;
+import androidx.preference.SwitchPreference;
+
+public class AllowBackgroundActivityStartsPreferenceController
+        extends DeveloperOptionsPreferenceController
+        implements Preference.OnPreferenceChangeListener, PreferenceControllerMixin {
+
+    private static final String BACKGROUND_ACTIVITY_STARTS_ENABLED_KEY
+            = "allow_background_activity_starts";
+
+    public AllowBackgroundActivityStartsPreferenceController(Context context) {
+        super(context);
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return BACKGROUND_ACTIVITY_STARTS_ENABLED_KEY;
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        writeSetting((boolean) newValue);
+        return true;
+    }
+
+    private void writeSetting(boolean isEnabled) {
+        Settings.Global.putInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, isEnabled ? 1 : 0);
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 1);
+        ((SwitchPreference) mPreference).setChecked(mode != 0);
+    }
+
+    @Override
+    protected void onDeveloperOptionsSwitchDisabled() {
+        super.onDeveloperOptionsSwitchDisabled();
+        writeSetting(false);
+        ((SwitchPreference) mPreference).setChecked(false);
+    }
+}
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 932c0c7..762686a 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -454,6 +454,7 @@
         controllers.add(new ProfileGpuRenderingPreferenceController(context));
         controllers.add(new KeepActivitiesPreferenceController(context));
         controllers.add(new BackgroundProcessLimitPreferenceController(context));
+        controllers.add(new AllowBackgroundActivityStartsPreferenceController(context));
         controllers.add(new ShowFirstCrashDialogPreferenceController(context));
         controllers.add(new AppsNotRespondingPreferenceController(context));
         controllers.add(new NotificationChannelWarningsPreferenceController(context));
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardFeedbackDialog.java b/src/com/android/settings/homepage/contextualcards/ContextualCardFeedbackDialog.java
new file mode 100644
index 0000000..0d5b275
--- /dev/null
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardFeedbackDialog.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+package com.android.settings.homepage.contextualcards;
+
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+
+import com.android.internal.app.AlertActivity;
+import com.android.internal.app.AlertController;
+import com.android.settings.R;
+
+public class ContextualCardFeedbackDialog extends AlertActivity implements
+        DialogInterface.OnClickListener {
+
+    public static final String EXTRA_CARD_NAME = "card_name";
+    public static final String EXTRA_FEEDBACK_EMAIL = "feedback_email";
+
+    private static final String TAG = "CardFeedbackDialog";
+    private static final String SUBJECT = "Settings Contextual Card Feedback - ";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        final AlertController.AlertParams alertParams = mAlertParams;
+        alertParams.mMessage = getText(R.string.contextual_card_feedback_confirm_message);
+        alertParams.mPositiveButtonText = getText(R.string.contextual_card_feedback_send);
+        alertParams.mPositiveButtonListener = this;
+        alertParams.mNegativeButtonText = getText(R.string.skip_label);
+
+        setupAlert();
+    }
+
+    @Override
+    public void onClick(DialogInterface dialog, int which) {
+        final String cardName = getIntent().getStringExtra(EXTRA_CARD_NAME);
+        final String email = getIntent().getStringExtra(EXTRA_FEEDBACK_EMAIL);
+        final Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:" + email));
+        intent.putExtra(Intent.EXTRA_SUBJECT, SUBJECT + cardName);
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+        try {
+            startActivity(intent);
+        } catch (Exception e) {
+            Log.e(TAG, "Send feedback failed.", e);
+        }
+        finish();
+    }
+}
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
index 30eae29..5f397d7 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
@@ -40,6 +40,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 
 /**
@@ -132,8 +133,13 @@
         // except Conditional cards, all other cards are from the database. So when the map sent
         // here is empty, we only keep Conditional cards.
         if (cardTypes.isEmpty()) {
+            final Set<Integer> conditionalCardTypes = new TreeSet() {{
+                add(ContextualCard.CardType.CONDITIONAL);
+                add(ContextualCard.CardType.CONDITIONAL_HEADER);
+                add(ContextualCard.CardType.CONDITIONAL_FOOTER);
+            }};
             cardsToKeep = mContextualCards.stream()
-                    .filter(card -> card.getCardType() == ContextualCard.CardType.CONDITIONAL)
+                    .filter(card -> conditionalCardTypes.contains(card.getCardType()))
                     .collect(Collectors.toList());
         } else {
             cardsToKeep = mContextualCards.stream()
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardsAdapter.java b/src/com/android/settings/homepage/contextualcards/ContextualCardsAdapter.java
index 10bed90..13b509d 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardsAdapter.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardsAdapter.java
@@ -99,7 +99,6 @@
                 @Override
                 public int getSpanSize(int position) {
                     final ContextualCard card = mContextualCards.get(position);
-                    //TODO(b/114009676): may use another field to make decision. still under review.
                     if (card.isHalfWidth()) {
                         return HALF_WIDTH;
                     }
diff --git a/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardController.java b/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardController.java
index f1fbc9c..3368580 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardController.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardController.java
@@ -17,11 +17,16 @@
 package com.android.settings.homepage.contextualcards.slices;
 
 import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
 
-import com.android.settings.homepage.contextualcards.CardContentProvider;
+import androidx.annotation.VisibleForTesting;
+
+import com.android.settings.R;
 import com.android.settings.homepage.contextualcards.CardDatabaseHelper;
 import com.android.settings.homepage.contextualcards.ContextualCard;
 import com.android.settings.homepage.contextualcards.ContextualCardController;
+import com.android.settings.homepage.contextualcards.ContextualCardFeedbackDialog;
 import com.android.settings.homepage.contextualcards.ContextualCardUpdateListener;
 import com.android.settingslib.utils.ThreadUtils;
 
@@ -32,7 +37,8 @@
 
     private static final String TAG = "SliceCardController";
 
-    private Context mContext;
+    private final Context mContext;
+
     private ContextualCardUpdateListener mCardUpdateListener;
 
     public SliceContextualCardController(Context context) {
@@ -51,7 +57,7 @@
 
     @Override
     public void onActionClick(ContextualCard card) {
-        //TODO(b/113783548): Implement feedback mechanism
+
     }
 
     @Override
@@ -60,10 +66,30 @@
             final CardDatabaseHelper dbHelper = CardDatabaseHelper.getInstance(mContext);
             dbHelper.markContextualCardAsDismissed(mContext, card.getName());
         });
+        showFeedbackDialog(card);
     }
 
     @Override
     public void setCardUpdateListener(ContextualCardUpdateListener listener) {
         mCardUpdateListener = listener;
     }
+
+    @VisibleForTesting
+    void showFeedbackDialog(ContextualCard card) {
+        final String email = mContext.getString(R.string.config_contextual_card_feedback_email);
+        if (TextUtils.isEmpty(email)) {
+            return;
+        }
+        final Intent feedbackIntent = new Intent(mContext, ContextualCardFeedbackDialog.class);
+        feedbackIntent.putExtra(ContextualCardFeedbackDialog.EXTRA_CARD_NAME,
+                getSimpleCardName(card));
+        feedbackIntent.putExtra(ContextualCardFeedbackDialog.EXTRA_FEEDBACK_EMAIL, email);
+        feedbackIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        mContext.startActivity(feedbackIntent);
+    }
+
+    private String getSimpleCardName(ContextualCard card) {
+        final String[] split = card.getName().split("/");
+        return split[split.length - 1];
+    }
 }
diff --git a/src/com/android/settings/network/ApnSettings.java b/src/com/android/settings/network/ApnSettings.java
index 3b1e14c..4bd964e 100755
--- a/src/com/android/settings/network/ApnSettings.java
+++ b/src/com/android/settings/network/ApnSettings.java
@@ -40,7 +40,6 @@
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
-import android.telephony.data.ApnSetting;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.Menu;
@@ -55,8 +54,6 @@
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.dataconnection.ApnSettingUtils;
-import com.android.internal.telephony.uicc.IccRecords;
 import com.android.internal.telephony.uicc.UiccController;
 import com.android.settings.R;
 import com.android.settings.RestrictedSettingsFragment;
@@ -278,34 +275,27 @@
     }
 
     private void fillList() {
-        final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
         final int subId = mSubscriptionInfo != null ? mSubscriptionInfo.getSubscriptionId()
                 : SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-        final String mccmnc = mSubscriptionInfo == null ? "" : tm.getSimOperator(subId);
-        Log.d(TAG, "mccmnc = " + mccmnc);
-        StringBuilder where = new StringBuilder("numeric=\"" + mccmnc +
-                "\" AND NOT (type='ia' AND (apn=\"\" OR apn IS NULL)) AND user_visible!=0");
+        final Uri simApnUri = Uri.withAppendedPath(Telephony.Carriers.SIM_APN_LIST,
+                String.valueOf(subId));
+        StringBuilder where = new StringBuilder("NOT (type='ia' AND (apn=\"\" OR apn IS NULL)) AND "
+                + "user_visible!=0");
 
         if (mHideImsApn) {
             where.append(" AND NOT (type='ims')");
         }
 
-        Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI,
-                CARRIERS_PROJECTION, where.toString(), null, Telephony.Carriers.DEFAULT_SORT_ORDER);
+        Cursor cursor = getContentResolver().query(simApnUri,
+                CARRIERS_PROJECTION, where.toString(), null,
+                Telephony.Carriers.DEFAULT_SORT_ORDER);
 
         if (cursor != null) {
-            IccRecords r = null;
-            if (mUiccController != null && mSubscriptionInfo != null) {
-                r = mUiccController.getIccRecords(
-                        SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
-            }
-            PreferenceGroup apnList = (PreferenceGroup) findPreference("apn_list");
-            apnList.removeAll();
+            PreferenceGroup apnPrefList = (PreferenceGroup) findPreference("apn_list");
+            apnPrefList.removeAll();
 
-            ArrayList<ApnPreference> mnoApnList = new ArrayList<ApnPreference>();
-            ArrayList<ApnPreference> mvnoApnList = new ArrayList<ApnPreference>();
-            ArrayList<ApnPreference> mnoMmsApnList = new ArrayList<ApnPreference>();
-            ArrayList<ApnPreference> mvnoMmsApnList = new ArrayList<ApnPreference>();
+            ArrayList<ApnPreference> apnList = new ArrayList<ApnPreference>();
+            ArrayList<ApnPreference> mmsApnList = new ArrayList<ApnPreference>();
 
             mSelectedKey = getSelectedApnKey();
             cursor.moveToFirst();
@@ -314,9 +304,9 @@
                 String apn = cursor.getString(APN_INDEX);
                 String key = cursor.getString(ID_INDEX);
                 String type = cursor.getString(TYPES_INDEX);
-                String mvnoType = cursor.getString(MVNO_TYPE_INDEX);
-                String mvnoMatchData = cursor.getString(MVNO_MATCH_DATA_INDEX);
                 int edited = cursor.getInt(EDITED_INDEX);
+                mMvnoType = cursor.getString(MVNO_TYPE_INDEX);
+                mMvnoMatchData = cursor.getString(MVNO_MATCH_DATA_INDEX);
 
                 ApnPreference pref = new ApnPreference(getPrefContext());
 
@@ -336,43 +326,20 @@
                     if ((mSelectedKey != null) && mSelectedKey.equals(key)) {
                         pref.setChecked();
                     }
-                    addApnToList(pref, mnoApnList, mvnoApnList, r, mvnoType, mvnoMatchData);
+                    apnList.add(pref);
                 } else {
-                    addApnToList(pref, mnoMmsApnList, mvnoMmsApnList, r, mvnoType, mvnoMatchData);
+                    mmsApnList.add(pref);
                 }
                 cursor.moveToNext();
             }
             cursor.close();
 
-            if (!mvnoApnList.isEmpty()) {
-                mnoApnList = mvnoApnList;
-                mnoMmsApnList = mvnoMmsApnList;
-
-                // Also save the mvno info
+            for (Preference preference : apnList) {
+                apnPrefList.addPreference(preference);
             }
-
-            for (Preference preference : mnoApnList) {
-                apnList.addPreference(preference);
+            for (Preference preference : mmsApnList) {
+                apnPrefList.addPreference(preference);
             }
-            for (Preference preference : mnoMmsApnList) {
-                apnList.addPreference(preference);
-            }
-        }
-    }
-
-    private void addApnToList(ApnPreference pref, ArrayList<ApnPreference> mnoList,
-                              ArrayList<ApnPreference> mvnoList, IccRecords r, String mvnoType,
-                              String mvnoMatchData) {
-        if (r != null && !TextUtils.isEmpty(mvnoType) && !TextUtils.isEmpty(mvnoMatchData)) {
-            if (ApnSettingUtils.mvnoMatches(r, ApnSetting.getMvnoTypeIntFromString(mvnoType),
-                    mvnoMatchData)) {
-                mvnoList.add(pref);
-                // Since adding to mvno list, save mvno info
-                mMvnoType = mvnoType;
-                mMvnoMatchData = mvnoMatchData;
-            }
-        } else {
-            mnoList.add(pref);
         }
     }
 
diff --git a/src/com/android/settings/wifi/WifiDetailPreference.java b/src/com/android/settings/wifi/WifiDetailPreference.java
deleted file mode 100644
index 2567a42..0000000
--- a/src/com/android/settings/wifi/WifiDetailPreference.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-package com.android.settings.wifi;
-
-import android.content.Context;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-import androidx.preference.Preference;
-import androidx.preference.PreferenceViewHolder;
-
-import com.android.settings.R;
-
-/**
- * A Preference to be used with the Wifi Network Detail Fragment that allows a summary text to be
- * set inside the widget resource
- */
-public class WifiDetailPreference extends Preference {
-    private String mDetailText;
-
-    public WifiDetailPreference(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        setWidgetLayoutResource(R.layout.preference_widget_summary);
-    }
-
-    public void setDetailText(String text) {
-        if (TextUtils.equals(mDetailText, text)) return;
-        mDetailText = text;
-        notifyChanged();
-    }
-
-    @Override
-    public void onBindViewHolder(PreferenceViewHolder view) {
-        super.onBindViewHolder(view);
-        TextView textView = ((TextView) view.findViewById(R.id.widget_summary));
-        textView.setText(mDetailText);
-        textView.setPadding(0, 0, 10, 0);
-    }
-}
diff --git a/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java b/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
index 9a3398a..48446c9 100644
--- a/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
+++ b/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
@@ -57,7 +57,6 @@
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settings.widget.ActionButtonPreference;
 import com.android.settings.widget.EntityHeaderController;
-import com.android.settings.wifi.WifiDetailPreference;
 import com.android.settings.wifi.WifiDialog;
 import com.android.settings.wifi.WifiDialog.WifiDialogListener;
 import com.android.settings.wifi.WifiUtils;
@@ -133,15 +132,15 @@
     // UI elements - in order of appearance
     private ActionButtonPreference mButtonsPref;
     private EntityHeaderController mEntityHeaderController;
-    private WifiDetailPreference mSignalStrengthPref;
-    private WifiDetailPreference mLinkSpeedPref;
-    private WifiDetailPreference mFrequencyPref;
-    private WifiDetailPreference mSecurityPref;
-    private WifiDetailPreference mMacAddressPref;
-    private WifiDetailPreference mIpAddressPref;
-    private WifiDetailPreference mGatewayPref;
-    private WifiDetailPreference mSubnetPref;
-    private WifiDetailPreference mDnsPref;
+    private Preference mSignalStrengthPref;
+    private Preference mLinkSpeedPref;
+    private Preference mFrequencyPref;
+    private Preference mSecurityPref;
+    private Preference mMacAddressPref;
+    private Preference mIpAddressPref;
+    private Preference mGatewayPref;
+    private Preference mSubnetPref;
+    private Preference mDnsPref;
     private PreferenceCategory mIpv6Category;
     private Preference mIpv6AddressPref;
 
@@ -283,22 +282,21 @@
                 .setButton2Text(R.string.wifi_sign_in_button_text)
                 .setButton2OnClickListener(view -> signIntoNetwork());
 
-        mSignalStrengthPref =
-                (WifiDetailPreference) screen.findPreference(KEY_SIGNAL_STRENGTH_PREF);
-        mLinkSpeedPref = (WifiDetailPreference) screen.findPreference(KEY_LINK_SPEED);
-        mFrequencyPref = (WifiDetailPreference) screen.findPreference(KEY_FREQUENCY_PREF);
-        mSecurityPref = (WifiDetailPreference) screen.findPreference(KEY_SECURITY_PREF);
+        mSignalStrengthPref = screen.findPreference(KEY_SIGNAL_STRENGTH_PREF);
+        mLinkSpeedPref = screen.findPreference(KEY_LINK_SPEED);
+        mFrequencyPref = screen.findPreference(KEY_FREQUENCY_PREF);
+        mSecurityPref = screen.findPreference(KEY_SECURITY_PREF);
 
-        mMacAddressPref = (WifiDetailPreference) screen.findPreference(KEY_MAC_ADDRESS_PREF);
-        mIpAddressPref = (WifiDetailPreference) screen.findPreference(KEY_IP_ADDRESS_PREF);
-        mGatewayPref = (WifiDetailPreference) screen.findPreference(KEY_GATEWAY_PREF);
-        mSubnetPref = (WifiDetailPreference) screen.findPreference(KEY_SUBNET_MASK_PREF);
-        mDnsPref = (WifiDetailPreference) screen.findPreference(KEY_DNS_PREF);
+        mMacAddressPref = screen.findPreference(KEY_MAC_ADDRESS_PREF);
+        mIpAddressPref = screen.findPreference(KEY_IP_ADDRESS_PREF);
+        mGatewayPref = screen.findPreference(KEY_GATEWAY_PREF);
+        mSubnetPref = screen.findPreference(KEY_SUBNET_MASK_PREF);
+        mDnsPref = screen.findPreference(KEY_DNS_PREF);
 
         mIpv6Category = (PreferenceCategory) screen.findPreference(KEY_IPV6_CATEGORY);
         mIpv6AddressPref = screen.findPreference(KEY_IPV6_ADDRESSES_PREF);
 
-        mSecurityPref.setDetailText(mAccessPoint.getSecurityString(false /* concise */));
+        mSecurityPref.setSummary(mAccessPoint.getSecurityString(false /* concise */));
     }
 
     private void setupEntityHeader(PreferenceScreen screen) {
@@ -359,12 +357,12 @@
         refreshRssiViews();
 
         // MAC Address Pref
-        mMacAddressPref.setDetailText(mWifiInfo.getMacAddress());
+        mMacAddressPref.setSummary(mWifiInfo.getMacAddress());
 
         // Link Speed Pref
         int linkSpeedMbps = mWifiInfo.getLinkSpeed();
         mLinkSpeedPref.setVisible(linkSpeedMbps >= 0);
-        mLinkSpeedPref.setDetailText(mContext.getString(
+        mLinkSpeedPref.setSummary(mContext.getString(
                 R.string.link_speed, mWifiInfo.getLinkSpeed()));
 
         // Frequency Pref
@@ -379,7 +377,7 @@
         } else {
             Log.e(TAG, "Unexpected frequency " + frequency);
         }
-        mFrequencyPref.setDetailText(band);
+        mFrequencyPref.setSummary(band);
 
         updateIpLayerInfo();
     }
@@ -414,12 +412,12 @@
                 R.color.wifi_details_icon_color, mContext.getTheme()));
         mSignalStrengthPref.setIcon(wifiIconDark);
 
-        mSignalStrengthPref.setDetailText(mSignalStr[mRssiSignalLevel]);
+        mSignalStrengthPref.setSummary(mSignalStr[mRssiSignalLevel]);
     }
 
-    private void updatePreference(WifiDetailPreference pref, String detailText) {
+    private void updatePreference(Preference pref, String detailText) {
         if (!TextUtils.isEmpty(detailText)) {
-            pref.setDetailText(detailText);
+            pref.setSummary(detailText);
             pref.setVisible(true);
         } else {
             pref.setVisible(false);
diff --git a/tests/robotests/res/values-mcc999/config.xml b/tests/robotests/res/values-mcc999/config.xml
index 73d2264..9bba3c3 100644
--- a/tests/robotests/res/values-mcc999/config.xml
+++ b/tests/robotests/res/values-mcc999/config.xml
@@ -77,4 +77,7 @@
     <string-array name="slice_whitelist_package_names" translatable="false">
         <item>com.android.settings.slice_whitelist_package</item>
     </string-array>
+
+    <!-- Email address for the homepage contextual cards feedback -->
+    <string name="config_contextual_card_feedback_email" translatable="false">test@test.test</string>
 </resources>
diff --git a/tests/robotests/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceControllerTest.java
new file mode 100644
index 0000000..8b9b14f
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/development/AllowBackgroundActivityStartsPreferenceControllerTest.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+package com.android.settings.development;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+
+import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+public class AllowBackgroundActivityStartsPreferenceControllerTest {
+
+    @Mock
+    private SwitchPreference mPreference;
+    @Mock
+    private PreferenceScreen mPreferenceScreen;
+
+    private Context mContext;
+    private AllowBackgroundActivityStartsPreferenceController mController;
+
+    @Before
+    public void setup() {
+        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
+        mController = new AllowBackgroundActivityStartsPreferenceController(mContext);
+        when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
+            .thenReturn(mPreference);
+        mController.displayPreference(mPreferenceScreen);
+    }
+
+    @Test
+    public void onPreferenceChange_settingEnabled_allowBackgroundActivityStartsShouldBeOn() {
+        mController.onPreferenceChange(mPreference, true /* new value */);
+
+        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 1 /* default */);
+
+        assertThat(mode).isEqualTo(1);
+    }
+
+    @Test
+    public void onPreferenceChange_settingDisabled_allowBackgroundActivityStartsShouldBeOff() {
+        mController.onPreferenceChange(mPreference, false /* new value */);
+
+        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 1 /* default */);
+
+        assertThat(mode).isEqualTo(0);
+    }
+
+    @Test
+    public void updateState_settingDisabled_preferenceShouldNotBeChecked() {
+        Settings.Global.putInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 0);
+        mController.updateState(mPreference);
+
+        verify(mPreference).setChecked(false);
+    }
+
+    @Test
+    public void updateState_settingEnabled_preferenceShouldBeChecked() {
+        Settings.Global.putInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 1);
+        mController.updateState(mPreference);
+
+        verify(mPreference).setChecked(true);
+    }
+
+    @Test
+    public void onDeveloperOptionsSwitchDisabled_shouldDisablePreference() {
+        mController.onDeveloperOptionsSwitchDisabled();
+
+        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
+                Settings.Global.BACKGROUND_ACTIVITY_STARTS_ENABLED, 1 /* default */);
+
+        assertThat(mode).isEqualTo(0);
+        verify(mPreference).setChecked(false);
+        verify(mPreference).setEnabled(false);
+    }
+}
+
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
index 8287672..64a7c9c 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
@@ -18,13 +18,12 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.mockito.ArgumentMatchers.anyMap;
-import static org.mockito.Mockito.doNothing;
-
 import android.content.Context;
 import android.net.Uri;
 import android.util.ArrayMap;
 
+import com.android.settings.homepage.contextualcards.conditional.ConditionFooterContextualCard;
+import com.android.settings.homepage.contextualcards.conditional.ConditionHeaderContextualCard;
 import com.android.settings.homepage.contextualcards.conditional.ConditionalContextualCard;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 
@@ -70,7 +69,7 @@
     }
 
     @Test
-    public void onContextualCardUpdated_emtpyMapWithExistingCards_shouldOnlyKeepConditionalCard() {
+    public void onContextualCardUpdated_emptyMapWithExistingCards_shouldOnlyKeepConditionalCard() {
         mManager.mContextualCards.add(new ConditionalContextualCard.Builder().build());
         mManager.mContextualCards.add(
                 buildContextualCard(TEST_SLICE_URI));
@@ -84,6 +83,31 @@
                 .isEqualTo(ContextualCard.CardType.CONDITIONAL);
     }
 
+    @Test
+    public void onContextualCardUpdated_hasEmptyMap_shouldKeepConditionalHeaderCard() {
+        mManager.mContextualCards.add(new ConditionHeaderContextualCard.Builder().build());
+        mManager.setListener(mListener);
+
+        mManager.onContextualCardUpdated(new ArrayMap<>());
+
+        assertThat(mManager.mContextualCards).hasSize(1);
+        assertThat(mManager.mContextualCards.get(0).getCardType())
+                .isEqualTo(ContextualCard.CardType.CONDITIONAL_HEADER);
+    }
+
+    @Test
+    public void onContextualCardUpdated_hasEmptyMap_shouldKeepConditionalFooterCard() {
+        mManager.mContextualCards.add(new ConditionFooterContextualCard.Builder().build());
+        mManager.setListener(mListener);
+
+        mManager.onContextualCardUpdated(new ArrayMap<>());
+
+        assertThat(mManager.mContextualCards).hasSize(1);
+        assertThat(mManager.mContextualCards.get(0).getCardType())
+                .isEqualTo(ContextualCard.CardType.CONDITIONAL_FOOTER);
+    }
+
+
     private ContextualCard buildContextualCard(String sliceUri) {
         return new ContextualCard.Builder()
                 .setName("test_name")
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionContextualCardRendererTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionContextualCardRendererTest.java
index 376042d..bb61c7d 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionContextualCardRendererTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionContextualCardRendererTest.java
@@ -19,11 +19,10 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import android.content.Context;
+import android.app.Activity;
 import android.view.LayoutInflater;
 import android.view.View;
 
@@ -40,7 +39,8 @@
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Robolectric;
+import org.robolectric.android.controller.ActivityController;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 public class ConditionContextualCardRendererTest {
@@ -49,25 +49,29 @@
     private ControllerRendererPool mControllerRendererPool;
     @Mock
     private ConditionContextualCardController mController;
-    private Context mContext;
+    private Activity mActivity;
     private ConditionContextualCardRenderer mRenderer;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mContext = spy(RuntimeEnvironment.application);
-        mRenderer = new ConditionContextualCardRenderer(mContext, mControllerRendererPool);
+        final ActivityController<Activity> activityController = Robolectric.buildActivity(
+                Activity.class);
+        mActivity = activityController.get();
+        mActivity.setTheme(R.style.Theme_AppCompat);
+        activityController.create();
+        mRenderer = new ConditionContextualCardRenderer(mActivity, mControllerRendererPool);
     }
 
     @Test
     public void bindView_shouldSetListener() {
         final int viewType = mRenderer.getViewType(false /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View view = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View view = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(view);
         final View card = view.findViewById(R.id.content);
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.CONDITIONAL)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, buildConditionContextualCard());
@@ -79,12 +83,12 @@
     @Test
     public void viewClick_shouldInvokeControllerPrimaryClick() {
         final int viewType = mRenderer.getViewType(false /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View view = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View view = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(view);
         final View card = view.findViewById(R.id.content);
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.CONDITIONAL)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, buildConditionContextualCard());
@@ -103,7 +107,7 @@
                 .setName("test_name")
                 .setTitleText("test_title")
                 .setSummaryText("test_summary")
-                .setIconDrawable(mContext.getDrawable(R.drawable.ic_do_not_disturb_on_24dp))
+                .setIconDrawable(mActivity.getDrawable(R.drawable.ic_do_not_disturb_on_24dp))
                 .setIsHalfWidth(true)
                 .build();
     }
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionHeaderContextualCardRendererTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionHeaderContextualCardRendererTest.java
index dbe5544..d0b5a24 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionHeaderContextualCardRendererTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ConditionHeaderContextualCardRendererTest.java
@@ -18,17 +18,17 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import android.content.Context;
+import android.app.Activity;
 import android.view.LayoutInflater;
 import android.view.View;
 
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.android.settings.R;
 import com.android.settings.homepage.contextualcards.ContextualCard;
 import com.android.settings.homepage.contextualcards.ControllerRendererPool;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
@@ -38,7 +38,8 @@
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Robolectric;
+import org.robolectric.android.controller.ActivityController;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -50,24 +51,28 @@
     private ControllerRendererPool mControllerRendererPool;
     @Mock
     private ConditionContextualCardController mController;
-    private Context mContext;
+    private Activity mActivity;
     private ConditionHeaderContextualCardRenderer mRenderer;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mContext = spy(RuntimeEnvironment.application);
-        mRenderer = new ConditionHeaderContextualCardRenderer(mContext, mControllerRendererPool);
+        final ActivityController<Activity> activityController = Robolectric.buildActivity(
+                Activity.class);
+        mActivity = activityController.get();
+        mActivity.setTheme(R.style.Theme_AppCompat);
+        activityController.create();
+        mRenderer = new ConditionHeaderContextualCardRenderer(mActivity, mControllerRendererPool);
     }
 
     @Test
     public void bindView_shouldSetClickListener() {
         final int viewType = mRenderer.getViewType(false /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View view = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View view = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(view);
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.CONDITIONAL_HEADER)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, generateConditionHeaderContextualCard());
@@ -79,11 +84,11 @@
     @Test
     public void bindView_clickView_shouldSetTrueToIsConditionExpanded() {
         final int viewType = mRenderer.getViewType(false /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View view = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View view = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(view);
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.CONDITIONAL_HEADER)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, generateConditionHeaderContextualCard());
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardRendererTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardRendererTest.java
index 20f1b7b..2618e1b 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardRendererTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/LegacySuggestionContextualCardRendererTest.java
@@ -23,7 +23,7 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import android.content.Context;
+import android.app.Activity;
 import android.view.LayoutInflater;
 import android.view.View;
 
@@ -40,7 +40,8 @@
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Robolectric;
+import org.robolectric.android.controller.ActivityController;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 public class LegacySuggestionContextualCardRendererTest {
@@ -48,26 +49,31 @@
     private ControllerRendererPool mControllerRendererPool;
     @Mock
     private LegacySuggestionContextualCardController mController;
-    private Context mContext;
+    private Activity mActivity;
     private LegacySuggestionContextualCardRenderer mRenderer;
 
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mContext = RuntimeEnvironment.application;
-        mRenderer = new LegacySuggestionContextualCardRenderer(mContext, mControllerRendererPool);
+        final ActivityController<Activity> activityController = Robolectric.buildActivity(
+                Activity.class);
+        mActivity = activityController.get();
+        mActivity.setTheme(R.style.Theme_AppCompat);
+        activityController.create();
+
+        mRenderer = new LegacySuggestionContextualCardRenderer(mActivity, mControllerRendererPool);
     }
 
     @Test
     public void bindView_shouldSetListener() {
         final int viewType = mRenderer.getViewType(true /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View card = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View card = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(card);
 
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.LEGACY_SUGGESTION)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, buildContextualCard());
@@ -79,11 +85,11 @@
     @Test
     public void viewClick_shouldInvokeControllerPrimaryClick() {
         final int viewType = mRenderer.getViewType(true /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View card = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View card = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
         final RecyclerView.ViewHolder viewHolder = mRenderer.createViewHolder(card);
-        when(mControllerRendererPool.getController(mContext,
+        when(mControllerRendererPool.getController(mActivity,
                 ContextualCard.CardType.LEGACY_SUGGESTION)).thenReturn(mController);
 
         mRenderer.bindView(viewHolder, buildContextualCard());
@@ -99,7 +105,7 @@
                 .setName("test_name")
                 .setTitleText("test_title")
                 .setSummaryText("test_summary")
-                .setIconDrawable(mContext.getDrawable(R.drawable.ic_do_not_disturb_on_24dp))
+                .setIconDrawable(mActivity.getDrawable(R.drawable.ic_do_not_disturb_on_24dp))
                 .build();
     }
 }
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardControllerTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardControllerTest.java
index 362e1f5..29e309d 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardControllerTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardControllerTest.java
@@ -18,6 +18,10 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.spy;
+
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Context;
@@ -27,14 +31,21 @@
 import com.android.settings.homepage.contextualcards.CardContentProvider;
 import com.android.settings.homepage.contextualcards.CardDatabaseHelper;
 import com.android.settings.homepage.contextualcards.ContextualCard;
+import com.android.settings.homepage.contextualcards.ContextualCardFeedbackDialog;
+import com.android.settings.homepage.contextualcards.ContextualCardsFragment;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
 import org.robolectric.Robolectric;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Shadows;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowActivity;
 import org.robolectric.shadows.ShadowContentResolver;
+import org.robolectric.shadows.androidx.fragment.FragmentController;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 public class SliceContextualCardControllerTest {
@@ -49,25 +60,22 @@
 
     @Before
     public void setUp() {
+        MockitoAnnotations.initMocks(this);
         mContext = RuntimeEnvironment.application;
         mProvider = Robolectric.setupContentProvider(CardContentProvider.class);
         ShadowContentResolver.registerProviderInternal(CardContentProvider.CARD_AUTHORITY,
                 mProvider);
         mResolver = mContext.getContentResolver();
-        mController = new SliceContextualCardController(mContext);
+        mController = spy(new SliceContextualCardController(mContext));
     }
 
     @Test
     public void onDismissed_cardShouldBeMarkedAsDismissed() {
         final Uri providerUri = CardContentProvider.URI;
-        final ContextualCard card = new ContextualCard.Builder()
-                .setName(TEST_CARD_NAME)
-                .setCardType(ContextualCard.CardType.SLICE)
-                .setSliceUri(Uri.parse(TEST_SLICE_URI))
-                .build();
         mResolver.insert(providerUri, generateOneRow());
+        doNothing().when(mController).showFeedbackDialog(any(ContextualCard.class));
 
-        mController.onDismissed(card);
+        mController.onDismissed(getTestSliceCard());
 
         final String[] columns = {CardDatabaseHelper.CardColumns.CARD_DISMISSED};
         final String selection = CardDatabaseHelper.CardColumns.NAME + "=?";
@@ -80,6 +88,32 @@
         assertThat(qryDismissed).isEqualTo(1);
     }
 
+    @Test
+    public void onDismissed_noFeedbackEmail_shouldNotShowFeedbackDialog() {
+        mResolver.insert(CardContentProvider.URI, generateOneRow());
+        final ContextualCardsFragment fragment =
+                FragmentController.of(new ContextualCardsFragment()).create().get();
+        final ShadowActivity shadowActivity = Shadows.shadowOf(fragment.getActivity());
+
+        mController.onDismissed(getTestSliceCard());
+
+        assertThat(shadowActivity.getNextStartedActivity()).isNull();
+    }
+
+    @Test
+    @Config(qualifiers = "mcc999")
+    public void onDismissed_hasFeedbackEmail_shouldShowFeedbackDialog() {
+        mResolver.insert(CardContentProvider.URI, generateOneRow());
+        final ContextualCardsFragment fragment =
+                FragmentController.of(new ContextualCardsFragment()).create().get();
+        final ShadowActivity shadowActivity = Shadows.shadowOf(fragment.getActivity());
+
+        mController.onDismissed(getTestSliceCard());
+
+        assertThat(shadowActivity.getNextStartedActivity().getComponent().getClassName())
+                .isEqualTo(ContextualCardFeedbackDialog.class.getName());
+    }
+
     private ContentValues generateOneRow() {
         final ContentValues values = new ContentValues();
         values.put(CardDatabaseHelper.CardColumns.NAME, TEST_CARD_NAME);
@@ -93,4 +127,12 @@
 
         return values;
     }
+
+    private ContextualCard getTestSliceCard() {
+        return new ContextualCard.Builder()
+                .setName(TEST_CARD_NAME)
+                .setCardType(ContextualCard.CardType.SLICE)
+                .setSliceUri(Uri.parse(TEST_SLICE_URI))
+                .build();
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardRendererTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardRendererTest.java
index 1ba329c..abfddbb 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardRendererTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/SliceContextualCardRendererTest.java
@@ -20,7 +20,7 @@
 
 import static org.mockito.Mockito.verify;
 
-import android.content.Context;
+import android.app.Activity;
 import android.net.Uri;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -45,7 +45,8 @@
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Robolectric;
+import org.robolectric.android.controller.ActivityController;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 public class SliceContextualCardRendererTest {
@@ -54,19 +55,21 @@
     private LiveData<Slice> mSliceLiveData;
     @Mock
     private ControllerRendererPool mControllerRendererPool;
-    @Mock
-    private SliceContextualCardController mController;
 
-    private Context mContext;
+    private Activity mActivity;
     private SliceContextualCardRenderer mRenderer;
     private LifecycleOwner mLifecycleOwner;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mContext = RuntimeEnvironment.application;
+        final ActivityController<Activity> activityController = Robolectric.buildActivity(
+                Activity.class);
+        mActivity = activityController.get();
+        mActivity.setTheme(R.style.Theme_AppCompat);
+        activityController.create();
         mLifecycleOwner = new ContextualCardsFragment();
-        mRenderer = new SliceContextualCardRenderer(mContext, mLifecycleOwner,
+        mRenderer = new SliceContextualCardRenderer(mActivity, mLifecycleOwner,
                 mControllerRendererPool);
     }
 
@@ -156,9 +159,9 @@
 
     private RecyclerView.ViewHolder getSliceViewHolder() {
         final int viewType = mRenderer.getViewType(false /* isHalfWidth */);
-        final RecyclerView recyclerView = new RecyclerView(mContext);
-        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
-        final View view = LayoutInflater.from(mContext).inflate(viewType, recyclerView, false);
+        final RecyclerView recyclerView = new RecyclerView(mActivity);
+        recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        final View view = LayoutInflater.from(mActivity).inflate(viewType, recyclerView, false);
 
         return mRenderer.createViewHolder(view);
     }
diff --git a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
index 4a0988a..d39b55f 100644
--- a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java
@@ -57,6 +57,7 @@
 
 import androidx.fragment.app.FragmentActivity;
 import androidx.lifecycle.LifecycleOwner;
+import androidx.preference.Preference;
 import androidx.preference.PreferenceCategory;
 import androidx.preference.PreferenceScreen;
 
@@ -69,7 +70,6 @@
 import com.android.settings.widget.ActionButtonPreference;
 import com.android.settings.widget.ActionButtonPreferenceTest;
 import com.android.settings.widget.EntityHeaderController;
-import com.android.settings.wifi.WifiDetailPreference;
 import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
 import com.android.settingslib.core.lifecycle.Lifecycle;
 import com.android.settingslib.widget.LayoutPreference;
@@ -144,27 +144,27 @@
     @Mock
     private ActionButtonPreference mockButtonsPref;
     @Mock
-    private WifiDetailPreference mockSignalStrengthPref;
+    private Preference mockSignalStrengthPref;
     @Mock
-    private WifiDetailPreference mockLinkSpeedPref;
+    private Preference mockLinkSpeedPref;
     @Mock
-    private WifiDetailPreference mockFrequencyPref;
+    private Preference mockFrequencyPref;
     @Mock
-    private WifiDetailPreference mockSecurityPref;
+    private Preference mockSecurityPref;
     @Mock
-    private WifiDetailPreference mockMacAddressPref;
+    private Preference mockMacAddressPref;
     @Mock
-    private WifiDetailPreference mockIpAddressPref;
+    private Preference mockIpAddressPref;
     @Mock
-    private WifiDetailPreference mockGatewayPref;
+    private Preference mockGatewayPref;
     @Mock
-    private WifiDetailPreference mockSubnetPref;
+    private Preference mockSubnetPref;
     @Mock
-    private WifiDetailPreference mockDnsPref;
+    private Preference mockDnsPref;
     @Mock
     private PreferenceCategory mockIpv6Category;
     @Mock
-    private WifiDetailPreference mockIpv6AddressesPref;
+    private Preference mockIpv6AddressesPref;
     @Mock
     private PackageManager mockPackageManager;
 
@@ -336,7 +336,7 @@
     public void securityPreference_stringShouldBeSet() {
         displayAndResume();
 
-        verify(mockSecurityPref).setDetailText(SECURITY);
+        verify(mockSecurityPref).setSummary(SECURITY);
     }
 
     @Test
@@ -413,7 +413,7 @@
 
         displayAndResume();
 
-        verify(mockSignalStrengthPref).setDetailText(expectedStrength);
+        verify(mockSignalStrengthPref).setSummary(expectedStrength);
     }
 
     @Test
@@ -422,7 +422,7 @@
 
         displayAndResume();
 
-        verify(mockLinkSpeedPref).setDetailText(expectedLinkSpeed);
+        verify(mockLinkSpeedPref).setSummary(expectedLinkSpeed);
     }
 
     @Test
@@ -438,7 +438,7 @@
     public void macAddressPref_shouldHaveDetailTextSet() {
         displayAndResume();
 
-        verify(mockMacAddressPref).setDetailText(MAC_ADDRESS);
+        verify(mockMacAddressPref).setSummary(MAC_ADDRESS);
     }
 
     @Test
@@ -447,7 +447,7 @@
 
         displayAndResume();
 
-        verify(mockIpAddressPref).setDetailText(Constants.IPV4_ADDR.getAddress().getHostAddress());
+        verify(mockIpAddressPref).setSummary(Constants.IPV4_ADDR.getAddress().getHostAddress());
     }
 
     @Test
@@ -458,8 +458,8 @@
 
         displayAndResume();
 
-        verify(mockSubnetPref).setDetailText("255.255.255.128");
-        verify(mockGatewayPref).setDetailText("192.0.2.127");
+        verify(mockSubnetPref).setSummary("255.255.255.128");
+        verify(mockGatewayPref).setSummary("192.0.2.127");
     }
 
     @Test
@@ -470,7 +470,7 @@
 
         displayAndResume();
 
-        verify(mockDnsPref).setDetailText(
+        verify(mockDnsPref).setSummary(
                 "8.8.4.4\n" +
                         "8.8.8.8\n" +
                         Constants.IPV6_DNS.getHostAddress());
@@ -551,15 +551,15 @@
 
         lp.addRoute(Constants.IPV4_DEFAULT);
         updateLinkProperties(lp);
-        inOrder.verify(mockGatewayPref).setDetailText(Constants.IPV4_GATEWAY.getHostAddress());
+        inOrder.verify(mockGatewayPref).setSummary(Constants.IPV4_GATEWAY.getHostAddress());
         inOrder.verify(mockGatewayPref).setVisible(true);
 
         lp.addLinkAddress(Constants.IPV4_ADDR);
         lp.addRoute(Constants.IPV4_SUBNET);
         updateLinkProperties(lp);
-        inOrder.verify(mockIpAddressPref).setDetailText(asString(Constants.IPV4_ADDR));
+        inOrder.verify(mockIpAddressPref).setSummary(asString(Constants.IPV4_ADDR));
         inOrder.verify(mockIpAddressPref).setVisible(true);
-        inOrder.verify(mockSubnetPref).setDetailText("255.255.255.128");
+        inOrder.verify(mockSubnetPref).setSummary("255.255.255.128");
         inOrder.verify(mockSubnetPref).setVisible(true);
 
         lp.addLinkAddress(Constants.IPV6_GLOBAL1);
@@ -578,13 +578,13 @@
 
         lp.addDnsServer(Constants.IPV6_DNS);
         updateLinkProperties(lp);
-        inOrder.verify(mockDnsPref).setDetailText(Constants.IPV6_DNS.getHostAddress());
+        inOrder.verify(mockDnsPref).setSummary(Constants.IPV6_DNS.getHostAddress());
         inOrder.verify(mockDnsPref).setVisible(true);
 
         lp.addDnsServer(Constants.IPV4_DNS1);
         lp.addDnsServer(Constants.IPV4_DNS2);
         updateLinkProperties(lp);
-        inOrder.verify(mockDnsPref).setDetailText(
+        inOrder.verify(mockDnsPref).setSummary(
                 Constants.IPV6_DNS.getHostAddress() + "\n" +
                         Constants.IPV4_DNS1.getHostAddress() + "\n" +
                         Constants.IPV4_DNS2.getHostAddress());