Merge "Add metrics log for special cases" into rvc-dev
diff --git a/res/layout/notification_sbn_log_row.xml b/res/layout/notification_sbn_log_row.xml
index 3b731ac..049e940 100644
--- a/res/layout/notification_sbn_log_row.xml
+++ b/res/layout/notification_sbn_log_row.xml
@@ -14,119 +14,132 @@
      limitations under the License.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingTop="6dp"
-    android:minHeight="48dp"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:orientation="vertical"
-    android:background="?android:attr/selectableItemBackground"
-    >
-
-    <LinearLayout
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:paddingTop="6dp"
+              android:minHeight="48dp"
+              android:orientation="vertical"
+              android:background="?android:attr/selectableItemBackground"
+>
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:minHeight="@*android:dimen/status_bar_icon_size"
-        android:paddingBottom="6dp">
-
-        <ImageView
-            android:id="@+id/icon"
-            android:layout_height="@*android:dimen/status_bar_icon_size"
-            android:layout_width="@*android:dimen/status_bar_icon_size"
-            android:layout_centerVertical="true"
-            android:layout_marginStart="0dp"
-            android:layout_marginEnd="8dp"
-            android:contentDescription="@null"
-            android:adjustViewBounds="true"
-            android:tint="?android:attr/textColorPrimary"
-            android:scaleType="fitCenter" />
-
-        <TextView
-            android:id="@+id/pkgname"
-            android:layout_weight="1"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:ellipsize="end"
-            android:singleLine="true"
-            android:textColor="?android:attr/textColorPrimary"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:marqueeRepeatLimit = "marquee_forever"
-            android:scrollHorizontally = "true"
-            android:textStyle="bold"
-            android:textAlignment="viewStart" />
-
-        <ImageView
-            android:id="@+id/alerted_icon"
-            android:layout_width="@*android:dimen/status_bar_icon_size"
-            android:layout_height="@*android:dimen/status_bar_icon_size"
-            android:layout_centerVertical="true"
-            android:layout_marginStart="6dp"
-            android:paddingTop="1dp"
-            android:scaleType="fitCenter"
-            android:visibility="gone"
-            android:tint="?android:attr/textColorSecondary"
-            android:src="@drawable/ic_notifications_alert"
-        />
-
-        <ImageView
-            android:id="@+id/profile_badge"
-            android:layout_width="@*android:dimen/status_bar_icon_size"
-            android:layout_height="@*android:dimen/status_bar_icon_size"
-            android:layout_centerVertical="true"
-            android:layout_marginEnd="6dp"
-            android:paddingTop="1dp"
-            android:scaleType="fitCenter"
-            android:contentDescription="@*android:string/notification_work_profile_content_description"
-            android:layout_toStartOf="@id/timestamp"
-        />
-
-        <DateTimeView
-            android:id="@+id/timestamp"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:minHeight="@*android:dimen/status_bar_icon_size"
-            android:layout_alignBottom="@android:id/widget_frame"
-            android:layout_alignParentEnd="true"
-            android:layout_alignTop="@android:id/widget_frame"
-            android:layout_centerVertical="true"
-            android:ellipsize="end"
-            android:singleLine="true"
-            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification"
-            android:textAlignment="viewEnd"
-            />
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
         android:orientation="vertical"
-        android:layout_marginStart="30dp"
-        android:layout_marginBottom="6dp"
         >
 
-        <TextView
-            android:id="@+id/title"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="left|center_vertical"
-            android:ellipsize="end"
-            android:singleLine="true"
-            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
-            android:textAlignment="viewStart"
-        />
+            android:minHeight="@*android:dimen/status_bar_icon_size"
+            android:paddingBottom="6dp">
 
-        <TextView
-            android:id="@+id/text"
+            <ImageView
+                android:id="@+id/icon"
+                android:layout_height="@*android:dimen/status_bar_icon_size"
+                android:layout_width="@*android:dimen/status_bar_icon_size"
+                android:layout_centerVertical="true"
+                android:layout_marginStart="0dp"
+                android:layout_marginEnd="8dp"
+                android:contentDescription="@null"
+                android:adjustViewBounds="true"
+                android:tint="?android:attr/textColorPrimary"
+                android:scaleType="fitCenter" />
+
+            <TextView
+                android:id="@+id/pkgname"
+                android:layout_weight="1"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:ellipsize="end"
+                android:singleLine="true"
+                android:textColor="?android:attr/textColorPrimary"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:marqueeRepeatLimit = "marquee_forever"
+                android:scrollHorizontally = "true"
+                android:textStyle="bold"
+                android:textAlignment="viewStart" />
+
+            <ImageView
+                android:id="@+id/alerted_icon"
+                android:layout_width="@*android:dimen/status_bar_icon_size"
+                android:layout_height="@*android:dimen/status_bar_icon_size"
+                android:layout_centerVertical="true"
+                android:layout_marginStart="6dp"
+                android:paddingTop="1dp"
+                android:scaleType="fitCenter"
+                android:visibility="gone"
+                android:tint="?android:attr/textColorSecondary"
+                android:src="@drawable/ic_notifications_alert"
+            />
+
+            <ImageView
+                android:id="@+id/profile_badge"
+                android:layout_width="@*android:dimen/status_bar_icon_size"
+                android:layout_height="@*android:dimen/status_bar_icon_size"
+                android:layout_centerVertical="true"
+                android:layout_marginEnd="6dp"
+                android:paddingTop="1dp"
+                android:scaleType="fitCenter"
+                android:contentDescription="@*android:string/notification_work_profile_content_description"
+                android:layout_toStartOf="@id/timestamp"
+            />
+
+            <DateTimeView
+                android:id="@+id/timestamp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:minHeight="@*android:dimen/status_bar_icon_size"
+                android:layout_alignBottom="@android:id/widget_frame"
+                android:layout_alignParentEnd="true"
+                android:layout_alignTop="@android:id/widget_frame"
+                android:layout_centerVertical="true"
+                android:ellipsize="end"
+                android:singleLine="true"
+                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification"
+                android:textAlignment="viewEnd"
+                />
+        </LinearLayout>
+
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="left|center_vertical"
-            android:ellipsize="end"
-            android:singleLine="true"
-            android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification"
-            android:textAlignment="viewStart"
-        />
+            android:orientation="vertical"
+            android:layout_marginStart="30dp"
+            android:layout_marginBottom="6dp"
+            >
+
+            <TextView
+                android:id="@+id/title"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="left|center_vertical"
+                android:ellipsize="end"
+                android:singleLine="true"
+                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
+                android:textAlignment="viewStart"
+            />
+
+            <TextView
+                android:id="@+id/text"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="left|center_vertical"
+                android:ellipsize="end"
+                android:singleLine="true"
+                android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification"
+                android:textAlignment="viewStart"
+            />
+
+        </LinearLayout>
 
     </LinearLayout>
-</LinearLayout>
+    <View
+        android:id="@+id/divider"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_marginTop="17dp"
+        android:background="@color/material_grey_300" />
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/preference_multiline_title.xml b/res/layout/preference_multiline_title.xml
index ae93ead..f64b27f 100644
--- a/res/layout/preference_multiline_title.xml
+++ b/res/layout/preference_multiline_title.xml
@@ -36,6 +36,7 @@
             android:layout_height="wrap_content"
             android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
             android:textColor="?android:attr/textColorPrimary"
+            android:textAlignment="center"
             android:ellipsize="marquee"
             android:fadingEdge="horizontal" />
 
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index 3b085dc..d4a69f2 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -290,7 +290,7 @@
     <string name="lockdown_settings_summary" msgid="7422522013953398806">"Mostra a opción do botón de acendido que desactiva Smart Lock, o desbloqueo biométrico e as notificacións da pantalla de bloqueo"</string>
     <string name="trust_lost_locks_screen_title" msgid="4231232144565291276">"Bloquear pantalla ao perder a confianza"</string>
     <string name="trust_lost_locks_screen_summary" msgid="718374221849537361">"Se se activa, o dispositivo bloquearase cando o último axente de confianza perda ese privilexio"</string>
-    <string name="owner_info_settings_summary" msgid="347238313388083297">"Ningunha"</string>
+    <string name="owner_info_settings_summary" msgid="347238313388083297">"Ningún"</string>
     <string name="owner_info_settings_status" msgid="7488764871758677862">"<xliff:g id="COUNT_0">%1$d</xliff:g>/<xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
     <string name="owner_info_settings_edit_text_hint" msgid="841926875876050274">"Por exemplo: Android de Xoán."</string>
     <string name="show_profile_info_on_lockscreen_label" msgid="5734739022887933365">"Mostrar info do perfil na pantalla de bloqueo"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 9d878d0..4be0b18 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -2127,24 +2127,17 @@
     <string name="accessibility_screen_magnification_summary" msgid="2023126829553044999">"Vuta karibu haraka kwenye skrini ili uonyeshe maudhui vizuri zaidi.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Ili uvute karibu:&lt;/b&gt;&lt;br/&gt; 1. Tumia njia ya mkato ili uanzishe ukuzaji&lt;br/&gt; 2. Gusa skrini&lt;br/&gt; 3. Buruta vidole viwili ili usogeze kwenye skrini&lt;br/&gt; 4. Bana kwa vidole viwili ili ubadilishe ukuzaji&lt;br/&gt; 5. Tumia njia ya mkato ili usimamishe ukuzaji&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Ili uvute karibu kwa muda:&lt;/b&gt;&lt;br/&gt; 1. Tumia njia ya mkato ili uanzishe ukuzaji&lt;br/&gt; 2. Gusa na ushikilie mahali popote kwenye skrini&lt;br/&gt; 3. Buruta kidole ili usogeze kwenye skrini&lt;br/&gt; 4. Inua kidole ili uache kukuza"</string>
     <string name="accessibility_screen_magnification_navbar_summary" msgid="807985499898802296">"Ukiwasha ukuzaji, unaweza kuvuta karibu kwenye skrini yako.\n\n"<b>"Ili ukuze"</b>", anzisha ukuzaji kisha uguse mahali popote kwenye skrini.\n"<ul><li>"Buruta vidole 2 au zaidi ili usogeze"</li>\n<li>"Bana vidole 2 au zaidi ili urekebishe ukuzaji"</li></ul>\n\n<b>"Ili ukuze kwa muda"</b>", anzisha ukuzaji kisha uguse na ushikilie mahali popote kwenye skrini.\n"<ul><li>"Buruta ili usogeze kwenye skrini"</li>\n<li>"Inua kidole ili usogeze mbali"</li></ul>\n\n"Huwezi kuvuta karibu kwenye kibodi au sehemu ya viungo muhimu."</string>
     <string name="accessibility_tutorial_dialog_title_button" msgid="4681164949716215131">"Tumia kitufe cha ufikivu kufungua"</string>
