Merge "Bug fix - when enrolled, biometrics have ok safety state." into tm-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index be4810f..26f0c4f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1517,6 +1517,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="package" />
             </intent-filter>
+            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+                       android:value="@string/menu_key_apps"/>
         </activity-alias>
 
         <activity android:name=".applications.InstalledAppOpenByDefaultActivity"
@@ -1529,6 +1531,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:scheme="package" />
             </intent-filter>
+            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+                       android:value="@string/menu_key_apps"/>
         </activity>
 
         <!-- Provide direct entry into manage apps showing running services. -->
@@ -1947,8 +1951,7 @@
         <activity android:name=".accessibility.AccessibilitySettingsForSetupWizardActivity"
                 android:icon="@drawable/ic_accessibility_suggestion"
                 android:label="@string/vision_settings_title"
-                android:exported="true"
-                android:theme="@style/GlifV3Theme.Light">
+                android:exported="true">
             <intent-filter android:priority="1">
                 <action android:name="android.settings.ACCESSIBILITY_SETTINGS_FOR_SUW" />
                 <category android:name="android.intent.category.DEFAULT" />
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index ba4d2f6..96f0210 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -21,38 +21,6 @@
         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;solid android:color=&quot;#BCEDDF&quot;/>"
-        errorLine2="                   ~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/drawable/accessibility_qs_tooltips_background.xml"
-            line="22"
-            column="20"/>
-    </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;solid android:color=&quot;#BCEDDF&quot;/>"
-        errorLine2="                   ~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/drawable/accessibility_qs_tooltips_background.xml"
-            line="35"
-            column="20"/>
-    </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:startColor=&quot;#4D000000&quot;"
         errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -117,6 +85,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;divider_color&quot;>#20ffffff&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="20"
+            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_accessibility_background&quot;>#783BE5&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -149,8 +133,40 @@
         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;divider_color&quot;>#20ffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        errorLine1="    &lt;color name=&quot;setup_wizard_wifi_color_dark&quot;>#89ffffff&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="22"
+            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;setup_wizard_wifi_color_light&quot;>#89000000&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="23"
+            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;lock_pattern_background&quot;>#00000000&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
             line="25"
@@ -181,22 +197,6 @@
         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;setup_wizard_wifi_color_dark&quot;>#89ffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="27"
-            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;notification_importance_button_unselected&quot;>#5F6368&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -213,8 +213,8 @@
         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;setup_wizard_wifi_color_light&quot;>#89000000&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        errorLine1="    &lt;color name=&quot;fingerprint_title_color&quot;>#ffffffff&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
             line="28"
@@ -245,43 +245,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;lock_pattern_background&quot;>#00000000&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="30"
-            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;fingerprint_title_color&quot;>#ffffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="33"
-            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;fingerprint_message_color&quot;>#de000000&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="34"
+            line="29"
             column="5"/>
     </issue>
 
@@ -297,7 +265,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="36"
+            line="31"
             column="5"/>
     </issue>
 
@@ -313,7 +281,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="37"
+            line="32"
             column="5"/>
     </issue>
 
@@ -329,7 +297,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="41"
+            line="36"
             column="5"/>
     </issue>
 
@@ -345,6 +313,54 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
+            line="39"
+            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;material_blue_500&quot;>#4285F4&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="42"
+            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;material_blue_700&quot;>#3367D6&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
+            line="43"
+            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;material_grey_100&quot;>#f5f5f5&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
             line="44"
             column="5"/>
     </issue>
@@ -373,10 +389,26 @@
         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_blue_500&quot;>#4285F4&lt;/color>"
+        errorLine1="    &lt;color name=&quot;material_grey_200&quot;>#ffffff&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
+            line="45"
+            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;message_text_incoming&quot;>#ffffffff&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values/colors.xml"
             line="47"
             column="5"/>
     </issue>
@@ -405,8 +437,8 @@
         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_blue_700&quot;>#3367D6&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        errorLine1="    &lt;color name=&quot;message_text_outgoing&quot;>#ff323232&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
             line="48"
@@ -437,8 +469,8 @@
         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_grey_100&quot;>#f5f5f5&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        errorLine1="    &lt;color name=&quot;timestamp_text_outgoing&quot;>#99323232&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
             line="49"
@@ -469,8 +501,8 @@
         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_grey_200&quot;>#ffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        errorLine1="    &lt;color name=&quot;timestamp_text_incoming&quot;>#99ffffff&lt;/color>"
+        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
             line="50"
@@ -501,75 +533,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;message_text_incoming&quot;>#ffffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="52"
-            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;message_text_outgoing&quot;>#ff323232&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="53"
-            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;timestamp_text_outgoing&quot;>#99323232&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="54"
-            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;timestamp_text_incoming&quot;>#99ffffff&lt;/color>"
-        errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values/colors.xml"
-            line="55"
-            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;message_bubble_incoming&quot;>#689f38&lt;/color>"
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="56"
+            line="51"
             column="5"/>
     </issue>
 
@@ -585,7 +553,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="57"
+            line="52"
             column="5"/>
     </issue>
 
@@ -601,7 +569,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="58"
+            line="53"
             column="5"/>
     </issue>
 
@@ -617,7 +585,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="59"
+            line="54"
             column="5"/>
     </issue>
 
@@ -633,7 +601,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="60"
+            line="55"
             column="5"/>
     </issue>
 
@@ -649,7 +617,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="61"
+            line="56"
             column="5"/>
     </issue>
 
@@ -665,7 +633,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="63"
+            line="58"
             column="5"/>
     </issue>
 
@@ -681,7 +649,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="66"
+            line="61"
             column="5"/>
     </issue>
 
@@ -697,7 +665,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="69"
+            line="64"
             column="5"/>
     </issue>
 
@@ -713,7 +681,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="72"
+            line="67"
             column="5"/>
     </issue>
 
@@ -729,7 +697,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="75"
+            line="70"
             column="5"/>
     </issue>
 
@@ -745,7 +713,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="76"
+            line="71"
             column="5"/>
     </issue>
 
@@ -761,7 +729,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="77"
+            line="72"
             column="5"/>
     </issue>
 
@@ -777,7 +745,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="78"
+            line="73"
             column="5"/>
     </issue>
 
@@ -793,7 +761,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="79"
+            line="74"
             column="5"/>
     </issue>
 
@@ -809,7 +777,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="80"
+            line="75"
             column="5"/>
     </issue>
 
@@ -825,7 +793,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="81"
+            line="76"
             column="5"/>
     </issue>
 
@@ -841,7 +809,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="82"
+            line="77"
             column="5"/>
     </issue>
 
@@ -857,7 +825,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="83"
+            line="78"
             column="5"/>
     </issue>
 
@@ -873,7 +841,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="84"
+            line="79"
             column="5"/>
     </issue>
 
@@ -889,7 +857,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="85"
+            line="80"
             column="5"/>
     </issue>
 
@@ -905,7 +873,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="86"
+            line="81"
             column="5"/>
     </issue>
 
@@ -921,7 +889,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="87"
+            line="82"
             column="5"/>
     </issue>
 
@@ -937,7 +905,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="88"
+            line="83"
             column="5"/>
     </issue>
 
@@ -953,7 +921,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="89"
+            line="84"
             column="5"/>
     </issue>
 
@@ -969,7 +937,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="90"
+            line="85"
             column="5"/>
     </issue>
 
@@ -985,7 +953,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="91"
+            line="86"
             column="5"/>
     </issue>
 
@@ -1001,7 +969,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="92"
+            line="87"
             column="5"/>
     </issue>
 
@@ -1017,7 +985,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="93"
+            line="88"
             column="5"/>
     </issue>
 
@@ -1033,7 +1001,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="100"
+            line="95"
             column="5"/>
     </issue>
 
@@ -1049,7 +1017,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="103"
+            line="98"
             column="5"/>
     </issue>
 
@@ -1065,7 +1033,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="104"
+            line="99"
             column="5"/>
     </issue>
 
@@ -1081,7 +1049,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="105"
+            line="100"
             column="5"/>
     </issue>
 
@@ -1097,7 +1065,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="106"
+            line="101"
             column="5"/>
     </issue>
 
@@ -1113,7 +1081,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="107"
+            line="102"
             column="5"/>
     </issue>
 
@@ -1129,7 +1097,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="108"
+            line="103"
             column="5"/>
     </issue>
 
@@ -1145,7 +1113,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="111"
+            line="106"
             column="5"/>
     </issue>
 
@@ -1161,7 +1129,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="112"
+            line="107"
             column="5"/>
     </issue>
 
@@ -1177,7 +1145,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="113"
+            line="108"
             column="5"/>
     </issue>
 
@@ -1193,7 +1161,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="114"
+            line="109"
             column="5"/>
     </issue>
 
@@ -1209,7 +1177,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="115"
+            line="110"
             column="5"/>
     </issue>
 
@@ -1225,7 +1193,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="118"
+            line="113"
             column="5"/>
     </issue>
 
@@ -1241,7 +1209,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="119"
+            line="114"
             column="5"/>
     </issue>
 
@@ -1257,7 +1225,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="120"
+            line="115"
             column="5"/>
     </issue>
 
@@ -1273,7 +1241,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="123"
+            line="118"
             column="5"/>
     </issue>
 
@@ -1289,7 +1257,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="124"
+            line="119"
             column="5"/>
     </issue>
 
@@ -1305,7 +1273,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="125"
+            line="120"
             column="5"/>
     </issue>
 
@@ -1321,7 +1289,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="126"
+            line="121"
             column="5"/>
     </issue>
 
@@ -1337,7 +1305,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="127"
+            line="122"
             column="5"/>
     </issue>
 
@@ -1353,7 +1321,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="128"
+            line="123"
             column="5"/>
     </issue>
 
@@ -1369,7 +1337,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="135"
+            line="130"
             column="5"/>
     </issue>
 
@@ -1385,7 +1353,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="136"
+            line="131"
             column="5"/>
     </issue>
 
@@ -1401,7 +1369,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="137"
+            line="132"
             column="5"/>
     </issue>
 
@@ -1417,7 +1385,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="143"
+            line="138"
             column="5"/>
     </issue>
 
@@ -1433,7 +1401,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="145"
+            line="140"
             column="5"/>
     </issue>
 
@@ -1449,7 +1417,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="149"
+            line="144"
             column="5"/>
     </issue>
 
@@ -1465,7 +1433,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="150"
+            line="145"
             column="5"/>
     </issue>
 
@@ -1481,7 +1449,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="151"
+            line="146"
             column="5"/>
     </issue>
 
@@ -1497,7 +1465,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="152"
+            line="147"
             column="5"/>
     </issue>
 
@@ -1513,7 +1481,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="153"
+            line="148"
             column="5"/>
     </issue>
 
@@ -1529,7 +1497,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="154"
+            line="149"
             column="5"/>
     </issue>
 
@@ -1545,7 +1513,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="155"
+            line="150"
             column="5"/>
     </issue>
 
@@ -1561,7 +1529,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="156"
+            line="151"
             column="5"/>
     </issue>
 
@@ -1577,7 +1545,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="159"
+            line="154"
             column="5"/>
     </issue>
 
@@ -1593,7 +1561,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="160"
+            line="155"
             column="5"/>
     </issue>
 
@@ -1609,7 +1577,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="161"
+            line="156"
             column="5"/>
     </issue>
 
@@ -1625,7 +1593,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="162"
+            line="157"
             column="5"/>
     </issue>
 
@@ -1641,7 +1609,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="163"
+            line="158"
             column="5"/>
     </issue>
 
@@ -1657,7 +1625,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="164"
+            line="159"
             column="5"/>
     </issue>
 
@@ -1673,7 +1641,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="165"
+            line="160"
             column="5"/>
     </issue>
 
@@ -1689,7 +1657,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="166"
+            line="161"
             column="5"/>
     </issue>
 
