diff --git a/res/drawable/ic_files_go_round.xml b/res/drawable/ic_files_go_round.xml
new file mode 100644
index 0000000..2025b00
--- /dev/null
+++ b/res/drawable/ic_files_go_round.xml
@@ -0,0 +1,121 @@
+<!--
+    Copyright (C) 2021 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:aapt="http://schemas.android.com/aapt"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="192"
+    android:viewportHeight="192">
+  <path
+      android:pathData="M96,96m-88,0a88,88 0,1 1,176 0a88,88 0,1 1,-176 0"
+      android:fillColor="#FFFFFF"/>
+  <path
+      android:pathData="M96,183c-48.43,0 -87.72,-39.13 -87.99,-87.5C8.01,95.67 8,95.83 8,96c0,48.6 39.4,88 88,88s88,-39.4 88,-88c0,-0.17 -0.01,-0.33 -0.01,-0.5C183.72,143.87 144.43,183 96,183z"
+      android:fillColor="#263238"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M96,9c48.43,0 87.72,39.13 87.99,87.5c0,-0.17 0.01,-0.33 0.01,-0.5c0,-48.6 -39.4,-88 -88,-88S8,47.4 8,96c0,0.17 0.01,0.33 0.01,0.5C8.28,48.13 47.57,9 96,9z"
+      android:fillColor="#FFFFFF"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M85.09,59.18H44.18c-4.52,0 -8.18,3.66 -8.18,8.18v40.91v2.05v-0.35c0,-1.08 0.43,-2.13 1.2,-2.89L85.09,59.18z"
+      android:fillColor="#0F9D58"/>
+  <path
+      android:pathData="M85.09,59.18H44.18c-4.52,0 -8.18,3.66 -8.18,8.18v40.91v2.05v-0.35c0,-1.08 0.43,-2.13 1.2,-2.89L85.09,59.18z">
+    <aapt:attr name="android:fillColor">
+      <gradient
+          android:startY="110.3181"
+          android:startX="60.5458"
+          android:endY="59.182"
+          android:endX="60.5458"
+          android:type="linear">
+        <item android:offset="0" android:color="#33263238"/>
+        <item android:offset="1" android:color="#00263238"/>
+      </gradient>
+    </aapt:attr>
+  </path>
+  <path
+      android:pathData="M37.2,106.39c-0.77,0.77 -1.2,1.81 -1.2,2.89v0.35v0.33c0,-1.08 0.43,-2.13 1.2,-2.89l47.89,-47.89h-0.68L37.2,106.39z"
+      android:fillColor="#263238"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M44.18,59.86h39.55l0.68,-0.68H44.18c-4.52,0 -8.18,3.66 -8.18,8.18v0.68C36,63.53 39.66,59.86 44.18,59.86z"
+      android:fillColor="#FFFFFF"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M147.82,143.73H44.18c-4.52,0 -8.18,-3.66 -8.18,-8.18v-25.58c0,-1.08 0.43,-2.13 1.2,-2.89l57.6,-57.6c0.77,-0.77 1.81,-1.2 2.89,-1.2h50.12c4.52,0 8.18,3.66 8.18,8.18v79.09C156,140.06 152.34,143.73 147.82,143.73z"
+      android:fillColor="#4285F4"/>
+  <path
+      android:pathData="M156,135.55l0,-29.32L98.05,48.27l-0.31,0c-1.11,0 -2.17,0.45 -2.94,1.25L37.2,107.07c-0.77,0.77 -1.2,1.81 -1.2,2.89v0.35l33.41,33.41l78.41,0C152.34,143.73 156,140.06 156,135.55z">
+    <aapt:attr name="android:fillColor">
+      <gradient
+          android:startY="78.2732"
+          android:startX="66.0008"
+          android:endY="153.6034"
+          android:endX="141.331"
+          android:type="linear">
+        <item android:offset="0" android:color="#281A237E"/>
+        <item android:offset="1" android:color="#051A237E"/>
+      </gradient>
+    </aapt:attr>
+  </path>
+  <path
+      android:pathData="M147.82,143.05H44.18c-4.52,0 -8.18,-3.66 -8.18,-8.18v0.68c0,4.52 3.66,8.18 8.18,8.18h103.64c4.52,0 8.18,-3.66 8.18,-8.18v-0.68C156,139.38 152.34,143.05 147.82,143.05z"
+      android:fillColor="#1A237E"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M147.82,48.27H98.05c-0.6,0 -1.14,0.27 -1.51,0.68h51.29c4.52,0 8.18,3.66 8.18,8.18v-0.68C156,51.94 152.34,48.27 147.82,48.27z"
+      android:fillColor="#FFFFFF"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M94.8,49.47l-57.6,57.6c-0.77,0.77 -1.2,1.81 -1.2,2.89v0.35v0c0,-1.13 0.92,-2.05 2.05,-2.05h49.77c4.52,0 8.18,-3.66 8.18,-8.18l0,-49.77c0,-1.13 0.92,-2.05 2.05,-2.05l0,0l-0.35,0C96.61,48.27 95.57,48.7 94.8,49.47z"
+      android:fillColor="#DB4437"/>
+  <path
+      android:pathData="M97.69,48.27c-0.27,0 -0.54,0.03 -0.8,0.08C97.15,48.3 97.42,48.27 97.69,48.27l0.35,0c-1.34,0 -2.55,0.72 -3.21,1.85c0.43,-0.42 0.95,-0.73 1.5,-0.93c0.37,-0.55 0.99,-0.92 1.7,-0.92L97.69,48.27z"
+      android:strokeAlpha="0.2"
+      android:fillColor="#3E2723"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M96,99.41c0,4.52 -3.66,8.18 -8.18,8.18H38.05c-0.85,0 -1.57,0.51 -1.88,1.25c-0.1,0.36 -0.16,0.74 -0.16,1.13v0.35c0,-1.13 0.92,-2.05 2.05,-2.05h49.77c4.52,0 8.18,-3.66 8.18,-8.18"
+      android:fillColor="#3E2723"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M36,110.32L36,110.32c0,-1.62 1.05,-3.06 2.6,-3.55L74.95,95.2c3.79,-1.21 6.77,-4.18 7.97,-7.97l11.57,-36.35c0.49,-1.55 1.93,-2.6 3.55,-2.6l0,0h-0.35c-1.08,0 -2.13,0.43 -2.89,1.2l-57.6,57.6c-0.77,0.77 -1.2,1.81 -1.2,2.89L36,110.32z"
+      android:fillColor="#F4B400"/>
+  <path
+      android:pathData="M94.84,49.44c-0.14,0.24 -0.26,0.48 -0.35,0.75L82.92,86.54c-1.21,3.79 -4.18,6.77 -7.97,7.97L38.6,106.08c-0.27,0.09 -0.52,0.21 -0.76,0.35l-0.64,0.64c-0.77,0.77 -1.2,1.81 -1.2,2.89l0,0.35c0,-1.62 1.05,-3.06 2.6,-3.55L74.95,95.2c3.79,-1.21 6.77,-4.18 7.97,-7.97l11.57,-36.35c0.49,-1.55 1.93,-2.6 3.55,-2.6h-0.35C96.63,48.27 95.6,48.69 94.84,49.44z"
+      android:fillColor="#BF360C"
+      android:fillAlpha="0.3"/>
+  <path
+      android:pathData="M39,105.95l55.36,-55.36l0.13,-0.4c0.09,-0.27 0.21,-0.52 0.35,-0.75c-0.01,0.01 -0.03,0.02 -0.04,0.03l-56.96,56.96c0.24,-0.14 0.49,-0.27 0.76,-0.35L39,105.95z"
+      android:strokeAlpha="0.2"
+      android:fillColor="#FFFFFF"
+      android:fillAlpha="0.2"/>
+  <path
+      android:pathData="M36,109.97v25.58c0,4.52 3.66,8.18 8.18,8.18h103.64c4.52,0 8.18,-3.66 8.18,-8.18V56.45c0,-4.52 -3.66,-8.18 -8.18,-8.18H97.69c-1.08,0 -2.13,0.43 -2.89,1.2l-9.71,9.71H44.18c-4.52,0 -8.18,3.66 -8.18,8.18v40.91L36,109.97">
+    <aapt:attr name="android:fillColor">
+      <gradient
+          android:gradientRadius="115.3882"
+          android:centerX="72.364"
+          android:centerY="59.4093"
+          android:type="radial">
+        <item android:offset="0.0029046" android:color="#19FFFFFF"/>
+        <item android:offset="1" android:color="#00FFFFFF"/>
+      </gradient>
+    </aapt:attr>
+  </path>
+</vector>
diff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml
index 1fd6824..1126052 100644
--- a/res/layout-land/confirm_lock_pattern.xml
+++ b/res/layout-land/confirm_lock_pattern.xml
@@ -48,13 +48,13 @@
                     android:src="@drawable/ic_enterprise" />
 
                 <TextView
-                    android:id="@+id/headerText"
+                    android:id="@+id/suc_layout_title"
                     style="@style/SudGlifHeaderTitle"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content" />
 
                 <TextView
-                    android:id="@+id/sud_layout_description"
+                    android:id="@+id/sud_layout_subtitle"
                     style="@style/SudDescription.Glif"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
diff --git a/res/layout-land/confirm_lock_pattern_normal.xml b/res/layout-land/confirm_lock_pattern_normal.xml
index 7a59894..2a9103f 100644
--- a/res/layout-land/confirm_lock_pattern_normal.xml
+++ b/res/layout-land/confirm_lock_pattern_normal.xml
@@ -48,14 +48,14 @@
                     android:src="@drawable/ic_lock" />
 
                 <TextView
-                    android:id="@+id/headerText"
+                    android:id="@+id/suc_layout_title"
                     style="@style/SudGlifHeaderTitle"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content" />
 
                 <TextView
                     style="@style/SudDescription.Glif"
-                    android:id="@+id/sud_layout_description"
+                    android:id="@+id/sud_layout_subtitle"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="?attr/sudMarginStart"
diff --git a/res/layout/app_authentication_item.xml b/res/layout/app_authentication_item.xml
index 423722e..16d6fbd 100644
--- a/res/layout/app_authentication_item.xml
+++ b/res/layout/app_authentication_item.xml
@@ -26,7 +26,8 @@
         android:layout_width="24dp"
         android:layout_height="24dp"/>
 
-    <LinearLayout
+    <RelativeLayout
+        android:id="@+id/app_details"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_toRightOf="@id/app_icon"
@@ -44,16 +45,18 @@
         <TextView
             android:id="@+id/number_of_uris"
             style="@style/AppAuthenticationPolicyNumberOfUrisText"
+            android:layout_below="@id/app_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:visibility="gone"/>
 
         <androidx.recyclerview.widget.RecyclerView
             android:id="@+id/uris"
+            android:layout_below="@id/app_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"/>
 
-    </LinearLayout>
+    </RelativeLayout>
 
     <ImageView
         android:id="@+id/expand"
diff --git a/res/layout/confirm_lock_pattern_base.xml b/res/layout/confirm_lock_pattern_base.xml
index 895bb8a..bac2689 100644
--- a/res/layout/confirm_lock_pattern_base.xml
+++ b/res/layout/confirm_lock_pattern_base.xml
@@ -42,13 +42,13 @@
                 android:src="@drawable/ic_enterprise" />
 
             <TextView
-                android:id="@+id/headerText"
+                android:id="@+id/suc_layout_title"
                 style="@style/SudGlifHeaderTitle"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
             <TextView
-                android:id="@+id/sud_layout_description"
+                android:id="@+id/sud_layout_subtitle"
                 style="@style/SudDescription.Glif"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
diff --git a/res/layout/confirm_lock_pattern_normal_base.xml b/res/layout/confirm_lock_pattern_normal_base.xml
index 7c1502d..29783dd 100644
--- a/res/layout/confirm_lock_pattern_normal_base.xml
+++ b/res/layout/confirm_lock_pattern_normal_base.xml
@@ -41,14 +41,14 @@
                 android:src="@drawable/ic_lock" />
 
             <TextView
-                android:id="@+id/headerText"
+                android:id="@+id/suc_layout_title"
                 style="@style/SudGlifHeaderTitle"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
             <TextView
                 style="@style/SudDescription.Glif"
-                android:id="@+id/sud_layout_description"
+                android:id="@+id/sud_layout_subtitle"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginStart="?attr/sudMarginStart"
diff --git a/res/values/config.xml b/res/values/config.xml
index 2546d8d..5a8f636 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -522,4 +522,7 @@
 
     <!-- Media Uri to view documents & other storage category. -->
     <string name="config_documents_and_other_storage_category_uri" translatable="false">content://com.android.providers.media.documents/root/documents_root</string>
+
+    <!-- Whether to show Smart Storage toggle -->
+    <bool name="config_show_smart_storage_toggle">true</bool>
 </resources>
diff --git a/res/xml/smart_battery_detail.xml b/res/xml/smart_battery_detail.xml
index 2d36119..c2b3d1f 100644
--- a/res/xml/smart_battery_detail.xml
+++ b/res/xml/smart_battery_detail.xml
@@ -22,11 +22,6 @@
     android:title="@string/smart_battery_manager_title"
     settings:searchable="false">
 
-    <com.android.settingslib.widget.MainSwitchPreference
-        android:key="smart_battery"
-        android:title="@string/adaptive_battery_main_switch_title"
-        settings:controller="com.android.settings.fuelgauge.SmartBatteryPreferenceController"/>
-
     <com.android.settings.widget.VideoPreference
         android:key="auto_awesome_battery"
         android:title="@string/summary_placeholder"
@@ -35,6 +30,13 @@
         settings:controller="com.android.settings.widget.VideoPreferenceController"/>
 
     <SwitchPreference
+        android:key="smart_battery"
+        android:title="@string/smart_battery_title"
+        android:summary="@string/smart_battery_summary"
+        settings:controller="com.android.settings.fuelgauge.SmartBatteryPreferenceController"
+        settings:allowDividerAbove="true"/>
+
+    <SwitchPreference
         android:key="auto_restriction"
         android:title="@string/battery_auto_restriction_title"
         android:summary="@string/battery_auto_restriction_summary"
diff --git a/res/xml/storage_dashboard_fragment.xml b/res/xml/storage_dashboard_fragment.xml
index 076405f..9bca65a 100644
--- a/res/xml/storage_dashboard_fragment.xml
+++ b/res/xml/storage_dashboard_fragment.xml
@@ -42,40 +42,55 @@
         android:key="free_up_space"
         android:order="4"
         android:title="@string/storage_free_up_space_title"
-        android:summary="@string/storage_free_up_space_summary"/>
+        android:summary="@string/storage_free_up_space_summary"
+        settings:allowDividerAbove="true"
+        android:icon="@drawable/ic_files_go_round"/>
     <!-- Preference order 100~200 are 'ONLY' for storage category preferences below. -->
+    <Preference
+        android:key="pref_public_storage"
+        android:title="@string/storage_files"
+        android:icon="@drawable/ic_folder_vd_theme_24"
+        android:order="100"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_images"
         android:title="@string/storage_images"
-        android:icon="@drawable/ic_photo_library"/>
+        android:icon="@drawable/ic_photo_library"
+        android:order="101"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_videos"
         android:title="@string/storage_videos"
-        android:icon="@drawable/ic_local_movies"/>
+        android:icon="@drawable/ic_local_movies"
+        android:order="102"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_audios"
         android:title="@string/storage_audios"
-        android:icon="@drawable/ic_media_stream"/>
+        android:icon="@drawable/ic_media_stream"
+        android:order="103"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_apps"
         android:title="@string/storage_apps"
-        android:icon="@drawable/ic_storage_apps"/>
+        android:icon="@drawable/ic_storage_apps"
+        android:order="104"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_games"
         android:title="@string/storage_games"
-        android:icon="@drawable/ic_videogame_vd_theme_24"/>
+        android:icon="@drawable/ic_videogame_vd_theme_24"
+        android:order="105"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_documents_and_other"
         android:title="@string/storage_documents_and_other"
-        android:icon="@drawable/ic_folder_vd_theme_24"/>
+        android:icon="@drawable/ic_folder_vd_theme_24"
+        android:order="106"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_system"
         android:title="@string/storage_system"
-        android:icon="@drawable/ic_system_update"/>
+        android:icon="@drawable/ic_system_update"
+        android:order="107"/>
     <com.android.settings.deviceinfo.StorageItemPreference
         android:key="pref_trash"
         android:title="@string/storage_trash"
-        android:icon="@drawable/ic_trash_can"/>
+        android:icon="@drawable/ic_trash_can"
+        android:order="108"/>
     <!-- Preference order 100~200 are 'ONLY' for storage category preferences above. -->
     <PreferenceCategory
         android:key="pref_secondary_users"
diff --git a/src/com/android/settings/applications/intentpicker/AppLaunchSettings.java b/src/com/android/settings/applications/intentpicker/AppLaunchSettings.java
index 7d6abe7..a277169 100644
--- a/src/com/android/settings/applications/intentpicker/AppLaunchSettings.java
+++ b/src/com/android/settings/applications/intentpicker/AppLaunchSettings.java
@@ -86,6 +86,7 @@
 
     private ClearDefaultsPreference mClearDefaultsPreference;
     private MainSwitchPreference mMainSwitchPreference;
+    private Preference mAddLinkPreference;
     private PreferenceCategory mMainPreferenceCategory;
     private PreferenceCategory mSelectedLinksPreferenceCategory;
     private PreferenceCategory mOtherDefaultsPreferenceCategory;
@@ -155,6 +156,7 @@
             }
             setDomainVerificationUserSelection(userState.getIdentifier(), domainSet, /* enabled= */
                     false);
+            mAddLinkPreference.setEnabled(isAddLinksNotEmpty());
         }
         return true;
     }