-    <!-- no translation found for accessibility_tutorial_dialog_title_volume (494810949830845234) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_title_volume" msgid="494810949830845234">"Shikilia vitufe vya sauti ili ufungue"</string>
     <string name="accessibility_tutorial_dialog_title_triple" msgid="7089562919284464400">"Gusa skrini mara tatu ili ufungue"</string>
     <string name="accessibility_tutorial_dialog_title_gesture" msgid="4965810097646659332">"Tumia ishara ili ufungue"</string>
     <string name="accessibility_tutorial_dialog_title_gesture_settings" msgid="8485448068531147828">"Tumia ishara mpya ya ufikivu"</string>
-    <!-- no translation found for accessibility_tutorial_dialog_message_button (7002398857479782303) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_volume (5033080515460519183) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_message_button" msgid="7002398857479782303">"Ili utumie kipengele hiki, gusa kitufe cha zana za ufikivu cha <xliff:g id="ACCESSIBILITY_ICON">%s</xliff:g> katika sehemu ya chini ya skrini yako.\n\nIli ubadilishe kati ya vipengele, gusa na ushikilie kitufe cha zana za ufikivu."</string>
+    <string name="accessibility_tutorial_dialog_message_volume" msgid="5033080515460519183">"Ili utumie kipengele hiki, bonyeza na ushikilie vitufe vyote viwili vya sauti."</string>
     <string name="accessibility_tutorial_dialog_message_triple" msgid="5219991116201165146">"Ili uanzishe na kusimamisha ukuzaji, gusa mara tatu mahali popote kwenye skrini yako."</string>
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture (4148062210755434854) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_talkback (8142847782708562793) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_settings (40769674586981429) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_settings_talkback (7292969929578621958) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_message_gesture" msgid="4148062210755434854">"Ili utumie kipengele hiki, telezesha vidole viwili juu kutoka sehemu ya chini ya skrini.\n\nIli ubadilishe kati ya vipengele, telezesha vidole viwili juu na ushikilie."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_talkback" msgid="8142847782708562793">"Ili utumie kipengele hiki, telezesha vidole vitatu juu kutoka sehemu ya chini ya skrini.\n\nIli ubadilishe kati ya vipengele, telezesha vidole vitatu juu na ushikilie."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_settings" msgid="40769674586981429">"Ili utumie kipengele cha ufikivu, telezesha vidole viwili juu kutoka sehemu ya chini ya skrini.\n\nIli ubadilishe kati ya vipengele, telezesha vidole viwili juu na ushikilie."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_settings_talkback" msgid="7292969929578621958">"Ili utumie kipengele cha ufikivu, telezesha vidole vitatu juu kutoka sehemu ya chini ya skrini.\n\nIli ubadilishe kati ya vipengele, telezesha vidole vitatu juu na ushikilie."</string>
     <string name="accessibility_tutorial_dialog_button" msgid="2031773187678948436">"Nimeelewa"</string>
     <string name="accessibility_shortcut_title" msgid="8125867833704517463">"Njia mkato ya <xliff:g id="SERVICE">%1$s</xliff:g>"</string>
     <string name="accessibility_shortcut_edit_summary_software" msgid="6405629977940618205">"Kitufe cha zana za ufikivu"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index da7d6c1..30314f5 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -2127,24 +2127,17 @@
     <string name="accessibility_screen_magnification_summary" msgid="2023126829553044999">"İçeriği daha net görüntülemek için ekranı hızlıca yakınlaştırın.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Yakınlaştırmak için:&lt;/b&gt;&lt;br/&gt; 1. Büyütmeyi başlatmak için kısayolu kullanın&lt;br/&gt; 2. Ekrana dokunun&lt;br/&gt; 3. Ekranda gezinmek için 2 parmağınızı sürükleyin&lt;br/&gt; 4. Yakınlaştırmayı ayarlamak için 2 parmağınızla sıkıştırın&lt;br/&gt; 5. Büyütmeyi durdurmak için kısayolu kullanın&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Geçici bir süreliğine yakınlaştırmak için:&lt;/b&gt;&lt;br/&gt; 1. Büyütmeyi başlatmak için kısayolu kullanın&lt;br/&gt; 2. Ekranda herhangi bir yere dokunup basılı tutun&lt;br/&gt; 3. Ekranda gezinmek için parmağınızı sürükleyin&lt;br/&gt; 4. Büyütmeyi durdurmak için parmağınızı kaldırın"</string>
     <string name="accessibility_screen_magnification_navbar_summary" msgid="807985499898802296">"Büyütme açıldığında ekranınızda yakınlaştırma yapabilirsiniz.\n\n"<b>"Yakınlaştırmak için"</b>", büyütmeyi başlatın, ardından ekranda herhangi bir yere dokunun.\n"<ul><li>"Kaydırmak için 2 veya daha fazla parmağınızı sürükleyin"</li>\n<li>"Yakınlaştırmayı ayarlamak için 2 veya daha fazla parmağınızı birbirine yaklaştırın"</li></ul>\n\n<b>"Geçici olarak yakınlaştırmak için"</b>", büyütmeyi başlatın, ardından ekranda herhangi bir yere dokunup basılı tutun.\n"<ul><li>"Ekranda hareket etmek için sürükleyin"</li>\n<li>"Uzaklaştırmak için parmağınızı çekin"</li></ul>\n\n"Klavyede veya gezinme çubuğundayken yakınlaştırma yapamazsınız."</string>
     <string name="accessibility_tutorial_dialog_title_button" msgid="4681164949716215131">"Açmak için erişilebilirlik düğmesini kullanın"</string>
-    <!-- no translation found for accessibility_tutorial_dialog_title_volume (494810949830845234) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_title_volume" msgid="494810949830845234">"Açmak için ses düğmelerini basılı tutun"</string>
     <string name="accessibility_tutorial_dialog_title_triple" msgid="7089562919284464400">"Açmak için ekrana üç kez dokunun"</string>
     <string name="accessibility_tutorial_dialog_title_gesture" msgid="4965810097646659332">"Açmak için hareketi kullanın"</string>
     <string name="accessibility_tutorial_dialog_title_gesture_settings" msgid="8485448068531147828">"Yeni erişilebilirlik hareketlerini kullanma"</string>
-    <!-- no translation found for accessibility_tutorial_dialog_message_button (7002398857479782303) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_volume (5033080515460519183) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_message_button" msgid="7002398857479782303">"Bu özelliği kullanmak için ekranınızın alt kısmındaki erişilebilirlik düğmesine <xliff:g id="ACCESSIBILITY_ICON">%s</xliff:g> dokunun.\n\nÖzellikler arasında geçiş yapmak için erişilebilirlik düğmesine dokunup basılı tutun."</string>
+    <string name="accessibility_tutorial_dialog_message_volume" msgid="5033080515460519183">"Bu özelliği kullanmak için ses tuşlarının ikisini birden basılı tutun."</string>
     <string name="accessibility_tutorial_dialog_message_triple" msgid="5219991116201165146">"Büyütmeyi başlatıp durdurmak için ekranınızda herhangi bir yere üç kez dokunun."</string>
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture (4148062210755434854) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_talkback (8142847782708562793) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_settings (40769674586981429) -->
-    <skip />
-    <!-- no translation found for accessibility_tutorial_dialog_message_gesture_settings_talkback (7292969929578621958) -->
-    <skip />
+    <string name="accessibility_tutorial_dialog_message_gesture" msgid="4148062210755434854">"Bu özelliği kullanmak için 2 parmağınızla ekranın alt kısmından yukarı kaydırın.\n\nÖzellikler arasında geçiş yapmak için 2 parmağınızla yukarı kaydırıp basılı tutun."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_talkback" msgid="8142847782708562793">"Bu özelliği kullanmak için 3 parmağınızla ekranın alt kısmından yukarı kaydırın.\n\nÖzellikler arasında geçiş yapmak için 3 parmağınızla yukarı kaydırıp basılı tutun."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_settings" msgid="40769674586981429">"Bir erişilebilirlik özelliğini kullanmak için 2 parmağınızla ekranın alt kısmından yukarı kaydırın.\n\nÖzellikler arasında geçiş yapmak için 2 parmağınızla yukarı kaydırıp basılı tutun."</string>
+    <string name="accessibility_tutorial_dialog_message_gesture_settings_talkback" msgid="7292969929578621958">"Bir erişilebilirlik özelliğini kullanmak için 3 parmağınızla ekranın alt kısmından yukarı kaydırın.\n\nÖzellikler arasında geçiş yapmak için 3 parmağınızla yukarı kaydırıp basılı tutun."</string>
     <string name="accessibility_tutorial_dialog_button" msgid="2031773187678948436">"Anladım"</string>
     <string name="accessibility_shortcut_title" msgid="8125867833704517463">"<xliff:g id="SERVICE">%1$s</xliff:g> kısayolu"</string>
     <string name="accessibility_shortcut_edit_summary_software" msgid="6405629977940618205">"Erişilebilirlik düğmesi"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3684056..366254f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4944,7 +4944,7 @@
     <string name="accessibility_screen_magnification_navbar_summary">When magnification is turned on, you can zoom in on your screen.\n\n<b>To zoom</b>, start magnification, then tap anywhere on the screen.\n<ul><li>Drag 2 or more fingers to scroll</li>\n<li>Pinch 2 or more fingers to adjust zoom</li></ul>\n\n<b>To zoom temporarily</b>, start magnification, then touch &amp; hold anywhere on the screen.\n<ul><li>Drag to move around the screen</li>\n<li>Lift finger to zoom out</li></ul>\n\nYou can’t zoom in on the keyboard or navigation bar.</string>
     <!-- Title for the accessibility tutorial dialog in accessibility service with button. [CHAR LIMIT=50] -->
     <string name="accessibility_tutorial_dialog_title_button">Use accessibility button to open</string>