@@ -1705,7 +1673,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="169"
+            line="164"
             column="5"/>
     </issue>
 
@@ -1721,7 +1689,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="170"
+            line="165"
             column="5"/>
     </issue>
 
@@ -1737,7 +1705,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="171"
+            line="166"
             column="5"/>
     </issue>
 
@@ -1753,7 +1721,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="172"
+            line="167"
             column="5"/>
     </issue>
 
@@ -1769,7 +1737,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="173"
+            line="168"
             column="5"/>
     </issue>
 
@@ -1785,7 +1753,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="174"
+            line="169"
             column="5"/>
     </issue>
 
@@ -1801,7 +1769,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="177"
+            line="172"
             column="5"/>
     </issue>
 
@@ -1817,7 +1785,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="178"
+            line="173"
             column="5"/>
     </issue>
 
@@ -1833,7 +1801,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="179"
+            line="174"
             column="5"/>
     </issue>
 
@@ -1849,7 +1817,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="180"
+            line="175"
             column="5"/>
     </issue>
 
@@ -1865,7 +1833,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="181"
+            line="176"
             column="5"/>
     </issue>
 
@@ -1881,7 +1849,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="182"
+            line="177"
             column="5"/>
     </issue>
 
@@ -1897,7 +1865,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="185"
+            line="180"
             column="5"/>
     </issue>
 
@@ -1913,7 +1881,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="186"
+            line="181"
             column="5"/>
     </issue>
 
@@ -1929,7 +1897,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="187"
+            line="182"
             column="5"/>
     </issue>
 
@@ -1945,7 +1913,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="188"
+            line="183"
             column="5"/>
     </issue>
 
@@ -1961,7 +1929,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="189"
+            line="184"
             column="5"/>
     </issue>
 
@@ -1977,7 +1945,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="190"
+            line="185"
             column="5"/>
     </issue>
 
@@ -1993,7 +1961,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="196"
+            line="191"
             column="5"/>
     </issue>
 
@@ -2009,7 +1977,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="197"
+            line="192"
             column="5"/>
     </issue>
 
@@ -2025,7 +1993,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="198"
+            line="193"
             column="5"/>
     </issue>
 
@@ -2041,7 +2009,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="199"
+            line="194"
             column="5"/>
     </issue>
 
@@ -2057,7 +2025,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="201"
+            line="196"
             column="5"/>
     </issue>
 
@@ -2073,7 +2041,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="203"
+            line="198"
             column="5"/>
     </issue>
 
@@ -2089,7 +2057,7 @@
         errorLine2="    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/colors.xml"
-            line="206"
+            line="201"
             column="5"/>
     </issue>
 
@@ -2837,6 +2805,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/accessibility_feature_background&quot;/>"
+        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/drawable/ic_accessibility_animation.xml"
+            line="22"
+            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:color=&quot;@color/accessibility_magnification_background&quot;/>"
         errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -2949,6 +2933,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/accessibility_feature_background&quot;/>"
+        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/drawable/ic_color_and_motion.xml"
+            line="22"
+            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:color=&quot;@color/accessibility_color_inversion_background&quot;/>"
         errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
@@ -3736,22 +3736,6 @@
         errorLine1="            android:color=&quot;@color/accessibility_feature_background&quot;/>"
         errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
         <location
-            file="res/drawable/ic_color_and_motion.xml"
-            line="22"
-            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:color=&quot;@color/accessibility_feature_background&quot;/>"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
             file="res/drawable/ic_vibration.xml"
             line="22"
             column="13"/>
@@ -4533,11 +4517,27 @@
         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;string name=&quot;sync_plug&quot; msgid=&quot;7956982719077985381&quot;>&quot;‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‏‎‎‏‏‎‏‏‎‎‏‏‏‎‎‎‎‏‏‎‏‎‎‎‎‎‎‎‎‎‎‏‏‎‏‎‎‏‎‎‎‎‏‎‏‎‏‏‎‎‎‏‏‎‎‏‎‏‎‎‏‎‎‏‏‎&quot;&lt;font fgcolor=&quot;#ffffffff&quot;>&quot;‎‏‎‎‏‏‏‎Welcome to Google sync!‎‏‎‎‏‏‎&quot;&lt;/font>&quot;‎‏‎‎‏‏‏‎ ‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎A Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are.‎‏‎‎‏‎&quot;&lt;/string>"
+        errorLine2="                                                                                                                                                                         ~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="res/values-en-rXC/strings.xml"
+            line="3108"
+            column="170"/>
+    </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;string name=&quot;sync_plug&quot; msgid=&quot;7956982719077985381&quot;>&lt;font fgcolor=&quot;#ffffffff&quot;>&quot;Welcome to Google sync!&quot;&lt;/font>&quot; \nA Google approach to syncing data to allow access to your contacts, appointments and more from wherever you are.&quot;&lt;/string>"
         errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values-en-rAU/strings.xml"
-            line="3104"
+            line="3112"
             column="64"/>
     </issue>
 
@@ -4553,7 +4553,7 @@
         errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values-en-rCA/strings.xml"
-            line="3104"
+            line="3112"
             column="64"/>
     </issue>
 
@@ -4569,7 +4569,7 @@
         errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values-en-rGB/strings.xml"
-            line="3104"
+            line="3112"
             column="64"/>
     </issue>
 
@@ -4585,7 +4585,7 @@
         errorLine2="                                                               ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values-en-rIN/strings.xml"
-            line="3104"
+            line="3112"
             column="64"/>
     </issue>
 
@@ -4597,27 +4597,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;string name=&quot;sync_plug&quot; msgid=&quot;7956982719077985381&quot;>&quot;‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‏‎‎‏‏‎‏‏‎‎‏‏‏‎‎‎‎‏‏‎‏‎‎‎‎‎‎‎‎‎‎‏‏‎‏‎‎‏‎‎‎‎‏‎‏‎‏‏‎‎‎‏‏‎‎‏‎‏‎‎‏‎‎‏‏‎&quot;&lt;font fgcolor=&quot;#ffffffff&quot;>&quot;‎‏‎‎‏‏‏‎Welcome to Google sync!‎‏‎‎‏‏‎&quot;&lt;/font>&quot;‎‏‎‎‏‏‏‎ ‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎A Google approach to syncing data to allow access to your contacts, appointments, and more from wherever you are.‎‏‎‎‏‎&quot;&lt;/string>"
-        errorLine2="                                                                                                                                                                         ~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="res/values-en-rXC/strings.xml"
-            line="3104"
-            column="170"/>
-    </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;string name=&quot;sync_plug&quot;>&lt;font fgcolor=&quot;#ffffffff&quot;>Welcome to Google sync!&lt;/font>"
         errorLine2="                                   ~~~~~~~~~~~~~~~~~~~">
         <location
             file="res/values/strings.xml"
-            line="7142"
+            line="7103"
             column="36"/>
     </issue>
 
@@ -4629,22 +4613,6 @@
         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;android:background&quot;>#ff000000&lt;/item>"
-        errorLine2="                                        ^">
-        <location
-            file="res/values/styles.xml"
-            line="202"
-            column="41"/>
-    </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;android:colorError&quot;>@color/settings_dialog_colorError&lt;/item>"
         errorLine2="                                        ^">
         <location
@@ -4713,7 +4681,7 @@
         errorLine2="                                        ^">
         <location
             file="res/values/themes.xml"
-            line="135"
+            line="126"
             column="41"/>
     </issue>
 
@@ -4729,7 +4697,7 @@
         errorLine2="                                        ^">
         <location
             file="res/values/themes.xml"
-            line="135"
+            line="126"
             column="41"/>
     </issue>
 
@@ -4745,6 +4713,38 @@
         errorLine2="                                            ^">
         <location
             file="res/values/themes.xml"
+            line="183"
+            column="45"/>
+    </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;android:navigationBarColor&quot;>#00000000&lt;/item>"
+        errorLine2="                                                ^">
+        <location
+            file="res/values/themes.xml"
+            line="184"
+            column="49"/>
+    </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;android:statusBarColor&quot;>#00000000&lt;/item>"
+        errorLine2="                                            ^">
+        <location
+            file="res/values/themes.xml"
             line="192"
             column="45"/>
     </issue>
@@ -4773,38 +4773,6 @@
         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;android:statusBarColor&quot;>#00000000&lt;/item>"
-        errorLine2="                                            ^">
-        <location
-            file="res/values/themes.xml"
-            line="201"
-            column="45"/>
-    </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;android:navigationBarColor&quot;>#00000000&lt;/item>"
-        errorLine2="                                                ^">
-        <location
-            file="res/values/themes.xml"
-            line="202"
-            column="49"/>
-    </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;wifi_signal_color&quot;>@color/setup_wizard_wifi_color_dark&lt;/item>"
         errorLine2="                                       ^">
         <location
diff --git a/res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml b/res/drawable/accessibility_auto_added_qs_tooltip_illustration.xml
similarity index 100%
rename from res/drawable/accessibility_auto_added_qs_tooltips_illustration.xml
rename to res/drawable/accessibility_auto_added_qs_tooltip_illustration.xml
diff --git a/res/drawable/accessibility_qs_tooltips_background.xml b/res/drawable/accessibility_qs_tooltip_background.xml
similarity index 100%
rename from res/drawable/accessibility_qs_tooltips_background.xml
rename to res/drawable/accessibility_qs_tooltip_background.xml
diff --git a/res/drawable/accessibility_qs_tooltips_illustration.xml b/res/drawable/accessibility_qs_tooltip_illustration.xml
similarity index 100%
rename from res/drawable/accessibility_qs_tooltips_illustration.xml
rename to res/drawable/accessibility_qs_tooltip_illustration.xml
diff --git a/res/drawable/accessibility_text_reading_reset_button_background.xml b/res/drawable/accessibility_text_reading_reset_button_background.xml
deleted file mode 100644
index b86facf..0000000
--- a/res/drawable/accessibility_text_reading_reset_button_background.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2022 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.
--->
-
-<shape
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
-    android:shape="rectangle">
-
-    <corners android:radius="100dp" />
-    <solid android:color="?androidprv:attr/colorAccentPrimary" />
-</shape>
diff --git a/res/layout/accessibility_qs_tooltips.xml b/res/layout/accessibility_qs_tooltip.xml
similarity index 86%
rename from res/layout/accessibility_qs_tooltips.xml
rename to res/layout/accessibility_qs_tooltip.xml
index 2bc9f5f..41501aa 100644
--- a/res/layout/accessibility_qs_tooltips.xml
+++ b/res/layout/accessibility_qs_tooltip.xml
@@ -20,13 +20,13 @@
     android:layout_height="wrap_content"
     android:gravity="center"
     android:orientation="vertical"
-    android:background="@drawable/accessibility_qs_tooltips_background">
+    android:background="@drawable/accessibility_qs_tooltip_background">
 
     <ImageView
         android:id="@+id/qs_illustration"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingTop="@dimen/accessibility_qs_tooltips_margin_top"
+        android:paddingTop="@dimen/accessibility_qs_tooltip_margin_top"
         android:layout_gravity="center_horizontal"
         android:contentDescription="@null" />
 
@@ -34,7 +34,7 @@
         android:id="@+id/qs_content"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="@dimen/accessibility_qs_tooltips_margin"
+        android:padding="@dimen/accessibility_qs_tooltip_margin"
         android:textColor="@android:color/black"
         android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
         android:textSize="16sp" />
diff --git a/res/layout/accessibility_text_reading_reset_button.xml b/res/layout/accessibility_text_reading_reset_button.xml
index 43800df..dd9128b 100644
--- a/res/layout/accessibility_text_reading_reset_button.xml
+++ b/res/layout/accessibility_text_reading_reset_button.xml
@@ -28,9 +28,8 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
-        android:background="@drawable/accessibility_text_reading_reset_button_background"
         android:paddingHorizontal="24dp"
         android:paddingVertical="14dp"
         android:text="@string/accessibility_text_reading_reset_button_title"