@@ -209,8 +211,8 @@
         initMainSwitchAndCategories();
         if (canUpdateMainSwitchAndCategories()) {
             initVerifiedLinksPreference();
-            addSelectedLinksPreference();
             initAddLinkPreference();
+            addSelectedLinksPreference();
             initFooter();
         }
     }
@@ -293,7 +295,7 @@
     }
 
     /** Add selected links items */
-    public void addSelectedLinksPreference() {
+    void addSelectedLinksPreference() {
         if (getLinksNumber(DOMAIN_STATE_SELECTED) == 0) {
             return;
         }
@@ -303,22 +305,25 @@
         for (String host : selectedLinks) {
             generateCheckBoxPreference(mSelectedLinksPreferenceCategory, host);
         }
+        mAddLinkPreference.setEnabled(isAddLinksNotEmpty());
     }
 
     /** Initialize add link preference */
     private void initAddLinkPreference() {
-        final Preference addLinkPreference = findPreference(ADD_LINK_PREF_KEY);
-        if (addLinkPreference != null) {
-            addLinkPreference.setEnabled(getLinksNumber(DOMAIN_STATE_NONE) > 0);
-            addLinkPreference.setOnPreferenceClickListener(preference -> {
-                final int stateNoneLinksNo = getLinksNumber(DOMAIN_STATE_NONE);
-                IntentPickerUtils.logd("The number of the state none links: " + stateNoneLinksNo);
-                if (stateNoneLinksNo > 0) {
-                    showProgressDialogFragment();
-                }
-                return true;
-            });
-        }
+        mAddLinkPreference = findPreference(ADD_LINK_PREF_KEY);
+        mAddLinkPreference.setEnabled(isAddLinksNotEmpty());
+        mAddLinkPreference.setOnPreferenceClickListener(preference -> {
+            final int stateNoneLinksNo = getLinksNumber(DOMAIN_STATE_NONE);
+            IntentPickerUtils.logd("The number of the state none links: " + stateNoneLinksNo);
+            if (stateNoneLinksNo > 0) {
+                showProgressDialogFragment();
+            }
+            return true;
+        });
+    }
+
+    private boolean isAddLinksNotEmpty() {
+        return getLinksNumber(DOMAIN_STATE_NONE) > 0;
     }
 
     private void showProgressDialogFragment() {
diff --git a/src/com/android/settings/datetime/timezone/RegionSearchPicker.java b/src/com/android/settings/datetime/timezone/RegionSearchPicker.java
index 07986e2..85d5d70 100644
--- a/src/com/android/settings/datetime/timezone/RegionSearchPicker.java
+++ b/src/com/android/settings/datetime/timezone/RegionSearchPicker.java
@@ -71,14 +71,14 @@
         final FilteredCountryTimeZones countryTimeZones = mTimeZoneData.lookupCountryTimeZones(
                 regionId);
         final Activity activity = getActivity();
-        if (countryTimeZones == null || countryTimeZones.getTimeZoneIds().isEmpty()) {
+        if (countryTimeZones == null || countryTimeZones.getPreferredTimeZoneIds().isEmpty()) {
             Log.e(TAG, "Region has no time zones: " + regionId);
             activity.setResult(Activity.RESULT_CANCELED);
             activity.finish();
             return;
         }
 
-        List<String> timeZoneIds = countryTimeZones.getTimeZoneIds();
+        List<String> timeZoneIds = countryTimeZones.getPreferredTimeZoneIds();
         // Choose the time zone associated the region if there is only one time zone in that region
         if (timeZoneIds.size() == 1) {
             final Intent resultData = new Intent()
diff --git a/src/com/android/settings/datetime/timezone/RegionZonePicker.java b/src/com/android/settings/datetime/timezone/RegionZonePicker.java
index 8e4aa05..7f988cd 100644
--- a/src/com/android/settings/datetime/timezone/RegionZonePicker.java
+++ b/src/com/android/settings/datetime/timezone/RegionZonePicker.java
@@ -103,7 +103,7 @@
         // It could be a timely operations if there are many time zones. A region in time zone data
         // contains a maximum of 29 time zones currently. It may change in the future, but it's
         // unlikely to be changed drastically.
-        return getRegionTimeZoneInfo(filteredCountryTimeZones.getTimeZoneIds());
+        return getRegionTimeZoneInfo(filteredCountryTimeZones.getPreferredTimeZoneIds());
     }
 
     /**
diff --git a/src/com/android/settings/datetime/timezone/TimeZoneSettings.java b/src/com/android/settings/datetime/timezone/TimeZoneSettings.java
index 60cd636..6c779b5 100644
--- a/src/com/android/settings/datetime/timezone/TimeZoneSettings.java
+++ b/src/com/android/settings/datetime/timezone/TimeZoneSettings.java
@@ -214,10 +214,11 @@
                 mTimeZoneData.lookupCountryTimeZones(regionId);
 
         use(RegionZonePreferenceController.class).setTimeZoneInfo(tzInfo);
-        // Only clickable when the region has more than 1 time zones or no time zone is selected.
 
+        // Only clickable when the region has more than 1 time zones or no time zone is selected.
         use(RegionZonePreferenceController.class).setClickable(tzInfo == null ||
-                (countryTimeZones != null && countryTimeZones.getTimeZoneIds().size() > 1));
+                (countryTimeZones != null
+                        && countryTimeZones.getPreferredTimeZoneIds().size() > 1));
         use(TimeZoneInfoPreferenceController.class).setTimeZoneInfo(tzInfo);
 
         updatePreferenceStates();
@@ -244,7 +245,8 @@
 
         FilteredCountryTimeZones countryTimeZones =
                 timeZoneData.lookupCountryTimeZones(regionId);
-        if (countryTimeZones == null || !countryTimeZones.getTimeZoneIds().contains(tzId)) {
+        if (countryTimeZones == null
+                || !countryTimeZones.getPreferredTimeZoneIds().contains(tzId)) {
             Log.e(TAG, "Unknown time zone id is selected: " + tzId);
             return;
         }
diff --git a/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java b/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java
index 7a38853..05a542d 100644
--- a/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java
+++ b/src/com/android/settings/datetime/timezone/model/FilteredCountryTimeZones.java
@@ -16,11 +16,15 @@
 
 package com.android.settings.datetime.timezone.model;
 
+import android.util.ArraySet;
+
 import com.android.i18n.timezone.CountryTimeZones;
 
+import java.time.Instant;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.stream.Collectors;
+import java.util.Set;
 
 /**
  * Wrap {@class CountryTimeZones} to filter time zone that are shown in the picker.
@@ -39,31 +43,46 @@
      * a timestamp known to be in the recent past is used. This should be updated occasionally but
      * it doesn't have to be very often.
      */
-    private static final long MIN_USE_DATE_OF_TIMEZONE = 1546300800000L; // 1/1/2019 00:00 UTC
+    private static final Instant MIN_USE_DATE_OF_TIMEZONE =
+            Instant.ofEpochMilli(1546300800000L); // 1/1/2019 00:00 UTC
 
     private final CountryTimeZones mCountryTimeZones;
-    private final List<String> mTimeZoneIds;
+    private final List<String> mPreferredTimeZoneIds;
+    private final Set<String> mAlternativeTimeZoneIds;
 
     public FilteredCountryTimeZones(CountryTimeZones countryTimeZones) {
         mCountryTimeZones = countryTimeZones;
-        List<String> timeZoneIds = countryTimeZones.getTimeZoneMappings().stream()
-                .filter(timeZoneMapping ->
-                        timeZoneMapping.isShownInPicker()
-                                && (timeZoneMapping.getNotUsedAfter() == null
-                                || timeZoneMapping.getNotUsedAfter() >= MIN_USE_DATE_OF_TIMEZONE))
-                .map(timeZoneMapping -> timeZoneMapping.getTimeZoneId())
-                .collect(Collectors.toList());
-        mTimeZoneIds = Collections.unmodifiableList(timeZoneIds);
+        List<String> timeZoneIds = new ArrayList<>();
+        Set<String> alternativeTimeZoneIds = new ArraySet<>();
+        for (CountryTimeZones.TimeZoneMapping timeZoneMapping :
+                countryTimeZones.getTimeZoneMappings()) {
+            if (timeZoneMapping.isShownInPickerAt(MIN_USE_DATE_OF_TIMEZONE)) {
+                String timeZoneId = timeZoneMapping.getTimeZoneId();
+                timeZoneIds.add(timeZoneId);
+                alternativeTimeZoneIds.addAll(timeZoneMapping.getAlternativeIds());
+            }
+        }
+        mPreferredTimeZoneIds = Collections.unmodifiableList(timeZoneIds);
+        mAlternativeTimeZoneIds = Collections.unmodifiableSet(alternativeTimeZoneIds);
     }
 
-    public List<String> getTimeZoneIds() {
-        return mTimeZoneIds;
+    public List<String> getPreferredTimeZoneIds() {
+        return mPreferredTimeZoneIds;
     }
 
     public CountryTimeZones getCountryTimeZones() {
         return mCountryTimeZones;
     }
 
+    /**
+     * Returns whether {@code timeZoneId} is currently used in the country or is an alternative
+     * name of a currently used time zone.
+     */
+    public boolean matches(String timeZoneId) {
+        return mPreferredTimeZoneIds.contains(timeZoneId)
+                || mAlternativeTimeZoneIds.contains(timeZoneId);
+    }
+
     public String getRegionId() {
         return TimeZoneData.normalizeRegionId(mCountryTimeZones.getCountryIso());
     }
diff --git a/src/com/android/settings/datetime/timezone/model/TimeZoneData.java b/src/com/android/settings/datetime/timezone/model/TimeZoneData.java
index 335e6e2..06f2de0 100644
--- a/src/com/android/settings/datetime/timezone/model/TimeZoneData.java
+++ b/src/com/android/settings/datetime/timezone/model/TimeZoneData.java
@@ -71,7 +71,7 @@
         Set<String> regionIds = new ArraySet<>();
         for (CountryTimeZones countryTimeZone : countryTimeZones) {
             FilteredCountryTimeZones filteredZones = new FilteredCountryTimeZones(countryTimeZone);
-            if (filteredZones.getTimeZoneIds().contains(tzId)) {
+            if (filteredZones.matches(tzId)) {
                 regionIds.add(filteredZones.getRegionId());
             }
         }
diff --git a/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java b/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
index 536f699..e6d9dfd 100644
--- a/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
+++ b/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
@@ -58,7 +58,7 @@
     public DeviceNamePreferenceController(Context context, String key) {
         super(context, key);
 
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mWifiDeviceNameTextValidator = new WifiDeviceNameTextValidator();
         mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
 
diff --git a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
index b8c4e28..03a7b97 100644
--- a/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
+++ b/src/com/android/settings/deviceinfo/StorageDashboardFragment.java
@@ -248,15 +248,19 @@
 
         mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
 
-        if (mSelectedStorageEntry.isPrivate() && mSelectedStorageEntry.isMounted()) {
+        if (!mSelectedStorageEntry.isMounted()) {
+            // Set null volume to hide category stats.
+            mPreferenceController.setVolume(null);
+            return;
+        }
+        if (mSelectedStorageEntry.isPrivate()) {
             // Stats data is only available on private volumes.
             getLoaderManager().restartLoader(STORAGE_JOB_ID, Bundle.EMPTY, this);
             getLoaderManager()
                  .restartLoader(VOLUME_SIZE_JOB_ID, Bundle.EMPTY, new VolumeSizeCallbacks());
             getLoaderManager().restartLoader(ICON_JOB_ID, Bundle.EMPTY, new IconLoaderCallbacks());
         } else {
-            // Set null volume to hide category stats.
-            mPreferenceController.setVolume(null);
+            mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
         }
     }
 
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
index 9e969a8..7d20aa7 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
@@ -121,7 +121,7 @@
         try {
             moveId = getPackageManager().movePrimaryStorage(mVolume);
         } catch (IllegalArgumentException e) {
-            StorageManager sm = getSystemService(StorageManager.class);
+            StorageManager sm = (StorageManager) getSystemService(STORAGE_SERVICE);
 
             if (Objects.equals(mVolume.getFsUuid(), sm.getPrimaryStorageVolume().getUuid())) {
                 final Intent intent = new Intent(this, StorageWizardReady.class);
diff --git a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
index fcbd5d3..4af5d79 100644
--- a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
+++ b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
@@ -146,8 +146,8 @@
         // TODO: There may be an avatar setting action we can use here.
         final int iconId = bundle.getInt("icon_id", 0);
         if (iconId == 0) {
-            final UserManager userManager = getActivity().getSystemService(
-                    UserManager.class);
+            final UserManager userManager = (UserManager) getActivity().getSystemService(
+                    Context.USER_SERVICE);
             final UserInfo info = Utils.getExistingUser(userManager,
                     android.os.Process.myUserHandle());
             controller.setLabel(info.name);
diff --git a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
index 14e86b4..d6cf442 100644
--- a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
@@ -49,7 +49,7 @@
 
     public FirmwareVersionDetailPreferenceController(Context context, String key) {
         super(context, key);
-        mUserManager = mContext.getSystemService(UserManager.class);
+        mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
         initializeAdminPermissions();
     }
 
diff --git a/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceController.java b/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceController.java
index fbb29a7..967eea6 100644
--- a/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceController.java
@@ -49,7 +49,7 @@
 
     public ImeiInfoPreferenceController(Context context, String key) {
         super(context, key);
-        mTelephonyManager = context.getSystemService(TelephonyManager.class);
+        mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
         mIsMultiSim = mTelephonyManager.getPhoneCount() > 1;
     }
 
diff --git a/src/com/android/settings/deviceinfo/simstatus/SimStatusPreferenceController.java b/src/com/android/settings/deviceinfo/simstatus/SimStatusPreferenceController.java
index c391750..02c1916 100644
--- a/src/com/android/settings/deviceinfo/simstatus/SimStatusPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/simstatus/SimStatusPreferenceController.java
@@ -46,9 +46,9 @@
     public SimStatusPreferenceController(Context context, Fragment fragment) {
         super(context);
 
-        mTelephonyManager = context.getSystemService(TelephonyManager.class);
-        mSubscriptionManager = context.getSystemService(
-                SubscriptionManager.class);
+        mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+        mSubscriptionManager = (SubscriptionManager) context.getSystemService(
+                Context.TELEPHONY_SUBSCRIPTION_SERVICE);
         mFragment = fragment;
     }
 
diff --git a/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceController.java b/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceController.java
index f733c72..f753868 100644
--- a/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceController.java
@@ -26,6 +26,7 @@
 import androidx.fragment.app.FragmentManager;
 import androidx.preference.PreferenceScreen;
 
+import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.deletionhelper.ActivationWarningFragment;
 import com.android.settings.overlay.FeatureFactory;
@@ -66,6 +67,9 @@
 
     @Override
     public int getAvailabilityStatus() {
+        if (!mContext.getResources().getBoolean(R.bool.config_show_smart_storage_toggle)) {
+            return UNSUPPORTED_ON_DEVICE;
+        }
         return !ActivityManager.isLowRamDeviceStatic() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
     }
 
@@ -108,4 +112,4 @@
 
         return true;
     }
-}
\ No newline at end of file
+}
diff --git a/src/com/android/settings/deviceinfo/storage/StorageEntry.java b/src/com/android/settings/deviceinfo/storage/StorageEntry.java
index f718116..9ea0292 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageEntry.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageEntry.java
@@ -236,6 +236,14 @@
         return mVolumeInfo == null ? false : mVolumeInfo.getType() == VolumeInfo.TYPE_PUBLIC;
     }
 
+    /**
+     * Stub volume is a volume that is maintained by external party such as the ChromeOS processes
+     * in ARC++.
+     */
+    public boolean isStub() {
+        return mVolumeInfo == null ? false : mVolumeInfo.getType() == VolumeInfo.TYPE_STUB;
+    }
+
     /** Returns description. */
     public String getDescription() {
         if (isVolumeInfo()) {
diff --git a/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java b/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
index 7d77687..e5259f9 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceController.java
@@ -70,6 +70,8 @@
     private static final String SYSTEM_FRAGMENT_TAG = "SystemInfo";
 
     @VisibleForTesting
+    static final String PUBLIC_STORAGE_KEY = "pref_public_storage";
+    @VisibleForTesting
     static final String IMAGES_KEY = "pref_images";
     @VisibleForTesting
     static final String VIDEOS_KEY = "pref_videos";
@@ -103,9 +105,11 @@
     private long mUsedBytes;
     private long mTotalSize;
 
-    private List<StorageItemPreference> mStorageItemPreferences;
+    private List<StorageItemPreference> mPrivateStorageItemPreferences;
     private PreferenceScreen mScreen;
     @VisibleForTesting
+    Preference mPublicStoragePreference;
+    @VisibleForTesting
     StorageItemPreference mImagesPreference;
     @VisibleForTesting
     StorageItemPreference mVideosPreference;
@@ -167,6 +171,9 @@
             return false;
         }
         switch (preference.getKey()) {
+            case PUBLIC_STORAGE_KEY:
+                launchPublicStorageIntent();
+                return true;
             case IMAGES_KEY:
                 launchImagesIntent();
                 return true;
@@ -210,37 +217,45 @@
     public void setVolume(VolumeInfo volume) {
         mVolume = volume;
 
-        final boolean isValidVolume = isValidVolume();
-        setCategoryPreferencesVisibility(isValidVolume);
-        if (isValidVolume) {
-            updateCategoryPreferencesOrder();
-        }
+        updateCategoryPreferencesVisibility();
+        updatePrivateStorageCategoryPreferencesOrder();
     }
 
     // Stats data is only available on private volumes.
-    private boolean isValidVolume() {
+    private boolean isValidPrivateVolume() {
         return mVolume != null
                 && mVolume.getType() == VolumeInfo.TYPE_PRIVATE
                 && (mVolume.getState() == VolumeInfo.STATE_MOUNTED
                 || mVolume.getState() == VolumeInfo.STATE_MOUNTED_READ_ONLY);
     }
 
-    private void setCategoryPreferencesVisibility(boolean visible) {
+    private boolean isValidPublicVolume() {
+        return mVolume != null
+                && (mVolume.getType() == VolumeInfo.TYPE_PUBLIC
+                || mVolume.getType() == VolumeInfo.TYPE_STUB)
+                && (mVolume.getState() == VolumeInfo.STATE_MOUNTED
+                || mVolume.getState() == VolumeInfo.STATE_MOUNTED_READ_ONLY);
+    }
+
+    private void updateCategoryPreferencesVisibility() {
         if (mScreen == null) {
             return;
         }
 
-        mImagesPreference.setVisible(visible);
-        mVideosPreference.setVisible(visible);
-        mAudiosPreference.setVisible(visible);
-        mAppsPreference.setVisible(visible);
-        mGamesPreference.setVisible(visible);
-        mDocumentsAndOtherPreference.setVisible(visible);
-        mSystemPreference.setVisible(visible);
+        mPublicStoragePreference.setVisible(isValidPublicVolume());
+
+        final boolean privateStoragePreferencesVisible = isValidPrivateVolume();
+        mImagesPreference.setVisible(privateStoragePreferencesVisible);
+        mVideosPreference.setVisible(privateStoragePreferencesVisible);
+        mAudiosPreference.setVisible(privateStoragePreferencesVisible);
+        mAppsPreference.setVisible(privateStoragePreferencesVisible);
+        mGamesPreference.setVisible(privateStoragePreferencesVisible);
+        mDocumentsAndOtherPreference.setVisible(privateStoragePreferencesVisible);
+        mSystemPreference.setVisible(privateStoragePreferencesVisible);
         // TODO(b/170918505): Shows trash category after trash category feature complete.
         mTrashPreference.setVisible(false);
 
-        if (visible) {
+        if (privateStoragePreferencesVisible) {
             final VolumeInfo sharedVolume = mSvp.findEmulatedForPrivate(mVolume);
             // If we don't have a shared volume for our internal storage (or the shared volume isn't
             // mounted as readable for whatever reason), we should hide the File preference.
@@ -250,22 +265,22 @@
         }
     }
 
-    private void updateCategoryPreferencesOrder() {
-        if (mScreen == null) {
+    private void updatePrivateStorageCategoryPreferencesOrder() {
+        if (mScreen == null || !isValidPrivateVolume()) {
             return;
         }
 
-        if (mStorageItemPreferences == null) {
-            mStorageItemPreferences = new ArrayList<>();
+        if (mPrivateStorageItemPreferences == null) {
+            mPrivateStorageItemPreferences = new ArrayList<>();
 
-            mStorageItemPreferences.add(mImagesPreference);
-            mStorageItemPreferences.add(mVideosPreference);
-            mStorageItemPreferences.add(mAudiosPreference);
-            mStorageItemPreferences.add(mAppsPreference);
-            mStorageItemPreferences.add(mGamesPreference);
-            mStorageItemPreferences.add(mDocumentsAndOtherPreference);
-            mStorageItemPreferences.add(mSystemPreference);
-            mStorageItemPreferences.add(mTrashPreference);
+            mPrivateStorageItemPreferences.add(mImagesPreference);
+            mPrivateStorageItemPreferences.add(mVideosPreference);
+            mPrivateStorageItemPreferences.add(mAudiosPreference);
+            mPrivateStorageItemPreferences.add(mAppsPreference);
+            mPrivateStorageItemPreferences.add(mGamesPreference);
+            mPrivateStorageItemPreferences.add(mDocumentsAndOtherPreference);
+            mPrivateStorageItemPreferences.add(mSystemPreference);
+            mPrivateStorageItemPreferences.add(mTrashPreference);
         }
         mScreen.removePreference(mImagesPreference);
         mScreen.removePreference(mVideosPreference);
@@ -277,10 +292,10 @@
         mScreen.removePreference(mTrashPreference);
 
         // Sort display order by size.
-        Collections.sort(mStorageItemPreferences,
+        Collections.sort(mPrivateStorageItemPreferences,
                 Comparator.comparingLong(StorageItemPreference::getStorageSize));
         int orderIndex = LAST_STORAGE_CATEGORY_PREFERENCE_ORDER;
-        for (StorageItemPreference preference : mStorageItemPreferences) {
+        for (StorageItemPreference preference : mPrivateStorageItemPreferences) {
             preference.setOrder(orderIndex--);
             mScreen.addPreference(preference);
         }
@@ -292,6 +307,7 @@
     public void setUserId(UserHandle userHandle) {
         mUserId = userHandle.getIdentifier();
 
+        tintPreference(mPublicStoragePreference);
         tintPreference(mImagesPreference);
         tintPreference(mVideosPreference);
         tintPreference(mAudiosPreference);
@@ -320,6 +336,7 @@
     @Override
     public void displayPreference(PreferenceScreen screen) {
         mScreen = screen;
+        mPublicStoragePreference = screen.findPreference(PUBLIC_STORAGE_KEY);
         mImagesPreference = screen.findPreference(IMAGES_KEY);
         mVideosPreference = screen.findPreference(VIDEOS_KEY);
         mAudiosPreference = screen.findPreference(AUDIOS_KEY);
@@ -329,11 +346,8 @@
         mSystemPreference = screen.findPreference(SYSTEM_KEY);
         mTrashPreference = screen.findPreference(TRASH_KEY);
 
-        final boolean isValidVolume = isValidVolume();
-        setCategoryPreferencesVisibility(isValidVolume);
-        if (isValidVolume) {
-            updateCategoryPreferencesOrder();
-        }
+        updateCategoryPreferencesVisibility();
+        updatePrivateStorageCategoryPreferencesOrder();
     }
 
     public void onLoadFinished(SparseArray<StorageAsyncLoader.AppsStorageResult> result,
@@ -371,7 +385,7 @@
             mSystemPreference.setStorageSize(systemSize, mTotalSize);
         }
 
-        updateCategoryPreferencesOrder();
+        updatePrivateStorageCategoryPreferencesOrder();
     }
 
     public void setUsedSize(long usedSizeBytes) {
@@ -382,6 +396,13 @@
         mTotalSize = totalSizeBytes;
     }
 
+    private void launchPublicStorageIntent() {
+        final Intent intent = mVolume.buildBrowseIntent();
+        if (intent != null) {
+            mContext.startActivity(intent);
+        }
+    }
+
     // TODO(b/183078080): To simplify StorageItemPreferenceController, move launchxxxIntent to a
     //                    utility object.
     private void launchImagesIntent() {
diff --git a/src/com/android/settings/fuelgauge/BatteryEntry.java b/src/com/android/settings/fuelgauge/BatteryEntry.java
index 09380ff..ed52f48 100644
--- a/src/com/android/settings/fuelgauge/BatteryEntry.java
+++ b/src/com/android/settings/fuelgauge/BatteryEntry.java
@@ -52,6 +52,19 @@
  * and icon image.
  */
 public class BatteryEntry {
+
+    public static final class NameAndIcon {
+        public final String name;
+        public final Drawable icon;
+        public final int iconId;
+
+        public NameAndIcon(String name, Drawable icon, int iconId) {
+            this.name = name;
+            this.icon = icon;
+            this.iconId = iconId;
+        }
+    }
+
     public static final int MSG_UPDATE_NAME_ICON = 1;
     public static final int MSG_REPORT_FULLY_DRAWN = 2;
 
@@ -186,22 +199,16 @@
         } else if (batteryConsumer instanceof SystemBatteryConsumer) {
             mConsumedPower = batteryConsumer.getConsumedPower()
                     - ((SystemBatteryConsumer) batteryConsumer).getPowerConsumedByApps();
-            final Pair<Integer, String> resourcePair = getResourcePairFromDrainType(
+            final NameAndIcon nameAndIcon = getNameAndIconFromDrainType(
                     context, ((SystemBatteryConsumer) batteryConsumer).getDrainType());
-            iconId = resourcePair.first;
-            name = resourcePair.second;
+            iconId = nameAndIcon.iconId;
+            name = nameAndIcon.name;
         } else if (batteryConsumer instanceof UserBatteryConsumer) {
             mConsumedPower = batteryConsumer.getConsumedPower();
-
-            UserInfo info = um.getUserInfo(((UserBatteryConsumer) batteryConsumer).getUserId());
-            if (info != null) {
-                icon = Utils.getUserIcon(context, um, info);
-                name = Utils.getUserLabel(context, info);
-            } else {
-                icon = null;
-                name = context.getResources().getString(
-                        R.string.running_process_item_removed_user_label);
-            }
+            final NameAndIcon nameAndIcon = getNameAndIconFromUserId(
+                    context, ((UserBatteryConsumer) batteryConsumer).getUserId());
+            icon = nameAndIcon.icon;
+            name = nameAndIcon.name;
         }
 
         if (iconId != 0) {
@@ -238,15 +245,9 @@
         }
 
         if (packages == null || packages.length == 0) {
-            if (uid == 0) {
-                name = mContext.getResources().getString(R.string.process_kernel_label);
-            } else if ("mediaserver".equals(name)) {
-                name = mContext.getResources().getString(R.string.process_mediaserver_label);
-            } else if ("dex2oat".equals(name)) {
-                name = mContext.getResources().getString(R.string.process_dex2oat_label);
-            }
-            iconId = R.drawable.ic_power_system;
-            icon = mContext.getDrawable(iconId);
+            final NameAndIcon nameAndIcon = getNameAndIconFromUid(mContext, name, uid);
+            icon = nameAndIcon.icon;
+            name = nameAndIcon.name;
         } else {
             icon = mContext.getPackageManager().getDefaultActivityIcon();
         }
@@ -419,6 +420,13 @@
     }
 
     /**
+     * Returns the BatteryConsumer of the app described by this entry.
+     */
+    public BatteryConsumer getBatteryConsumer() {
+        return mBatteryConsumer;
+    }
+
+    /**
      * Returns foreground foreground time (in milliseconds) that is attributed to this entry.
      */
     public long getTimeInForegroundMs() {
@@ -462,10 +470,46 @@
     }
 
     /**
-     * Gets icon ID and name from system battery consumer drain type.
+     * Gets name and icon resource from UserBatteryConsumer userId.
      */
-    public static Pair<Integer, String> getResourcePairFromDrainType(
-            Context context, int drainType) {
+    public static NameAndIcon getNameAndIconFromUserId(
+            Context context, final int userId) {
+        UserManager um = context.getSystemService(UserManager.class);
+        UserInfo info = um.getUserInfo(userId);
+
+        Drawable icon = null;
+        String name = null;
+        if (info != null) {
+            icon = Utils.getUserIcon(context, um, info);
+            name = Utils.getUserLabel(context, info);
+        } else {
+            name = context.getResources().getString(
+                    R.string.running_process_item_removed_user_label);
+        }
+        return new NameAndIcon(name, icon, 0 /* iconId */);
+    }
+
+    /**
+     * Gets name and icon resource from UidBatteryConsumer uid.
+     */
+    public static NameAndIcon getNameAndIconFromUid(
+            Context context, String name, final int uid) {
+        Drawable icon = context.getDrawable(R.drawable.ic_power_system);
+        if (uid == 0) {
+            name = context.getResources().getString(R.string.process_kernel_label);
+        } else if ("mediaserver".equals(name)) {
+            name = context.getResources().getString(R.string.process_mediaserver_label);
+        } else if ("dex2oat".equals(name)) {
+            name = context.getResources().getString(R.string.process_dex2oat_label);
+        }
+        return new NameAndIcon(name, icon, 0 /* iconId */);
+    }
+
+    /**
+     * Gets name annd icon resource from SystemBatteryConsumer drain type.
+     */
+    public static NameAndIcon getNameAndIconFromDrainType(
+            Context context, final int drainType) {
         String name = null;
         int iconId = 0;
         switch (drainType) {
@@ -511,6 +555,6 @@
                 iconId = R.drawable.ic_power_system;
                 break;
         }
-        return new Pair<>(Integer.valueOf(iconId), name);
+        return new NameAndIcon(name, null /* icon */, iconId);
     }
 }
diff --git a/src/com/android/settings/fuelgauge/SmartBatteryPreferenceController.java b/src/com/android/settings/fuelgauge/SmartBatteryPreferenceController.java
index ea277a1..27b70cb 100644
--- a/src/com/android/settings/fuelgauge/SmartBatteryPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/SmartBatteryPreferenceController.java
@@ -20,27 +20,23 @@
 import android.content.Context;
 import android.provider.Settings;
 import android.text.TextUtils;
-import android.widget.Switch;
 
 import androidx.preference.Preference;
-import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
 
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.overlay.FeatureFactory;
-import com.android.settingslib.widget.MainSwitchPreference;
-import com.android.settingslib.widget.OnMainSwitchChangeListener;
 
 /**
  * Controller to change and update the smart battery toggle
  */
 public class SmartBatteryPreferenceController extends BasePreferenceController implements
-        OnMainSwitchChangeListener {
+        Preference.OnPreferenceChangeListener {
 
     private static final String KEY_SMART_BATTERY = "smart_battery";
     private static final int ON = 1;
     private static final int OFF = 0;
     private PowerUsageFeatureProvider mPowerUsageFeatureProvider;
-    private MainSwitchPreference mPreference;
 
     public SmartBatteryPreferenceController(Context context) {
         super(context, KEY_SMART_BATTERY);
@@ -70,19 +66,14 @@
         super.updateState(preference);
         final boolean smartBatteryOn = Settings.Global.getInt(mContext.getContentResolver(),
                 Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, ON) == ON;
-        ((MainSwitchPreference) preference).updateStatus(smartBatteryOn);
+        ((SwitchPreference) preference).setChecked(smartBatteryOn);
     }
 
     @Override
-    public void displayPreference(PreferenceScreen screen) {
-        super.displayPreference(screen);
-        mPreference = (MainSwitchPreference) screen.findPreference(getPreferenceKey());
-        mPreference.addOnSwitchChangeListener(this);
-    }
-
-    @Override
-    public void onSwitchChanged(Switch switchView, boolean isChecked) {
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        final boolean smartBatteryOn = (Boolean) newValue;
         Settings.Global.putInt(mContext.getContentResolver(),
-                Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, isChecked ? ON : OFF);
+                Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, smartBatteryOn ? ON : OFF);
+        return true;
     }
 }
diff --git a/src/com/android/settings/network/EthernetTetherPreferenceController.java b/src/com/android/settings/network/EthernetTetherPreferenceController.java
index 3559edb..06cd6a7 100644
--- a/src/com/android/settings/network/EthernetTetherPreferenceController.java
+++ b/src/com/android/settings/network/EthernetTetherPreferenceController.java
@@ -43,7 +43,7 @@
         super(context, preferenceKey);
         mEthernetRegex = context.getString(
                 com.android.internal.R.string.config_ethernet_iface_regex);
-        mEthernetManager = context.getSystemService(EthernetManager.class);
+        mEthernetManager = (EthernetManager) context.getSystemService(Context.ETHERNET_SERVICE);
     }
 
     @OnLifecycleEvent(Lifecycle.Event.ON_START)
diff --git a/src/com/android/settings/network/InternetUpdater.java b/src/com/android/settings/network/InternetUpdater.java
index 3967276..dd70cef 100644
--- a/src/com/android/settings/network/InternetUpdater.java
+++ b/src/com/android/settings/network/InternetUpdater.java
@@ -142,13 +142,13 @@
     private NetworkCallback mNetworkCallback = new NetworkCallback() {
         public void onCapabilitiesChanged(@NonNull Network network,
                 @NonNull NetworkCapabilities networkCapabilities) {
-            checkNetworkCapabilities(networkCapabilities);
+            updateInternetAvailable(networkCapabilities);
         }
 
         @Override
         public void onLost(@NonNull Network network) {
             mInternetAvailable = false;
-            update();
+            updateInternetType();
         }
     };
 
@@ -203,7 +203,7 @@
         Network activeNetwork = mConnectivityManager.getActiveNetwork();
         if (activeNetwork == null) {
             mInternetAvailable = false;
-            update();
+            updateInternetType();
             return;
         }
 
@@ -211,36 +211,34 @@
                 mConnectivityManager.getNetworkCapabilities(activeNetwork);
         if (activeNetworkCapabilities == null) {
             mInternetAvailable = false;
-            update();
+            updateInternetType();
             return;
         }
 
-        checkNetworkCapabilities(activeNetworkCapabilities);
-    }
-
-    private void checkNetworkCapabilities(@NonNull NetworkCapabilities networkCapabilities) {
-        if (!networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) {
-            mInternetAvailable = false;
-            update();
-            return;
-        }
-
-        boolean internetAvailable = false;
-        for (int transport : networkCapabilities.getTransportTypes()) {
-            if (sTransportMap.containsKey(transport)) {
-                mTransport = transport;
-                internetAvailable = true;
-                Log.i(TAG, "Detect an internet capability network with transport type: "
-                        + mTransport);
-                break;
-            }
-        }
-        mInternetAvailable = internetAvailable;
-        update();
+        updateInternetAvailable(activeNetworkCapabilities);
     }
 
     @VisibleForTesting
-    void update() {
+    void updateInternetAvailable(@NonNull NetworkCapabilities capabilities) {
+        boolean internetAvailable = false;
+        if (capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+                && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)) {
+            for (int transport : capabilities.getTransportTypes()) {
+                if (sTransportMap.containsKey(transport)) {
+                    mTransport = transport;
+                    internetAvailable = true;
+                    Log.i(TAG, "Detect an internet available network with transport type: "
+                            + mTransport);
+                    break;
+                }
+            }
+        }
+        mInternetAvailable = internetAvailable;
+        updateInternetType();
+    }
+
+    @VisibleForTesting
+    void updateInternetType() {
         @InternetType int internetType = INTERNET_NETWORKS_AVAILABLE;
         if (mInternetAvailable) {
             internetType = sTransportMap.get(mTransport);
diff --git a/src/com/android/settings/network/MobilePlanPreferenceController.java b/src/com/android/settings/network/MobilePlanPreferenceController.java
index 65439bc..d8963ad 100644
--- a/src/com/android/settings/network/MobilePlanPreferenceController.java
+++ b/src/com/android/settings/network/MobilePlanPreferenceController.java
@@ -73,9 +73,9 @@
             MobilePlanPreferenceHost host) {
         super(context);
         mHost = host;
-        mCm = context.getSystemService(ConnectivityManager.class);
-        mTm = context.getSystemService(TelephonyManager.class);
-        mUserManager = context.getSystemService(UserManager.class);
+        mCm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
+        mTm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mIsSecondaryUser = !mUserManager.isAdminUser();
     }
 
diff --git a/src/com/android/settings/network/NetworkResetRestrictionChecker.java b/src/com/android/settings/network/NetworkResetRestrictionChecker.java
index c873f9d..46227f9 100644
--- a/src/com/android/settings/network/NetworkResetRestrictionChecker.java
+++ b/src/com/android/settings/network/NetworkResetRestrictionChecker.java
@@ -31,7 +31,7 @@
 
     public NetworkResetRestrictionChecker(Context context) {
         mContext = context;
-        mUserManager = context.getSystemService(UserManager.class);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
     }
 
     @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
diff --git a/src/com/android/settings/network/NetworkScorerPicker.java b/src/com/android/settings/network/NetworkScorerPicker.java
index 011cf05..9ecab3b 100644
--- a/src/com/android/settings/network/NetworkScorerPicker.java
+++ b/src/com/android/settings/network/NetworkScorerPicker.java
@@ -140,6 +140,6 @@
 
     @VisibleForTesting
     NetworkScoreManager createNetworkScorerManager(Context context) {
-        return context.getSystemService(NetworkScoreManager.class);
+        return (NetworkScoreManager) context.getSystemService(Context.NETWORK_SCORE_SERVICE);
     }
 }
diff --git a/src/com/android/settings/network/NetworkScorerPickerPreferenceController.java b/src/com/android/settings/network/NetworkScorerPickerPreferenceController.java
index 2abe390..4b452c0 100644
--- a/src/com/android/settings/network/NetworkScorerPickerPreferenceController.java
+++ b/src/com/android/settings/network/NetworkScorerPickerPreferenceController.java
@@ -37,7 +37,7 @@
     public NetworkScorerPickerPreferenceController(Context context, String key) {
         super(context, key);
         mNetworkScoreManager =
-                mContext.getSystemService(NetworkScoreManager.class);
+                (NetworkScoreManager) mContext.getSystemService(Context.NETWORK_SCORE_SERVICE);
     }
 
     @Override
diff --git a/src/com/android/settings/network/ProviderModelSlice.java b/src/com/android/settings/network/ProviderModelSlice.java
index 18765a8..beb7489 100644
--- a/src/com/android/settings/network/ProviderModelSlice.java
+++ b/src/com/android/settings/network/ProviderModelSlice.java
@@ -21,6 +21,7 @@
 
 import static com.android.settings.slices.CustomSliceRegistry.PROVIDER_MODEL_SLICE_URI;
 
+import android.annotation.ColorInt;
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
@@ -30,6 +31,7 @@
 import android.util.Log;
 
 import androidx.annotation.VisibleForTesting;
+import androidx.core.graphics.drawable.IconCompat;
 import androidx.slice.Slice;
 import androidx.slice.builders.ListBuilder;
 
@@ -83,9 +85,10 @@
         // Second section:  Add a carrier item.
         // Third section:  Add the Wi-Fi items which are not connected.
         // Fourth section:  If device has connection problem, this row show the message for user.
-        boolean hasEthernet = isEthernetConnected();
+        @InternetUpdater.InternetType int internetType = getInternetType();
         final ListBuilder listBuilder = mHelper.createListBuilder(getUri());
-        if (mHelper.isAirplaneModeEnabled() && !mWifiManager.isWifiEnabled() && !hasEthernet) {
+        if (mHelper.isAirplaneModeEnabled() && !mWifiManager.isWifiEnabled()
+                && internetType != InternetUpdater.INTERNET_ETHERNET) {
             log("Airplane mode is enabled.");
             return listBuilder.build();
         }
@@ -105,15 +108,17 @@
         log("hasCarrier: " + hasCarrier);
 
         // First section:  Add a Ethernet or Wi-Fi item which state is connected.
+        boolean isConnectedWifiAddedTop = false;
         final WifiSliceItem connectedWifiItem = mHelper.getConnectedWifiItem(wifiList);
-        if (hasEthernet) {
+        if (internetType == InternetUpdater.INTERNET_ETHERNET) {
             log("get Ethernet item which is connected");
             listBuilder.addRow(createEthernetRow());
             maxListSize--;
         } else {
-            if (connectedWifiItem != null) {
-                log("get Wi-Fi item which is connected");
+            if (connectedWifiItem != null && internetType == InternetUpdater.INTERNET_WIFI) {
+                log("get Wi-Fi item which is connected to internet");
                 listBuilder.addRow(getWifiSliceItemRow(connectedWifiItem));
+                isConnectedWifiAddedTop = true;
                 maxListSize--;
             }
         }
@@ -128,7 +133,7 @@
         }
 
         // Third section:  Add the connected Wi-Fi item to Wi-Fi list if the Ethernet is connected.
-        if (connectedWifiItem != null && hasEthernet) {
+        if (connectedWifiItem != null && !isConnectedWifiAddedTop) {
             log("get Wi-Fi item which is connected");
             listBuilder.addRow(getWifiSliceItemRow(connectedWifiItem));
             maxListSize--;
@@ -222,12 +227,12 @@
         return SliceBackgroundWorker.getInstance(getUri());
     }
 
-    private boolean isEthernetConnected() {
+    private @InternetUpdater.InternetType int getInternetType() {
         final NetworkProviderWorker worker = getWorker();
         if (worker == null) {
-            return false;
+            return InternetUpdater.INTERNET_NETWORKS_AVAILABLE;
         }
-        return worker.isEthernetConnected();
+        return worker.getInternetType();
     }
 
     @VisibleForTesting
@@ -243,6 +248,20 @@
                 .setSubtitle(mContext.getText(R.string.to_switch_networks_disconnect_ethernet));
     }
 
+    @Override
+    protected IconCompat getWifiSliceItemLevelIcon(WifiSliceItem wifiSliceItem) {
+        if (wifiSliceItem.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED
+                && getInternetType() != InternetUpdater.INTERNET_WIFI) {
+            final @ColorInt int tint = Utils.getColorAttrDefaultColor(mContext,
+                    android.R.attr.colorControlNormal);
+            final Drawable drawable = mContext.getDrawable(
+                    Utils.getWifiIconResource(wifiSliceItem.getLevel()));
+            drawable.setTint(tint);
+            return Utils.createIconWithDrawable(drawable);
+        }
+        return super.getWifiSliceItemLevelIcon(wifiSliceItem);
+    }
+
     /**
      * Wrap the subscriptionManager call for test mocking.
      */
diff --git a/src/com/android/settings/network/TetherEnabler.java b/src/com/android/settings/network/TetherEnabler.java
index 550d324..ef031f6 100644
--- a/src/com/android/settings/network/TetherEnabler.java
+++ b/src/com/android/settings/network/TetherEnabler.java
@@ -128,10 +128,10 @@
         mSwitchWidgetController = switchWidgetController;
         mDataSaverBackend = new DataSaverBackend(context);
         mConnectivityManager =
-                context.getSystemService(ConnectivityManager.class);
-        mTetheringManager = context.getSystemService(TetheringManager.class);
-        mWifiManager = context.getSystemService(WifiManager.class);
-        mUserManager = context.getSystemService(UserManager.class);
+                (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
+        mTetheringManager = (TetheringManager) context.getSystemService(Context.TETHERING_SERVICE);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
         mBluetoothPan = bluetoothPan;
         mEthernetRegex =
diff --git a/src/com/android/settings/network/apn/ApnEditor.java b/src/com/android/settings/network/apn/ApnEditor.java
index 78b7ccc..afc68d5 100644
--- a/src/com/android/settings/network/apn/ApnEditor.java
+++ b/src/com/android/settings/network/apn/ApnEditor.java
@@ -1291,8 +1291,8 @@
         mReadOnlyApnTypes = null;
         mReadOnlyApnFields = null;
 
-        final CarrierConfigManager configManager =
-                getSystemService(CarrierConfigManager.class);
+        final CarrierConfigManager configManager = (CarrierConfigManager)
+                getSystemService(Context.CARRIER_CONFIG_SERVICE);
         if (configManager != null) {
             final PersistableBundle b = configManager.getConfigForSubId(mSubId);
             if (b != null) {
diff --git a/src/com/android/settings/network/apn/ApnSettings.java b/src/com/android/settings/network/apn/ApnSettings.java
index 3ba667c..02d9b3d 100755
--- a/src/com/android/settings/network/apn/ApnSettings.java
+++ b/src/com/android/settings/network/apn/ApnSettings.java
@@ -209,8 +209,8 @@
         mSubscriptionInfo = getSubscriptionInfo(mSubId);
         mTelephonyManager = activity.getSystemService(TelephonyManager.class);
 
-        final CarrierConfigManager configManager =
-                getSystemService(CarrierConfigManager.class);
+        final CarrierConfigManager configManager = (CarrierConfigManager)
+                getSystemService(Context.CARRIER_CONFIG_SERVICE);
         final PersistableBundle b = configManager.getConfigForSubId(mSubId);
         mHideImsApn = b.getBoolean(CarrierConfigManager.KEY_HIDE_IMS_APN_BOOL);
         mAllowAddingApns = b.getBoolean(CarrierConfigManager.KEY_ALLOW_ADDING_APNS_BOOL);
diff --git a/src/com/android/settings/network/telephony/MobileNetworkSettings.java b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
index 7eb53b9..9a4cb40 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkSettings.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
@@ -202,7 +202,7 @@
 
         super.onCreate(icicle);
         final Context context = getContext();
-        mUserManager = context.getSystemService(UserManager.class);
+        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mTelephonyManager = context.getSystemService(TelephonyManager.class)
                 .createForSubscriptionId(mSubId);
 
diff --git a/src/com/android/settings/network/telephony/NetworkProviderWorker.java b/src/com/android/settings/network/telephony/NetworkProviderWorker.java
index 57f17b5..698e779 100644
--- a/src/com/android/settings/network/telephony/NetworkProviderWorker.java
+++ b/src/com/android/settings/network/telephony/NetworkProviderWorker.java
@@ -288,9 +288,9 @@
     }
 
     /**
-     * Returns true, if the ethernet network is connected.
+     * Returns the internet type.
      */
-    public boolean isEthernetConnected() {
-        return mInternetType == INTERNET_ETHERNET;
+    public @InternetUpdater.InternetType int getInternetType() {
+        return mInternetType;
     }
 }
diff --git a/src/com/android/settings/network/telephony/NetworkSelectSettings.java b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
index 588d828..c8121c4 100644
--- a/src/com/android/settings/network/telephony/NetworkSelectSettings.java
+++ b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
@@ -106,8 +106,8 @@
                 .createForSubscriptionId(mSubId);
         mNetworkScanHelper = new NetworkScanHelper(
                 mTelephonyManager, mCallback, mNetworkScanExecutor);
-        PersistableBundle bundle = (getContext().getSystemService(
-                CarrierConfigManager.class)).getConfigForSubId(mSubId);
+        PersistableBundle bundle = ((CarrierConfigManager) getContext().getSystemService(
+                Context.CARRIER_CONFIG_SERVICE)).getConfigForSubId(mSubId);
         if (bundle != null) {
             mShow4GForLTE = bundle.getBoolean(
                     CarrierConfigManager.KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL);
diff --git a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
index 6cb627b..c782b66 100644
--- a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
+++ b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
@@ -212,8 +212,8 @@
 
         @Override
         public View getView(int position, View convertView, ViewGroup parent) {
-            final LayoutInflater inflater =
-                    mContext.getSystemService(LayoutInflater.class);
+            final LayoutInflater inflater = (LayoutInflater)
+                    mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
             if (convertView == null) {
                 convertView = inflater.inflate(mItemResId, null);
diff --git a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
index 8be6016..d4ad994 100644
--- a/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
+++ b/src/com/android/settings/notification/app/RecentConversationsPreferenceController.java
@@ -72,7 +72,7 @@
         return true;
     }
 
-    Preference getClearAll(PreferenceGroup parent) {
+    LayoutPreference getClearAll(PreferenceGroup parent) {
         LayoutPreference pref = new LayoutPreference(
                 mContext, R.layout.conversations_clear_recents);
         pref.setOrder(1);
@@ -80,10 +80,21 @@
         button.setOnClickListener(v -> {
             try {
                 mPs.removeAllRecentConversations();
+                // Removing recents is asynchronous, so we can't immediately reload the list from
+                // the backend. Instead, proactively remove all of items that were marked as
+                // clearable, so long as we didn't get an error
+
+                for (int i = parent.getPreferenceCount() - 1; i >= 0; i--) {
+                    Preference p = parent.getPreference(i);
+                    if (p instanceof RecentConversationPreference) {
+                        if (((RecentConversationPreference) p).hasClearListener()) {
+                            parent.removePreference(p);
+                        }
+                    }
+                }
             } catch (RemoteException e) {
                 Slog.w(TAG, "Could not clear recents", e);
             }
-            updateState(parent);
         });
         return pref;
     }
@@ -118,36 +129,45 @@
     protected void populateList(List<ConversationChannel> conversations,
             PreferenceGroup containerGroup) {
         containerGroup.removeAll();
+        boolean hasClearable = false;
         if (conversations != null) {
-            populateConversations(conversations, containerGroup);
+            hasClearable = populateConversations(conversations, containerGroup);
         }
 
         if (containerGroup.getPreferenceCount() == 0) {
             containerGroup.setVisible(false);
         } else {
             containerGroup.setVisible(true);
-            Preference clearAll = getClearAll(containerGroup);
-            if (clearAll != null) {
-                containerGroup.addPreference(clearAll);
+            if (hasClearable) {
+                Preference clearAll = getClearAll(containerGroup);
+                if (clearAll != null) {
+                    containerGroup.addPreference(clearAll);
+                }
             }
         }
     }
 
-    protected void populateConversations(List<ConversationChannel> conversations,
+    protected boolean populateConversations(List<ConversationChannel> conversations,
             PreferenceGroup containerGroup) {
         int order = 100;
+        boolean hasClearable = false;
         for (ConversationChannel conversation : conversations) {
             if (conversation.getParentNotificationChannel().getImportance() == IMPORTANCE_NONE
                     || (conversation.getParentNotificationChannelGroup() != null
                     && conversation.getParentNotificationChannelGroup().isBlocked())) {
                 continue;
             }
-            containerGroup.addPreference(
-                    createConversationPref(containerGroup, conversation, order++));
+            RecentConversationPreference pref =
+                    createConversationPref(containerGroup, conversation, order++);
+            containerGroup.addPreference(pref);
+            if (pref.hasClearListener()) {
+                hasClearable = true;
+            }
         }
+        return hasClearable;
     }
 
-    protected Preference createConversationPref(PreferenceGroup parent,
+    protected RecentConversationPreference createConversationPref(PreferenceGroup parent,
             final ConversationChannel conversation, int order) {
         final String pkg = conversation.getShortcutInfo().getPackage();
         final int uid = conversation.getUid();
diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java
index c52b410..4b9883a 100644
--- a/src/com/android/settings/password/ChooseLockPattern.java
+++ b/src/com/android/settings/password/ChooseLockPattern.java
@@ -32,6 +32,7 @@
 import android.util.TypedValue;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
+import android.view.Surface;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ScrollView;
@@ -508,6 +509,12 @@
                 Bundle savedInstanceState) {
             final GlifLayout layout = (GlifLayout) inflater.inflate(
                     R.layout.choose_lock_pattern, container, false);
+            switch(getContext().getDisplay().getRotation()) {
+                case Surface.ROTATION_90:
+                case Surface.ROTATION_270:
+                    layout.setLandscapeHeaderAreaVisible(false /* visible */);
+                    break;
+            }
             layout.setHeaderText(getActivity().getTitle());
             if (getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
                 View iconView = layout.findViewById(R.id.sud_layout_icon);
diff --git a/src/com/android/settings/password/ConfirmLockPattern.java b/src/com/android/settings/password/ConfirmLockPattern.java
index 598e09a..0e18436 100644
--- a/src/com/android/settings/password/ConfirmLockPattern.java
+++ b/src/com/android/settings/password/ConfirmLockPattern.java
@@ -28,6 +28,7 @@
 import android.os.storage.StorageManager;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
+import android.view.Surface;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.AnimationUtils;
@@ -45,6 +46,8 @@
 import com.android.settingslib.animation.AppearAnimationUtils;
 import com.android.settingslib.animation.DisappearAnimationUtils;
 
+import com.google.android.setupdesign.GlifLayout;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -90,8 +93,7 @@
         private boolean mDisappearing = false;
         private CountDownTimer mCountdownTimer;
 
-        private TextView mHeaderTextView;
-        private TextView mDetailsTextView;
+        private GlifLayout mGlifLayout;
 
         // caller-supplied text for various prompts
         private CharSequence mHeaderText;
@@ -117,9 +119,14 @@
                             : R.layout.confirm_lock_pattern,
                     container,
                     false);
-            mHeaderTextView = (TextView) view.findViewById(R.id.headerText);
+            mGlifLayout = view.findViewById(R.id.setup_wizard_layout);
+            switch(getContext().getDisplay().getRotation()) {
+                case Surface.ROTATION_90:
+                case Surface.ROTATION_270:
+                    mGlifLayout.setLandscapeHeaderAreaVisible(false /* visible */);
+                    break;
+            }
             mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
-            mDetailsTextView = (TextView) view.findViewById(R.id.sud_layout_description);
             mErrorTextView = (TextView) view.findViewById(R.id.errorText);
 
             mIsManagedProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
@@ -177,7 +184,7 @@
                             return (float)(numRows - row) / numRows;
                         }
                     });
-            setAccessibilityTitle(mHeaderTextView.getText());
+            setAccessibilityTitle(mGlifLayout.getHeaderText());
 
             mCredentialCheckResultTracker = (CredentialCheckResultTracker) getFragmentManager()
                     .findFragmentByTag(FRAGMENT_TAG_CHECK_LOCK_RESULT);
@@ -242,13 +249,13 @@
         @Override
         public void prepareEnterAnimation() {
             super.prepareEnterAnimation();
-            mHeaderTextView.setAlpha(0f);
+            mGlifLayout.getHeaderTextView().setAlpha(0f);
             mCancelButton.setAlpha(0f);
             if (mForgotButton != null) {
                 mForgotButton.setAlpha(0f);
             }
             mLockPatternView.setAlpha(0f);
-            mDetailsTextView.setAlpha(0f);
+            mGlifLayout.getDescriptionTextView().setAlpha(0f);
         }
 
         private int getDefaultDetails() {
@@ -269,8 +276,9 @@
 
         private Object[][] getActiveViews() {
             ArrayList<ArrayList<Object>> result = new ArrayList<>();
-            result.add(new ArrayList<>(Collections.singletonList(mHeaderTextView)));
-            result.add(new ArrayList<>(Collections.singletonList(mDetailsTextView)));
+            result.add(new ArrayList<>(Collections.singletonList(mGlifLayout.getHeaderTextView())));
+            result.add(new ArrayList<>(
+                    Collections.singletonList(mGlifLayout.getDescriptionTextView())));
             if (mCancelButton.getVisibility() == View.VISIBLE) {
                 result.add(new ArrayList<>(Collections.singletonList(mCancelButton)));
             }
@@ -306,14 +314,14 @@
             switch (stage) {
                 case NeedToUnlock:
                     if (mHeaderText != null) {
-                        mHeaderTextView.setText(mHeaderText);
+                        mGlifLayout.setHeaderText(mHeaderText);
                     } else {
-                        mHeaderTextView.setText(getDefaultHeader());
+                        mGlifLayout.setHeaderText(getDefaultHeader());
                     }
                     if (mDetailsText != null) {
-                        mDetailsTextView.setText(mDetailsText);
+                        mGlifLayout.setDescriptionText(mDetailsText);
                     } else {
-                        mDetailsTextView.setText(getDefaultDetails());
+                        mGlifLayout.setDescriptionText(getDefaultDetails());
                     }
                     mErrorTextView.setText("");
                     updateErrorMessage(
@@ -341,7 +349,7 @@
 
             // Always announce the header for accessibility. This is a no-op
             // when accessibility is disabled.
-            mHeaderTextView.announceForAccessibility(mHeaderTextView.getText());
+            mGlifLayout.getHeaderTextView().announceForAccessibility(mGlifLayout.getHeaderText());
         }
 
         private int getDefaultHeader() {
diff --git a/src/com/android/settings/security/CredentialManagementAppAdapter.java b/src/com/android/settings/security/CredentialManagementAppAdapter.java
index e56fc63..6b37f7f 100644
--- a/src/com/android/settings/security/CredentialManagementAppAdapter.java
+++ b/src/com/android/settings/security/CredentialManagementAppAdapter.java
@@ -25,6 +25,7 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageView;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import androidx.annotation.NonNull;
@@ -61,6 +62,7 @@
 
     private final boolean mIncludeHeader;
     private final boolean mIncludeExpander;
+    private final boolean mIsLayoutRtl;
 
     /**
      * View holder for the header in the request manage credentials screen.
@@ -113,6 +115,15 @@
             mChildRecyclerView = view.findViewById(R.id.uris);
             mExpandedApps = new ArrayList<>();
 
+            if (mIsLayoutRtl) {
+                RelativeLayout appDetails = view.findViewById(R.id.app_details);
+                RelativeLayout.LayoutParams params =
+                        (RelativeLayout.LayoutParams) appDetails.getLayoutParams();
+                params.addRule(RelativeLayout.LEFT_OF, R.id.app_icon);
+                params.addRule(RelativeLayout.RIGHT_OF, R.id.expand);
+                view.setLayoutParams(params);
+            }
+
             mExpanderIconView.setOnClickListener(view1 -> {
                 final String appName = mSortedAppNames.get(getBindingAdapterPosition());
                 if (mExpandedApps.contains(appName)) {
@@ -195,6 +206,8 @@
         mViewPool = new RecyclerView.RecycledViewPool();
         mIncludeHeader = includeHeader;
         mIncludeExpander = includeExpander;
+        mIsLayoutRtl = context.getResources().getConfiguration().getLayoutDirection()
+                == View.LAYOUT_DIRECTION_RTL;
     }
 
     /**
diff --git a/src/com/android/settings/sim/SimSelectNotification.java b/src/com/android/settings/sim/SimSelectNotification.java
index 3051b92..7dab4c0 100644
--- a/src/com/android/settings/sim/SimSelectNotification.java
+++ b/src/com/android/settings/sim/SimSelectNotification.java
@@ -104,8 +104,8 @@
             subId = SubscriptionManager.getDefaultSmsSubscriptionId();
         }
 
-        SubscriptionManager subscriptionManager = (context.getSystemService(
-                SubscriptionManager.class));
+        SubscriptionManager subscriptionManager = ((SubscriptionManager) context.getSystemService(
+                Context.TELEPHONY_SUBSCRIPTION_SERVICE));
         if (!subscriptionManager.isActiveSubscriptionId(subId)) {
             Log.w(TAG, "onEnableMmsDataRequest invalid sub ID " + subId);
             return;
@@ -130,8 +130,8 @@
             return;
         }
 
-        TelephonyManager tm = (context.getSystemService(
-                TelephonyManager.class)).createForSubscriptionId(subId);
+        TelephonyManager tm = ((TelephonyManager) context.getSystemService(
+                Context.TELEPHONY_SERVICE)).createForSubscriptionId(subId);
 
         if (tm.isDataEnabledForApn(TYPE_MMS)) {
             Log.w(TAG, "onEnableMmsDataRequest MMS data already enabled on sub ID " + subId);
@@ -230,14 +230,14 @@
                 PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
         builder.setContentIntent(resultPendingIntent);
         NotificationManager notificationManager =
-                context.getSystemService(NotificationManager.class);
+                (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
         notificationManager.createNotificationChannel(notificationChannel);
         notificationManager.notify(SIM_SELECT_NOTIFICATION_ID, builder.build());
     }
 
     public static void cancelSimSelectNotification(Context context) {
         NotificationManager notificationManager =
-                context.getSystemService(NotificationManager.class);
+                (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
         notificationManager.cancel(SIM_SELECT_NOTIFICATION_ID);
     }
 
@@ -270,14 +270,14 @@
 
         // Notify the notification.
         NotificationManager notificationManager =
-                context.getSystemService(NotificationManager.class);
+                (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
         notificationManager.createNotificationChannel(notificationChannel);
         notificationManager.notify(ENABLE_MMS_NOTIFICATION_ID, builder.build());
     }
 
     private void cancelEnableMmsNotification(Context context) {
         NotificationManager notificationManager =
-                context.getSystemService(NotificationManager.class);
+                (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
         notificationManager.cancel(ENABLE_MMS_NOTIFICATION_ID);
     }
 
diff --git a/src/com/android/settings/vpn2/AppManagementFragment.java b/src/com/android/settings/vpn2/AppManagementFragment.java
index 4543f3f..0543fee 100644
--- a/src/com/android/settings/vpn2/AppManagementFragment.java
+++ b/src/com/android/settings/vpn2/AppManagementFragment.java
@@ -319,7 +319,7 @@
     @VisibleForTesting
     static boolean appHasVpnPermission(Context context, @NonNull ApplicationInfo application) {
         final AppOpsManager service =
-                context.getSystemService(AppOpsManager.class);
+                (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
         final List<AppOpsManager.PackageOps> ops = service.getOpsForPackage(application.uid,
                 application.packageName, new int[]{OP_ACTIVATE_VPN, OP_ACTIVATE_PLATFORM_VPN});
         return !ArrayUtils.isEmpty(ops);
diff --git a/src/com/android/settings/vpn2/VpnSettings.java b/src/com/android/settings/vpn2/VpnSettings.java
index 2620426..cdc6537 100644
--- a/src/com/android/settings/vpn2/VpnSettings.java
+++ b/src/com/android/settings/vpn2/VpnSettings.java
@@ -116,9 +116,9 @@
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
 
-        mUserManager = getSystemService(UserManager.class);
-        mConnectivityManager = getSystemService(ConnectivityManager.class);
-        mVpnManager = getSystemService(VpnManager.class);
+        mUserManager = (UserManager) getSystemService(Context.USER_SERVICE);
+        mConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
+        mVpnManager = (VpnManager) getSystemService(Context.VPN_MANAGEMENT_SERVICE);
 
         mUnavailable = isUiRestricted();
         setHasOptionsMenu(!mUnavailable);
@@ -511,7 +511,7 @@
         }
 
         // Fetch VPN-enabled apps from AppOps.
-        AppOpsManager aom = context.getSystemService(AppOpsManager.class);
+        AppOpsManager aom = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
         List<AppOpsManager.PackageOps> apps =
                 aom.getPackagesForOps(new int[] {OP_ACTIVATE_VPN, OP_ACTIVATE_PLATFORM_VPN});
         if (apps != null) {
diff --git a/src/com/android/settings/wifi/ChangeWifiStateDetails.java b/src/com/android/settings/wifi/ChangeWifiStateDetails.java
index 4e3e62e..9841615 100644
--- a/src/com/android/settings/wifi/ChangeWifiStateDetails.java
+++ b/src/com/android/settings/wifi/ChangeWifiStateDetails.java
@@ -49,7 +49,7 @@
         super.onCreate(savedInstanceState);
         final Context context = getActivity();
         mAppBridge = new AppStateChangeWifiStateBridge(context, mState, null);
-        mAppOpsManager = context.getSystemService(AppOpsManager.class);
+        mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
 
         // find preferences
         addPreferencesFromResource(R.xml.change_wifi_state_details);
diff --git a/src/com/android/settings/wifi/ConfigureWifiSettings.java b/src/com/android/settings/wifi/ConfigureWifiSettings.java
index 484d3cc..ff313c7 100644
--- a/src/com/android/settings/wifi/ConfigureWifiSettings.java
+++ b/src/com/android/settings/wifi/ConfigureWifiSettings.java
@@ -69,7 +69,7 @@
 
     @Override
     protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
-        final WifiManager wifiManager = getSystemService(WifiManager.class);
+        final WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         controllers.add(new WifiP2pPreferenceController(context, getSettingsLifecycle(),
                 wifiManager));
diff --git a/src/com/android/settings/wifi/UseOpenWifiPreferenceController.java b/src/com/android/settings/wifi/UseOpenWifiPreferenceController.java
index 5fa4dfb..44114e5 100644
--- a/src/com/android/settings/wifi/UseOpenWifiPreferenceController.java
+++ b/src/com/android/settings/wifi/UseOpenWifiPreferenceController.java
@@ -51,7 +51,7 @@
         super(context, KEY_USE_OPEN_WIFI_AUTOMATICALLY);
         mContentResolver = context.getContentResolver();
         mNetworkScoreManager =
-                context.getSystemService(NetworkScoreManager.class);
+                (NetworkScoreManager) context.getSystemService(Context.NETWORK_SCORE_SERVICE);
         mSettingObserver = new SettingObserver();
         updateEnableUseWifiComponentName();
         checkForFeatureSupportedScorers();
diff --git a/src/com/android/settings/wifi/WifiAPITest.java b/src/com/android/settings/wifi/WifiAPITest.java
index 498539d..15465ed 100644
--- a/src/com/android/settings/wifi/WifiAPITest.java
+++ b/src/com/android/settings/wifi/WifiAPITest.java
@@ -64,7 +64,7 @@
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        mWifiManager = getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
     }
 
     @Override
diff --git a/src/com/android/settings/wifi/WifiConfigInfo.java b/src/com/android/settings/wifi/WifiConfigInfo.java
index 18ac2e5..0de3063 100644
--- a/src/com/android/settings/wifi/WifiConfigInfo.java
+++ b/src/com/android/settings/wifi/WifiConfigInfo.java
@@ -38,7 +38,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        mWifiManager = getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
         setContentView(R.layout.wifi_config_info);
         mConfigList = (TextView) findViewById(R.id.config_list);
     }
diff --git a/src/com/android/settings/wifi/WifiEnabler.java b/src/com/android/settings/wifi/WifiEnabler.java
index ba1ee3c..dc5be42 100644
--- a/src/com/android/settings/wifi/WifiEnabler.java
+++ b/src/com/android/settings/wifi/WifiEnabler.java
@@ -75,7 +75,7 @@
     public WifiEnabler(Context context, SwitchWidgetController switchWidget,
         MetricsFeatureProvider metricsFeatureProvider) {
         this(context, switchWidget, metricsFeatureProvider,
-            context.getSystemService(ConnectivityManager.class));
+            (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE));
     }
 
     @VisibleForTesting
@@ -86,7 +86,7 @@
         mSwitchWidget = switchWidget;
         mSwitchWidget.setListener(this);
         mMetricsFeatureProvider = metricsFeatureProvider;
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mConnectivityManager = connectivityManager;
 
         mIntentFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
diff --git a/src/com/android/settings/wifi/WifiNoInternetDialog.java b/src/com/android/settings/wifi/WifiNoInternetDialog.java
index 3cd8a8a..57e42f8 100644
--- a/src/com/android/settings/wifi/WifiNoInternetDialog.java
+++ b/src/com/android/settings/wifi/WifiNoInternetDialog.java
@@ -107,7 +107,7 @@
             }
         };
 
-        mCM = getSystemService(ConnectivityManager.class);
+        mCM = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
         mCM.registerNetworkCallback(request, mNetworkCallback);
 
         final NetworkInfo ni = mCM.getNetworkInfo(mNetwork);
diff --git a/src/com/android/settings/wifi/WifiStatusTest.java b/src/com/android/settings/wifi/WifiStatusTest.java
index 06242e3..249cd71 100644
--- a/src/com/android/settings/wifi/WifiStatusTest.java
+++ b/src/com/android/settings/wifi/WifiStatusTest.java
@@ -116,7 +116,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        mWifiManager = getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
 
         mWifiStateFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION);
         mWifiStateFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
diff --git a/src/com/android/settings/wifi/WifiUtils.java b/src/com/android/settings/wifi/WifiUtils.java
index e576851..d05260a 100644
--- a/src/com/android/settings/wifi/WifiUtils.java
+++ b/src/com/android/settings/wifi/WifiUtils.java
@@ -83,7 +83,7 @@
         final DevicePolicyManager dpm =
                 (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
         final PackageManager pm = context.getPackageManager();
-        final UserManager um = context.getSystemService(UserManager.class);
+        final UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
 
         // Check if device has DPM capability. If it has and dpm is still null, then we
         // treat this case with suspicion and bail out.
diff --git a/src/com/android/settings/wifi/WifiWakeupPreferenceController.java b/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
index 3aa62b9..e9fd350 100644
--- a/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
+++ b/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
@@ -73,7 +73,7 @@
 
     public WifiWakeupPreferenceController(Context context) {
         super(context, KEY_ENABLE_WIFI_WAKEUP);
-        mLocationManager = context.getSystemService(LocationManager.class);
+        mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE);
         mWifiManager = context.getSystemService(WifiManager.class);
     }
 
diff --git a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
index 3cfe514..de64b91 100644
--- a/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
+++ b/src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java
@@ -128,8 +128,8 @@
 
             boolean isWfcModeEditable = true;
             boolean isWfcRoamingModeEditable = false;
-            final CarrierConfigManager configManager =
-                    activity.getSystemService(CarrierConfigManager.class);
+            final CarrierConfigManager configManager = (CarrierConfigManager)
+                    activity.getSystemService(Context.CARRIER_CONFIG_SERVICE);
             if (configManager != null) {
                 PersistableBundle b =
                         configManager.getConfigForSubId(WifiCallingSettingsForSub.this.mSubId);
@@ -343,8 +343,8 @@
             return;
         }
 
-        final CarrierConfigManager configManager =
-                getSystemService(CarrierConfigManager.class);
+        final CarrierConfigManager configManager = (CarrierConfigManager)
+                getSystemService(Context.CARRIER_CONFIG_SERVICE);
         boolean isWifiOnlySupported = true;
 
         if (configManager != null) {
diff --git a/src/com/android/settings/wifi/details2/AddDevicePreferenceController2.java b/src/com/android/settings/wifi/details2/AddDevicePreferenceController2.java
index 9ab64c7..8f9741a 100644
--- a/src/com/android/settings/wifi/details2/AddDevicePreferenceController2.java
+++ b/src/com/android/settings/wifi/details2/AddDevicePreferenceController2.java
@@ -42,7 +42,7 @@
     public AddDevicePreferenceController2(Context context) {
         super(context, KEY_ADD_DEVICE);
 
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
     }
 
     public void setWifiEntry(WifiEntry wifiEntry) {
diff --git a/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java b/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
index 488ffcb..104761f 100644
--- a/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
+++ b/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
@@ -143,8 +143,8 @@
                     if (admin == null) {
                         final DevicePolicyManager dpm = (DevicePolicyManager)
                                 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
-                        final UserManager um =
-                                getContext().getSystemService(UserManager.class);
+                        final UserManager um = (UserManager)
+                                getContext().getSystemService(Context.USER_SERVICE);
                         final int profileOwnerUserId = Utils.getManagedProfileId(
                                 um, UserHandle.myUserId());
                         if (profileOwnerUserId != UserHandle.USER_NULL) {
diff --git a/src/com/android/settings/wifi/details2/WifiPrivacyPreferenceController2.java b/src/com/android/settings/wifi/details2/WifiPrivacyPreferenceController2.java
index 72a2361..c484922 100644
--- a/src/com/android/settings/wifi/details2/WifiPrivacyPreferenceController2.java
+++ b/src/com/android/settings/wifi/details2/WifiPrivacyPreferenceController2.java
@@ -45,7 +45,7 @@
     public WifiPrivacyPreferenceController2(Context context) {
         super(context, KEY_WIFI_PRIVACY);
 
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
     }
 
     public void setWifiEntry(WifiEntry wifiEntry) {
diff --git a/src/com/android/settings/wifi/dpp/WifiDppUtils.java b/src/com/android/settings/wifi/dpp/WifiDppUtils.java
index 081e160..abf5bec 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppUtils.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppUtils.java
@@ -373,8 +373,8 @@
      *                        device security or if lock screen is unlocked
      */
     public static void showLockScreen(Context context, Runnable successRunnable) {
-        final KeyguardManager keyguardManager = context.getSystemService(
-                KeyguardManager.class);
+        final KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(
+                Context.KEYGUARD_SERVICE);
 
         if (keyguardManager.isKeyguardSecure()) {
             final BiometricPrompt.AuthenticationCallback authenticationCallback =
diff --git a/src/com/android/settings/wifi/p2p/WifiP2pPreferenceController.java b/src/com/android/settings/wifi/p2p/WifiP2pPreferenceController.java
index 8696bef..9604410 100644
--- a/src/com/android/settings/wifi/p2p/WifiP2pPreferenceController.java
+++ b/src/com/android/settings/wifi/p2p/WifiP2pPreferenceController.java
@@ -71,7 +71,7 @@
         super(context);
         mWifiManager = wifiManager;
         lifecycle.addObserver(this);
-        mLocationManager = context.getSystemService(LocationManager.class);
+        mLocationManager = (LocationManager) context.getSystemService(Service.LOCATION_SERVICE);
     }
 
     @Override
diff --git a/src/com/android/settings/wifi/p2p/WifiP2pSettings.java b/src/com/android/settings/wifi/p2p/WifiP2pSettings.java
index 0aac0bb..9578c80 100644
--- a/src/com/android/settings/wifi/p2p/WifiP2pSettings.java
+++ b/src/com/android/settings/wifi/p2p/WifiP2pSettings.java
@@ -200,7 +200,7 @@
     public void onActivityCreated(Bundle savedInstanceState) {
         final Activity activity = getActivity();
         if (mWifiP2pManager == null) {
-            mWifiP2pManager = getSystemService(WifiP2pManager.class);
+            mWifiP2pManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
         }
 
         if (mWifiP2pManager != null) {
diff --git a/src/com/android/settings/wifi/qrcode/QrCamera.java b/src/com/android/settings/wifi/qrcode/QrCamera.java
index 274655d..3865eb1 100644
--- a/src/com/android/settings/wifi/qrcode/QrCamera.java
+++ b/src/com/android/settings/wifi/qrcode/QrCamera.java
@@ -202,7 +202,7 @@
         }
 
         final WindowManager winManager =
-                mContext.get().getSystemService(WindowManager.class);
+                (WindowManager) mContext.get().getSystemService(Context.WINDOW_SERVICE);
         final int rotation = winManager.getDefaultDisplay().getRotation();
         int degrees = 0;
         switch (rotation) {
diff --git a/src/com/android/settings/wifi/slice/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
index 898de56..e4a571d 100644
--- a/src/com/android/settings/wifi/slice/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -164,7 +164,7 @@
         return rowBuilder;
     }
 
-    private IconCompat getWifiSliceItemLevelIcon(WifiSliceItem wifiSliceItem) {
+    protected IconCompat getWifiSliceItemLevelIcon(WifiSliceItem wifiSliceItem) {
         final @ColorInt int tint;
         if (wifiSliceItem.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED) {
             tint = Utils.getColorAccentDefaultColor(mContext);
diff --git a/src/com/android/settings/wifi/tether/TetherService.java b/src/com/android/settings/wifi/tether/TetherService.java
index a3321bb..5902719 100644
--- a/src/com/android/settings/wifi/tether/TetherService.java
+++ b/src/com/android/settings/wifi/tether/TetherService.java
@@ -255,7 +255,7 @@
     }
 
     private void disableTethering(final int tetheringType) {
-        final TetheringManager tm = getSystemService(TetheringManager.class);
+        final TetheringManager tm = (TetheringManager) getSystemService(Context.TETHERING_SERVICE);
         tm.stopTethering(tetheringType);
     }
 
diff --git a/src/com/android/settings/wifi/tether/WifiTetherPreferenceController.java b/src/com/android/settings/wifi/tether/WifiTetherPreferenceController.java
index 1fa41b2..70b6a45 100644
--- a/src/com/android/settings/wifi/tether/WifiTetherPreferenceController.java
+++ b/src/com/android/settings/wifi/tether/WifiTetherPreferenceController.java
@@ -63,7 +63,7 @@
             boolean initSoftApManager) {
         super(context);
         mTetheringManager = context.getSystemService(TetheringManager.class);
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mWifiRegexs = mTetheringManager.getTetherableWifiRegexs();
         mLifecycle = lifecycle;
         if (lifecycle != null) {
diff --git a/src/com/android/settings/wifi/tether/WifiTetherSettings.java b/src/com/android/settings/wifi/tether/WifiTetherSettings.java
index 41b439b..e342550 100644
--- a/src/com/android/settings/wifi/tether/WifiTetherSettings.java
+++ b/src/com/android/settings/wifi/tether/WifiTetherSettings.java
@@ -110,7 +110,7 @@
     @Override
     public void onAttach(Context context) {
         super.onAttach(context);
-        mWifiManager = context.getSystemService(WifiManager.class);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mTetherChangeReceiver = new TetherChangeReceiver();
 
         mSSIDPreferenceController = use(WifiTetherSSIDPreferenceController.class);
diff --git a/src/com/android/settings/wifi/tether/WifiTetherSwitchBarController.java b/src/com/android/settings/wifi/tether/WifiTetherSwitchBarController.java
index 379bf6d..3d8cd3e 100644
--- a/src/com/android/settings/wifi/tether/WifiTetherSwitchBarController.java
+++ b/src/com/android/settings/wifi/tether/WifiTetherSwitchBarController.java
@@ -73,8 +73,8 @@
         mSwitch = mSwitchBar.getSwitch();
         mDataSaverBackend = new DataSaverBackend(context);
         mConnectivityManager =
-                context.getSystemService(ConnectivityManager.class);
-        mWifiManager = context.getSystemService(WifiManager.class);
+                (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
+        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mSwitchBar.setChecked(mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED);
         updateWifiSwitch();
     }
diff --git a/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java b/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
index d21aa04..784b3bb 100644
--- a/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
+++ b/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
@@ -92,4 +92,23 @@
                 .containsExactly("US", "GB");
         assertThat(timeZoneData.lookupCountryCodesForZoneId("Unknown/Secret_City2")).isEmpty();
     }
+
+    @Test
+    public void lookupCountryCodesForNonCanonicalZoneId_returnsCurrentZone() {
+        TimeZoneData timeZoneData = new TimeZoneData(mCountryZonesFinder);
+
+        CountryTimeZones greenland = mock(CountryTimeZones.class);
+        when(greenland.getCountryIso()).thenReturn("gl");
+        when(greenland.getTimeZoneMappings()).thenReturn(Arrays.asList(
+                TimeZoneMapping.createForTests(
+                        "America/Nuuk",
+                        true /* showInPicker */,
+                        null /* notUsedAfter */,
+                        Arrays.asList("America/Godthab"))));
+        when(mCountryZonesFinder.lookupCountryTimeZonesForZoneId("America/Godthab"))
+                .thenReturn(Arrays.asList(greenland));
+
+        assertThat(timeZoneData.lookupCountryCodesForZoneId("America/Godthab"))
+                .containsExactly("GL");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceControllerTest.java
index 60eab12..997c35e 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/imei/ImeiInfoPreferenceControllerTest.java
@@ -181,8 +181,8 @@
 
         mController.copy();
 
-        final ClipboardManager clipboard = mContext.getSystemService(
-                ClipboardManager.class);
+        final ClipboardManager clipboard = (ClipboardManager) mContext.getSystemService(
+                CLIPBOARD_SERVICE);
         final CharSequence data = clipboard.getPrimaryClip().getItemAt(0).getText();
         assertThat(data.toString()).isEqualTo(meid);
     }
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceControllerTest.java
index d1371a2..384ddc3 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/storage/AutomaticStorageManagementSwitchPreferenceControllerTest.java
@@ -22,12 +22,14 @@
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.res.Resources;
 import android.os.SystemProperties;
 import android.provider.Settings;
 
@@ -38,6 +40,7 @@
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.os.RoSystemProperties;
+import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.deletionhelper.ActivationWarningFragment;
 import com.android.settings.overlay.FeatureFactory;
@@ -67,13 +70,16 @@
     private FragmentManager mFragmentManager;
 
     private Context mContext;
+    private Resources mResources;
     private AutomaticStorageManagementSwitchPreferenceController mController;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mContext = RuntimeEnvironment.application.getApplicationContext();
+        mContext = spy(RuntimeEnvironment.application.getApplicationContext());
         FeatureFactory.getFactory(mContext);
+        mResources = spy(mContext.getResources());
+        when(mContext.getResources()).thenReturn(mResources);
 
         mController = new AutomaticStorageManagementSwitchPreferenceController(mContext, "testkey");
         mController.setFragmentManager(mFragmentManager);
@@ -81,14 +87,27 @@
     }
 
     @Test
-    public void isAvailable_shouldReturnTrue_forHighRamDevice() {
+    public void getAvailabilityStatus_configFalse_shouldUnsupportedOnDevice() {
+        when(mResources.getBoolean(R.bool.config_show_smart_storage_toggle)).thenReturn(false);
+
+        assertThat(mController.isAvailable()).isFalse();
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(
+                BasePreferenceController.UNSUPPORTED_ON_DEVICE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_forHighRamDevice_shouldAvailable() {
+        when(mResources.getBoolean(R.bool.config_show_smart_storage_toggle)).thenReturn(true);
+
         assertThat(mController.isAvailable()).isTrue();
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.AVAILABLE);
     }
 
     @Test
-    public void isAvailable_shouldAlwaysReturnFalse_forLowRamDevice() {
+    public void getAvailabilityStatus_forLowRamDevice_shouldUnsupportedOnDevice() {
+        when(mResources.getBoolean(R.bool.config_show_smart_storage_toggle)).thenReturn(true);
+
         ReflectionHelpers.setStaticField(RoSystemProperties.class, "CONFIG_LOW_RAM", true);
         assertThat(mController.isAvailable()).isFalse();
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
index 6f9c451..b7bf7f5 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
@@ -104,6 +104,8 @@
     }
 
     private PreferenceScreen getPreferenceScreen() {
+        final StorageItemPreference publicStorage = spy(new StorageItemPreference(mContext));
+        publicStorage.setIcon(R.drawable.ic_folder_vd_theme_24);
         final StorageItemPreference images = spy(new StorageItemPreference(mContext));
         images.setIcon(R.drawable.ic_photo_library);
         final StorageItemPreference videos = spy(new StorageItemPreference(mContext));
@@ -122,6 +124,8 @@
         trash.setIcon(R.drawable.ic_trash_can);
 
         final PreferenceScreen screen = mock(PreferenceScreen.class);
+        when(screen.findPreference(eq(StorageItemPreferenceController.PUBLIC_STORAGE_KEY)))
+                .thenReturn(publicStorage);
         when(screen.findPreference(eq(StorageItemPreferenceController.IMAGES_KEY)))
                 .thenReturn(images);
         when(screen.findPreference(eq(StorageItemPreferenceController.VIDEOS_KEY)))
@@ -149,6 +153,24 @@
     }
 
     @Test
+    public void launchPublicStorageIntent_nonNullBrowseIntent_settingsIntent() {
+        final String fakeBrowseAction = "FAKE_BROWSE_ACTION";
+        final Intent fakeBrowseIntent = new Intent(fakeBrowseAction);
+        // mContext is not the activity, add FLAG_ACTIVITY_NEW_TASK to avoid AndroidRuntimeException
+        // during this test.
+        fakeBrowseIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        when(mVolume.buildBrowseIntent()).thenReturn(fakeBrowseIntent);
+        mPreference.setKey(StorageItemPreferenceController.PUBLIC_STORAGE_KEY);
+        mController.handlePreferenceTreeClick(mPreference);
+
+        final ArgumentCaptor<Intent> argumentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mContext).startActivity(argumentCaptor.capture());
+
+        final Intent intent = argumentCaptor.getValue();
+        assertThat(intent.getAction()).isEqualTo(fakeBrowseAction);
+    }
+
+    @Test
     public void launchImagesIntent_resolveActionViewNull_settingsIntent() {
         mPreference.setKey(StorageItemPreferenceController.IMAGES_KEY);
         mController.handlePreferenceTreeClick(mPreference);
@@ -191,6 +213,7 @@
 
         mController.setVolume(null);
 
+        assertThat(mController.mPublicStoragePreference.isVisible()).isFalse();
         assertThat(mController.mImagesPreference.isVisible()).isFalse();
         assertThat(mController.mVideosPreference.isVisible()).isFalse();
         assertThat(mController.mAudiosPreference.isVisible()).isFalse();
@@ -347,6 +370,7 @@
 
         mController.setUserId(new UserHandle(10));
 
+        verify(mController.mPublicStoragePreference, times(2)).setIcon(nullable(Drawable.class));
         verify(mController.mImagesPreference, times(2)).setIcon(nullable(Drawable.class));
         verify(mController.mVideosPreference, times(2)).setIcon(nullable(Drawable.class));
         verify(mController.mAudiosPreference, times(2)).setIcon(nullable(Drawable.class));
@@ -418,4 +442,26 @@
 
         assertThat(mController.mDocumentsAndOtherPreference.isVisible()).isTrue();
     }
+
+    @Test
+    public void setVolume_publicStorage_showFilePreference() {
+        // This will hide it initially.
+        mController.displayPreference(mPreferenceScreen);
+        when(mVolume.getType()).thenReturn(VolumeInfo.TYPE_PUBLIC);
+        when(mVolume.getState()).thenReturn(VolumeInfo.STATE_MOUNTED);
+        when(mVolume.isMountedReadable()).thenReturn(true);
+
+        // And we bring it back.
+        mController.setVolume(mVolume);
+
+        assertThat(mController.mPublicStoragePreference.isVisible()).isTrue();
+        assertThat(mController.mImagesPreference.isVisible()).isFalse();
+        assertThat(mController.mVideosPreference.isVisible()).isFalse();
+        assertThat(mController.mAudiosPreference.isVisible()).isFalse();
+        assertThat(mController.mAppsPreference.isVisible()).isFalse();
+        assertThat(mController.mGamesPreference.isVisible()).isFalse();
+        assertThat(mController.mDocumentsAndOtherPreference.isVisible()).isFalse();
+        assertThat(mController.mSystemPreference.isVisible()).isFalse();
+        assertThat(mController.mTrashPreference.isVisible()).isFalse();
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/SmartBatteryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/SmartBatteryPreferenceControllerTest.java
index a1f3bda..b132a97 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/SmartBatteryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/SmartBatteryPreferenceControllerTest.java
@@ -21,9 +21,10 @@
 import static org.mockito.Mockito.doReturn;
 
 import android.content.ContentResolver;
-import android.content.Context;
 import android.provider.Settings;
 
+import androidx.preference.SwitchPreference;
+
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settingslib.widget.MainSwitchPreference;
@@ -42,50 +43,48 @@
     private static final int OFF = 0;
 
     private SmartBatteryPreferenceController mController;
+    private SwitchPreference mPreference;
     private ContentResolver mContentResolver;
     private FakeFeatureFactory mFeatureFactory;
-    private Context mContext;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
 
-        mContext = RuntimeEnvironment.application;
         mFeatureFactory = FakeFeatureFactory.setupForTest();
         mContentResolver = RuntimeEnvironment.application.getContentResolver();
         mController = new SmartBatteryPreferenceController(RuntimeEnvironment.application);
+        mPreference = new SwitchPreference(RuntimeEnvironment.application);
     }
 
     @Test
     public void testUpdateState_smartBatteryOn_preferenceChecked() {
         putSmartBatteryValue(ON);
-        final MainSwitchPreference preference = new MainSwitchPreference(mContext);
 
-        mController.updateState(preference);
+        mController.updateState(mPreference);
 
-        assertThat(preference.isChecked()).isTrue();
+        assertThat(mPreference.isChecked()).isTrue();
     }
 
     @Test
     public void testUpdateState_smartBatteryOff_preferenceUnchecked() {
         putSmartBatteryValue(OFF);
-        final MainSwitchPreference preference = new MainSwitchPreference(mContext);
 
-        mController.updateState(preference);
+        mController.updateState(mPreference);
 
-        assertThat(preference.isChecked()).isFalse();
+        assertThat(mPreference.isChecked()).isFalse();
     }
 
     @Test
     public void testUpdateState_checkPreference_smartBatteryOn() {
-        mController.onSwitchChanged(null, true);
+        mController.onPreferenceChange(mPreference, true);
 
         assertThat(getSmartBatteryValue()).isEqualTo(ON);
     }
 
     @Test
     public void testUpdateState_unCheckPreference_smartBatteryOff() {
-        mController.onSwitchChanged(null, false);
+        mController.onPreferenceChange(mPreference, false);
 
         assertThat(getSmartBatteryValue()).isEqualTo(OFF);
     }
diff --git a/tests/robotests/src/com/android/settings/network/BluetoothTetherPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/BluetoothTetherPreferenceControllerTest.java
index 53dd959..d3a3129 100644
--- a/tests/robotests/src/com/android/settings/network/BluetoothTetherPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/BluetoothTetherPreferenceControllerTest.java
@@ -57,7 +57,7 @@
 
         mContext = spy(ApplicationProvider.getApplicationContext());
         mSwitchPreference = spy(SwitchPreference.class);
-        when(mContext.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableBluetoothRegexs()).thenReturn(new String[] {""});
         mController = new BluetoothTetherPreferenceController(mContext, "BLUETOOTH");
         mController.setTetherEnabler(mTetherEnabler);
diff --git a/tests/robotests/src/com/android/settings/network/EthernetTetherPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/EthernetTetherPreferenceControllerTest.java
index de642f6..8a81908 100644
--- a/tests/robotests/src/com/android/settings/network/EthernetTetherPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/EthernetTetherPreferenceControllerTest.java
@@ -62,9 +62,9 @@
     public void setUp() {
         mContext = spy(ApplicationProvider.getApplicationContext());
         mPreference = spy(SwitchPreference.class);
-        when(mContext.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableIfaces()).thenReturn(new String[]{ETHERNET_REGEX});
-        when(mContext.getSystemService(EthernetManager.class)).thenReturn(mEthernetManager);
+        when(mContext.getSystemService(Context.ETHERNET_SERVICE)).thenReturn(mEthernetManager);
         mController = new EthernetTetherPreferenceController(mContext, "ethernet");
         mController.setTetherEnabler(mTetherEnabler);
         ReflectionHelpers.setField(mController, "mEthernetRegex", ETHERNET_REGEX);
diff --git a/tests/robotests/src/com/android/settings/network/NetworkProviderSettingsTest.java b/tests/robotests/src/com/android/settings/network/NetworkProviderSettingsTest.java
index d7c0ffe..c1377ff 100644
--- a/tests/robotests/src/com/android/settings/network/NetworkProviderSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/network/NetworkProviderSettingsTest.java
@@ -44,6 +44,7 @@
 import android.os.PowerManager;
 import android.os.UserManager;
 import android.provider.Settings;
+import android.util.FeatureFlagUtils;
 import android.view.ContextMenu;
 import android.view.MenuItem;
 import android.view.View;
@@ -131,6 +132,7 @@
         mNetworkProviderSettings.mResetInternetPreference = mResetInternetPreference;
         mNetworkProviderSettings.mAirplaneModeMsgPreference = mAirplaneModeMsgPreference;
         mNetworkProviderSettings.mAirplaneModeEnabler = mAirplaneModeEnabler;
+        FeatureFlagUtils.setEnabled(mContext, FeatureFlagUtils.SETTINGS_PROVIDER_MODEL, false);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/network/NetworkResetRestrictionCheckerTest.java b/tests/robotests/src/com/android/settings/network/NetworkResetRestrictionCheckerTest.java
index 293b649..8996c1d 100644
--- a/tests/robotests/src/com/android/settings/network/NetworkResetRestrictionCheckerTest.java
+++ b/tests/robotests/src/com/android/settings/network/NetworkResetRestrictionCheckerTest.java
@@ -45,14 +45,14 @@
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager);
+        when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
         mRestrictionChecker = spy(new NetworkResetRestrictionChecker(mContext));
     }
 
     @Test
     public void testHasRestriction_notAdmin_shouldReturnTrue() {
         final Context context = mock(Context.class);
-        when(context.getSystemService(UserManager.class)).thenReturn(mUserManager);
+        when(context.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
         when(mUserManager.isAdminUser()).thenReturn(false);
 
         assertThat(mRestrictionChecker.hasRestriction()).isTrue();
diff --git a/tests/robotests/src/com/android/settings/network/PrivateDnsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/PrivateDnsPreferenceControllerTest.java
index fce9517..390a674 100644
--- a/tests/robotests/src/com/android/settings/network/PrivateDnsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/PrivateDnsPreferenceControllerTest.java
@@ -125,7 +125,7 @@
         mContext = spy(RuntimeEnvironment.application);
         mContentResolver = mContext.getContentResolver();
         mShadowContentResolver = Shadow.extract(mContentResolver);
-        when(mContext.getSystemService(ConnectivityManager.class))
+        when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE))
                 .thenReturn(mConnectivityManager);
         doNothing().when(mConnectivityManager).registerDefaultNetworkCallback(
                 mCallbackCaptor.capture(), nullable(Handler.class));
diff --git a/tests/robotests/src/com/android/settings/network/TetherEnablerTest.java b/tests/robotests/src/com/android/settings/network/TetherEnablerTest.java
index cd93865..bb4b0c4 100644
--- a/tests/robotests/src/com/android/settings/network/TetherEnablerTest.java
+++ b/tests/robotests/src/com/android/settings/network/TetherEnablerTest.java
@@ -95,10 +95,10 @@
         AtomicReference<BluetoothPan> panReference = spy(AtomicReference.class);
         mSwitchBar = spy(new SwitchBar(context));
         mSwitchWidgetController = spy(new SwitchBarController(mSwitchBar));
-        when(context.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
-        when(context.getSystemService(ConnectivityManager.class)).thenReturn(
+        when(context.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
+        when(context.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(
                 mConnectivityManager);
-        when(context.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(context.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(context.getSystemService(Context.NETWORK_POLICY_SERVICE)).thenReturn(
                 mNetworkPolicyManager);
         when(mTetheringManager.getTetherableIfaces()).thenReturn(new String[0]);
@@ -311,4 +311,4 @@
         assertThat(TetherEnabler.isTethering(TETHERING_ETHERNET_ON, TETHERING_ETHERNET)).isTrue();
         assertThat(TetherEnabler.isTethering(~TETHERING_ETHERNET_ON, TETHERING_ETHERNET)).isFalse();
     }
-}
+}
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/network/UsbTetherPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/UsbTetherPreferenceControllerTest.java
index 0639ef3..e02da90 100644
--- a/tests/robotests/src/com/android/settings/network/UsbTetherPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/UsbTetherPreferenceControllerTest.java
@@ -55,7 +55,7 @@
         MockitoAnnotations.initMocks(this);
 
         mContext = spy(ApplicationProvider.getApplicationContext());
-        when(mContext.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableUsbRegexs()).thenReturn(new String[]{""});
         mController = new UsbTetherPreferenceController(mContext, "USB");
         mController.setTetherEnabler(mTetherEnabler);
diff --git a/tests/robotests/src/com/android/settings/network/WifiTetherDisablePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/network/WifiTetherDisablePreferenceControllerTest.java
index 22ed55c..a82a71f 100644
--- a/tests/robotests/src/com/android/settings/network/WifiTetherDisablePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/network/WifiTetherDisablePreferenceControllerTest.java
@@ -100,7 +100,7 @@
 
         mContext = spy(ApplicationProvider.getApplicationContext());
         mPreference = spy(SwitchPreference.class);
-        when(mContext.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{""});
         mController = new WifiTetherDisablePreferenceController(mContext, WIFI_TETHER_DISABLE_KEY);
         mController.setTetherEnabler(mTetherEnabler);
diff --git a/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java b/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
index acc6b1a..ba37c30 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
@@ -74,7 +74,7 @@
         MockitoAnnotations.initMocks(this);
         mContext = spy(RuntimeEnvironment.application);
 
-        doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class);
+        doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE);
         doReturn(mSubscriptionManager).when(mContext).getSystemService(SubscriptionManager.class);
         doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID);
         doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(anyInt());
diff --git a/tests/robotests/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java b/tests/robotests/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
index 0d86408..6bee38f 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
@@ -77,7 +77,7 @@
         MockitoAnnotations.initMocks(this);
 
         mContext = spy(RuntimeEnvironment.application);
-        when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
+        when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager);
         when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager);
         when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager);
 
diff --git a/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
index 660b4e1..15bc598 100644
--- a/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/notification/app/RecentConversationsPreferenceControllerTest.java
@@ -47,8 +47,10 @@
 import androidx.preference.PreferenceScreen;
 import androidx.preference.PreferenceViewHolder;
 
+import com.android.settings.R;
 import com.android.settings.applications.AppInfoBase;
 import com.android.settings.notification.NotificationBackend;
+import com.android.settingslib.widget.LayoutPreference;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -105,9 +107,9 @@
         ps.addPreference(outerContainer);
 
         ConversationChannel ccw = new ConversationChannel(mock(ShortcutInfo.class), 6,
-        new NotificationChannel("hi", "hi", 4),
-        new NotificationChannelGroup("hi", "hi"), 7,
-        true);
+                new NotificationChannel("hi", "hi", 4),
+                new NotificationChannelGroup("hi", "hi"), 7,
+                false);
 
         ArrayList<ConversationChannel> list = new ArrayList<>();
         list.add(ccw);
@@ -124,19 +126,19 @@
         ConversationChannel ccw = new ConversationChannel(mock(ShortcutInfo.class), 6,
                 new NotificationChannel("hi", "hi", 4),
                 new NotificationChannelGroup("hi", "hi"), 7,
-                true);
+                false);
 
         ConversationChannel ccw2 = new ConversationChannel(mock(ShortcutInfo.class), 6,
                 new NotificationChannel("hi", "hi", 0),
                 new NotificationChannelGroup("hi", "hi"), 7,
-                true);
+                false);
 
         NotificationChannelGroup blockedGroup = new NotificationChannelGroup("hi", "hi");
         blockedGroup.setBlocked(true);
         ConversationChannel ccw3 = new ConversationChannel(mock(ShortcutInfo.class), 6,
                 new NotificationChannel("hi", "hi", 4),
                 blockedGroup, 7,
-                true);
+                false);
 
         ArrayList<ConversationChannel> list = new ArrayList<>();
         list.add(ccw);
@@ -198,7 +200,6 @@
                 new NotificationChannelGroup("hi", "group"), 7,
                 true);
 
-
         Intent intent = mController.getSubSettingLauncher(ccw, "title").toIntent();
 
         Bundle extras = intent.getExtras();
@@ -258,6 +259,51 @@
     }
 
     @Test
+    public void testRemoveConversations() throws Exception {
+        ShortcutInfo si = mock(ShortcutInfo.class);
+        when(si.getId()).thenReturn("person");
+        when(si.getPackage()).thenReturn("pkg");
+        ConversationChannel ccw = new ConversationChannel(si, 6,
+                new NotificationChannel("hi", "hi", 4),
+                new NotificationChannelGroup("hi", "group"), 7,
+                false);
+
+        ConversationChannel ccw2 = new ConversationChannel(si, 6,
+                new NotificationChannel("bye", "bye", 4),
+                new NotificationChannelGroup("hi", "group"), 7,
+                true);
+
+        PreferenceCategory group = new PreferenceCategory(mContext);
+        PreferenceScreen screen = new PreferenceManager(mContext).createPreferenceScreen(mContext);
+        screen.addPreference(group);
+
+        RecentConversationPreference pref = mController.createConversationPref(
+                        new PreferenceCategory(mContext), ccw, 100);
+        final View view = View.inflate(mContext, pref.getLayoutResource(), null);
+        PreferenceViewHolder holder = spy(PreferenceViewHolder.createInstanceForTests(view));
+        View delete = View.inflate(mContext, pref.getSecondTargetResId(), null);
+        when(holder.findViewById(pref.getClearId())).thenReturn(delete);
+        group.addPreference(pref);
+
+        RecentConversationPreference pref2 = mController.createConversationPref(
+                        new PreferenceCategory(mContext), ccw2, 100);
+        final View view2 = View.inflate(mContext, pref2.getLayoutResource(), null);
+        PreferenceViewHolder holder2 = spy(PreferenceViewHolder.createInstanceForTests(view2));
+        View delete2 = View.inflate(mContext, pref2.getSecondTargetResId(), null);
+        when(holder2.findViewById(pref.getClearId())).thenReturn(delete2);
+        group.addPreference(pref2);
+
+        LayoutPreference clearAll = mController.getClearAll(group);
+        group.addPreference(clearAll);
+
+        clearAll.findViewById(R.id.conversation_settings_clear_recents).performClick();
+
+        verify(mPs).removeAllRecentConversations();
+        assertThat((Preference) group.findPreference("hi:person")).isNull();
+        assertThat((Preference) group.findPreference("bye:person")).isNotNull();
+    }
+
+    @Test
     public void testNonremoveableConversation() throws Exception {
         ShortcutInfo si = mock(ShortcutInfo.class);
         when(si.getId()).thenReturn("person");
@@ -272,4 +318,24 @@
                         new PreferenceCategory(mContext), ccw, 100);
         assertThat(pref.hasClearListener()).isFalse();
     }
+
+    @Test
+    public void testPopulateList_onlyNonremoveableConversations() {
+        final PreferenceManager preferenceManager = new PreferenceManager(mContext);
+        PreferenceScreen ps = preferenceManager.createPreferenceScreen(mContext);
+        PreferenceCategory outerContainer = spy(new PreferenceCategory(mContext));
+        ps.addPreference(outerContainer);
+
+        ConversationChannel ccw = new ConversationChannel(mock(ShortcutInfo.class), 6,
+                new NotificationChannel("hi", "hi", 4),
+                new NotificationChannelGroup("hi", "hi"), 7,
+                true /* hasactivenotifs */);
+
+        ArrayList<ConversationChannel> list = new ArrayList<>();
+        list.add(ccw);
+
+        mController.populateList(list, outerContainer);
+        // one for the preference, none for 'clear all'
+        verify(outerContainer, times(1)).addPreference(any());
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java b/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
index be3267e..094e282 100644
--- a/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/NetworkRequestDialogActivityTest.java
@@ -78,7 +78,7 @@
         mActivity = spy(activity);
 
         mWifiManager = mock(WifiManager.class);
-        when(mActivity.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
+        when(mActivity.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiEnablerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiEnablerTest.java
index 2475d80..65cc811 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiEnablerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiEnablerTest.java
@@ -53,7 +53,7 @@
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
+        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
         mEnabler = new WifiEnabler(mContext, mock(SwitchWidgetController.class),
                 mock(MetricsFeatureProvider.class), mConnectivityManager);
     }
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiNoInternetDialogTest.java b/tests/robotests/src/com/android/settings/wifi/WifiNoInternetDialogTest.java
index dc5ccb4..6cbb19d 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiNoInternetDialogTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiNoInternetDialogTest.java
@@ -44,6 +44,7 @@
 import com.android.settings.R;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
@@ -87,6 +88,7 @@
                 Robolectric.setupActivity(WifiNoInternetDialog.class);
     }
 
+    @Ignore
     @Test
     public void setupPromptUnvalidated_shouldShowNoInternetAccessRemember() {
         setupActivityWithAction(ACTION_PROMPT_UNVALIDATED, FAKE_URL);
@@ -98,6 +100,7 @@
                 mActivity.getString(R.string.no_internet_access_remember));
     }
 
+    @Ignore
     @Test
     public void setupPromptPartialConnectivity_shouldShowNoInternetAccessRemember() {
         setupActivityWithAction(ACTION_PROMPT_PARTIAL_CONNECTIVITY, FAKE_URL);
@@ -109,6 +112,7 @@
                 mActivity.getString(R.string.no_internet_access_remember));
     }
 
+    @Ignore
     @Test
     public void setupPromptLostValidationAction_shouldShowLostInternetAccessPersist() {
         setupActivityWithAction(ACTION_PROMPT_LOST_VALIDATION, FAKE_URL);
@@ -120,6 +124,7 @@
                 mActivity.getString(R.string.lost_internet_access_persist));
     }
 
+    @Ignore
     @Test
     public void clickPositiveButton_whenPromptUnvalidated_shouldCallSetAcceptUnvalidated() {
         setupActivityWithAction(ACTION_PROMPT_UNVALIDATED, FAKE_URL);
@@ -131,6 +136,7 @@
         verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(true), eq(false));
     }
 
+    @Ignore
     @Test
     public void positiveButton_withPartialConnectivity_shouldCallSetAcceptPartialConnectivity() {
         setupActivityWithAction(ACTION_PROMPT_PARTIAL_CONNECTIVITY, FAKE_URL);
@@ -143,6 +149,7 @@
                 eq(false));
     }
 
+    @Ignore
     @Test
     public void positiveButton_withLostValidation_shouldCallSetAvoidUnvalidated() {
         setupActivityWithAction(ACTION_PROMPT_LOST_VALIDATION, FAKE_URL);
@@ -154,6 +161,7 @@
         verify(mConnectivityManager).setAvoidUnvalidated(any(Network.class));
     }
 
+    @Ignore
     @Test
     public void destroyWithNoClick_inPartialConnectivity_shouldCallSetAcceptPartialConnectivity() {
         setupActivityWithAction(ACTION_PROMPT_PARTIAL_CONNECTIVITY, FAKE_URL);
@@ -167,6 +175,7 @@
                 eq(false));
     }
 
+    @Ignore
     @Test
     public void destroyWithNoClick_whenUnvalidated_shouldCallSetAcceptUnvalidated() {
         setupActivityWithAction(ACTION_PROMPT_UNVALIDATED, FAKE_URL);
@@ -179,6 +188,7 @@
         verify(mConnectivityManager).setAcceptUnvalidated(any(Network.class), eq(false), eq(false));
     }
 
+    @Ignore
     @Test
     public void networkCallbackOnLost_shouldFinish() {
         setupActivityWithAction(ACTION_PROMPT_UNVALIDATED, FAKE_URL);
@@ -192,6 +202,7 @@
         verify(mActivity).finish();
     }
 
+    @Ignore
     @Test
     public void networkCallbackOnCapabilitiesChanged_shouldFinish() {
         setupActivityWithAction(ACTION_PROMPT_UNVALIDATED, FAKE_URL);
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiPrimarySwitchPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiPrimarySwitchPreferenceControllerTest.java
index 4100d05..b94df29 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiPrimarySwitchPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiPrimarySwitchPreferenceControllerTest.java
@@ -78,7 +78,7 @@
         when(mContext.getSystemService(NetworkScoreManager.class)).thenReturn(mNetworkScoreManager);
         mController = new WifiPrimarySwitchPreferenceController(mContext, mMetricsFeatureProvider);
         when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
-        when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
+        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
         when(mWifiManager.getWifiState()).thenReturn(WifiManager.WIFI_STATE_DISABLED);
     }
 
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiSettingsTest.java b/tests/robotests/src/com/android/settings/wifi/WifiSettingsTest.java
index 428a360..1f5abd3 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiSettingsTest.java
@@ -43,6 +43,7 @@
 import android.os.PowerManager;
 import android.os.UserManager;
 import android.provider.Settings;
+import android.util.FeatureFlagUtils;
 import android.view.ContextMenu;
 import android.view.View;
 
@@ -105,6 +106,7 @@
         mWifiSettings.mConfigureWifiSettingsPreference = new Preference(mContext);
         mWifiSettings.mWifiPickerTracker = mMockWifiPickerTracker;
         mWifiSettings.mWifiManager = mWifiManager;
+        FeatureFlagUtils.setEnabled(mContext, FeatureFlagUtils.SETTINGS_PROVIDER_MODEL, false);
     }
 
     @Test
@@ -209,7 +211,7 @@
         final Resources.Theme theme = mContext.getTheme();
         when(activity.getTheme()).thenReturn(theme);
         UserManager userManager = mock(UserManager.class);
-        when(activity.getSystemService(UserManager.class))
+        when(activity.getSystemService(Context.USER_SERVICE))
                 .thenReturn(userManager);
 
         when(mWifiSettings.findPreference(WifiSettings.PREF_KEY_DATA_USAGE))
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/DisclaimerItemListAdapterTest.java b/tests/robotests/src/com/android/settings/wifi/calling/DisclaimerItemListAdapterTest.java
index 3e15348..8478a54 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/DisclaimerItemListAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/DisclaimerItemListAdapterTest.java
@@ -77,7 +77,7 @@
 
         when(mLayoutInflater.inflate(anyInt(), anyObject(), anyBoolean())).thenReturn(mView);
         when(mViewGroup.getContext()).thenReturn(mContext);
-        when(mViewGroup.getContext().getSystemService(LayoutInflater.class)).thenReturn(
+        when(mViewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).thenReturn(
                 mLayoutInflater);
         when(mView.findViewById(ID_DISCLAIMER_ITEM_TITLE)).thenReturn(mTestView);
         when(mView.findViewById(ID_DISCLAIMER_ITEM_DESCRIPTION)).thenReturn(mDescView);
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/EmergencyCallLimitationDisclaimerTest.java b/tests/robotests/src/com/android/settings/wifi/calling/EmergencyCallLimitationDisclaimerTest.java
index c15e850..985edda 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/EmergencyCallLimitationDisclaimerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/EmergencyCallLimitationDisclaimerTest.java
@@ -54,7 +54,7 @@
         mContext = spy(RuntimeEnvironment.application);
 
         doReturn(mCarrierConfigManager).when(mContext).getSystemService(
-                CarrierConfigManager.class);
+                Context.CARRIER_CONFIG_SERVICE);
         when(mCarrierConfigManager.getConfigForSubId(anyInt())).thenReturn(mBundle);
 
         doReturn(getSharedPreferences()).when(mContext).getSharedPreferences(anyString(), anyInt());
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/LocationPolicyDisclaimerTest.java b/tests/robotests/src/com/android/settings/wifi/calling/LocationPolicyDisclaimerTest.java
index 108acf8..3fe9678 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/LocationPolicyDisclaimerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/LocationPolicyDisclaimerTest.java
@@ -54,7 +54,7 @@
         mContext = spy(RuntimeEnvironment.application);
 
         doReturn(mCarrierConfigManager).when(mContext).getSystemService(
-                CarrierConfigManager.class);
+                Context.CARRIER_CONFIG_SERVICE);
         when(mCarrierConfigManager.getConfigForSubId(anyInt())).thenReturn(mBundle);
         doReturn(getSharedPreferences()).when(mContext).getSharedPreferences(anyString(), anyInt());
     }
diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java
index 252d876..d777a59 100644
--- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java
@@ -73,8 +73,8 @@
         MockitoAnnotations.initMocks(this);
         mContext = spy(RuntimeEnvironment.application);
         mPreference = new ListPreference(RuntimeEnvironment.application);
-        when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
-        when(mContext.getSystemService(TetheringManager.class)).thenReturn(mTetheringManager);
+        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
+        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"1", "2"});
         when(mContext.getResources()).thenReturn(RuntimeEnvironment.application.getResources());
         when(mScreen.findPreference(anyString())).thenReturn(mPreference);
diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherFooterPreferenceControllerTest.java
index a423071..c1d6c16 100644
--- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherFooterPreferenceControllerTest.java
@@ -17,6 +17,7 @@
 package com.android.settings.wifi.tether;
 
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -57,7 +58,8 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
 
-        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
+        doReturn(mWifiManager).when(mContext).getSystemService(WifiManager.class);
+        doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
         when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
         when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"1", "2"});
         mController = new WifiTetherFooterPreferenceController(mContext);
diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherPasswordPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherPasswordPreferenceControllerTest.java
index 8f8477f..bb61eb9 100644
--- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherPasswordPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherPasswordPreferenceControllerTest.java
@@ -19,6 +19,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -75,9 +76,9 @@
                 .setPassphrase(INITIAL_PASSWORD, SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .build();
 
-        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
+        doReturn(mWifiManager).when(mContext).getSystemService(WifiManager.class);
         when(mWifiManager.getSoftApConfiguration()).thenReturn(mConfig);
-        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
+        doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
         when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"1", "2"});
         when(mContext.getResources()).thenReturn(RuntimeEnvironment.application.getResources());
         when(mScreen.findPreference(anyString())).thenReturn(mPreference);
diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSSIDPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSSIDPreferenceControllerTest.java
index 147cd64..2d88722 100644
--- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSSIDPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSSIDPreferenceControllerTest.java
@@ -19,6 +19,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -67,8 +68,8 @@
         MockitoAnnotations.initMocks(this);
         mPreference = new WifiTetherSsidPreference(RuntimeEnvironment.application);
 
-        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
-        when(mContext.getSystemService(Context.TETHERING_SERVICE)).thenReturn(mTetheringManager);
+        doReturn(mWifiManager).when(mContext).getSystemService(WifiManager.class);
+        doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
         when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"1", "2"});
         when(mContext.getResources()).thenReturn(RuntimeEnvironment.application.getResources());
         when(mScreen.findPreference(anyString())).thenReturn(mPreference);
diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
index 9a34323..2ecc7d2 100644
--- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
@@ -80,10 +80,10 @@
 
         MockitoAnnotations.initMocks(this);
         doReturn(mConnectivityManager)
-                .when(mContext).getSystemService(ConnectivityManager.class);
-        doReturn(mTetheringManager).when(mContext).getSystemService(TetheringManager.class);
+                .when(mContext).getSystemService(Context.CONNECTIVITY_SERVICE);
+        doReturn(mTetheringManager).when(mContext).getSystemService(Context.TETHERING_SERVICE);
         doReturn(WIFI_REGEXS).when(mTetheringManager).getTetherableWifiRegexs();
-        doReturn(mUserManager).when(mContext).getSystemService(UserManager.class);
+        doReturn(mUserManager).when(mContext).getSystemService(Context.USER_SERVICE);
 
         mWifiTetherSettings = new WifiTetherSettings();
     }
@@ -133,7 +133,7 @@
         when(settings.getContext()).thenReturn(mContext);
         final Resources.Theme theme = mContext.getTheme();
         when(activity.getTheme()).thenReturn(theme);
-        when(activity.getSystemService(UserManager.class)).thenReturn(mUserManager);
+        when(activity.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
         doNothing().when(settings)
             .onCreatePreferences(any(Bundle.class), nullable(String.class));
         final FakeFeatureFactory fakeFeatureFactory = FakeFeatureFactory.setupForTest();
diff --git a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageEntryTest.java b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageEntryTest.java
index cf1b6b2..3cd3539 100644
--- a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageEntryTest.java
+++ b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageEntryTest.java
@@ -209,6 +209,24 @@
     }
 
     @Test
+    public void isPublic_prublicVolume_shouldReturnTrue() {
+        final VolumeInfo publicVolumeInfo = mock(VolumeInfo.class);
+        final StorageEntry publicStorage = new StorageEntry(mContext, publicVolumeInfo);
+        when(publicVolumeInfo.getType()).thenReturn(VolumeInfo.TYPE_PUBLIC);
+
+        assertThat(publicStorage.isPublic()).isTrue();
+    }
+
+    @Test
+    public void isStub_stubVolume_shouldReturnTrue() {
+        final VolumeInfo stubVolumeInfo = mock(VolumeInfo.class);
+        final StorageEntry stubStorage = new StorageEntry(mContext, stubVolumeInfo);
+        when(stubVolumeInfo.getType()).thenReturn(VolumeInfo.TYPE_STUB);
+
+        assertThat(stubStorage.isStub()).isTrue();
+    }
+
+    @Test
     public void isPrivate_nonVolumeInfo_shouldReturnFalse() {
         final DiskInfo diskInfo = mock(DiskInfo.class);
         final StorageEntry diskStorage = new StorageEntry(diskInfo);
diff --git a/tests/unit/src/com/android/settings/network/InternetUpdaterTest.java b/tests/unit/src/com/android/settings/network/InternetUpdaterTest.java
index 94456fe..3e9cdc7 100644
--- a/tests/unit/src/com/android/settings/network/InternetUpdaterTest.java
+++ b/tests/unit/src/com/android/settings/network/InternetUpdaterTest.java
@@ -38,6 +38,7 @@
 import android.content.Context;
 import android.content.IntentFilter;
 import android.net.ConnectivityManager;
+import android.net.NetworkCapabilities;
 import android.net.wifi.WifiManager;
 
 import androidx.lifecycle.Lifecycle;
@@ -107,57 +108,80 @@
     }
 
     @Test
-    public void update_apmOnWifiOff_getInternetApm() {
+    public void updateInternetAvailable_wifiConnectedAndNoValidated_internetUnavailable() {
+        final NetworkCapabilities networkCapabilities = new NetworkCapabilities();
+        networkCapabilities.addTransportType(TRANSPORT_WIFI);
+        networkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
+
+        mInternetUpdater.updateInternetAvailable(networkCapabilities);
+
+        assertThat(mInternetUpdater.mInternetAvailable).isEqualTo(false);
+    }
+
+    @Test
+    public void updateInternetAvailable_wifiConnectedAndValidated_internetAvailable() {
+        final NetworkCapabilities networkCapabilities = new NetworkCapabilities();
+        networkCapabilities.addTransportType(TRANSPORT_WIFI);
+        networkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
+        networkCapabilities.addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED);
+
+        mInternetUpdater.updateInternetAvailable(networkCapabilities);
+
+        assertThat(mInternetUpdater.mInternetAvailable).isEqualTo(true);
+    }
+
+    @Test
+    public void updateInternetType_apmOnWifiOff_getInternetApm() {
         doReturn(true).when(mAirplaneModeEnabler).isAirplaneModeOn();
         doReturn(WifiManager.WIFI_STATE_DISABLED).when(mWifiManager).getWifiState();
         mInternetUpdater.mInternetAvailable = false;
 
-        mInternetUpdater.update();
+        mInternetUpdater.updateInternetType();
 
         assertThat(mInternetUpdater.getInternetType()).isEqualTo(INTERNET_OFF);
     }
 
     @Test
-    public void update_apmOnWifiOnNotConnected_getInternetNetworksAvailable() {
+    public void updateInternetType_apmOnWifiOnNotConnected_getInternetNetworksAvailable() {
         doReturn(true).when(mAirplaneModeEnabler).isAirplaneModeOn();
         doReturn(WifiManager.WIFI_STATE_ENABLED).when(mWifiManager).getWifiState();
         mInternetUpdater.mInternetAvailable = false;
 
-        mInternetUpdater.update();
+        mInternetUpdater.updateInternetType();
 
         assertThat(mInternetUpdater.getInternetType()).isEqualTo(INTERNET_NETWORKS_AVAILABLE);
     }
 
     @Test
-    public void update_apmOnWifiConnected_getInternetWifi() {
+    public void updateInternetType_apmOnWifiConnected_getInternetWifi() {
         doReturn(true).when(mAirplaneModeEnabler).isAirplaneModeOn();
         doReturn(true).when(mWifiManager).isWifiEnabled();
         mInternetUpdater.mInternetAvailable = true;
         mInternetUpdater.mTransport = TRANSPORT_WIFI;
 
-        mInternetUpdater.update();
+        mInternetUpdater.updateInternetType();
 
         assertThat(mInternetUpdater.getInternetType()).isEqualTo(INTERNET_WIFI);
     }
 
     @Test
-    public void update_apmOnCellularConnected_getInternetCellular() {
+    public void updateInternetType_apmOnCellularConnected_getInternetCellular() {
         doReturn(true).when(mAirplaneModeEnabler).isAirplaneModeOn();
         mInternetUpdater.mInternetAvailable = true;
         mInternetUpdater.mTransport = TRANSPORT_CELLULAR;
 
-        mInternetUpdater.update();
+        mInternetUpdater.updateInternetType();
 
         assertThat(mInternetUpdater.getInternetType()).isEqualTo(INTERNET_CELLULAR);
     }
 
     @Test
-    public void update_apmOnEthernetConnected_getInternetEthernet() {
+    public void updateInternetType_apmOnEthernetConnected_getInternetEthernet() {
         doReturn(true).when(mAirplaneModeEnabler).isAirplaneModeOn();
         mInternetUpdater.mInternetAvailable = true;
         mInternetUpdater.mTransport = TRANSPORT_ETHERNET;
 
-        mInternetUpdater.update();
+        mInternetUpdater.updateInternetType();
 
         assertThat(mInternetUpdater.getInternetType()).isEqualTo(INTERNET_ETHERNET);
     }
diff --git a/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java b/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
index 4760daa..a323ed6 100644
--- a/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
+++ b/tests/unit/src/com/android/settings/network/ProviderModelSliceTest.java
@@ -236,7 +236,8 @@
         mWifiList.add(mMockWifiSliceItem2);
         mMockNetworkProviderWorker.updateSelfResults(mWifiList);
         mockHelperCondition(false, true, true, null);
-        when(mMockNetworkProviderWorker.isEthernetConnected()).thenReturn(true);
+        when(mMockNetworkProviderWorker.getInternetType())
+                .thenReturn(InternetUpdater.INTERNET_ETHERNET);
 
         final Slice slice = mMockProviderModelSlice.getSlice();
 
@@ -258,7 +259,8 @@
         mWifiList.add(mMockWifiSliceItem2);
         mMockNetworkProviderWorker.updateSelfResults(mWifiList);
         mockHelperCondition(false, true, true, mWifiList.get(0));
-        when(mMockNetworkProviderWorker.isEthernetConnected()).thenReturn(true);
+        when(mMockNetworkProviderWorker.getInternetType())
+                .thenReturn(InternetUpdater.INTERNET_ETHERNET);
 
         final Slice slice = mMockProviderModelSlice.getSlice();
 
diff --git a/tests/unit/src/com/android/settings/network/telephony/MobileDataPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/MobileDataPreferenceControllerTest.java
index 0c8ffb9..45f3693 100644
--- a/tests/unit/src/com/android/settings/network/telephony/MobileDataPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/MobileDataPreferenceControllerTest.java
@@ -74,7 +74,7 @@
         MockitoAnnotations.initMocks(this);
 
         mContext = spy(ApplicationProvider.getApplicationContext());
-        doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class);
+        doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE);
 
         when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager);
         doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID);
diff --git a/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWorkerTest.java b/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWorkerTest.java
index 97f8e11..d052f31 100644
--- a/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWorkerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWorkerTest.java
@@ -261,24 +261,24 @@
     }
 
     @Test
-    public void isEthernetConnected_connectedEthernet_shouldBeTrue() {
+    public void getInternetType_connectedEthernet_returnInternetEthernet() {
         mMockNetworkProviderWorker.onInternetTypeChanged(INTERNET_ETHERNET);
 
-        assertThat(mMockNetworkProviderWorker.isEthernetConnected()).isTrue();
+        assertThat(mMockNetworkProviderWorker.getInternetType()).isEqualTo(INTERNET_ETHERNET);
     }
 
     @Test
-    public void isEthernetConnected_connectedWifi_shouldBeFalse() {
+    public void getInternetType_connectedWifi_returnInternetWifi() {
         mMockNetworkProviderWorker.onInternetTypeChanged(INTERNET_WIFI);
 
-        assertThat(mMockNetworkProviderWorker.isEthernetConnected()).isFalse();
+        assertThat(mMockNetworkProviderWorker.getInternetType()).isEqualTo(INTERNET_WIFI);
     }
 
     @Test
-    public void isEthernetConnected_connectedCarrier_shouldBeFalse() {
+    public void getInternetType__connectedCarrier_returnInternetCellular() {
         mMockNetworkProviderWorker.onInternetTypeChanged(INTERNET_CELLULAR);
 
-        assertThat(mMockNetworkProviderWorker.isEthernetConnected()).isFalse();
+        assertThat(mMockNetworkProviderWorker.getInternetType()).isEqualTo(INTERNET_CELLULAR);
     }
 
     public class MockNetworkProviderWorker extends NetworkProviderWorker {