-    <!-- Title for the accessibility tutorial dialog in accessibility service with volume keys. [CHAR LIMIT=50] -->
+    <!-- Title for the accessibility tutorial dialog in accessibility service with volume keys. [CHAR LIMIT=100] -->
     <string name="accessibility_tutorial_dialog_title_volume">Hold volume keys to open</string>
     <!-- Title for the accessibility tutorial dialog in accessibility service with triple tap. [CHAR LIMIT=100] -->
     <string name="accessibility_tutorial_dialog_title_triple">Triple tap screen to open</string>
@@ -8197,8 +8197,6 @@
 
     <!-- Configure Notifications: Title for the notification bubbles option. [CHAR LIMIT=60] -->
     <string name="notification_bubbles_title">Bubbles</string>
-    <!-- Developer setting summary for bubbles [CHAR LIMIT=NONE] -->
-    <string name="notification_bubbles_developer_setting_summary">Some notifications can appear as bubbles on the screen</string>
     <!-- Feature education for bubbles. [CHAR LIMIT=NONE] -->
     <string name="bubbles_feature_education">Some notifications and other content can appear as bubbles on the screen. To open a bubble, tap it. To dismiss it, drag it down the screen.</string>
     <!-- Title for the toggle shown on the app-level bubbles page  [CHAR LIMIT=60] -->
@@ -8666,7 +8664,7 @@
     <!-- Settings text. This text lets a user know that they should only connect work and personal apps
     if they trust the work app with their personal data. The work app could potentially show that data
     to the user's IT admin. [CHAR LIMIT=NONE] -->
-    <string name="interact_across_profiles_summary_2">Only connect apps that you trust with your personal data. Work apps may expose your data to your IT admin.</string>
+    <string name="interact_across_profiles_summary_2">Only connect apps if you trust them not to share personal data with your IT admin.</string>
 
     <!-- Dialog title. This dialog is shown when a user tries to connect a work app to a personal
     app (e.g. their work Calendar to their personal Calendar), and it's confirming that they should
@@ -8677,7 +8675,7 @@
     app (e.g. their work Calendar to their personal Calendar), and it's confirming that they should
     connect the apps only if they trust the work app with their personal data.
     The placeholder is the app name. [CHAR LIMIT=NONE] -->
-    <string name="interact_across_profiles_consent_dialog_summary"><xliff:g id="name" example="Calendar">%1$s</xliff:g> may expose your personal data to your IT admin.</string>
+    <string name="interact_across_profiles_consent_dialog_summary">Only connect apps if you trust them not to share personal data with your IT admin.</string>
 
     <!-- Title of a section in a dialog. This section shows the app data that will be
     accessible when work and personal apps are connected. [CHAR LIMIT=NONE] -->
@@ -8708,12 +8706,12 @@
     <!-- Banner title. This banner lets a user know that they need to install an app in their
     work profile in order to connect it to the corresponding personal app.
     The placeholder would be the app name (e.g. Calendar). [CHAR LIMIT=NONE]-->
-    <string name="interact_across_profiles_install_work_app_title">Install work <xliff:g id="name" example="Calendar">%1$s</xliff:g> to connect these apps</string>
+    <string name="interact_across_profiles_install_work_app_title">To connect these apps, install <xliff:g id="name" example="Calendar">%1$s</xliff:g> in your work profile</string>
 
     <!-- Banner title. This banner lets a user know that they need to install an app in their
     personal profile in order to connect it to the corresponding work app.
     The placeholder would be the app name (e.g. Calendar). [CHAR LIMIT=NONE]-->
-    <string name="interact_across_profiles_install_personal_app_title">Install personal <xliff:g id="name" example="Calendar">%1$s</xliff:g> to connect these apps</string>
+    <string name="interact_across_profiles_install_personal_app_title">To connect these apps, install <xliff:g id="name" example="Calendar">%1$s</xliff:g> in your personal profile</string>
 
     <!-- Banner text. This banner lets a user know that they need to install an app in their
     work/personal profile in order to connect it to the corresponding personal app.
@@ -11820,11 +11818,6 @@
     <!-- Summary for the top level Privacy Settings [CHAR LIMIT=NONE]-->
     <string name="privacy_dashboard_summary">Permissions, account activity, personal data</string>
 
-    <!-- UI debug setting: show media player on quick settings title [CHAR LIMIT=60] -->
-    <string name="quick_settings_media_player">Media resumption</string>
-    <!-- UI debug setting: show media player on quick settings summary [CHAR_LIMIT=NONE] -->
-    <string name="quick_settings_media_player_summary">Shows and persists media player in Quick Settings. Requires reboot.</string>
-
     <!-- Label for button in contextual card for users to remove the card [CHAR LIMIT=30] -->
     <string name="contextual_card_dismiss_remove">Remove</string>
     <!-- Label for button in contextual card for users to keep the card [CHAR LIMIT=30] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8393f80..98f340c 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -501,6 +501,11 @@
         <item name="rowStyle">@style/SliceRow.Settings</item>
     </style>
 
+    <style name="Widget.SliceView.ContextualCard">
+        <item name="rowStyle">@style/SliceRow</item>
+        <item name="android:background">@color/contextual_card_background</item>
+    </style>
+
     <style name="Widget.SliceView.Panel">
         <item name="titleSize">16sp</item>
         <item name="rowStyle">@style/SliceRow</item>
@@ -511,35 +516,6 @@
         <item name="rowStyle">@style/SliceRow.Slider</item>
     </style>
 
-    <style name="SliceRow.Slider">
-        <!-- 2dp start padding for the start icon -->
-        <item name="titleItemStartPadding">10dp</item>
-        <item name="titleItemEndPadding">0dp</item>
-
-        <!-- Padding between content and the start icon is 14dp -->
-        <item name="contentStartPadding">5dp</item>
-        <!-- Padding between content and end items is 16dp -->
-        <item name="contentEndPadding">16dp</item>
-
-        <!-- Both side margins of end item are 16dp -->
-        <item name="endItemStartPadding">0dp</item>
-        <item name="endItemEndPadding">24dp</item>
-
-        <!-- Both side margins of bottom divider are 12dp -->
-        <item name="bottomDividerStartPadding">12dp</item>
-        <item name="bottomDividerEndPadding">12dp</item>
-
-        <item name="actionDividerHeight">32dp</item>
-        <!-- Align text with slider -->
-        <item name="titleStartPadding">6dp</item>
-        <item name="subContentStartPadding">6dp</item>
-    </style>
-
-    <style name="Widget.SliceView.ContextualCard">
-        <item name="rowStyle">@style/SliceRow</item>
-        <item name="android:background">@color/contextual_card_background</item>
-    </style>
-
     <style name="SliceRow">
         <!-- 2dp start padding for the start icon -->
         <item name="titleItemStartPadding">2dp</item>
@@ -566,6 +542,23 @@
         <item name="contentStartPadding">8dp</item>
     </style>
 
+    <style name="SliceRow.Slider">
+        <!-- 10dp start padding for the start icon -->
+        <item name="titleItemStartPadding">10dp</item>
+
+        <!-- Padding between content and the start icon is 0dp -->
+        <item name="contentStartPadding">0dp</item>
+
+        <!-- 0dp start padding for the end item -->
+        <item name="endItemStartPadding">0dp</item>
+        <!-- 24dp end padding for the end item -->
+        <item name="endItemEndPadding">24dp</item>
+
+        <!-- Align text with slider -->
+        <item name="titleStartPadding">11dp</item>
+        <item name="subContentStartPadding">11dp</item>
+    </style>
+
     <style name="DisclaimerPositiveButton" parent="@style/SudGlifButton.Primary">
         <item name="android:layout_margin">16dp</item>
         <item name="android:paddingStart">8dp</item>