-        android:textAppearance="?android:attr/textAppearanceMedium" />
+        style="@style/ActionPrimaryButton"/>
 </FrameLayout>
diff --git a/res/layout/profile_select_tablayout.xml b/res/layout/profile_select_tablayout.xml
deleted file mode 100644
index 3e83bb9..0000000
--- a/res/layout/profile_select_tablayout.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-  Copyright (C) 2019 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.
-  -->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:theme="@style/Theme.MaterialComponents.DayNight"
-    android:clipToPadding="true"
-    android:clipChildren="true"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <com.google.android.material.tabs.TabLayout
-        android:background="@android:color/transparent"
-        android:id="@+id/tabs"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        app:tabMaxWidth="0dp"
-        app:tabGravity="fill"
-        app:tabMode="fixed"
-        app:tabIndicatorColor="@*android:color/accent_device_default"
-        app:tabSelectedTextColor="@*android:color/accent_device_default"
-        app:tabTextColor="?android:attr/textColorSecondary" />
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="?android:attr/listDivider"/>
-
-    <androidx.viewpager.widget.ViewPager
-        android:id="@+id/view_pager"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-    </androidx.viewpager.widget.ViewPager>
-</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 635bd82..c44a1cb 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -276,9 +276,9 @@
     <dimen name="accessibility_icon_size">32dp</dimen>
     <dimen name="accessibility_icon_foreground_size">18dp</dimen>
 
-    <!-- Accessibility quick settings tooltips -->
-    <dimen name="accessibility_qs_tooltips_margin">20dp</dimen>
-    <dimen name="accessibility_qs_tooltips_margin_top">27dp</dimen>
+    <!-- Accessibility quick settings tooltip -->
+    <dimen name="accessibility_qs_tooltip_margin">20dp</dimen>
+    <dimen name="accessibility_qs_tooltip_margin_top">27dp</dimen>
 
     <!-- Restricted icon in switch bar -->
     <dimen name="restricted_icon_margin_end">16dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9083674..c1a6dfe 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5554,12 +5554,28 @@
     <string name="accessibility_service_primary_switch_title">Use <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
     <!-- Used in the accessibility service settings to open the activity. [CHAR LIMIT=NONE] -->
     <string name="accessibility_service_primary_open_title">Open <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
-    <!-- Used in the accessibility service settings to show quick settings tooltips for auto-added feature. [CHAR LIMIT=NONE] -->
-    <string name="accessibility_service_auto_added_qs_tooltips_content"><xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> added to Quick Settings. Swipe down to turn it on or off anytime.</string>
-    <!-- Used in the accessibility service settings to show quick settings tooltips. [CHAR LIMIT=NONE] -->
-    <string name="accessibility_service_qs_tooltips_content">You can also add <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> to Quick Settings from the top of your screen</string>
-    <!-- Used in the accessibility action for accessibility quick settings tooltips to dismiss. [CHAR LIMIT=NONE] -->
-    <string name="accessibility_quick_settings_tooltips_dismiss">Dismiss</string>
+    <!-- Used in the accessibility service settings to show quick settings tooltip for auto-added feature. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_service_auto_added_qs_tooltip_content"><xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> added to Quick Settings. Swipe down to turn it on or off anytime.</string>
+    <!-- Used in the accessibility service settings to show quick settings tooltip. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_service_qs_tooltip_content">You can also add <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g> to Quick Settings from the top of your screen</string>
+    <!-- Used in the color correction settings to show quick settings tooltip for auto-added feature. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_color_correction_auto_added_qs_tooltip_content">Color correction added to Quick Settings. Swipe down to turn it on or off anytime.</string>
+    <!-- Used in the color correction settings to show quick settings tooltip. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_color_correction_qs_tooltip_content">You can also add color correction to Quick Settings from the top of your screen</string>
+    <!-- Used in the color inversion settings to show quick settings tooltip for auto-added feature. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_color_inversion_auto_added_qs_tooltip_content">Color inversion added to Quick Settings. Swipe down to turn it on or off anytime.</string>
+    <!-- Used in the color inversion settings to show quick settings tooltip. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_color_inversion_qs_tooltip_content">You can also add color inversion to Quick Settings from the top of your screen</string>
+    <!-- Used in the reduce bright colors settings to show quick settings tooltip for auto-added feature. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_reduce_bright_colors_auto_added_qs_tooltip_content">Extra dim added to Quick Settings. Swipe down to turn it on or off anytime.</string>
+    <!-- Used in the reduce bright colors settings to show quick settings tooltip. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_reduce_bright_colors_qs_tooltip_content">You can also add extra dim to Quick Settings from the top of your screen</string>
+    <!-- Used in the One-hand mode color to show quick settings tooltip for auto-added feature. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_one_handed_mode_auto_added_qs_tooltip_content">One-handed mode added to Quick Settings. Swipe down to turn it on or off anytime.</string>
+    <!-- Used in the One-hand mode settings to show quick settings tooltip. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_one_handed_mode_qs_tooltip_content">You can also add one-handed mode to Quick Settings from the top of your screen</string>
+    <!-- Used in the accessibility action for accessibility quick settings tooltip to dismiss. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_quick_settings_tooltip_dismiss">Dismiss</string>
     <!-- Intro for color correction settings screen to control turning on/off the feature entirely. [CHAR LIMIT=NONE] -->
     <string name="accessibility_daltonizer_about_intro_text" product="default">Adjust how colors display on your phone</string>
     <!-- Intro for color correction settings screen to control turning on/off the feature entirely. [CHAR LIMIT=NONE] -->
@@ -5619,10 +5635,10 @@
     <!-- Title for the accessibility audio adjustment page. [CHAR LIMIT=50] -->
     <string name="accessibility_audio_adjustment_title">Audio adjustment</string>
     <!-- Title for control audio description preference. [CHAR LIMIT=50] -->
-    <string name="accessibility_toggle_audio_description_preference_title">Audio Description</string>
+    <string name="accessibility_toggle_audio_description_preference_title">Audio description</string>
     <!-- Summary for accessibility preference for audio description when need
     audio description in adopted apps. [CHAR_LIMIT=NONE] -->
-    <string name="accessibility_audio_description_summary">Select audio sound track with audio description by default</string>
+    <string name="accessibility_audio_description_summary">Hear a description of what\u2019s happening on screen in supported movies and shows</string>
     <!-- List of synonyms used in the settings search bar to find the "Audio Description. [CHAR LIMIT=NONE] -->
     <string name="keywords_audio_description">audio description, audio, description, low vision,</string>
 
@@ -14010,4 +14026,13 @@
 
     <!-- Text to explain an activity is a temporary placeholder [CHAR LIMIT=none] -->
     <string name="placeholder_activity" translatable="false">*This is a temporary placeholder fallback activity.</string>
+
+    <!-- The title of the spatial audio [CHAR LIMIT=none] -->
+    <string name="bluetooth_details_spatial_audio_title">Spatial audio</string>
+    <!-- The summary of the spatial audio [CHAR LIMIT=none] -->
+    <string name="bluetooth_details_spatial_audio_summary">Immersive audio seems like it\u0027s coming from all around you. Only works with some media.</string>
+    <!-- The title of the head tracking [CHAR LIMIT=none] -->
+    <string name="bluetooth_details_head_tracking_title">Make audio more realistic</string>
+    <!-- The summary of the head tracking [CHAR LIMIT=none] -->
+    <string name="bluetooth_details_head_tracking_summary">Shift positioning of audio so it sounds more natural.</string>
 </resources>
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index 2e253e2..509aed6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -69,16 +69,6 @@
             settings:keywords="@string/keywords_magnification"
             settings:controller="com.android.settings.accessibility.MagnificationPreferenceController"/>
 
-        <SwitchPreference
-            android:key="toggle_audio_description"
-            android:persistent="false"
-            android:icon="@drawable/ic_audio_description"
-            android:summary="@string/accessibility_audio_description_summary"
-            android:title="@string/accessibility_toggle_audio_description_preference_title"
-            settings:keywords="@string/keywords_audio_description"
-            settings:searchable="true"
-            settings:controller="com.android.settings.accessibility.AudioDescriptionPreferenceController"/>
-
     </PreferenceCategory>
 
     <PreferenceCategory
@@ -150,6 +140,16 @@
         android:persistent="false"
         android:title="@string/audio_category_title">
 
+        <SwitchPreference
+            android:key="toggle_audio_description"
+            android:persistent="false"
+            android:icon="@drawable/ic_audio_description"
+            android:summary="@string/accessibility_audio_description_summary"
+            android:title="@string/accessibility_toggle_audio_description_preference_title"
+            settings:keywords="@string/keywords_audio_description"
+            settings:searchable="true"
+            settings:controller="com.android.settings.accessibility.AudioDescriptionPreferenceController"/>
+
         <Preference
             android:key="hearing_aid_preference"
             android:icon="@drawable/ic_hearing_aid"
diff --git a/res/xml/bluetooth_device_details_fragment.xml b/res/xml/bluetooth_device_details_fragment.xml
index 9df1955..b21d5c9 100644
--- a/res/xml/bluetooth_device_details_fragment.xml
+++ b/res/xml/bluetooth_device_details_fragment.xml
@@ -53,6 +53,9 @@
         android:key="device_companion_apps"/>
 
     <PreferenceCategory
+        android:key="spatial_audio_group"/>
+
+    <PreferenceCategory
         android:key="bluetooth_profiles"/>
 
     <com.android.settingslib.widget.FooterPreference
diff --git a/res/xml/notification_access_permission_details.xml b/res/xml/notification_access_permission_details.xml
index cec383c..9867b6d 100644
--- a/res/xml/notification_access_permission_details.xml
+++ b/res/xml/notification_access_permission_details.xml
@@ -26,7 +26,7 @@
         android:layout="@layout/settings_entity_header"
         settings:controller="com.android.settings.applications.specialaccess.notificationaccess.HeaderPreferenceController"/>
 
-    <com.android.settings.widget.FilterTouchesSwitchPreference
+    <com.android.settingslib.RestrictedSwitchPreference
         android:key="notification_access_switch"
         android:title="@string/notification_access_detail_switch"
         settings:controller="com.android.settings.applications.specialaccess.notificationaccess.ApprovalPreferenceController"/>
diff --git a/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceController.java b/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceController.java
new file mode 100644
index 0000000..d272a0b
--- /dev/null
+++ b/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceController.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2022 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.accessibility;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.os.Bundle;
+import android.os.Handler;
+
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.core.TogglePreferenceController;
+import com.android.settingslib.PrimarySwitchPreference;
+import com.android.settingslib.core.lifecycle.LifecycleObserver;
+import com.android.settingslib.core.lifecycle.events.OnCreate;
+import com.android.settingslib.core.lifecycle.events.OnSaveInstanceState;
+
+/** PrimarySwitchPreferenceController that shows quick settings tooltip on first use. */
+public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceController
+        extends TogglePreferenceController
+        implements LifecycleObserver, OnCreate, OnSaveInstanceState {
+    private static final String KEY_SAVED_QS_TOOLTIP_RESHOW = "qs_tooltip_reshow";
+    private final Handler mHandler;
+    private PrimarySwitchPreference mPreference;
+    private AccessibilityQuickSettingsTooltipWindow mTooltipWindow;
+    private boolean mNeedsQSTooltipReshow = false;
+
+    /** Returns the accessibility tile component name. */
+    abstract ComponentName getTileComponentName();
+
+    /** Returns the accessibility tile tooltip content. */
+    abstract CharSequence getTileTooltipContent();
+
+    public AccessibilityQuickSettingsPrimarySwitchPreferenceController(Context context,
+            String preferenceKey) {
+        super(context, preferenceKey);
+        mHandler = new Handler(context.getMainLooper());
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        // Restore the tooltip.
+        if (savedInstanceState != null) {
+            if (savedInstanceState.containsKey(KEY_SAVED_QS_TOOLTIP_RESHOW)) {
+                mNeedsQSTooltipReshow = savedInstanceState.getBoolean(KEY_SAVED_QS_TOOLTIP_RESHOW);
+            }
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        if (mTooltipWindow != null) {
+            outState.putBoolean(KEY_SAVED_QS_TOOLTIP_RESHOW, mTooltipWindow.isShowing());
+        }
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+        mPreference = screen.findPreference(getPreferenceKey());
+        if (mNeedsQSTooltipReshow) {
+            mHandler.post(this::showQuickSettingsTooltipIfNeeded);
+        }
+    }
+
+    @Override
+    public boolean setChecked(boolean isChecked) {
+        if (isChecked) {
+            showQuickSettingsTooltipIfNeeded();
+        }
+        return isChecked;
+    }
+
+    @Override
+    public boolean isChecked() {
+        return false;
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+
+    @Override
+    public int getSliceHighlightMenuRes() {
+        return R.string.menu_key_accessibility;
+    }
+
+    private void showQuickSettingsTooltipIfNeeded() {
+        final ComponentName tileComponentName = getTileComponentName();
+        if (tileComponentName == null) {
+            // Returns if no tile service assigned.
+            return;
+        }
+
+        if (!mNeedsQSTooltipReshow && AccessibilityQuickSettingUtils.hasValueInSharedPreferences(
+                mContext, tileComponentName)) {
+            // Returns if quick settings tooltip only show once.
+            return;
+        }
+
+        mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(mContext);
+        mTooltipWindow.setup(getTileTooltipContent(),
+                R.drawable.accessibility_auto_added_qs_tooltip_illustration);
+        mTooltipWindow.showAtTopCenter(mPreference.getSwitch());
+        AccessibilityQuickSettingUtils.optInValueToSharedPreferences(mContext, tileComponentName);
+        mNeedsQSTooltipReshow = false;
+    }
+}
diff --git a/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindow.java b/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindow.java
index 2c77102..bb6dba8 100644
--- a/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindow.java
+++ b/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindow.java
@@ -61,7 +61,7 @@
                 super.onInitializeAccessibilityNodeInfo(host, info);
                 final AccessibilityAction clickAction = new AccessibilityAction(
                         AccessibilityNodeInfo.ACTION_CLICK,
-                        mContext.getString(R.string.accessibility_quick_settings_tooltips_dismiss));
+                        mContext.getString(R.string.accessibility_quick_settings_tooltip_dismiss));
                 info.addAction(clickAction);
             }
 
@@ -80,7 +80,7 @@
      * @param text text to be displayed
      * @param imageResId the resource ID of the image drawable
      */
-    public void setup(String text, @DrawableRes int imageResId) {
+    public void setup(CharSequence text, @DrawableRes int imageResId) {
         this.setup(text, imageResId, /* closeDelayTimeMillis= */ 0);
     }
 
@@ -94,13 +94,13 @@
      * @param imageResId the resource ID of the image drawable
      * @param closeDelayTimeMillis how long the popup window be auto-closed
      */
-    public void setup(String text, @DrawableRes int imageResId, long closeDelayTimeMillis) {
+    public void setup(CharSequence text, @DrawableRes int imageResId, long closeDelayTimeMillis) {
         this.mCloseDelayTimeMillis = closeDelayTimeMillis;
 
         setBackgroundDrawable(new ColorDrawable(mContext.getColor(android.R.color.transparent)));
         final LayoutInflater inflater = mContext.getSystemService(LayoutInflater.class);
         final View popupView =
-                inflater.inflate(R.layout.accessibility_qs_tooltips, /* root= */ null);
+                inflater.inflate(R.layout.accessibility_qs_tooltip, /* root= */ null);
         popupView.setFocusable(/* focusable= */ true);
         popupView.setAccessibilityDelegate(mAccessibilityDelegate);
         setContentView(popupView);
@@ -179,7 +179,7 @@
     @VisibleForTesting
     int getAvailableWindowWidth() {
         final Resources res = mContext.getResources();
-        final int padding = res.getDimensionPixelSize(R.dimen.accessibility_qs_tooltips_margin);
+        final int padding = res.getDimensionPixelSize(R.dimen.accessibility_qs_tooltip_margin);
         final int screenWidth = res.getDisplayMetrics().widthPixels;
         return screenWidth - padding * 2;
     }
diff --git a/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java b/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
index 59618d6..a25c4a6 100644
--- a/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java
@@ -83,8 +83,8 @@
     /** Returns the accessibility tile component name. */
     protected abstract ComponentName getTileComponentName();
 
-    /** Returns the accessibility tile feature name. */
-    protected abstract CharSequence getTileName();
+    /** Returns the accessibility tile tooltip content. */
+    protected abstract CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type);
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -148,7 +148,7 @@
     public void onViewCreated(View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
 
-        // Reshow tooltips when activity recreate, such as rotate device.
+        // Reshow tooltip when activity recreate, such as rotate device.
         if (mNeedsQSTooltipReshow) {
             getView().post(this::showQuickSettingsTooltipIfNeeded);
         }
@@ -499,21 +499,17 @@
             return;
         }
 
-        final CharSequence tileName = getTileName();
-        if (TextUtils.isEmpty(tileName)) {
-            // Returns if no title of tile service assigned.
+        final CharSequence content = getTileTooltipContent(mNeedsQSTooltipType);
+        if (TextUtils.isEmpty(content)) {
+            // Returns if no content of tile tooltip assigned.
             return;
         }
 
-        final int titleResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
-                ? R.string.accessibility_service_qs_tooltips_content
-                : R.string.accessibility_service_auto_added_qs_tooltips_content;
-        final String title = getString(titleResId, tileName);
         final int imageResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
-                ? R.drawable.accessibility_qs_tooltips_illustration
-                : R.drawable.accessibility_auto_added_qs_tooltips_illustration;
+                ? R.drawable.accessibility_qs_tooltip_illustration
+                : R.drawable.accessibility_auto_added_qs_tooltip_illustration;
         mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(getContext());
-        mTooltipWindow.setup(title, imageResId);
+        mTooltipWindow.setup(content, imageResId);
         mTooltipWindow.showAtTopCenter(getView());
         AccessibilityQuickSettingUtils.optInValueToSharedPreferences(getContext(),
                 tileComponentName);
diff --git a/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragment.java b/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragment.java
index b04582f..3adef6d 100644
--- a/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragment.java
@@ -41,6 +41,7 @@
 import androidx.preference.Preference;
 
 import com.android.settings.R;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
 import com.android.settings.overlay.FeatureFactory;
 
 import java.util.ArrayList;
@@ -128,12 +129,21 @@
     }
 
     @Override
-    CharSequence getTileName() {
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
         final ComponentName componentName = getTileComponentName();
         if (componentName == null) {
             return null;
         }
-        return loadTileLabel(getPrefContext(), componentName);
+
+        final CharSequence tileName = loadTileLabel(getPrefContext(), componentName);
+        if (tileName == null) {
+            return null;
+        }
+
+        final int titleResId = type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                ? R.string.accessibility_service_qs_tooltip_content
+                : R.string.accessibility_service_auto_added_qs_tooltip_content;
+        return getString(titleResId, tileName);
     }
 
     @Override
diff --git a/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceController.java b/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceController.java
index 2018e05..7b40024 100644
--- a/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceController.java
+++ b/src/com/android/settings/accessibility/ReduceBrightColorsPreferenceController.java
@@ -16,6 +16,9 @@
 
 package com.android.settings.accessibility;
 
+import static com.android.internal.accessibility.AccessibilityShortcutController.REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
+
+import android.content.ComponentName;
 import android.content.Context;
 import android.database.ContentObserver;
 import android.hardware.display.ColorDisplayManager;
@@ -30,14 +33,14 @@
 import androidx.preference.PreferenceScreen;
 
 import com.android.settings.R;
-import com.android.settings.core.TogglePreferenceController;
 import com.android.settingslib.PrimarySwitchPreference;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnStart;
 import com.android.settingslib.core.lifecycle.events.OnStop;
 
 /** PreferenceController that shows the Reduce Bright Colors summary */
-public class ReduceBrightColorsPreferenceController extends TogglePreferenceController
+public class ReduceBrightColorsPreferenceController
+        extends AccessibilityQuickSettingsPrimarySwitchPreferenceController
         implements LifecycleObserver, OnStart, OnStop {
     private ContentObserver mSettingsContentObserver;
     private PrimarySwitchPreference mPreference;
@@ -67,6 +70,7 @@
 
     @Override
     public boolean setChecked(boolean isChecked) {
+        super.setChecked(isChecked);
         return mColorDisplayManager.setReduceBrightColorsActivated(isChecked);
     }
 
@@ -105,8 +109,20 @@
                 Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED),
                 false, mSettingsContentObserver, UserHandle.USER_CURRENT);
     }
+
     @Override
     public void onStop() {
         mContext.getContentResolver().unregisterContentObserver(mSettingsContentObserver);
     }
+
+    @Override
+    protected ComponentName getTileComponentName() {
+        return REDUCE_BRIGHT_COLORS_TILE_SERVICE_COMPONENT_NAME;
+    }
+
+    @Override
+    CharSequence getTileTooltipContent() {
+        return mContext.getText(
+                R.string.accessibility_reduce_bright_colors_auto_added_qs_tooltip_content);
+    }
 }
diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
index 02da51e..e314036 100644
--- a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java
@@ -47,6 +47,7 @@
 import androidx.annotation.Nullable;
 
 import com.android.settings.R;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
 import com.android.settings.accessibility.AccessibilityUtil.UserShortcutType;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.accessibility.AccessibilityUtils;
@@ -239,12 +240,21 @@
     }
 
     @Override
-    CharSequence getTileName() {
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
         final ComponentName componentName = getTileComponentName();
         if (componentName == null) {
             return null;
         }
-        return loadTileLabel(getPrefContext(), componentName);
+
+        final CharSequence tileName = loadTileLabel(getPrefContext(), componentName);
+        if (tileName == null) {
+            return null;
+        }
+
+        final int titleResId = type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                ? R.string.accessibility_service_qs_tooltip_content
+                : R.string.accessibility_service_auto_added_qs_tooltip_content;
+        return getString(titleResId, tileName);
     }
 
     @Override
diff --git a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
index 1f498d6..5883714 100644
--- a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
@@ -144,8 +144,10 @@
     }
 
     @Override
-    CharSequence getTileName() {
-        return getText(R.string.accessibility_display_inversion_preference_title);
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+        return getText(type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                ? R.string.accessibility_color_inversion_qs_tooltip_content
+                : R.string.accessibility_color_inversion_auto_added_qs_tooltip_content);
     }
 
     @Override
diff --git a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
index c4df5bf..183da96 100644
--- a/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleDaltonizerPreferenceFragment.java
@@ -201,8 +201,10 @@
     }
 
     @Override
-    CharSequence getTileName() {
-        return getText(R.string.accessibility_display_daltonizer_preference_title);
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+        return getText(type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                ? R.string.accessibility_color_correction_qs_tooltip_content
+                : R.string.accessibility_color_correction_auto_added_qs_tooltip_content);
     }
 
     @Override
diff --git a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
index 69b8f75..ccdc78b 100644
--- a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
@@ -222,7 +222,7 @@
 
         updatePreferenceOrder();
 
-        // Reshow tooltips when activity recreate, such as rotate device.
+        // Reshow tooltip when activity recreate, such as rotate device.
         if (mNeedsQSTooltipReshow) {
             getView().post(this::showQuickSettingsTooltipIfNeeded);
         }