diff --git a/res/xml/accessibility_color_inversion_settings.xml b/res/xml/accessibility_color_inversion_settings.xml
new file mode 100644
index 0000000..44702db
--- /dev/null
+++ b/res/xml/accessibility_color_inversion_settings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 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.
+-->
+
+<PreferenceScreen
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:persistent="false"
+    android:title="@string/accessibility_display_inversion_preference_title">
+</PreferenceScreen>
\ No newline at end of file
diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml
index d1473e5..cce0a37 100644
--- a/res/xml/development_settings.xml
+++ b/res/xml/development_settings.xml
@@ -527,11 +527,6 @@
             android:title="@string/usb_audio_disable_routing"
             android:summary="@string/usb_audio_disable_routing_summary" />
 
-        <SwitchPreference
-            android:key="quick_settings_media_player"
-            android:title="@string/quick_settings_media_player"
-            android:summary="@string/quick_settings_media_player_summary" />
-
     </PreferenceCategory>
 
     <PreferenceCategory
@@ -638,12 +633,6 @@
         <Preference
             android:key="reset_shortcut_manager_throttling"
             android:title="@string/reset_shortcut_manager_throttling" />
-
-        <SwitchPreference
-            android:key="notification_bubbles"
-            android:title="@string/notification_bubbles_title"
-            android:summary="@string/notification_bubbles_developer_setting_summary"/>
-
     </PreferenceCategory>
 
     <com.android.settings.development.autofill.AutofillPreferenceCategory
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 2391fe8..d34dbcf 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -42,6 +42,7 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
+import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.database.Cursor;
@@ -1101,4 +1102,13 @@
                 context.getString(R.string.config_settingsintelligence_package_name));
         return isSettingsIntelligence;
     }
+
+    /**
+     * Returns true if the night mode is enabled.
+     */
+    public static boolean isNightMode(Context context) {
+        final int currentNightMode =
+                context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+        return currentNightMode == Configuration.UI_MODE_NIGHT_YES;
+    }
 }
diff --git a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
index cae1b25..dfdcd9e 100644
--- a/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleColorInversionPreferenceFragment.java
@@ -57,6 +57,11 @@
     }
 
     @Override
+    protected int getPreferenceScreenResId() {
+        return R.xml.accessibility_color_inversion_settings;
+    }
+
+    @Override
     protected void onRemoveSwitchPreferenceToggleSwitch() {
         super.onRemoveSwitchPreferenceToggleSwitch();
         mToggleServiceDividerSwitchPreference.setOnPreferenceClickListener(null);
diff --git a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
index 6b0759a..2386911 100644
--- a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
@@ -30,6 +30,7 @@
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.text.Html;
@@ -96,6 +97,7 @@
     private int mUserShortcutTypes = UserShortcutType.EMPTY;
     private CheckBox mSoftwareTypeCheckBox;
     private CheckBox mHardwareTypeCheckBox;
+    private SettingsContentObserver mSettingsContentObserver;
 
     // For html description of accessibility service, must follow the rule, such as
     // <img src="R.drawable.fileName"/>, a11y settings will get the resources successfully.
@@ -124,6 +126,17 @@
                     getPrefContext());
             setPreferenceScreen(preferenceScreen);
         }
+
+        final List<String> shortcutFeatureKeys = new ArrayList<>();
+        shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS);
+        shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE);
+        mSettingsContentObserver = new SettingsContentObserver(new Handler(), shortcutFeatureKeys) {
+            @Override
+            public void onChange(boolean selfChange, Uri uri) {
+                updateShortcutPreferenceData();
+                updateShortcutPreference();
+            }
+        };
     }
 
     @Override
@@ -229,6 +242,7 @@
         final AccessibilityManager am = getPrefContext().getSystemService(
                 AccessibilityManager.class);
         am.addTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
+        mSettingsContentObserver.register(getContentResolver());
         updateShortcutPreferenceData();
         updateShortcutPreference();
     }
@@ -238,6 +252,7 @@
         final AccessibilityManager am = getPrefContext().getSystemService(
                 AccessibilityManager.class);
         am.removeTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
+        mSettingsContentObserver.unregister(getContentResolver());
         super.onPause();
     }
 
@@ -618,7 +633,7 @@
                 getShortcutTypeSummary(getPrefContext()));
     }
 