@@ -331,8 +331,8 @@
     /** Returns the accessibility tile component name. */
     abstract ComponentName getTileComponentName();
 
-    /** Returns the accessibility tile feature name. */
-    abstract CharSequence getTileName();
+    /** Returns the accessibility tile tooltip content. */
+    abstract CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type);
 
     protected void updateToggleServiceTitle(SettingsMainSwitchPreference switchPreference) {
         final CharSequence title =
@@ -870,21 +870,17 @@
             return;
         }
 
-        final CharSequence tileName = getTileName();
-        if (TextUtils.isEmpty(tileName)) {
-            // Returns if no title of tile service assigned.
+        final CharSequence content = getTileTooltipContent(mNeedsQSTooltipType);
+        if (TextUtils.isEmpty(content)) {
+            // Returns if no content of tile tooltip assigned.
             return;
         }
 
-        final int titleResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
-                ? R.string.accessibility_service_qs_tooltips_content
-                : R.string.accessibility_service_auto_added_qs_tooltips_content;
-        final String title = getString(titleResId, tileName);
         final int imageResId = mNeedsQSTooltipType == QuickSettingsTooltipType.GUIDE_TO_EDIT
-                ? R.drawable.accessibility_qs_tooltips_illustration
-                : R.drawable.accessibility_auto_added_qs_tooltips_illustration;
+                ? R.drawable.accessibility_qs_tooltip_illustration
+                : R.drawable.accessibility_auto_added_qs_tooltip_illustration;
         mTooltipWindow = new AccessibilityQuickSettingsTooltipWindow(getContext());
-        mTooltipWindow.setup(title, imageResId);
+        mTooltipWindow.setup(content, imageResId);
         mTooltipWindow.showAtTopCenter(getView());
         AccessibilityQuickSettingUtils.optInValueToSharedPreferences(getContext(),
                 tileComponentName);
diff --git a/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
index fb9c4a8..93884b7 100644
--- a/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleReduceBrightColorsPreferenceFragment.java
@@ -184,8 +184,10 @@
     }
 
     @Override
-    CharSequence getTileName() {
-        return getText(R.string.reduce_bright_colors_preference_title);
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+        return getText(type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                 ? R.string.accessibility_reduce_bright_colors_qs_tooltip_content
+                 : R.string.accessibility_reduce_bright_colors_auto_added_qs_tooltip_content);
     }
 
     @Override
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 62f4282..1176fa4 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -47,6 +47,7 @@
 import com.android.settings.DialogCreatable;
 import com.android.settings.R;
 import com.android.settings.accessibility.AccessibilityDialogUtils.DialogType;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
 import com.android.settings.accessibility.AccessibilityUtil.UserShortcutType;
 import com.android.settings.utils.LocaleUtils;
 
@@ -405,7 +406,7 @@
     }
 
     @Override
-    CharSequence getTileName() {
+    CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
         return null;
     }
 
diff --git a/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java b/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java
index a43b9fd..0767e65 100644
--- a/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java
+++ b/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceController.java
@@ -27,10 +27,10 @@
 import androidx.annotation.VisibleForTesting;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceFragmentCompat;
-import androidx.preference.SwitchPreference;
 
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
+import com.android.settingslib.RestrictedSwitchPreference;
 
 public class ApprovalPreferenceController extends BasePreferenceController {
 
@@ -78,9 +78,11 @@
 
     @Override
     public void updateState(Preference pref) {
-        final SwitchPreference preference = (SwitchPreference) pref;
+        final RestrictedSwitchPreference preference =
+                (RestrictedSwitchPreference) pref;
         final CharSequence label = mPkgInfo.applicationInfo.loadLabel(mPm);
-        preference.setChecked(isServiceEnabled(mCn));
+        final boolean isEnabled = isServiceEnabled(mCn);
+        preference.setChecked(isEnabled);
         preference.setOnPreferenceChangeListener((p, newValue) -> {
             final boolean access = (Boolean) newValue;
             if (!access) {
@@ -103,6 +105,7 @@
                 return false;
             }
         });
+        preference.updateState(mCn.getPackageName(), mPkgInfo.applicationInfo.uid, isEnabled);
     }
 
     public void disable(final ComponentName cn) {
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioController.java b/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioController.java
new file mode 100644
index 0000000..89d923d
--- /dev/null
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioController.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2022 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.bluetooth;
+
+import android.content.Context;
+import android.media.AudioDeviceAttributes;
+import android.media.AudioDeviceInfo;
+import android.media.AudioManager;
+import android.media.Spatializer;
+import android.text.TextUtils;
+import android.util.Log;
+
+import androidx.annotation.VisibleForTesting;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
+
+import com.android.settings.R;
+import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+
+/**
+ * The controller of the Spatial audio setting in the bluetooth detail settings.
+ */
+public class BluetoothDetailsSpatialAudioController extends BluetoothDetailsController
+        implements Preference.OnPreferenceClickListener {
+
+    private static final String TAG = "BluetoothSpatialAudioController";
+    private static final String KEY_SPATIAL_AUDIO_GROUP = "spatial_audio_group";
+    private static final String KEY_SPATIAL_AUDIO = "spatial_audio";
+    private static final String KEY_HEAD_TRACKING = "head_tracking";
+
+    private final Spatializer mSpatializer;
+
+    @VisibleForTesting
+    PreferenceCategory mProfilesContainer;
+    @VisibleForTesting
+    AudioDeviceAttributes mAudioDevice;
+
+    public BluetoothDetailsSpatialAudioController(
+            Context context,
+            PreferenceFragmentCompat fragment,
+            CachedBluetoothDevice device,
+            Lifecycle lifecycle) {
+        super(context, fragment, device, lifecycle);
+        AudioManager audioManager = context.getSystemService(AudioManager.class);
+        mSpatializer = audioManager.getSpatializer();
+        mAudioDevice = new AudioDeviceAttributes(
+                AudioDeviceAttributes.ROLE_OUTPUT,
+                AudioDeviceInfo.TYPE_BLUETOOTH_A2DP,
+                mCachedDevice.getAddress());
+
+    }
+
+    @Override
+    public boolean isAvailable() {
+        return mSpatializer.isAvailableForDevice(mAudioDevice) ? true : false;
+    }
+
+    @Override
+    public boolean onPreferenceClick(Preference preference) {
+        SwitchPreference switchPreference = (SwitchPreference) preference;
+        String key = switchPreference.getKey();
+        if (TextUtils.equals(key, KEY_SPATIAL_AUDIO)) {
+            if (switchPreference.isChecked()) {
+                mSpatializer.addCompatibleAudioDevice(mAudioDevice);
+            } else {
+                mSpatializer.removeCompatibleAudioDevice(mAudioDevice);
+            }
+            refresh();
+            return true;
+        } else if (TextUtils.equals(key, KEY_HEAD_TRACKING)) {
+            mSpatializer.setHeadTrackerEnabled(switchPreference.isChecked(), mAudioDevice);
+            return true;
+        } else {
+            Log.w(TAG, "invalid key name.");
+            return false;
+        }
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_SPATIAL_AUDIO_GROUP;
+    }
+
+    @Override
+    protected void init(PreferenceScreen screen) {
+        mProfilesContainer = screen.findPreference(getPreferenceKey());
+        mProfilesContainer.setLayoutResource(R.layout.preference_bluetooth_profile_category);
+        refresh();
+    }
+
+    @Override
+    protected void refresh() {
+        SwitchPreference spatialAudioPref = mProfilesContainer.findPreference(KEY_SPATIAL_AUDIO);
+        if (spatialAudioPref == null) {
+            spatialAudioPref = createSpatialAudioPreference(mProfilesContainer.getContext());
+            mProfilesContainer.addPreference(spatialAudioPref);
+        }
+
+        boolean isSpatialAudioOn = mSpatializer.getCompatibleAudioDevices().contains(mAudioDevice);
+        Log.d(TAG, "refresh() isSpatialAudioOn : " + isSpatialAudioOn);
+        spatialAudioPref.setChecked(isSpatialAudioOn);
+
+        SwitchPreference headTrackingPref = mProfilesContainer.findPreference(KEY_HEAD_TRACKING);
+        if (headTrackingPref == null) {
+            headTrackingPref = createHeadTrackingPreference(mProfilesContainer.getContext());
+            mProfilesContainer.addPreference(headTrackingPref);
+        }
+
+        boolean isHeadTrackingAvailable =
+                isSpatialAudioOn && mSpatializer.hasHeadTracker(mAudioDevice);
+        Log.d(TAG, "refresh() has head tracker : " + mSpatializer.hasHeadTracker(mAudioDevice));
+        headTrackingPref.setVisible(isHeadTrackingAvailable);
+        if (isHeadTrackingAvailable) {
+            headTrackingPref.setChecked(mSpatializer.isHeadTrackerEnabled(mAudioDevice));
+        }
+    }
+
+    @VisibleForTesting
+    SwitchPreference createSpatialAudioPreference(Context context) {
+        SwitchPreference pref = new SwitchPreference(context);
+        pref.setKey(KEY_SPATIAL_AUDIO);
+        pref.setTitle(context.getString(R.string.bluetooth_details_spatial_audio_title));
+        pref.setSummary(context.getString(R.string.bluetooth_details_spatial_audio_summary));
+        pref.setOnPreferenceClickListener(this);
+        return pref;
+    }
+
+    @VisibleForTesting
+    SwitchPreference createHeadTrackingPreference(Context context) {
+        SwitchPreference pref = new SwitchPreference(context);
+        pref.setKey(KEY_HEAD_TRACKING);
+        pref.setTitle(context.getString(R.string.bluetooth_details_head_tracking_title));
+        pref.setSummary(context.getString(R.string.bluetooth_details_head_tracking_summary));
+        pref.setOnPreferenceClickListener(this);
+        return pref;
+    }
+}
diff --git a/src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java b/src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java
index 4980ba3..6532482 100644
--- a/src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java
+++ b/src/com/android/settings/bluetooth/BluetoothDeviceDetailsFragment.java
@@ -187,6 +187,8 @@
                     lifecycle));
             controllers.add(new BluetoothDetailsCompanionAppsController(context, this,
                     mCachedDevice, lifecycle));
+            controllers.add(new BluetoothDetailsSpatialAudioController(context, this, mCachedDevice,
+                    lifecycle));
             controllers.add(new BluetoothDetailsProfilesController(context, this, mManager,
                     mCachedDevice, lifecycle));
             controllers.add(new BluetoothDetailsMacAddressController(context, this, mCachedDevice,
diff --git a/src/com/android/settings/development/compat/PlatformCompatDashboard.java b/src/com/android/settings/development/compat/PlatformCompatDashboard.java
index c617e17..f8cbf21 100644
--- a/src/com/android/settings/development/compat/PlatformCompatDashboard.java
+++ b/src/com/android/settings/development/compat/PlatformCompatDashboard.java
@@ -31,6 +31,7 @@
 import android.os.Bundle;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+import android.text.TextUtils;
 import android.util.ArraySet;
 
 import androidx.annotation.VisibleForTesting;
@@ -66,6 +67,8 @@
 
     private AndroidBuildClassifier mAndroidBuildClassifier = new AndroidBuildClassifier();
 
+    private boolean mShouldStartAppPickerOnResume = true;
+
     @VisibleForTesting
     String mSelectedApp;
 
@@ -98,13 +101,67 @@
     }
 
     @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
         try {
             mChanges = getPlatformCompat().listUIChanges();
         } catch (RemoteException e) {
             throw new RuntimeException("Could not list changes!", e);
         }
+        if (icicle != null) {
+            mShouldStartAppPickerOnResume = false;
+            mSelectedApp = icicle.getString(COMPAT_APP);
+        }
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (requestCode == REQUEST_COMPAT_CHANGE_APP) {
+            mShouldStartAppPickerOnResume = false;
+            switch (resultCode) {
+                case Activity.RESULT_OK:
+                    mSelectedApp = data.getAction();
+                    break;
+                case Activity.RESULT_CANCELED:
+                    if (TextUtils.isEmpty(mSelectedApp)) {
+                        finish();
+                    }
+                    break;
+                case AppPicker.RESULT_NO_MATCHING_APPS:
+                    mSelectedApp = null;
+                    break;
+            }
+            return;
+        }
+        super.onActivityResult(requestCode, resultCode, data);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (isFinishingOrDestroyed()) {
+            return;
+        }
+        if (!mShouldStartAppPickerOnResume) {
+            if (TextUtils.isEmpty(mSelectedApp)) {
+                new AlertDialog.Builder(getContext())
+                        .setTitle(R.string.platform_compat_dialog_title_no_apps)
+                        .setMessage(R.string.platform_compat_dialog_text_no_apps)
+                        .setPositiveButton(R.string.okay, (dialog, which) -> finish())
+                        .setOnDismissListener(dialog -> finish())
+                        .setCancelable(false)
+                        .show();
+                return;
+            }
+            try {
+                final ApplicationInfo applicationInfo = getApplicationInfo();
+                addPreferences(applicationInfo);
+                return;
+            } catch (PackageManager.NameNotFoundException e) {
+                mShouldStartAppPickerOnResume = true;
+                mSelectedApp = null;
+            }
+        }
         startAppPicker();
     }
 