-    private void updateShortcutPreferenceData() {
+    protected void updateShortcutPreferenceData() {
         if (mComponentName == null) {
             return;
         }
@@ -651,7 +666,7 @@
         mShortcutPreference.setTitle(title);
     }
 
-    private void updateShortcutPreference() {
+    protected void updateShortcutPreference() {
         if (mComponentName == null) {
             return;
         }
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 23fb153..52f8f71 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -467,7 +467,8 @@
         showDialog(DialogEnums.MAGNIFICATION_EDIT_SHORTCUT);
     }
 
-    private void updateShortcutPreferenceData() {
+    @Override
+    protected void updateShortcutPreferenceData() {
         // Get the user shortcut type from settings provider.
         mUserShortcutType = getUserShortcutTypeFromSettings(getPrefContext());
         if (mUserShortcutType != UserShortcutType.EMPTY) {
@@ -489,7 +490,8 @@
         mShortcutPreference.setTitle(title);
     }
 
-    private void updateShortcutPreference() {
+    @Override
+    protected void updateShortcutPreference() {
         final int shortcutTypes = getUserShortcutTypes(getPrefContext(), UserShortcutType.SOFTWARE);
         mShortcutPreference.setChecked(
                 hasMagnificationValuesInSettings(getPrefContext(), shortcutTypes));
diff --git a/src/com/android/settings/accounts/AccountTypePreferenceLoader.java b/src/com/android/settings/accounts/AccountTypePreferenceLoader.java
index d32b630..c639d1d 100644
--- a/src/com/android/settings/accounts/AccountTypePreferenceLoader.java
+++ b/src/com/android/settings/accounts/AccountTypePreferenceLoader.java
@@ -197,14 +197,7 @@
         ActivityInfo resolvedActivityInfo = resolveInfo.activityInfo;
         ApplicationInfo resolvedAppInfo = resolvedActivityInfo.applicationInfo;
         try {
-            if (resolvedActivityInfo.exported) {
-                if (resolvedActivityInfo.permission == null) {
-                    return true; // exported activity without permission.
-                } else if (pm.checkPermission(resolvedActivityInfo.permission,
-                    authDesc.packageName) == PackageManager.PERMISSION_GRANTED) {
-                    return true;
-                }
-            }
+            // Allows to launch only authenticator owned activities.
             ApplicationInfo authenticatorAppInf = pm.getApplicationInfo(authDesc.packageName, 0);
             return resolvedAppInfo.uid == authenticatorAppInf.uid;
         } catch (NameNotFoundException e) {
diff --git a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
index d954e72..147c412 100644
--- a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
@@ -16,6 +16,10 @@
 
 package com.android.settings.applications.appinfo;
 
+import static com.android.settings.core.instrumentation.SettingsStatsLog.AUTO_REVOKED_APP_INTERACTION;
+import static com.android.settings.core.instrumentation.SettingsStatsLog.AUTO_REVOKED_APP_INTERACTION__ACTION__OPEN_IN_SETTINGS;
+import static com.android.settings.core.instrumentation.SettingsStatsLog.AUTO_REVOKED_APP_INTERACTION__ACTION__REMOVE_IN_SETTINGS;
+
 import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.admin.DevicePolicyManager;
@@ -52,6 +56,7 @@
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.core.InstrumentedPreferenceFragment;
 import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settings.core.instrumentation.SettingsStatsLog;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.RestrictedLockUtils;
 import com.android.settingslib.RestrictedLockUtilsInternal;
@@ -118,10 +123,12 @@
     private RestrictedLockUtils.EnforcedAdmin mAppsControlDisallowedAdmin;
     private PreferenceScreen mScreen;
 
+    private long mSessionId;
     private boolean mUpdatedSysApp = false;
     private boolean mListeningToPackageRemove = false;
     private boolean mFinishing = false;
     private boolean mAppsControlDisallowedBySystem;
+    private boolean mAccessedFromAutoRevoke;
 
     public AppButtonsPreferenceController(SettingsActivity activity,
             InstrumentedPreferenceFragment fragment,
@@ -149,6 +156,8 @@
         mRequestUninstall = requestUninstall;
         mRequestRemoveDeviceAdmin = requestRemoveDeviceAdmin;
         mAppLaunchIntent = mPm.getLaunchIntentForPackage(mPackageName);
+        mSessionId = activity.getIntent().getLongExtra(Intent.ACTION_AUTO_REVOKE_PERMISSIONS, 0);
+        mAccessedFromAutoRevoke = mSessionId != 0;
 
         if (packageName != null) {
             mAppEntry = mState.getEntry(packageName, mUserId);
@@ -202,6 +211,13 @@
 
         @Override
         public void onClick(View v) {
+            if (mAccessedFromAutoRevoke) {
+
+                Log.i(TAG, "sessionId: " + mSessionId + " uninstalling " + mPackageName
+                        + " with uid " + getUid() + ", reached from auto revoke");
+                SettingsStatsLog.write(AUTO_REVOKED_APP_INTERACTION, mSessionId, getUid(),
+                        mPackageName, AUTO_REVOKED_APP_INTERACTION__ACTION__REMOVE_IN_SETTINGS);
+            }
             final String packageName = mAppEntry.info.packageName;
             // Uninstall
             if (mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
@@ -701,10 +717,28 @@
 
     private void launchApplication() {
         if (mAppLaunchIntent != null) {
+            if (mAccessedFromAutoRevoke) {
+
+                Log.i(TAG, "sessionId: " + mSessionId + " uninstalling " + mPackageName
+                        + " with uid " + getUid() + ", reached from auto revoke");
+                SettingsStatsLog.write(AUTO_REVOKED_APP_INTERACTION, mSessionId, getUid(),
+                        mPackageName, AUTO_REVOKED_APP_INTERACTION__ACTION__OPEN_IN_SETTINGS);
+            }
             mContext.startActivityAsUser(mAppLaunchIntent, new UserHandle(mUserId));
         }
     }
 
+    private int getUid() {
+        int uid = -1;
+        if (mPackageInfo == null) {
+            retrieveAppEntry();
+        }
+        if (mPackageInfo != null) {
+            uid = mPackageInfo.applicationInfo.uid;
+        }
+        return uid;
+    }
+
     private boolean isInstantApp() {
         return mAppEntry != null && AppUtils.isInstant(mAppEntry.info);
     }
diff --git a/src/com/android/settings/applications/appinfo/AppPermissionPreferenceController.java b/src/com/android/settings/applications/appinfo/AppPermissionPreferenceController.java
index cf0be20..ce2ff32 100644
--- a/src/com/android/settings/applications/appinfo/AppPermissionPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppPermissionPreferenceController.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.applications.appinfo;
 
+import android.app.Activity;
 import android.content.ActivityNotFoundException;
 import android.content.Context;
 import android.content.Intent;
@@ -35,6 +36,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Random;
 
 /**
  * A PreferenceController handling the logic for permissions of apps.
@@ -44,6 +46,7 @@
 
     private static final String TAG = "PermissionPrefControl";
     private static final String EXTRA_HIDE_INFO_BUTTON = "hideInfoButton";
+    private static final long INVALID_SESSION_ID = 0;
 
     private final PackageManager mPackageManager;
 
@@ -121,11 +124,28 @@
 
     private void startManagePermissionsActivity() {
         // start new activity to manage app permissions
-        final Intent intent = new Intent(Intent.ACTION_MANAGE_APP_PERMISSIONS);
-        intent.putExtra(Intent.EXTRA_PACKAGE_NAME, mParent.getAppEntry().info.packageName);
-        intent.putExtra(EXTRA_HIDE_INFO_BUTTON, true);
+        final Intent permIntent = new Intent(Intent.ACTION_MANAGE_APP_PERMISSIONS);
+        permIntent.putExtra(Intent.EXTRA_PACKAGE_NAME, mParent.getAppEntry().info.packageName);
+        permIntent.putExtra(EXTRA_HIDE_INFO_BUTTON, true);
+        Activity activity = mParent.getActivity();
+        Intent intent = activity != null ? activity.getIntent() : null;
+        if (intent != null) {
+            String action = intent.getAction();
+            long sessionId = intent.getLongExtra(
+                    Intent.ACTION_AUTO_REVOKE_PERMISSIONS, INVALID_SESSION_ID);
+            if ((action != null && action.equals(Intent.ACTION_AUTO_REVOKE_PERMISSIONS))
+                    || sessionId != INVALID_SESSION_ID) {
+                // If intent is Auto revoke, and we don't already have a session ID, make one
+                while (sessionId == INVALID_SESSION_ID) {
+                    sessionId = new Random().nextLong();
+                }
+                permIntent.putExtra(Intent.ACTION_AUTO_REVOKE_PERMISSIONS, sessionId);
+            }
+        }
         try {
-            mParent.getActivity().startActivityForResult(intent, mParent.SUB_INFO_FRAGMENT);
+            if (activity != null) {
+                activity.startActivityForResult(permIntent, mParent.SUB_INFO_FRAGMENT);
+            }
         } catch (ActivityNotFoundException e) {
             Log.w(TAG, "No app can handle android.intent.action.MANAGE_APP_PERMISSIONS");
         }
diff --git a/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java b/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java
index ad47c03..8b1497e 100644
--- a/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java
+++ b/src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java
@@ -255,11 +255,6 @@
         dialogTitle.setText(
                 getString(R.string.interact_across_profiles_consent_dialog_title, mAppLabel));
 
-        final TextView dialogSummary = dialogView.findViewById(
-                R.id.interact_across_profiles_consent_dialog_summary);
-        dialogSummary.setText(
-                getString(R.string.interact_across_profiles_consent_dialog_summary, mAppLabel));
-
         final TextView appDataSummary = dialogView.findViewById(R.id.app_data_summary);
         appDataSummary.setText(getString(
                 R.string.interact_across_profiles_consent_dialog_app_data_summary, mAppLabel));
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 6492560..eaccebf 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -496,7 +496,6 @@
         controllers.add(new DebugNonRectClipOperationsPreferenceController(context));
         controllers.add(new ForceDarkPreferenceController(context));
         controllers.add(new EnableBlursPreferenceController(context));
-        controllers.add(new QuickSettingsMediaPlayerPreferenceController(context));
         controllers.add(new ForceMSAAPreferenceController(context));
         controllers.add(new HardwareOverlaysPreferenceController(context));
         controllers.add(new SimulateColorSpacePreferenceController(context));
diff --git a/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceController.java b/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceController.java
deleted file mode 100644
index 47f3adc..0000000
--- a/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceController.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.development;
-
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.annotation.VisibleForTesting;
-import androidx.preference.Preference;
-import androidx.preference.SwitchPreference;
-
-import com.android.settings.core.PreferenceControllerMixin;
-import com.android.settingslib.development.DeveloperOptionsPreferenceController;
-
-/**
- * Controls whether the media player should be visible in quick settings.
- */
-public class QuickSettingsMediaPlayerPreferenceController extends
-        DeveloperOptionsPreferenceController implements Preference.OnPreferenceChangeListener,
-        PreferenceControllerMixin {
-    private static final String PREFERENCE_KEY = "quick_settings_media_player";
-    @VisibleForTesting
-    static final String SETTING_NAME = Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS;
-    @VisibleForTesting
-    static final int SETTING_VALUE_ON = 1;
-    @VisibleForTesting
-    static final int SETTING_VALUE_OFF = 0;
-
-    public QuickSettingsMediaPlayerPreferenceController(Context context) {
-        super(context);
-    }
-
-    @Override
-    public String getPreferenceKey() {
-        return PREFERENCE_KEY;
-    }
-
-    @Override
-    public boolean onPreferenceChange(Preference preference, Object newValue) {
-        final boolean isEnabled = (Boolean) newValue;
-        Settings.Global.putInt(mContext.getContentResolver(), SETTING_NAME,
-                isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF);
-        return true;
-    }
-
-    @Override
-    public void updateState(Preference preference) {
-        final int mode = Settings.Global.getInt(mContext.getContentResolver(), SETTING_NAME,
-                SETTING_VALUE_OFF);
-        ((SwitchPreference) mPreference).setChecked(mode != SETTING_VALUE_OFF);
-    }
-
-    @Override
-    protected void onDeveloperOptionsSwitchDisabled() {
-        super.onDeveloperOptionsSwitchDisabled();
-        Settings.Global.putInt(mContext.getContentResolver(), SETTING_NAME, SETTING_VALUE_OFF);
-        ((SwitchPreference) mPreference).setChecked(false);
-    }
-}
diff --git a/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java b/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
index 25a6841..79be26d 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
@@ -105,9 +105,6 @@
             return null;
         }
 
-        // Reload theme for switching dark mode on/off
-        mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
-
         final ListBuilder listBuilder = new ListBuilder(mContext, getUri(), ListBuilder.INFINITY)
                 .setAccentColor(COLOR_NOT_TINTED);
 
diff --git a/src/com/android/settings/homepage/contextualcards/slices/DarkThemeSlice.java b/src/com/android/settings/homepage/contextualcards/slices/DarkThemeSlice.java
index 1c1bedc..f934d58 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/DarkThemeSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/DarkThemeSlice.java
@@ -24,7 +24,6 @@
 import android.app.UiModeManager;
 import android.content.Context;
 import android.content.Intent;
-import android.content.res.Configuration;
 import android.database.ContentObserver;
 import android.net.Uri;
 import android.os.BatteryManager;
@@ -107,7 +106,7 @@
         final IconCompat icon =
                 IconCompat.createWithResource(mContext, R.drawable.dark_theme);
 
-        final boolean isChecked = isDarkThemeMode(mContext);
+        final boolean isChecked = Utils.isNightMode(mContext);
         if (sPreChecked != isChecked) {
             // Dark(Night) mode changed and reset the sSliceClicked.
             resetValue(isChecked, false);
@@ -157,7 +156,7 @@
     @VisibleForTesting
     boolean isAvailable(Context context) {
         // check if dark theme mode is enabled or if dark theme scheduling is on.
-        if (isDarkThemeMode(context) || isNightModeScheduled()) {
+        if (Utils.isNightMode(context) || isNightModeScheduled()) {
             return false;
         }
         // checking the current battery level
@@ -167,13 +166,6 @@
         return level <= BATTERY_LEVEL_THRESHOLD;
     }
 
-    @VisibleForTesting
-    static boolean isDarkThemeMode(Context context) {
-        final int currentNightMode =
-                context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-        return currentNightMode == Configuration.UI_MODE_NIGHT_YES;
-    }
-
     private void resetValue(boolean preChecked, boolean clicked) {
         sPreChecked = preChecked;
         sSliceClicked = clicked;
diff --git a/src/com/android/settings/media/MediaDeviceUpdateWorker.java b/src/com/android/settings/media/MediaDeviceUpdateWorker.java
index 52249ff..92cc0e3 100644
--- a/src/com/android/settings/media/MediaDeviceUpdateWorker.java
+++ b/src/com/android/settings/media/MediaDeviceUpdateWorker.java
@@ -174,6 +174,15 @@
         return mLocalMediaManager.getSelectedMediaDevice();
     }
 
+    boolean isSelectedMediaDevice(MediaDevice device) {
+        for (MediaDevice selectedMediaDevice : getSelectedMediaDevice()) {
+            if (TextUtils.equals(selectedMediaDevice.getId(), device.getId())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     void adjustSessionVolume(String sessionId, int volume) {
         mLocalMediaManager.adjustSessionVolume(sessionId, volume);
     }
diff --git a/src/com/android/settings/media/MediaOutputGroupSlice.java b/src/com/android/settings/media/MediaOutputGroupSlice.java
index be6c298..ba29ab7 100644
--- a/src/com/android/settings/media/MediaOutputGroupSlice.java
+++ b/src/com/android/settings/media/MediaOutputGroupSlice.java
@@ -75,8 +75,6 @@
 
     @Override
     public Slice getSlice() {
-        // Reload theme for switching dark mode on/off
-        mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
         final ListBuilder listBuilder = new ListBuilder(mContext, getUri(), ListBuilder.INFINITY)
                 .setAccentColor(COLOR_NOT_TINTED);
         // Add "Group" row
@@ -238,7 +236,7 @@
                             + ") is unavailable");
                     return;
                 }
-                if (TextUtils.equals(device.getClientPackageName(), getWorker().getPackageName())) {
+                if (getWorker().isSelectedMediaDevice(device)) {
                     getWorker().removeDeviceFromPlayMedia(device);
                 } else {
                     getWorker().addDeviceToPlayMedia(device);
diff --git a/src/com/android/settings/media/MediaOutputSlice.java b/src/com/android/settings/media/MediaOutputSlice.java
index df9538b..773013e 100644
--- a/src/com/android/settings/media/MediaOutputSlice.java
+++ b/src/com/android/settings/media/MediaOutputSlice.java
@@ -81,9 +81,6 @@
 
     @Override
     public Slice getSlice() {
-        // Reload theme for switching dark mode on/off
-        mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
-
         final ListBuilder listBuilder = new ListBuilder(mContext, getUri(), ListBuilder.INFINITY)
                 .setAccentColor(COLOR_NOT_TINTED);
         if (!isVisible()) {
diff --git a/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java b/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
index 52fc99c..9e46158 100644
--- a/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
+++ b/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelper.java
@@ -18,6 +18,8 @@
 
 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
 
+import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
+
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
@@ -274,6 +276,7 @@
      */
     private PendingIntent getActivityIntent(String action) {
         final Intent intent = new Intent(action);
+        intent.setPackage(SETTINGS_PACKAGE_NAME);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, 0 /* flags */);
     }
diff --git a/src/com/android/settings/network/telephony/MobileNetworkSettings.java b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
index 49f7981..528e5c7 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkSettings.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
@@ -73,7 +73,7 @@
     private String mClickedPrefKey;
 
     private ActiveSubsciptionsListener mActiveSubsciptionsListener;
-    private boolean mActiveSubsciptionsListenerStarting;
+    private boolean mDropFirstSubscriptionChangeNotify;
     private int mActiveSubsciptionsListenerCount;
 
     public MobileNetworkSettings() {
@@ -207,20 +207,20 @@
     public void onResume() {
         super.onResume();
         if (mActiveSubsciptionsListener == null) {
-            mActiveSubsciptionsListenerStarting = true;
             mActiveSubsciptionsListener = new ActiveSubsciptionsListener(
                     getContext().getMainLooper(), getContext(), mSubId) {
                 public void onChanged() {
                     onSubscriptionDetailChanged();
                 }
             };
-            mActiveSubsciptionsListenerStarting = false;
+            mDropFirstSubscriptionChangeNotify = true;
         }
         mActiveSubsciptionsListener.start();
     }
 
     private void onSubscriptionDetailChanged() {
-        if (mActiveSubsciptionsListenerStarting) {
+        if (mDropFirstSubscriptionChangeNotify) {
+            mDropFirstSubscriptionChangeNotify = false;
             Log.d(LOG_TAG, "Callback during onResume()");
             return;
         }
@@ -235,6 +235,14 @@
         });
     }
 
+    @Override
+    public void onDestroy() {
+        if (mActiveSubsciptionsListener != null) {
+            mActiveSubsciptionsListener.stop();
+        }
+        super.onDestroy();
+    }
+
     @VisibleForTesting
     void onRestoreInstance(Bundle icicle) {
         if (icicle != null) {
diff --git a/src/com/android/settings/notification/history/NotificationHistoryActivity.java b/src/com/android/settings/notification/history/NotificationHistoryActivity.java
index c45242e..8b4bc9d 100644
--- a/src/com/android/settings/notification/history/NotificationHistoryActivity.java
+++ b/src/com/android/settings/notification/history/NotificationHistoryActivity.java
@@ -266,9 +266,6 @@
             mSnoozedRv.setLayoutManager(lm);
             mSnoozedRv.setAdapter(
                     new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm));
-            DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(
-                    mSnoozedRv.getContext(), lm.getOrientation());
-            mSnoozedRv.addItemDecoration(dividerItemDecoration);
             mSnoozedRv.setNestedScrollingEnabled(false);
 
             if (snoozed == null || snoozed.length == 0) {
@@ -284,9 +281,6 @@
             mDismissedRv.setLayoutManager(dismissLm);
             mDismissedRv.setAdapter(
                 new NotificationSbnAdapter(NotificationHistoryActivity.this, mPm));
-            DividerItemDecoration dismissDivider = new DividerItemDecoration(
-                mDismissedRv.getContext(), dismissLm.getOrientation());
-            mDismissedRv.addItemDecoration(dismissDivider);
             mDismissedRv.setNestedScrollingEnabled(false);
 
             if (dismissed == null || dismissed.length == 0) {
diff --git a/src/com/android/settings/notification/history/NotificationSbnAdapter.java b/src/com/android/settings/notification/history/NotificationSbnAdapter.java
index c7f68ab..5d4e716 100644
--- a/src/com/android/settings/notification/history/NotificationSbnAdapter.java
+++ b/src/com/android/settings/notification/history/NotificationSbnAdapter.java
@@ -94,6 +94,7 @@
             holder.setTitle(getTitleString(sbn.getNotification()));
             holder.setSummary(getTextString(mContext, sbn.getNotification()));
             holder.setPostedTime(sbn.getPostTime());
+            holder.setDividerVisible(position < (mValues.size() -1));
             int userId = normalizeUserId(sbn);
             if (!mUserBadgeCache.containsKey(userId)) {
                 Drawable profile = mContext.getPackageManager().getUserBadgeForDensity(
diff --git a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
index 42a2100..3f1197d 100644
--- a/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
+++ b/src/com/android/settings/notification/history/NotificationSbnViewHolder.java
@@ -45,6 +45,7 @@
     private final TextView mTitle;
     private final TextView mSummary;
     private final ImageView mProfileBadge;
+    private final View mDivider;
 
     NotificationSbnViewHolder(View itemView) {
         super(itemView);
@@ -54,6 +55,7 @@
         mTitle = itemView.findViewById(R.id.title);
         mSummary = itemView.findViewById(R.id.text);
         mProfileBadge = itemView.findViewById(R.id.profile_badge);
+        mDivider = itemView.findViewById(R.id.divider);
     }
 
     void setSummary(CharSequence summary) {
@@ -85,6 +87,10 @@
         mProfileBadge.setVisibility(badge != null ? View.VISIBLE : View.GONE);
     }
 
+    void setDividerVisible(boolean visible) {
+        mDivider.setVisibility(visible ? View.VISIBLE : View.GONE);
+    }
+
     void addOnClick(String pkg, int userId, PendingIntent pi) {
         Intent appIntent = itemView.getContext().getPackageManager()
                 .getLaunchIntentForPackage(pkg);
diff --git a/src/com/android/settings/panel/SettingsPanelActivity.java b/src/com/android/settings/panel/SettingsPanelActivity.java
index 6bf016e..68cb8d5 100644
--- a/src/com/android/settings/panel/SettingsPanelActivity.java
+++ b/src/com/android/settings/panel/SettingsPanelActivity.java
@@ -66,6 +66,7 @@
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        getApplicationContext().getTheme().rebase();
         createOrUpdatePanel(true /* shouldForceCreation */);
         getLifecycle().addObserver(new HideNonSystemOverlayMixin(this));
     }
diff --git a/src/com/android/settings/security/ScreenPinningSettings.java b/src/com/android/settings/security/ScreenPinningSettings.java
index ca7590b..c532366 100644
--- a/src/com/android/settings/security/ScreenPinningSettings.java
+++ b/src/com/android/settings/security/ScreenPinningSettings.java
@@ -215,7 +215,6 @@
 
     private void updateDisplay() {
         if (isLockToAppEnabled(getActivity())) {
-            mFooterPreference.setVisible(false);
             mUseScreenLock.setVisible(true);
             mUseScreenLock.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
                 @Override
@@ -226,7 +225,6 @@
             mUseScreenLock.setChecked(isScreenLockUsed());
             mUseScreenLock.setTitle(getCurrentSecurityTitle());
         } else {
-            mFooterPreference.setVisible(true);
             mFooterPreference.setSummary(getAppPinningContent());
             mUseScreenLock.setVisible(false);
         }
diff --git a/src/com/android/settings/slices/SettingsSliceProvider.java b/src/com/android/settings/slices/SettingsSliceProvider.java
index 0aaf85d..6c245ce 100644
--- a/src/com/android/settings/slices/SettingsSliceProvider.java
+++ b/src/com/android/settings/slices/SettingsSliceProvider.java
@@ -140,8 +140,11 @@
     @VisibleForTesting
     Map<Uri, SliceData> mSliceWeakDataCache;
 
+    @VisibleForTesting
     final Map<Uri, SliceBackgroundWorker> mPinnedWorkers = new ArrayMap<>();
 
+    private boolean mNightMode;
+
     public SettingsSliceProvider() {
         super(READ_SEARCH_INDEXABLES);
     }
@@ -150,6 +153,8 @@
     public boolean onCreateSliceProvider() {
         mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(getContext());
         mSliceWeakDataCache = new WeakHashMap<>();
+        mNightMode = Utils.isNightMode(getContext());
+        getContext().setTheme(R.style.Theme_SettingsBase);
         return true;
     }
 
@@ -201,6 +206,13 @@
                 return null;
             }
 
+            final boolean nightMode = Utils.isNightMode(getContext());
+            if (mNightMode != nightMode) {
+                Log.d(TAG, "Night mode changed, reload theme");
+                mNightMode = nightMode;
+                getContext().getTheme().rebase();
+            }
+
             // Before adding a slice to {@link CustomSliceManager}, please get approval
             // from the Settings team.
             if (CustomSliceRegistry.isValidUri(sliceUri)) {
diff --git a/src/com/android/settings/slices/SliceBuilderUtils.java b/src/com/android/settings/slices/SliceBuilderUtils.java
index 2d5b4aa..391e9fd 100644
--- a/src/com/android/settings/slices/SliceBuilderUtils.java
+++ b/src/com/android/settings/slices/SliceBuilderUtils.java
@@ -73,8 +73,6 @@
      * {@param sliceData} is an inline controller.
      */
     public static Slice buildSlice(Context context, SliceData sliceData) {
-        // Reload theme for switching dark mode on/off
-        context.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
         Log.d(TAG, "Creating slice for: " + sliceData.getPreferenceController());
         final BasePreferenceController controller = getPreferenceController(context, sliceData);
         FeatureFactory.getFactory(context).getMetricsFeatureProvider()
diff --git a/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java b/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
index 008df24..a48358f 100644
--- a/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
+++ b/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragment.java
@@ -124,6 +124,9 @@
     List<Integer> mResultCodeArrayList;
     @VisibleForTesting
     WifiPickerTracker mWifiPickerTracker;
+    // Worker thread used for WifiPickerTracker work
+    @VisibleForTesting
+    HandlerThread mWorkerThread;
 
     private boolean mIsSingleNetwork;
     private boolean mAnyNetworkSavedSuccess;
@@ -133,8 +136,6 @@
     private UiConfigurationItemAdapter mUiConfigurationItemAdapter;
     private WifiManager.ActionListener mSaveListener;
     private WifiManager mWifiManager;
-    // Worker thread used for WifiPickerTracker work
-    private HandlerThread mWorkerThread;
 
     private final Handler mHandler = new Handler() {
         @Override
@@ -203,6 +204,13 @@
     }
 
     @Override
+    public void onDestroy() {
+        mWorkerThread.quit();
+
+        super.onDestroy();
+    }
+
+    @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
 
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
index 958db7e..26d742d 100644
--- a/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
+++ b/src/com/android/settings/wifi/calling/WifiCallingSliceHelper.java
@@ -20,6 +20,7 @@
 
 import static com.android.settings.slices.CustomSliceRegistry.WIFI_CALLING_PREFERENCE_URI;
 import static com.android.settings.slices.CustomSliceRegistry.WIFI_CALLING_URI;
+import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
 
 import android.app.PendingIntent;
 import android.content.ComponentName;
@@ -554,6 +555,7 @@
      */
     private PendingIntent getActivityIntent(String action) {
         final Intent intent = new Intent(action);
+        intent.setPackage(SETTINGS_PACKAGE_NAME);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, 0 /* flags */);
     }
diff --git a/src/com/android/settings/wifi/slice/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
index fd27970..a489b05 100644
--- a/src/com/android/settings/wifi/slice/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -86,9 +86,6 @@
 
     @Override
     public Slice getSlice() {
-        // Reload theme for switching dark mode on/off
-        mContext.getTheme().applyStyle(R.style.Theme_Settings_Home, true /* force */);
-
         final boolean isWifiEnabled = isWifiEnabled();
         ListBuilder listBuilder = getListBuilder(isWifiEnabled, null /* accessPoint */);
         if (!isWifiEnabled) {
diff --git a/tests/robotests/src/com/android/settings/applications/manageapplications/ManageApplicationsTest.java b/tests/robotests/src/com/android/settings/applications/manageapplications/ManageApplicationsTest.java
index 33faee0..4d420d1 100644
--- a/tests/robotests/src/com/android/settings/applications/manageapplications/ManageApplicationsTest.java
+++ b/tests/robotests/src/com/android/settings/applications/manageapplications/ManageApplicationsTest.java
@@ -56,6 +56,7 @@
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.android.settings.R;
+import com.android.settings.testutils.shadow.ShadowAppUtils;
 import com.android.settings.testutils.shadow.ShadowUserManager;
 import com.android.settings.widget.LoadingViewController;
 import com.android.settingslib.applications.ApplicationsState;
@@ -76,7 +77,7 @@
 import java.util.ArrayList;
 
 @RunWith(RobolectricTestRunner.class)
-@Config(shadows = ShadowUserManager.class)
+@Config(shadows = {ShadowUserManager.class, ShadowAppUtils.class})
 public class ManageApplicationsTest {
 
     @Mock
diff --git a/tests/robotests/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceControllerTest.java
deleted file mode 100644
index 10eed2f..0000000
--- a/tests/robotests/src/com/android/settings/development/QuickSettingsMediaPlayerPreferenceControllerTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.development;
-
-import static com.android.settings.development.QuickSettingsMediaPlayerPreferenceController.SETTING_NAME;
-import static com.android.settings.development.QuickSettingsMediaPlayerPreferenceController.SETTING_VALUE_OFF;
-import static com.android.settings.development.QuickSettingsMediaPlayerPreferenceController.SETTING_VALUE_ON;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.provider.Settings;
-
-import androidx.preference.PreferenceScreen;
-import androidx.preference.SwitchPreference;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-
-@RunWith(RobolectricTestRunner.class)
-public class QuickSettingsMediaPlayerPreferenceControllerTest {
-    @Mock
-    private SwitchPreference mPreference;
-    @Mock
-    private PreferenceScreen mPreferenceScreen;
-    @Rule
-    public MockitoRule mMockitoRule = MockitoJUnit.rule();
-
-    private Context mContext;
-    private QuickSettingsMediaPlayerPreferenceController mController;
-
-    @Before
-    public void setup() {
-        mContext = RuntimeEnvironment.application;
-        mController = new QuickSettingsMediaPlayerPreferenceController(mContext);
-        when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
-            .thenReturn(mPreference);
-        mController.displayPreference(mPreferenceScreen);
-    }
-
-    @Test
-    public void onPreferenceChanged_turnOnPreference_shouldEnable() {
-        mController.onPreferenceChange(mPreference, true /* new value */);
-
-        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
-                SETTING_NAME, -1 /* default */);
-
-        assertThat(mode).isEqualTo(SETTING_VALUE_ON);
-    }
-
-    @Test
-    public void onPreferenceChanged_turnOffPreference_shouldDisable() {
-        mController.onPreferenceChange(mPreference, false /* new value */);
-
-        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
-                SETTING_NAME, -1 /* default */);
-
-        assertThat(mode).isEqualTo(SETTING_VALUE_OFF);
-    }
-
-    @Test
-    public void updateState_settingEnabled_preferenceShouldBeChecked() {
-        Settings.Global.putInt(mContext.getContentResolver(), SETTING_NAME, SETTING_VALUE_ON);
-        mController.updateState(mPreference);
-
-        verify(mPreference).setChecked(true);
-    }
-
-    @Test
-    public void updateState_settingDisabled_preferenceShouldNotBeChecked() {
-        Settings.Global.putInt(mContext.getContentResolver(), SETTING_NAME, SETTING_VALUE_OFF);
-        mController.updateState(mPreference);
-
-        verify(mPreference).setChecked(false);
-    }
-
-    @Test
-    public void onDeveloperOptionsSwitchDisabled_shouldDisable() {
-        mController.onDeveloperOptionsSwitchDisabled();
-        final int mode = Settings.Global.getInt(mContext.getContentResolver(),
-                SETTING_NAME, -1 /* default */);
-
-        assertThat(mode).isEqualTo(SETTING_VALUE_OFF);
-        verify(mPreference).setEnabled(false);
-        verify(mPreference).setChecked(false);
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/media/MediaOutputGroupSliceTest.java b/tests/robotests/src/com/android/settings/media/MediaOutputGroupSliceTest.java
index 12e066b..9da18d50 100644
--- a/tests/robotests/src/com/android/settings/media/MediaOutputGroupSliceTest.java
+++ b/tests/robotests/src/com/android/settings/media/MediaOutputGroupSliceTest.java
@@ -212,11 +212,9 @@
     }
 
     @Test
-    public void onNotifyChange_sessionOperation_differentClient_verifyAddSession() {
-        mSelectableDevices.add(mDevice1);
+    public void onNotifyChange_sendSelectableDevice_verifyAddSession() {
         mSelectableDevices.add(mDevice2);
         mSelectedDevices.add(mDevice1);
-        when(mDevice2.getClientPackageName()).thenReturn(TEST_PACKAGE_NAME2);
         when(mLocalMediaManager.getMediaDeviceById(mSelectableDevices, TEST_DEVICE_2_ID))
                 .thenReturn(mDevice2);
         sMediaDeviceUpdateWorker.onDeviceListUpdate(mSelectableDevices);
@@ -229,16 +227,13 @@
 
         verify(sMediaDeviceUpdateWorker).addDeviceToPlayMedia(mDevice2);
     }
-
     @Test
-    public void onNotifyChange_sessionOperation_sameClient_verifyRemoveSession() {
-        mSelectableDevices.add(mDevice1);
-        mSelectableDevices.add(mDevice2);
+    public void onNotifyChange_sendSelectedDevice_verifyRemoveSession() {
         mSelectedDevices.add(mDevice1);
-        when(mDevice2.getClientPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        when(mLocalMediaManager.getMediaDeviceById(mSelectableDevices, TEST_DEVICE_2_ID))
+        mSelectedDevices.add(mDevice2);
+        when(mLocalMediaManager.getMediaDeviceById(mSelectedDevices, TEST_DEVICE_2_ID))
                 .thenReturn(mDevice2);
-        sMediaDeviceUpdateWorker.onDeviceListUpdate(mSelectableDevices);
+        sMediaDeviceUpdateWorker.onDeviceListUpdate(mSelectedDevices);
         when(sMediaDeviceUpdateWorker.getSelectedMediaDevice()).thenReturn(mSelectedDevices);
         final Intent intent = new Intent();
         intent.putExtra(MEDIA_DEVICE_ID, TEST_DEVICE_2_ID);
diff --git a/tests/robotests/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelperTest.java b/tests/robotests/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelperTest.java
index 50446ad..416e2f0 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelperTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/Enhanced4gLteSliceHelperTest.java
@@ -20,6 +20,7 @@
 import static android.app.slice.Slice.HINT_TITLE;
 import static android.app.slice.SliceItem.FORMAT_TEXT;
 
+import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -248,6 +249,7 @@
 
     private PendingIntent getActivityIntent(String action) {
         final Intent intent = new Intent(action);
+        intent.setPackage(SETTINGS_PACKAGE_NAME);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, 0 /* flags */);
     }
diff --git a/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java b/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
index 0a9d8cb..0fa249d 100644
--- a/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
+++ b/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
@@ -20,6 +20,8 @@
 import static android.content.ContentResolver.SCHEME_CONTENT;
 import static android.content.pm.PackageManager.PERMISSION_DENIED;
 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.content.res.Configuration.UI_MODE_NIGHT_NO;
+import static android.content.res.Configuration.UI_MODE_NIGHT_YES;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -39,6 +41,7 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
+import android.content.res.Resources.Theme;
 import android.net.Uri;
 import android.os.StrictMode;
 import android.provider.Settings;
@@ -96,7 +99,8 @@
 @Config(shadows = {ShadowUserManager.class, ShadowUtils.class,
         SlicesDatabaseAccessorTest.ShadowApplicationPackageManager.class,
         ShadowBluetoothAdapter.class, ShadowLockPatternUtils.class,
-        SettingsSliceProviderTest.ShadowWifiScanWorker.class})
+        SettingsSliceProviderTest.ShadowWifiScanWorker.class,
+        SettingsSliceProviderTest.ShadowTheme.class})
 public class SettingsSliceProviderTest {
 
     private static final String KEY = "KEY";
@@ -162,6 +166,7 @@
     @After
     public void cleanUp() {
         ShadowThreadUtils.reset();
+        ShadowTheme.reset();
         DatabaseTestUtils.clearDb(mContext);
     }
 
@@ -264,6 +269,28 @@
     }
 
     @Test
+    public void onBindSlice_nightModeChanged_shouldReloadTheme() {
+        mContext.getResources().getConfiguration().uiMode = UI_MODE_NIGHT_YES;
+
+        final SliceData data = getDummyData();
+        mProvider.mSliceWeakDataCache.put(data.getUri(), data);
+        mProvider.onBindSlice(data.getUri());
+
+        assertThat(ShadowTheme.isThemeRebased()).isTrue();
+    }
+
+    @Test
+    public void onBindSlice_nightModeNotChanged_shouldNotReloadTheme() {
+        mContext.getResources().getConfiguration().uiMode = UI_MODE_NIGHT_NO;
+
+        SliceData data = getDummyData();
+        mProvider.mSliceWeakDataCache.put(data.getUri(), data);
+        mProvider.onBindSlice(data.getUri());
+
+        assertThat(ShadowTheme.isThemeRebased()).isFalse();
+    }
+
+    @Test
     public void getDescendantUris_fullActionUri_returnsSelf() {
         final Collection<Uri> descendants = mProvider.onGetSliceDescendants(ACTION_SLICE_URI);
 
@@ -722,4 +749,23 @@
             return sSetThreadPolicyCount != 0;
         }
     }
+
+    @Implements(Theme.class)
+    public static class ShadowTheme {
+        private static boolean sThemeRebased;
+
+        @Resetter
+        public static void reset() {
+            sThemeRebased = false;
+        }
+
+        @Implementation
+        public void rebase() {
+            sThemeRebased = true;
+        }
+
+        static boolean isThemeRebased() {
+            return sThemeRebased;
+        }
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/testutils/SliceTester.java b/tests/robotests/src/com/android/settings/testutils/SliceTester.java
index 6fb2c49..f2cce3c 100644
--- a/tests/robotests/src/com/android/settings/testutils/SliceTester.java
+++ b/tests/robotests/src/com/android/settings/testutils/SliceTester.java
@@ -137,16 +137,19 @@
      */
     public static void testSettingsSliderSlice(Context context, Slice slice, SliceData sliceData) {
         final SliceMetadata metadata = SliceMetadata.from(context, slice);
-
-        final SliceItem colorItem = SliceQuery.findSubtype(slice, FORMAT_INT, SUBTYPE_COLOR);
-        final int color = colorItem.getInt();
-        assertThat(color).isEqualTo(Utils.getColorAccentDefaultColor(context));
-
         final SliceAction primaryAction = metadata.getPrimaryAction();
 
-        final IconCompat expectedIcon = IconCompat.createWithResource(context,
-                sliceData.getIconResource());
-        assertThat(expectedIcon.toString()).isEqualTo(primaryAction.getIcon().toString());
+        final IconCompat icon = primaryAction.getIcon();
+        if (icon == null) {
+            final SliceItem colorItem = SliceQuery.findSubtype(slice, FORMAT_INT, SUBTYPE_COLOR);
+            final int color = colorItem.getInt();
+            assertThat(color).isEqualTo(Utils.getColorAccentDefaultColor(context));
+
+        } else {
+            final IconCompat expectedIcon = IconCompat.createWithResource(context,
+                    sliceData.getIconResource());
+            assertThat(expectedIcon.toString()).isEqualTo(icon.toString());
+        }
 
         final long sliceTTL = metadata.getExpiry();
         assertThat(sliceTTL).isEqualTo(ListBuilder.INFINITY);
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowAppUtils.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowAppUtils.java
new file mode 100644
index 0000000..871a536
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowAppUtils.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020 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.testutils.shadow;
+
+import android.content.Context;
+
+import com.android.settingslib.applications.AppUtils;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Implements(AppUtils.class)
+public class ShadowAppUtils {
+
+    private static Map<String, String> sAppContentDesMap;
+
+    @Implementation
+    protected static CharSequence getAppContentDescription(Context context, String packageName,
+            int userId) {
+        if (sAppContentDesMap != null) {
+            return sAppContentDesMap.get(packageName);
+        }
+        return null;
+    }
+
+    public static void setAppContentDescription(String packageName, String appContentDes) {
+        if (sAppContentDesMap == null) {
+            sAppContentDesMap = new HashMap<>();
+        }
+        sAppContentDesMap.put(packageName, appContentDes);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragmentTest.java b/tests/robotests/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragmentTest.java
index ac25689..3f02e2e 100644
--- a/tests/robotests/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/addappnetworks/AddAppNetworksFragmentTest.java
@@ -19,7 +19,9 @@
 import static com.google.common.truth.Truth.assertThat;
 
 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.settings.SettingsEnums;
@@ -27,6 +29,7 @@
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
 import android.os.Bundle;
+import android.os.HandlerThread;
 import android.os.Parcelable;
 import android.provider.Settings;
 import android.widget.TextView;
@@ -247,6 +250,19 @@
                 SCANED_LEVEL0);
     }
 
+    @Test
+    public void onDestroy_quitWorkerThread() {
+        mAddAppNetworksFragment.mWorkerThread = mock(HandlerThread.class);
+
+        try {
+            mAddAppNetworksFragment.onDestroy();
+        } catch (IllegalArgumentException e) {
+            // Ignore the exception from super class.
+        }
+
+        verify(mAddAppNetworksFragment.mWorkerThread).quit();
+    }
+
     private void setUpOneScannedNetworkWithScanedLevel4() {
         final ArrayList list = new ArrayList<>();
         list.add(mMockWifiEntry);
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java b/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
index 0013234..0b9ef55 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSliceHelperTest.java
@@ -20,6 +20,7 @@
 import static android.app.slice.Slice.HINT_TITLE;
 import static android.app.slice.SliceItem.FORMAT_TEXT;
 
+import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -400,6 +401,7 @@
 
     private PendingIntent getActivityIntent(String action) {
         final Intent intent = new Intent(action);
+        intent.setPackage(SETTINGS_PACKAGE_NAME);
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, 0 /* flags */);
     }