@@ -114,31 +171,6 @@
         outState.putString(COMPAT_APP, mSelectedApp);
     }
 
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (requestCode == REQUEST_COMPAT_CHANGE_APP) {
-            if (resultCode == Activity.RESULT_OK) {
-                mSelectedApp = data.getAction();
-                try {
-                    final ApplicationInfo applicationInfo = getApplicationInfo();
-                    addPreferences(applicationInfo);
-                } catch (PackageManager.NameNotFoundException e) {
-                    startAppPicker();
-                }
-            } else if (resultCode == AppPicker.RESULT_NO_MATCHING_APPS) {
-                new AlertDialog.Builder(getContext())
-                        .setTitle(R.string.platform_compat_dialog_title_no_apps)
-                        .setMessage(R.string.platform_compat_dialog_text_no_apps)
-                        .setPositiveButton(R.string.okay, (dialog, which) -> finish())
-                        .setOnDismissListener(dialog -> finish())
-                        .setCancelable(false)
-                        .show();
-            }
-            return;
-        }
-        super.onActivityResult(requestCode, resultCode, data);
-    }
-
     private void addPreferences(ApplicationInfo applicationInfo) {
         getPreferenceScreen().removeAll();
         getPreferenceScreen().addPreference(createAppPreference(applicationInfo));
diff --git a/src/com/android/settings/gestures/OneHandedSettings.java b/src/com/android/settings/gestures/OneHandedSettings.java
index 0e6b402..13ccbd6 100644
--- a/src/com/android/settings/gestures/OneHandedSettings.java
+++ b/src/com/android/settings/gestures/OneHandedSettings.java
@@ -131,8 +131,10 @@
     }
 
     @Override
-    protected CharSequence getTileName() {
-        return mFeatureName;
+    protected CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+        return type == QuickSettingsTooltipType.GUIDE_TO_EDIT
+                ? getText(R.string.accessibility_one_handed_mode_qs_tooltip_content)
+                : getText(R.string.accessibility_one_handed_mode_auto_added_qs_tooltip_content);
     }
 
     @Override
diff --git a/src/com/android/settings/nearby/FastPairSettingsFragment.java b/src/com/android/settings/nearby/FastPairSettingsFragment.java
index f605cf1..702e90a 100644
--- a/src/com/android/settings/nearby/FastPairSettingsFragment.java
+++ b/src/com/android/settings/nearby/FastPairSettingsFragment.java
@@ -21,6 +21,7 @@
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
+import android.nearby.NearbyManager;
 import android.os.Bundle;
 import android.provider.Settings;
 import android.text.TextUtils;
@@ -56,9 +57,9 @@
                 findPreference(SCAN_SWITCH_KEY));
         mainSwitchPreference.addOnSwitchChangeListener(
                 (switchView, isChecked) ->
-                        Settings.Secure.putInt(getContentResolver(),
-                                Settings.Secure.FAST_PAIR_SCAN_ENABLED, isChecked ? 1 : 0));
-        mainSwitchPreference.setChecked(isFastPairScanAvailable());
+                        NearbyManager.setFastPairScanEnabled(getContext(), isChecked));
+        mainSwitchPreference.setChecked(
+                NearbyManager.getFastPairScanEnabled(getContext(), false));
 
         Preference savedDevicePref = Objects.requireNonNull(
                 findPreference(SAVED_DEVICES_PREF_KEY));
@@ -89,11 +90,6 @@
     public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
             new BaseSearchIndexProvider(R.xml.fast_pair_settings);
 
-    private boolean isFastPairScanAvailable() {
-        return Settings.Secure.getInt(getContentResolver(),
-                Settings.Secure.FAST_PAIR_SCAN_ENABLED, 1) != 0;
-    }
-
     @Nullable
     private ComponentName getSavedDevicesComponent() {
         String savedDevicesComponent = Settings.Secure.getString(
diff --git a/src/com/android/settings/wifi/WifiUtils.java b/src/com/android/settings/wifi/WifiUtils.java
index 6f955b2..1027792 100644
--- a/src/com/android/settings/wifi/WifiUtils.java
+++ b/src/com/android/settings/wifi/WifiUtils.java
@@ -41,6 +41,8 @@
     private static final int SSID_ASCII_MIN_LENGTH = 1;
     private static final int SSID_ASCII_MAX_LENGTH = 32;
 
+    private static final int PSK_PASSPHRASE_ASCII_MIN_LENGTH = 8;
+    private static final int PSK_PASSPHRASE_ASCII_MAX_LENGTH = 63;
 
     public static boolean isSSIDTooLong(String ssid) {
         if (TextUtils.isEmpty(ssid)) {
@@ -62,6 +64,13 @@
     public static boolean isHotspotPasswordValid(String password, int securityType) {
         final SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
         try {
+            if (securityType == SoftApConfiguration.SECURITY_TYPE_WPA2_PSK
+                    || securityType == SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION) {
+                if (password.length() < PSK_PASSPHRASE_ASCII_MIN_LENGTH
+                        || password.length() > PSK_PASSPHRASE_ASCII_MAX_LENGTH) {
+                    return false;
+                }
+            }
             configBuilder.setPassphrase(password, securityType);
         } catch (IllegalArgumentException e) {
             return false;
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest.java
new file mode 100644
index 0000000..89c9120
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2022 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.accessibility;
+
+import static com.android.settings.accessibility.ToggleFeaturePreferenceFragment.KEY_SAVED_QS_TOOLTIP_RESHOW;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.PreferenceViewHolder;
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.testutils.shadow.ShadowFragment;
+import com.android.settingslib.PrimarySwitchPreference;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
+import org.robolectric.shadows.ShadowApplication;
+
+/**
+ * Tests for {@link AccessibilityQuickSettingsPrimarySwitchPreferenceController}.
+ */
+@RunWith(RobolectricTestRunner.class)
+public class AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest {
+
+    private static final String PLACEHOLDER_PACKAGE_NAME = "com.placeholder.example";
+    private static final String PLACEHOLDER_TILE_CLASS_NAME =
+            PLACEHOLDER_PACKAGE_NAME + "tile.placeholder";
+    private static final ComponentName PLACEHOLDER_TILE_COMPONENT_NAME = new ComponentName(
+            PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME);
+    private static final CharSequence PLACEHOLDER_TILE_CONTENT =
+            PLACEHOLDER_TILE_CLASS_NAME + ".tile.content";
+    private static final String TEST_KEY = "test_pref_key";
+    private static final String TEST_TITLE = "test_title";
+
+    @Rule
+    public final MockitoRule mockito = MockitoJUnit.rule();
+
+    @Spy
+    private final Context mContext = ApplicationProvider.getApplicationContext();
+
+    private TestAccessibilityQuickSettingsPrimarySwitchPreferenceController mController;
+    private PrimarySwitchPreference mPreference;
+    private TestFragment mFragment;
+    private PreferenceScreen mScreen;
+    private PreferenceViewHolder mHolder;
+    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
+    private PreferenceManager mPreferenceManager;
+
+    private static PopupWindow getLatestPopupWindow() {
+        final ShadowApplication shadowApplication =
+                Shadow.extract(ApplicationProvider.getApplicationContext());
+        return shadowApplication.getLatestPopupWindow();
+    }
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        mContext.setTheme(R.style.Theme_AppCompat);
+        mFragment = spy(new TestFragment());
+        when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager);
+        when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext);
+        when(mFragment.getContext()).thenReturn(mContext);
+        mScreen = spy(new PreferenceScreen(mContext, /* attrs= */ null));
+        when(mScreen.getPreferenceManager()).thenReturn(mPreferenceManager);
+        doReturn(mScreen).when(mFragment).getPreferenceScreen();
+
+        mPreference = new PrimarySwitchPreference(mContext);
+        mPreference.setKey(TEST_KEY);
+        mPreference.setTitle(TEST_TITLE);
+        LayoutInflater inflater = LayoutInflater.from(mContext);
+        mHolder = PreferenceViewHolder.createInstanceForTests(inflater.inflate(
+                com.android.settingslib.R.layout.preference_two_target, null));
+        LinearLayout mWidgetView = mHolder.itemView.findViewById(android.R.id.widget_frame);
+        inflater.inflate(R.layout.preference_widget_primary_switch, mWidgetView, true);
+        mPreference.onBindViewHolder(mHolder);
+
+        mController = new TestAccessibilityQuickSettingsPrimarySwitchPreferenceController(mContext,
+                TEST_KEY);
+        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
+        mController.displayPreference(mScreen);
+    }
+
+    @Test
+    public void setChecked_showTooltipView() {
+        mController.setChecked(true);
+
+        assertThat(getLatestPopupWindow().isShowing()).isTrue();
+    }
+
+    @Test
+    public void setChecked_tooltipViewShown_notShowTooltipView() {
+        mController.setChecked(true);
+        getLatestPopupWindow().dismiss();
+        mController.setChecked(false);
+
+        mController.setChecked(true);
+
+        assertThat(getLatestPopupWindow().isShowing()).isFalse();
+    }
+
+    @Test
+    @Config(shadows = ShadowFragment.class)
+    public void restoreValueFromSavedInstanceState_showTooltipView() {
+        mController.setChecked(true);
+        final Bundle savedInstanceState = new Bundle();
+        savedInstanceState.putBoolean(KEY_SAVED_QS_TOOLTIP_RESHOW, /* value= */ true);
+
+        mFragment.onCreate(savedInstanceState);
+        mController.displayPreference(mScreen);
+
+        assertThat(getLatestPopupWindow().isShowing()).isTrue();
+    }
+
+    public static class TestAccessibilityQuickSettingsPrimarySwitchPreferenceController
+            extends AccessibilityQuickSettingsPrimarySwitchPreferenceController {
+
+        public TestAccessibilityQuickSettingsPrimarySwitchPreferenceController(Context context,
+                String preferenceKey) {
+            super(context, preferenceKey);
+        }
+
+        @Override
+        ComponentName getTileComponentName() {
+            return PLACEHOLDER_TILE_COMPONENT_NAME;
+        }
+
+        @Override
+        CharSequence getTileTooltipContent() {
+            return PLACEHOLDER_TILE_CONTENT;
+        }
+    }
+
+    private static class TestFragment extends SettingsPreferenceFragment {
+
+        @Override
+        protected boolean shouldSkipForInitialSUW() {
+            return false;
+        }
+
+        @Override
+        public int getMetricsCategory() {
+            return 0;
+        }
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindowTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindowTest.java
index 3fec81a..49602bc 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindowTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityQuickSettingsTooltipWindowTest.java
@@ -67,7 +67,7 @@
     @Test
     public void initTooltipView_atMostAvailableTextWidth() {
         final String quickSettingsTooltipsContent = mContext.getString(
-                R.string.accessibility_service_qs_tooltips_content, TEST_PACKAGE_NAME);
+                R.string.accessibility_service_qs_tooltip_content, TEST_PACKAGE_NAME);
         mTooltipView.setup(quickSettingsTooltipsContent, TEST_RES_ID);
 
         final int getMaxWidth = mTooltipView.getAvailableWindowWidth();
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
deleted file mode 100644
index 65b0647..0000000
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2019 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.accessibility;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.Intent;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.settings.R;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.Robolectric;
-import org.robolectric.RobolectricTestRunner;
-
-@RunWith(RobolectricTestRunner.class)
-@SmallTest
-public class AccessibilitySettingsForSetupWizardActivityTest {
-
-    @Test
-    public void createSetupAccessibilityActivity_shouldBeSUWTheme() {
-        final Intent intent = new Intent();
-        AccessibilitySettingsForSetupWizardActivity activity =
-                Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class,
-                        intent).get();
-
-        assertThat(activity.getThemeResId()).isEqualTo(R.style.GlifV3Theme_Light);
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
index f7c546f..c1950be 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
@@ -20,6 +20,8 @@
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.atLeast;
@@ -31,6 +33,7 @@
 
 import android.accessibilityservice.AccessibilityServiceInfo;
 import android.accessibilityservice.AccessibilityShortcutInfo;
+import android.app.AppOpsManager;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -110,6 +113,8 @@
     @Mock
     private PreferenceManager mPreferenceManager;
     private ShadowAccessibilityManager mShadowAccessibilityManager;
+    @Mock
+    private AppOpsManager mAppOpsManager;
 
     @Before
     public void setup() {
@@ -121,6 +126,9 @@
         when(mFragment.getPreferenceManager()).thenReturn(mPreferenceManager);
         when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext);
         mContext.setTheme(R.style.Theme_AppCompat);
+        when(mContext.getSystemService(AppOpsManager.class)).thenReturn(mAppOpsManager);
+        when(mAppOpsManager.noteOpNoThrow(eq(AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS),
+                anyInt(), anyString())).thenReturn(AppOpsManager.MODE_ALLOWED);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
index d05600a..c7a5884 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
@@ -73,6 +73,8 @@
             PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_CLASS_NAME);
     private static final ComponentName PLACEHOLDER_TILE_COMPONENT_NAME = new ComponentName(
             PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME);
+    private static final String PLACEHOLDER_TILE_TOOLTIP_CONTENT =
+            PLACEHOLDER_PACKAGE_NAME + "tooltip_content";
     private static final String PLACEHOLDER_DIALOG_TITLE = "title";
 
     private static final String SOFTWARE_SHORTCUT_KEY =
@@ -281,8 +283,8 @@
         }
 
         @Override
-        protected CharSequence getTileName() {
-            return PLACEHOLDER_PACKAGE_NAME;
+        protected CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+            return PLACEHOLDER_TILE_TOOLTIP_CONTENT;
         }
 
         @Override
diff --git a/tests/robotests/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragmentTest.java
index c44352f..8d5724b 100644
--- a/tests/robotests/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/LaunchAccessibilityActivityPreferenceFragmentTest.java
@@ -34,6 +34,9 @@
 import androidx.preference.PreferenceScreen;
 import androidx.test.core.app.ApplicationProvider;
 
+import com.android.settings.R;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -44,8 +47,6 @@
 import org.robolectric.Shadows;
 import org.robolectric.shadows.ShadowPackageManager;
 
-import java.util.Arrays;
-
 /** Tests for {@link LaunchAccessibilityActivityPreferenceFragment} */
 @RunWith(RobolectricTestRunner.class)
 public class LaunchAccessibilityActivityPreferenceFragmentTest {
@@ -83,53 +84,91 @@
     }
 
     @Test
-    public void getTileName_noTileServiceAssigned_returnNull() {
-        assertThat(mFragment.getTileName()).isNull();
+    public void getTileTooltipContent_noTileServiceAssigned_returnNull() {
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+
+        assertThat(tileTooltipContent).isNull();
     }
 
     @Test
-    public void getTileName_hasOneTileService_haveMatchString() {
-        final Intent tileProbe = new Intent(TileService.ACTION_QS_TILE);
-        final ResolveInfo info = new ResolveInfo();
-        info.serviceInfo = new FakeServiceInfo();
-        info.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME;
-        final ShadowPackageManager shadowPackageManager =
-                Shadows.shadowOf(mContext.getPackageManager());
-        shadowPackageManager.setResolveInfosForIntent(tileProbe, Arrays.asList(info));
+    public void getTileTooltipContent_hasOneTileService_guideToEdit_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
 
-        final CharSequence tileName = mFragment.getTileName();
-        assertThat(tileName.toString()).isEqualTo(PLACEHOLDER_TILE_NAME);
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(R.string.accessibility_service_qs_tooltip_content, tileName));
     }
 
     @Test
-    public void getTileName_hasTwoTileServices_haveMatchString() {
+    public void getTileTooltipContent_hasOneTileService_guideToDirectUse_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_DIRECT_USE);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(
+                        R.string.accessibility_service_auto_added_qs_tooltip_content, tileName));
+    }
+
+    @Test
+    public void getTileTooltipContent_hasTwoTileServices_guideToEdit_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME2,
+                PLACEHOLDER_TILE_NAME2);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(R.string.accessibility_service_qs_tooltip_content, tileName));
+    }
+
+    @Test
+    public void getTileTooltipContent_hasTwoTileServices_guideToDirectUse_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME2,
+                PLACEHOLDER_TILE_NAME2);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_DIRECT_USE);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(
+                        R.string.accessibility_service_auto_added_qs_tooltip_content, tileName));
+    }
+
+    private void setupTileService(String packageName, String name, String tileName) {
         final Intent tileProbe = new Intent(TileService.ACTION_QS_TILE);
         final ResolveInfo info = new ResolveInfo();
-        info.serviceInfo = new FakeServiceInfo();
-        info.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME;
-        final ResolveInfo info2 = new ResolveInfo();
-        info2.serviceInfo = new FakeServiceInfo2();
-        info2.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info2.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME2;
+        info.serviceInfo = new FakeServiceInfo(packageName, name, tileName);
         final ShadowPackageManager shadowPackageManager =
                 Shadows.shadowOf(mContext.getPackageManager());
-        shadowPackageManager.setResolveInfosForIntent(tileProbe, Arrays.asList(info, info2));
-
-        final CharSequence tileName = mFragment.getTileName();
-        assertThat(tileName.toString()).isEqualTo(PLACEHOLDER_TILE_NAME);
+        shadowPackageManager.addResolveInfoForIntent(tileProbe, info);
     }
 
     private static class FakeServiceInfo extends ServiceInfo {
-        public String loadLabel(PackageManager mgr) {
-            return PLACEHOLDER_TILE_NAME;
-        }
-    }
+        private String mTileName;
 
-    private static class FakeServiceInfo2 extends ServiceInfo {
+        FakeServiceInfo(String packageName, String name, String tileName) {
+            this.packageName = packageName;
+            this.name = name;
+            mTileName = tileName;
+        }
+
         public String loadLabel(PackageManager mgr) {
-            return PLACEHOLDER_TILE_NAME2;
+            return mTileName;
         }
     }
 
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragmentTest.java
index 236f9f2..2269529 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragmentTest.java
@@ -34,6 +34,9 @@
 import androidx.preference.PreferenceScreen;
 import androidx.test.core.app.ApplicationProvider;
 
+import com.android.settings.R;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -44,8 +47,6 @@
 import org.robolectric.Shadows;
 import org.robolectric.shadows.ShadowPackageManager;
 
-import java.util.Arrays;
-
 /** Tests for {@link ToggleAccessibilityServicePreferenceFragment} */
 @RunWith(RobolectricTestRunner.class)
 public class ToggleAccessibilityServicePreferenceFragmentTest {
@@ -83,53 +84,91 @@
     }
 
     @Test
-    public void getTileName_noTileServiceAssigned_returnNull() {
-        assertThat(mFragment.getTileName()).isNull();
+    public void getTileTooltipContent_noTileServiceAssigned_returnNull() {
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+
+        assertThat(tileTooltipContent).isNull();
     }
 
     @Test
-    public void getTileName_hasOneTileService_haveMatchString() {
-        final Intent tileProbe = new Intent(TileService.ACTION_QS_TILE);
-        final ResolveInfo info = new ResolveInfo();
-        info.serviceInfo = new FakeServiceInfo();
-        info.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME;
-        final ShadowPackageManager shadowPackageManager =
-                Shadows.shadowOf(mContext.getPackageManager());
-        shadowPackageManager.setResolveInfosForIntent(tileProbe, Arrays.asList(info));
+    public void getTileTooltipContent_hasOneTileService_guideToEdit_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
 
-        final CharSequence tileName = mFragment.getTileName();
-        assertThat(tileName.toString()).isEqualTo(PLACEHOLDER_TILE_NAME);
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(R.string.accessibility_service_qs_tooltip_content, tileName));
     }
 
     @Test
-    public void getTileName_hasTwoTileServices_haveMatchString() {
+    public void getTileTooltipContent_hasOneTileService_guideToDirectUse_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_DIRECT_USE);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(
+                        R.string.accessibility_service_auto_added_qs_tooltip_content, tileName));
+    }
+
+    @Test
+    public void getTileTooltipContent_hasTwoTileServices_guideToEdit_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME2,
+                PLACEHOLDER_TILE_NAME2);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_EDIT);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(R.string.accessibility_service_qs_tooltip_content, tileName));
+    }
+
+    @Test
+    public void getTileTooltipContent_hasTwoTileServices_guideToDirectUse_haveMatchString() {
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME,
+                PLACEHOLDER_TILE_NAME);
+        setupTileService(PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME2,
+                PLACEHOLDER_TILE_NAME2);
+
+        final CharSequence tileTooltipContent =
+                mFragment.getTileTooltipContent(QuickSettingsTooltipType.GUIDE_TO_DIRECT_USE);
+        final CharSequence tileName =
+                mFragment.loadTileLabel(mContext, mFragment.getTileComponentName());
+        assertThat(tileTooltipContent.toString()).isEqualTo(
+                mContext.getString(
+                        R.string.accessibility_service_auto_added_qs_tooltip_content, tileName));
+    }
+
+    private void setupTileService(String packageName, String name, String tileName) {
         final Intent tileProbe = new Intent(TileService.ACTION_QS_TILE);
         final ResolveInfo info = new ResolveInfo();
-        info.serviceInfo = new FakeServiceInfo();
-        info.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME;
-        final ResolveInfo info2 = new ResolveInfo();
-        info2.serviceInfo = new FakeServiceInfo2();
-        info2.serviceInfo.packageName = PLACEHOLDER_PACKAGE_NAME;
-        info2.serviceInfo.name = PLACEHOLDER_TILE_CLASS_NAME2;
+        info.serviceInfo = new FakeServiceInfo(packageName, name, tileName);
         final ShadowPackageManager shadowPackageManager =
                 Shadows.shadowOf(mContext.getPackageManager());
-        shadowPackageManager.setResolveInfosForIntent(tileProbe, Arrays.asList(info, info2));
-
-        final CharSequence tileName = mFragment.getTileName();
-        assertThat(tileName.toString()).isEqualTo(PLACEHOLDER_TILE_NAME);
+        shadowPackageManager.addResolveInfoForIntent(tileProbe, info);
     }
 
     private static class FakeServiceInfo extends ServiceInfo {
-        public String loadLabel(PackageManager mgr) {
-            return PLACEHOLDER_TILE_NAME;
-        }
-    }
+        private String mTileName;
 
-    private static class FakeServiceInfo2 extends ServiceInfo {
+        FakeServiceInfo(String packageName, String name, String tileName) {
+            this.packageName = packageName;
+            this.name = name;
+            mTileName = tileName;
+        }
+
         public String loadLabel(PackageManager mgr) {
-            return PLACEHOLDER_TILE_NAME2;
+            return mTileName;
         }
     }
 
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragmentTest.java
index 34a2f5b..04018a6 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragmentTest.java
@@ -49,6 +49,7 @@
 
 import com.android.settings.R;
 import com.android.settings.accessibility.AccessibilityDialogUtils.DialogType;
+import com.android.settings.accessibility.AccessibilityUtil.QuickSettingsTooltipType;
 import com.android.settings.accessibility.AccessibilityUtil.UserShortcutType;
 import com.android.settings.testutils.shadow.ShadowFragment;
 import com.android.settingslib.widget.TopIntroPreference;
@@ -77,8 +78,8 @@
             PLACEHOLDER_PACKAGE_NAME + "tile.placeholder";
     private static final ComponentName PLACEHOLDER_TILE_COMPONENT_NAME = new ComponentName(
             PLACEHOLDER_PACKAGE_NAME, PLACEHOLDER_TILE_CLASS_NAME);
-    private static final String PLACEHOLDER_TILE_NAME =
-            PLACEHOLDER_PACKAGE_NAME + "tile.placeholder";
+    private static final String PLACEHOLDER_TILE_TOOLTIP_CONTENT =
+            PLACEHOLDER_PACKAGE_NAME + "tooltip_content";
     private static final String PLACEHOLDER_DIALOG_TITLE = "title";
     private static final String DEFAULT_SUMMARY = "default summary";
     private static final String DEFAULT_DESCRIPTION = "default description";
@@ -361,8 +362,8 @@
         }
 
         @Override
-        CharSequence getTileName() {
-            return PLACEHOLDER_TILE_NAME;
+        protected CharSequence getTileTooltipContent(@QuickSettingsTooltipType int type) {
+            return PLACEHOLDER_TILE_TOOLTIP_CONTENT;
         }
 
         @Override
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioControllerTest.java
new file mode 100644
index 0000000..ef81247
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsSpatialAudioControllerTest.java
@@ -0,0 +1,206 @@
+/*
+ * Copyright (C) 2022 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.bluetooth;
+
+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.media.AudioDeviceAttributes;
+import android.media.AudioManager;
+import android.media.Spatializer;
+
+import androidx.preference.PreferenceCategory;
+import androidx.preference.SwitchPreference;
+
+import com.android.settingslib.core.lifecycle.Lifecycle;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(RobolectricTestRunner.class)
+public class BluetoothDetailsSpatialAudioControllerTest extends BluetoothDetailsControllerTestBase {
+
+    private static final String MAC_ADDRESS = "04:52:C7:0B:D8:3C";
+    private static final String KEY_SPATIAL_AUDIO = "spatial_audio";
+    private static final String KEY_HEAD_TRACKING = "head_tracking";
+
+    @Mock
+    private AudioManager mAudioManager;
+    @Mock
+    private Spatializer mSpatializer;
+    @Mock
+    private Lifecycle mSpatialAudioLifecycle;
+    @Mock
+    private PreferenceCategory mProfilesContainer;
+
+    private BluetoothDetailsSpatialAudioController mController;
+    private SwitchPreference mSpatialAudioPref;
+    private SwitchPreference mHeadTrackingPref;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        mContext = spy(RuntimeEnvironment.application);
+        when(mContext.getSystemService(AudioManager.class)).thenReturn(mAudioManager);
+        when(mAudioManager.getSpatializer()).thenReturn(mSpatializer);
+        when(mCachedDevice.getAddress()).thenReturn(MAC_ADDRESS);
+
+        mController = new BluetoothDetailsSpatialAudioController(mContext, mFragment,
+                mCachedDevice, mSpatialAudioLifecycle);
+        mController.mProfilesContainer = mProfilesContainer;
+
+        mSpatialAudioPref = mController.createSpatialAudioPreference(mContext);
+        mHeadTrackingPref = mController.createHeadTrackingPreference(mContext);
+
+        when(mProfilesContainer.findPreference(KEY_SPATIAL_AUDIO)).thenReturn(mSpatialAudioPref);
+        when(mProfilesContainer.findPreference(KEY_HEAD_TRACKING)).thenReturn(mHeadTrackingPref);
+    }
+
+    @Test
+    public void isAvailable_spatialAudioIsAvailable_returnsTrue() {
+        when(mSpatializer.isAvailableForDevice(mController.mAudioDevice)).thenReturn(true);
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void isAvailable_spatialAudioIsNotAvailable_returnsFalse() {
+        when(mSpatializer.isAvailableForDevice(mController.mAudioDevice)).thenReturn(false);
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    public void refresh_spatialAudioIsTurnedOn_checksSpatialAudioPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        compatibleAudioDevices.add(mController.mAudioDevice);
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+
+        mController.refresh();
+
+        assertThat(mSpatialAudioPref.isChecked()).isTrue();
+    }
+
+    @Test
+    public void refresh_spatialAudioIsTurnedOff_unchecksSpatialAudioPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+
+        mController.refresh();
+
+        assertThat(mSpatialAudioPref.isChecked()).isFalse();
+    }
+
+    @Test
+    public void refresh_spatialAudioOnAndHeadTrackingIsAvailable_showsHeadTrackingPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        compatibleAudioDevices.add(mController.mAudioDevice);
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+        when(mSpatializer.hasHeadTracker(mController.mAudioDevice)).thenReturn(true);
+
+        mController.refresh();
+
+        assertThat(mHeadTrackingPref.isVisible()).isTrue();
+    }
+
+    @Test
+    public void
+            refresh_spatialAudioOnAndHeadTrackingIsNotAvailable_hidesHeadTrackingPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        compatibleAudioDevices.add(mController.mAudioDevice);
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+        when(mSpatializer.hasHeadTracker(mController.mAudioDevice)).thenReturn(false);
+
+        mController.refresh();
+
+        assertThat(mHeadTrackingPref.isVisible()).isFalse();
+    }
+
+    @Test
+    public void refresh_spatialAudioOff_hidesHeadTrackingPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+
+        mController.refresh();
+
+        assertThat(mHeadTrackingPref.isVisible()).isFalse();
+    }
+
+    @Test
+    public void refresh_headTrackingIsTurnedOn_checksHeadTrackingPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        compatibleAudioDevices.add(mController.mAudioDevice);
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+        when(mSpatializer.hasHeadTracker(mController.mAudioDevice)).thenReturn(true);
+        when(mSpatializer.isHeadTrackerEnabled(mController.mAudioDevice)).thenReturn(true);
+
+        mController.refresh();
+
+        assertThat(mHeadTrackingPref.isChecked()).isTrue();
+    }
+
+    @Test
+    public void refresh_headTrackingIsTurnedOff_unchecksHeadTrackingPreference() {
+        List<AudioDeviceAttributes> compatibleAudioDevices = new ArrayList<>();
+        compatibleAudioDevices.add(mController.mAudioDevice);
+        when(mSpatializer.getCompatibleAudioDevices()).thenReturn(compatibleAudioDevices);
+        when(mSpatializer.hasHeadTracker(mController.mAudioDevice)).thenReturn(true);
+        when(mSpatializer.isHeadTrackerEnabled(mController.mAudioDevice)).thenReturn(false);
+
+        mController.refresh();
+
+        assertThat(mHeadTrackingPref.isChecked()).isFalse();
+    }
+
+    @Test
+    public void turnedOnSpatialAudio_invokesAddCompatibleAudioDevice() {
+        mSpatialAudioPref.setChecked(true);
+        mController.onPreferenceClick(mSpatialAudioPref);
+        verify(mSpatializer).addCompatibleAudioDevice(mController.mAudioDevice);
+    }
+
+    @Test
+    public void turnedOffSpatialAudio_invokesRemoveCompatibleAudioDevice() {
+        mSpatialAudioPref.setChecked(false);
+        mController.onPreferenceClick(mSpatialAudioPref);
+        verify(mSpatializer).removeCompatibleAudioDevice(mController.mAudioDevice);
+    }
+
+    @Test
+    public void turnedOnHeadTracking_invokesSetHeadTrackerEnabled_setsTrue() {
+        mHeadTrackingPref.setChecked(true);
+        mController.onPreferenceClick(mHeadTrackingPref);
+        verify(mSpatializer).setHeadTrackerEnabled(true, mController.mAudioDevice);
+    }
+
+    @Test
+    public void turnedOffHeadTracking_invokesSetHeadTrackerEnabled_setsFalse() {
+        mHeadTrackingPref.setChecked(false);
+        mController.onPreferenceClick(mHeadTrackingPref);
+        verify(mSpatializer).setHeadTrackerEnabled(false, mController.mAudioDevice);
+    }
+}
diff --git a/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java b/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java
index 064f813..249b713 100644
--- a/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java
@@ -18,12 +18,15 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.AppOpsManager;
 import android.app.NotificationManager;
 import android.content.ComponentName;
 import android.content.Context;
@@ -31,12 +34,12 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 
-import androidx.preference.SwitchPreference;
 import androidx.test.core.app.ApplicationProvider;
 import androidx.test.ext.junit.runners.AndroidJUnit4;
 
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settingslib.RestrictedSwitchPreference;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -55,6 +58,8 @@
     @Mock
     NotificationManager mNm;
     @Mock
+    AppOpsManager mAppOpsManager;
+    @Mock
     PackageManager mPm;
     PackageInfo mPkgInfo;
     ComponentName mCn = new ComponentName("a", "b");
@@ -75,15 +80,47 @@
         mController.setNm(mNm);
         mController.setParent(mFragment);
         mController.setPkgInfo(mPkgInfo);
+
     }
 
     @Test
     public void updateState_checked() {
+        when(mAppOpsManager.noteOpNoThrow(anyInt(), anyInt(), anyString())).thenReturn(
+                AppOpsManager.MODE_ALLOWED);
         when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true);
-        SwitchPreference pref = new SwitchPreference(mContext);
+        RestrictedSwitchPreference pref = new RestrictedSwitchPreference(
+                mContext);
+        pref.setAppOps(mAppOpsManager);
 
         mController.updateState(pref);
         assertThat(pref.isChecked()).isTrue();
+        assertThat(pref.isEnabled()).isTrue();
+    }
+
+    @Test
+    public void restrictedSettings_appOpsDisabled() {
+        when(mAppOpsManager.noteOpNoThrow(anyInt(), anyInt(), anyString())).thenReturn(
+                AppOpsManager.MODE_ERRORED);
+        when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(false);
+        RestrictedSwitchPreference pref = new RestrictedSwitchPreference(
+                mContext);
+        pref.setAppOps(mAppOpsManager);
+
+        mController.updateState(pref);
+        assertThat(pref.isEnabled()).isFalse();
+    }
+
+    @Test
+    public void restrictedSettings_serviceAlreadyEnabled() {
+        when(mAppOpsManager.noteOpNoThrow(anyInt(), anyInt(), anyString())).thenReturn(
+                AppOpsManager.MODE_ERRORED);
+        when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true);
+        RestrictedSwitchPreference pref = new RestrictedSwitchPreference(
+                mContext);
+        pref.setAppOps(mAppOpsManager);
+
+        mController.updateState(pref);
+        assertThat(pref.isEnabled()).isTrue();
     }
 
     @Test