diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e4e1a10..0623738 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -191,6 +191,7 @@
         </receiver>
 
         <activity android:name=".SubSettings"
+                  android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize"
                   android:theme="@style/Theme.SubSettings" />
 
         <activity android:name=".Settings$CreateShortcutActivity"
@@ -299,18 +300,31 @@
             </intent-filter>
         </activity>
 
+        <receiver android:name=".search.SearchStateReceiver"
+                  android:exported="true"
+                  android:permission="android.permission.READ_SEARCH_INDEXABLES">
+            <intent-filter>
+                <action android:name="com.android.settings.SEARCH_START"/>
+                <action android:name="com.android.settings.SEARCH_EXIT"/>
+            </intent-filter>
+        </receiver>
+
         <activity
             android:name="Settings$WifiSettingsActivity"
             android:label="@string/wifi_settings"
             android:icon="@drawable/ic_homepage_network"
             android:exported="true"
             android:configChanges="orientation|keyboardHidden|screenSize">
+            <intent-filter android:priority="1">
+                <action android:name="android.settings.WIFI_SETTINGS"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.wifi.WifiSettings" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
+                       android:value="true"/>
         </activity>
 
         <!-- Keep compatibility with old shortcuts. -->
@@ -321,9 +335,11 @@
             android:icon="@drawable/ic_homepage_network"
             android:exported="true">
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.wifi.WifiSettings" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
+            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+                       android:value="true"/>
         </activity-alias>
 
         <activity
@@ -333,23 +349,19 @@
             android:exported="true"
             android:configChanges="orientation|keyboardHidden|screenSize">
             <intent-filter android:priority="1">
-                <action android:name="android.settings.NETWORK_PROVIDER_SETTINGS" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <action android:name="android.settings.NETWORK_PROVIDER_SETTINGS"/>
+                <category android:name="android.intent.category.DEFAULT"/>
             </intent-filter>
             <intent-filter android:priority="1">
-                <action android:name="android.settings.WIFI_SETTINGS" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            <intent-filter android:priority="1">
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="com.android.settings.SHORTCUT" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="com.android.settings.SHORTCUT"/>
             </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.network.NetworkProviderSettings" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
+                       android:value="true"/>
         </activity>
 
         <activity
diff --git a/res/layout/sfps_enroll_find_sensor_layout.xml b/res/layout/sfps_enroll_find_sensor_layout.xml
new file mode 100644
index 0000000..fe74e58
--- /dev/null
+++ b/res/layout/sfps_enroll_find_sensor_layout.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<com.google.android.setupdesign.GlifLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/setup_wizard_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    style="?attr/fingerprint_layout_theme">
+
+    <LinearLayout
+        style="@style/SudContentFrame"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center_vertical"
+        android:orientation="vertical"
+        android:clipToPadding="false"
+        android:clipChildren="false">
+
+        <com.airbnb.lottie.LottieAnimationView
+            android:id="@+id/illustration_lottie"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:scaleType="centerInside"
+            app:lottie_imageAssetsFolder="images"
+            app:lottie_autoPlay="true"
+            app:lottie_loop="true"
+            app:lottie_rawRes="@raw/fingerprint_edu_lottie"/>
+
+        <com.airbnb.lottie.LottieAnimationView
+            android:id="@+id/illustration_lottie_portrait"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:scaleType="centerInside"
+            android:visibility="gone"
+            app:lottie_imageAssetsFolder="images"
+            app:lottie_autoPlay="true"
+            app:lottie_loop="true"
+            app:lottie_rawRes="@raw/fingerprint_edu_lottie_portrait"/>
+
+    </LinearLayout>
+</com.google.android.setupdesign.GlifLayout>
diff --git a/res/raw/fingerprint_edu_lottie.json b/res/raw/fingerprint_edu_lottie.json
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/res/raw/fingerprint_edu_lottie.json
diff --git a/res/raw/fingerprint_edu_lottie_portrait.json b/res/raw/fingerprint_edu_lottie_portrait.json
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/res/raw/fingerprint_edu_lottie_portrait.json
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2048d5c..7262171 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13289,6 +13289,10 @@
     <string name="lockscreen_privacy_controls_setting_toggle">Show device controls</string>
     <!-- Device controls summary [CHAR LIMIT=NONE] -->
     <string name="lockscreen_privacy_controls_summary">Access controls when locked</string>
+    <!-- Lockscreen double-line clock summary [CHAR LIMIT=NONE] -->
+    <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
+    <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
+    <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
 
     <!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
     <string name="rtt_settings_title"></string>
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
index 82cb860..19a1a4c 100644
--- a/res/xml/security_lockscreen_settings.xml
+++ b/res/xml/security_lockscreen_settings.xml
@@ -56,6 +56,12 @@
             android:title="@string/lockscreen_privacy_controls_setting_toggle"
             android:summary="@string/lockscreen_privacy_controls_summary"
             settings:controller="com.android.settings.display.ControlsPrivacyPreferenceController" />
+
+        <SwitchPreference
+            android:key="lockscreen_double_line_clock_switch"
+            android:title="@string/lockscreen_double_line_clock_setting_toggle"
+            android:summary="@string/lockscreen_double_line_clock_summary"
+            settings:controller="com.android.settings.display.LockscreenClockPreferenceController" />
     </PreferenceCategory>
 
     <PreferenceCategory
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 231a149..893c0ad 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -89,7 +89,6 @@
     public static class PrivateVolumeForgetActivity extends SettingsActivity { /* empty */ }
     public static class PublicVolumeSettingsActivity extends SettingsActivity { /* empty */ }
     public static class WifiSettingsActivity extends SettingsActivity { /* empty */ }
-    public static class WifiSettings2Activity extends SettingsActivity { /* empty */ }
     public static class NetworkProviderSettingsActivity extends SettingsActivity { /* empty */ }
     /** Activity for the Wi-Fi network details settings. */
     public static class WifiDetailsSettingsActivity extends SettingsActivity { /* empty */ }
diff --git a/src/com/android/settings/SettingsApplication.java b/src/com/android/settings/SettingsApplication.java
index a2f723e..353208d 100644
--- a/src/com/android/settings/SettingsApplication.java
+++ b/src/com/android/settings/SettingsApplication.java
@@ -16,17 +16,17 @@
 
 package com.android.settings;
 
-import android.app.Activity;
 import android.app.Application;
 
 import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
+import com.android.settings.homepage.SettingsHomepageActivity;
 
 import java.lang.ref.WeakReference;
 
 /** Settings application which sets up activity embedding rules for the large screen device. */
 public class SettingsApplication extends Application {
 
-    private WeakReference<Activity> mHomeActivity = new WeakReference<>(null);
+    private WeakReference<SettingsHomepageActivity> mHomeActivity = new WeakReference<>(null);
 
     @Override
     public void onCreate() {
@@ -37,11 +37,11 @@
         controller.initRules();
     }
 
-    public void setHomeActivity(Activity homeActivity) {
+    public void setHomeActivity(SettingsHomepageActivity homeActivity) {
         mHomeActivity = new WeakReference<>(homeActivity);
     }
 
-    public Activity getHomeActivity() {
+    public SettingsHomepageActivity getHomeActivity() {
         return mHomeActivity.get();
     }
 }
diff --git a/src/com/android/settings/SettingsInitialize.java b/src/com/android/settings/SettingsInitialize.java
index 500ce77..376d916 100644
--- a/src/com/android/settings/SettingsInitialize.java
+++ b/src/com/android/settings/SettingsInitialize.java
@@ -41,6 +41,7 @@
 
 import com.android.settings.Settings.CreateShortcutActivity;
 import com.android.settings.homepage.SettingsHomepageActivity;
+import com.android.settings.search.SearchStateReceiver;
 import com.android.settingslib.utils.ThreadUtils;
 
 import java.util.ArrayList;
@@ -67,7 +68,7 @@
         managedProfileSetup(context, pm, broadcast, userInfo);
         webviewSettingSetup(context, pm, userInfo);
         ThreadUtils.postOnBackgroundThread(() -> refreshExistingShortcuts(context));
-        enableTwoPaneDeepLinkActivityIfNecessary(pm, broadcast);
+        enableTwoPaneDeepLinkActivityIfNecessary(pm, context);
     }
 
     private void managedProfileSetup(Context context, final PackageManager pm, Intent broadcast,
@@ -148,12 +149,16 @@
         shortcutManager.updateShortcuts(updates);
     }
 
-    private void enableTwoPaneDeepLinkActivityIfNecessary(PackageManager pm, Intent intent) {
+    private void enableTwoPaneDeepLinkActivityIfNecessary(PackageManager pm, Context context) {
         final ComponentName deepLinkHome = new ComponentName(Utils.SETTINGS_PACKAGE_NAME,
                 SettingsHomepageActivity.ALIAS_DEEP_LINK);
+        final ComponentName searchStateReceiver = new ComponentName(context,
+                SearchStateReceiver.class);
         final int enableState = SplitController.getInstance().isSplitSupported()
                 ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                 : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
         pm.setComponentEnabledSetting(deepLinkHome, enableState, PackageManager.DONT_KILL_APP);
+        pm.setComponentEnabledSetting(searchStateReceiver, enableState,
+                PackageManager.DONT_KILL_APP);
     }
 }
diff --git a/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java b/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java
index 7894c6e..10a0bce 100644
--- a/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java
+++ b/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java
@@ -63,6 +63,9 @@
         int SCREEN_SIZE = 2;
     }
 
+    // Keep the last height of the scroll view in the {@link GlifLayout}
+    private int mLastScrollViewHeight;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -143,11 +146,13 @@
      * Scrolls to bottom while {@link ScrollView} layout changed.
      */
     private void scrollToBottom() {
+        mLastScrollViewHeight = 0;
         final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
         final ScrollView scrollView = layout.getScrollView();
         scrollView.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
             final int scrollViewHeight = scrollView.getHeight();
-            if (scrollViewHeight > 0) {
+            if (scrollViewHeight > 0 && scrollViewHeight != mLastScrollViewHeight) {
+                mLastScrollViewHeight = scrollViewHeight;
                 scrollView.post(() -> {
                     // Here is no need to show the scrolling animation. So disabled first and
                     // then enabled it after scrolling finished.
diff --git a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
index 4060e53..1540657 100644
--- a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
+++ b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
@@ -35,6 +35,7 @@
 import com.android.settings.SubSettings;
 import com.android.settings.Utils;
 import com.android.settings.homepage.SettingsHomepageActivity;
+import com.android.settings.homepage.SliceDeepLinkHomepageActivity;
 
 import java.util.HashSet;
 import java.util.Set;
@@ -128,6 +129,15 @@
                 true /* finishPrimaryWithSecondary */,
                 true /* finishSecondaryWithPrimary */,
                 clearTop);
+
+        registerTwoPanePairRule(
+                context,
+                getComponentName(context, SliceDeepLinkHomepageActivity.class),
+                secondaryComponent,
+                secondaryIntentAction,
+                true /* finishPrimaryWithSecondary */,
+                true /* finishSecondaryWithPrimary */,
+                clearTop);
     }
 
     /** Register a SplitPairRule for SubSettings if the device supports 2-pane. */
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
index 3cea962..405c090 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
@@ -21,13 +21,14 @@
 import android.hardware.fingerprint.FingerprintManager;
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
 import android.os.Bundle;
+import android.view.OrientationEventListener;
+import android.view.Surface;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.accessibility.AccessibilityManager;
 
 import androidx.annotation.Nullable;
 
-import com.airbnb.lottie.LottieAnimationView;
 import com.android.settings.R;
 import com.android.settings.Utils;
 import com.android.settings.biometrics.BiometricEnrollBase;
@@ -35,6 +36,7 @@
 import com.android.settings.biometrics.BiometricUtils;
 import com.android.settings.password.ChooseLockSettingsHelper;
 
+import com.airbnb.lottie.LottieAnimationView;
 import com.google.android.setupcompat.template.FooterBarMixin;
 import com.google.android.setupcompat.template.FooterButton;
 
@@ -52,6 +54,10 @@
     private FingerprintEnrollSidecar mSidecar;
     private boolean mNextClicked;
     private boolean mCanAssumeUdfps;
+    private boolean mCanAssumeSidefps;
+
+    private OrientationEventListener mOrientationEventListener;
+    private int mPreviousRotation = 0;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -61,6 +67,7 @@
         final List<FingerprintSensorPropertiesInternal> props =
                 fingerprintManager.getSensorPropertiesInternal();
         mCanAssumeUdfps = props != null && props.size() == 1 && props.get(0).isAnyUdfpsType();
+        mCanAssumeSidefps = props != null && props.size() == 1 && props.get(0).isAnySidefpsType();
         setContentView(getContentView());
         mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
         mFooterBarMixin.setSecondaryButton(
@@ -72,6 +79,8 @@
                         .build()
         );
 
+        listenOrientationEvent();
+
         if (mCanAssumeUdfps) {
             setHeaderText(R.string.security_settings_udfps_enroll_find_sensor_title);
             setDescriptionText(R.string.security_settings_udfps_enroll_find_sensor_message);
@@ -90,6 +99,28 @@
                 lottieAnimationView.setAnimation(R.raw.udfps_edu_a11y_lottie);
             }
 
+        } else if (mCanAssumeSidefps) {
+            setHeaderText(R.string.security_settings_fingerprint_enroll_find_sensor_title);
+            setDescriptionText(R.string.security_settings_fingerprint_enroll_find_sensor_message);
+            final LottieAnimationView lottieAnimationView = findViewById(R.id.illustration_lottie);
+            final LottieAnimationView lottieAnimationViewPortrait =
+                    findViewById(R.id.illustration_lottie_portrait);
+            final int rotation = getApplicationContext().getDisplay().getRotation();
+            switch(rotation) {
+                case Surface.ROTATION_90:
+                    lottieAnimationView.setVisibility(View.GONE);
+                    lottieAnimationViewPortrait.setVisibility(View.VISIBLE);
+                    break;
+                case Surface.ROTATION_270:
+                    lottieAnimationView.setVisibility(View.GONE);
+                    lottieAnimationViewPortrait.setVisibility(View.VISIBLE);
+                    lottieAnimationViewPortrait.setRotation(180);
+                    break;
+                default:
+                    lottieAnimationView.setVisibility(View.VISIBLE);
+                    lottieAnimationViewPortrait.setVisibility(View.GONE);
+                    break;
+            }
         } else {
             setHeaderText(R.string.security_settings_fingerprint_enroll_find_sensor_title);
             setDescriptionText(R.string.security_settings_fingerprint_enroll_find_sensor_message);
@@ -145,6 +176,8 @@
     protected int getContentView() {
         if (mCanAssumeUdfps) {
             return R.layout.udfps_enroll_find_sensor_layout;
+        } else if (mCanAssumeSidefps) {
+            return R.layout.sfps_enroll_find_sensor_layout;
         }
         return R.layout.fingerprint_enroll_find_sensor;
     }
@@ -220,6 +253,7 @@
 
     @Override
     protected void onDestroy() {
+        stopListenOrientationEvent();
         super.onDestroy();
         if (mAnimation != null) {
             mAnimation.stopAnimation();
@@ -297,4 +331,37 @@
     public int getMetricsCategory() {
         return SettingsEnums.FINGERPRINT_FIND_SENSOR;
     }
+
+    private void listenOrientationEvent() {
+        if (!mCanAssumeSidefps) {
+            // Do nothing if the device doesn't support SideFPS.
+            return;
+        }
+        mOrientationEventListener = new OrientationEventListener(this) {
+            @Override
+            public void onOrientationChanged(int orientation) {
+                final int currentRotation = getDisplay().getRotation();
+                if ((mPreviousRotation == Surface.ROTATION_90
+                        && currentRotation == Surface.ROTATION_270) || (
+                        mPreviousRotation == Surface.ROTATION_270
+                                && currentRotation == Surface.ROTATION_90)) {
+                    mPreviousRotation = currentRotation;
+                    recreate();
+                }
+            }
+        };
+        mOrientationEventListener.enable();
+        mPreviousRotation = getDisplay().getRotation();
+    }
+
+    private void stopListenOrientationEvent() {
+        if (!mCanAssumeSidefps) {
+            // Do nothing if the device doesn't support SideFPS.
+            return;
+        }
+        if (mOrientationEventListener != null) {
+            mOrientationEventListener.disable();
+        }
+        mOrientationEventListener = null;
+    }
 }
diff --git a/src/com/android/settings/datausage/BillingCycleSettings.java b/src/com/android/settings/datausage/BillingCycleSettings.java
index 8c433a0..57931c1 100644
--- a/src/com/android/settings/datausage/BillingCycleSettings.java
+++ b/src/com/android/settings/datausage/BillingCycleSettings.java
@@ -271,12 +271,14 @@
             mView = dialogInflater.inflate(R.layout.data_usage_bytes_editor, null, false);
             setupPicker((EditText) mView.findViewById(R.id.bytes),
                     (Spinner) mView.findViewById(R.id.size_spinner));
-            return new AlertDialog.Builder(context)
+            Dialog dialog = new AlertDialog.Builder(context)
                     .setTitle(isLimit ? R.string.data_usage_limit_editor_title
                             : R.string.data_usage_warning_editor_title)
                     .setView(mView)
                     .setPositiveButton(R.string.data_usage_cycle_editor_positive, this)
                     .create();
+            dialog.setCanceledOnTouchOutside(false);
+            return dialog;
         }
 
         private void setupPicker(EditText bytesPicker, Spinner type) {
@@ -402,10 +404,12 @@
             mCycleDayPicker.setValue(cycleDay);
             mCycleDayPicker.setWrapSelectorWheel(true);
 
-            return builder.setTitle(R.string.data_usage_cycle_editor_title)
+            Dialog dialog = builder.setTitle(R.string.data_usage_cycle_editor_title)
                     .setView(view)
                     .setPositiveButton(R.string.data_usage_cycle_editor_positive, this)
                     .create();
+            dialog.setCanceledOnTouchOutside(false);
+            return dialog;
         }
 
         @Override
@@ -466,12 +470,14 @@
         public Dialog onCreateDialog(Bundle savedInstanceState) {
             final Context context = getActivity();
 
-            return new AlertDialog.Builder(context)
+            Dialog dialog = new AlertDialog.Builder(context)
                     .setTitle(R.string.data_usage_limit_dialog_title)
                     .setMessage(R.string.data_usage_limit_dialog_mobile)
                     .setPositiveButton(android.R.string.ok, this)
                     .setNegativeButton(android.R.string.cancel, null)
                     .create();
+            dialog.setCanceledOnTouchOutside(false);
+            return dialog;
         }
 
         @Override
diff --git a/src/com/android/settings/display/LockscreenClockPreferenceController.java b/src/com/android/settings/display/LockscreenClockPreferenceController.java
new file mode 100644
index 0000000..70ae55e
--- /dev/null
+++ b/src/com/android/settings/display/LockscreenClockPreferenceController.java
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.display;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.preference.Preference;
+
+import com.android.settings.R;
+import com.android.settings.core.TogglePreferenceController;
+
+/**
+ * Preference to enable/disable the large double-line clock on lockscreen
+ */
+public class LockscreenClockPreferenceController extends TogglePreferenceController {
+
+    private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
+
+    public LockscreenClockPreferenceController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+    }
+
+    @Override
+    public boolean isChecked() {
+        return Settings.Secure.getInt(mContext.getContentResolver(), SETTING_KEY, 1) != 0;
+    }
+
+    @Override
+    public boolean setChecked(boolean isChecked) {
+        return Settings.Secure.putInt(mContext.getContentResolver(), SETTING_KEY,
+                isChecked ? 1 : 0);
+    }
+
+    @Override
+    public CharSequence getSummary() {
+        return mContext.getText(R.string.lockscreen_double_line_clock_summary);
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        super.updateState(preference);
+        preference.setEnabled(true);
+        refreshSummary(preference);
+    }
+
+    @Override
+    public int getSliceHighlightMenuRes() {
+        return R.string.menu_key_display;
+    }
+}
diff --git a/src/com/android/settings/homepage/SettingsHomepageActivity.java b/src/com/android/settings/homepage/SettingsHomepageActivity.java
index 051204d..4e843fd 100644
--- a/src/com/android/settings/homepage/SettingsHomepageActivity.java
+++ b/src/com/android/settings/homepage/SettingsHomepageActivity.java
@@ -78,6 +78,7 @@
     private static final int DEFAULT_HIGHLIGHT_MENU_KEY = R.string.menu_key_network;
     private static final long HOMEPAGE_LOADING_TIMEOUT_MS = 300;
 
+    private TopLevelSettings mMainFragment;
     private View mHomepageView;
     private View mSuggestionView;
     private CategoryMixin mCategoryMixin;
@@ -124,6 +125,11 @@
         homepageView.setVisibility(View.VISIBLE);
     }
 
+    /** Returns the main content fragment */
+    public TopLevelSettings getMainFragment() {
+        return mMainFragment;
+    }
+
     @Override
     public CategoryMixin getCategoryMixin() {
         return mCategoryMixin;
@@ -132,7 +138,6 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setHomeActivity();
         setContentView(R.layout.settings_homepage_container);
 
         final View appBar = findViewById(R.id.app_bar_container);
@@ -162,10 +167,10 @@
                 showFragment(new ContextualCardsFragment(), R.id.contextual_cards_content);
             }
         }
-        final Fragment fragment = new TopLevelSettings();
-        fragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY,
+        mMainFragment = new TopLevelSettings();
+        mMainFragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY,
                 getHighlightMenuKey());
-        showFragment(fragment, R.id.main_content);
+        showFragment(mMainFragment, R.id.main_content);
 
         ((FrameLayout) findViewById(R.id.main_content))
                 .getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
@@ -175,6 +180,12 @@
     }
 
     @Override
+    protected void onStart() {
+        ((SettingsApplication) getApplication()).setHomeActivity(this);
+        super.onStart();
+    }
+
+    @Override
     protected void onNewIntent(Intent intent) {
         super.onNewIntent(intent);
 
@@ -189,10 +200,6 @@
         launchDeepLinkIntentToRight();
     }
 
-    protected void setHomeActivity() {
-        ((SettingsApplication) getApplication()).setHomeActivity(this);
-    }
-
     private void showSuggestionFragment() {
         final Class<? extends Fragment> fragment = FeatureFactory.getFactory(this)
                 .getSuggestionFeatureProvider(this).getContextualSuggestionFragment();
@@ -314,13 +321,9 @@
     }
 
     private void reloadHighlightMenuKey() {
-        final TopLevelSettings fragment =
-                (TopLevelSettings) getSupportFragmentManager().findFragmentById(R.id.main_content);
-        if (fragment != null) {
-            fragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY,
-                    getHighlightMenuKey());
-            fragment.reloadHighlightMenuKey();
-        }
+        mMainFragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY,
+                getHighlightMenuKey());
+        mMainFragment.reloadHighlightMenuKey();
     }
 
     private void initHomepageContainer() {
diff --git a/src/com/android/settings/homepage/SliceDeepLinkHomepageActivity.java b/src/com/android/settings/homepage/SliceDeepLinkHomepageActivity.java
index 61e946d..2f83612 100644
--- a/src/com/android/settings/homepage/SliceDeepLinkHomepageActivity.java
+++ b/src/com/android/settings/homepage/SliceDeepLinkHomepageActivity.java
@@ -21,11 +21,6 @@
 /** Activity for Slices to launch Settings deep link page */
 public class SliceDeepLinkHomepageActivity extends SettingsHomepageActivity {
     @Override
-    protected void setHomeActivity() {
-        // do not overwrite homepage activity in SettingsApplication
-    }
-
-    @Override
     protected ComponentName getDeepLinkComponent() {
         return new ComponentName(getApplicationContext(), getClass());
     }
diff --git a/src/com/android/settings/homepage/TopLevelSettings.java b/src/com/android/settings/homepage/TopLevelSettings.java
index 548b3c4..193b69e 100644
--- a/src/com/android/settings/homepage/TopLevelSettings.java
+++ b/src/com/android/settings/homepage/TopLevelSettings.java
@@ -52,10 +52,12 @@
 
     private static final String TAG = "TopLevelSettings";
     private static final String SAVED_HIGHLIGHTED_PREF = "highlighted_pref";
+    private static final String SAVED_CACHED_PREF = "cached_pref";
 
     private HighlightableTopLevelPreferenceAdapter mTopLevelAdapter;
 
     private String mHighlightedPreferenceKey;
+    private String mCachedPreferenceKey;
 
     public TopLevelSettings() {
         final Bundle args = new Bundle();
@@ -125,6 +127,7 @@
         super.onCreate(icicle);
         if (icicle != null) {
             mHighlightedPreferenceKey = icicle.getString(SAVED_HIGHLIGHTED_PREF);
+            mCachedPreferenceKey = icicle.getString(SAVED_CACHED_PREF);
         }
     }
 
@@ -132,6 +135,7 @@
     public void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         outState.putString(SAVED_HIGHLIGHTED_PREF, mHighlightedPreferenceKey);
+        outState.putString(SAVED_CACHED_PREF, mCachedPreferenceKey);
     }
 
     @Override
@@ -169,9 +173,10 @@
         }
     }
 
-    /** Highlight a preference with specified key */
+    /** Highlight a preference with specified preference key */
     public void setHighlightPreferenceKey(String prefKey) {
         if (mTopLevelAdapter != null) {
+            mCachedPreferenceKey = null;
             mHighlightedPreferenceKey = prefKey;
             mTopLevelAdapter.highlightPreference(prefKey, /* scrollNeeded= */ false);
         }
@@ -184,13 +189,38 @@
         }
     }
 
-    /** Disable highlight on the menu entry */
-    public void disableMenuHighlight() {
+    /** Show/hide the highlight on the menu entry */
+    public void setMenuHighlightShowed(boolean show) {
         if (mTopLevelAdapter == null) {
             return;
         }
-        mHighlightedPreferenceKey = null;
-        mTopLevelAdapter.highlightPreference(mHighlightedPreferenceKey, /* scrollNeeded= */ false);
+
+        if (show) {
+            mHighlightedPreferenceKey = mCachedPreferenceKey;
+            mCachedPreferenceKey = null;
+        } else {
+            if (mCachedPreferenceKey == null) {
+                mCachedPreferenceKey = mHighlightedPreferenceKey;
+            }
+            mHighlightedPreferenceKey = null;
+        }
+        mTopLevelAdapter.highlightPreference(mHighlightedPreferenceKey, /* scrollNeeded= */ show);
+    }
+
+    /** Highlight and scroll to a preference with specified menu key */
+    public void setHighlightMenuKey(String menuKey) {
+        if (mTopLevelAdapter == null) {
+            return;
+        }
+
+        final String prefKey = HighlightableMenu.lookupPreferenceKey(menuKey);
+        if (TextUtils.isEmpty(prefKey)) {
+            Log.e(TAG, "Invalid highlight menu key: " + menuKey);
+        } else {
+            Log.d(TAG, "Menu key: " + menuKey);
+            mHighlightedPreferenceKey = prefKey;
+            mTopLevelAdapter.highlightPreference(prefKey, /* scrollNeeded= */ true);
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/network/telephony/NetworkSelectSettings.java b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
index 813cc74..c1c0f8f 100644
--- a/src/com/android/settings/network/telephony/NetworkSelectSettings.java
+++ b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
@@ -50,6 +50,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Optional;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -326,12 +327,19 @@
                     CellInfoUtil.getCellIdentityMccMnc(cellInfo.getCellIdentity()));
             Class className = cellInfo.getClass();
 
-            if (aggregatedList.stream().anyMatch(
+            Optional<CellInfo> itemInTheList = aggregatedList.stream().filter(
                     item -> {
                         String itemPlmn = CellInfoUtil.getNetworkTitle(item.getCellIdentity(),
                                 CellInfoUtil.getCellIdentityMccMnc(item.getCellIdentity()));
                         return itemPlmn.equals(plmn) && item.getClass().equals(className);
-                    })) {
+                    })
+                    .findFirst();
+            if (itemInTheList.isPresent()) {
+                if (cellInfo.isRegistered() && !itemInTheList.get().isRegistered()) {
+                    // Adding the registered cellinfo item into list. If there are two registered
+                    // cellinfo items, then select first one from source list.
+                    aggregatedList.set(aggregatedList.indexOf(itemInTheList.get()), cellInfo);
+                }
                 continue;
             }
             aggregatedList.add(cellInfo);
diff --git a/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceController.java b/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceController.java
index 7615fe3..b585ece 100644
--- a/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceController.java
+++ b/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceController.java
@@ -46,6 +46,7 @@
     Preference mPreference;
     private TelephonyManager mTelephonyManager;
     private PhoneCallStateTelephonyCallback mTelephonyCallback;
+    private boolean mIsVonrEnabledFromCarrierConfig = false;
     private boolean mIsVonrVisibleFromCarrierConfig = false;
     private boolean mIsNrEnableFromCarrierConfig = false;
     private boolean mHas5gCapability = false;
@@ -83,6 +84,9 @@
         if (carrierConfig == null) {
             return this;
         }
+        mIsVonrEnabledFromCarrierConfig = carrierConfig.getBoolean(
+            CarrierConfigManager.KEY_VONR_ENABLED_BOOL);
+
         mIsVonrVisibleFromCarrierConfig = carrierConfig.getBoolean(
                 CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL);
 
@@ -92,6 +96,7 @@
 
         Log.d(TAG, "mHas5gCapability: " + mHas5gCapability
                 + ",mIsNrEnabledFromCarrierConfig: " + mIsNrEnableFromCarrierConfig
+                + ",mIsVonrEnabledFromCarrierConfig: " + mIsVonrEnabledFromCarrierConfig
                 + ",mIsVonrVisibleFromCarrierConfig: " + mIsVonrVisibleFromCarrierConfig);
         return this;
     }
@@ -100,7 +105,10 @@
     public int getAvailabilityStatus(int subId) {
         init(subId);
 
-        if (mHas5gCapability && mIsNrEnableFromCarrierConfig && mIsVonrVisibleFromCarrierConfig) {
+        if (mHas5gCapability
+                && mIsNrEnableFromCarrierConfig
+                && mIsVonrEnabledFromCarrierConfig
+                && mIsVonrVisibleFromCarrierConfig) {
             return AVAILABLE;
         }
         return CONDITIONALLY_UNAVAILABLE;
diff --git a/src/com/android/settings/password/PasswordUtils.java b/src/com/android/settings/password/PasswordUtils.java
index 5b75033..e8e309c 100644
--- a/src/com/android/settings/password/PasswordUtils.java
+++ b/src/com/android/settings/password/PasswordUtils.java
@@ -79,18 +79,20 @@
     }
 
     /** Crashes the calling application and provides it with {@code message}. */
-    public static void crashCallingApplication(IBinder activityToken, String message) {
+    public static void crashCallingApplication(IBinder activityToken, String message,
+            int exceptionTypeId) {
         IActivityManager am = ActivityManager.getService();
         try {
             int uid = am.getLaunchedFromUid(activityToken);
             int userId = UserHandle.getUserId(uid);
-            am.crashApplication(
+            am.crashApplicationWithType(
                     uid,
                     /* initialPid= */ -1,
                     getCallingAppPackageName(activityToken),
                     userId,
                     message,
-                    false);
+                    false,
+                    exceptionTypeId);
         } catch (RemoteException e) {
             Log.v(TAG, "Could not talk to activity manager.", e);
         }
diff --git a/src/com/android/settings/password/SetNewPasswordActivity.java b/src/com/android/settings/password/SetNewPasswordActivity.java
index 2282587..fc664ec 100644
--- a/src/com/android/settings/password/SetNewPasswordActivity.java
+++ b/src/com/android/settings/password/SetNewPasswordActivity.java
@@ -29,6 +29,7 @@
 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_REQUESTED_MIN_COMPLEXITY;
 
 import android.app.Activity;
+import android.app.RemoteServiceException.MissingRequestPasswordComplexityPermissionException;
 import android.app.admin.DevicePolicyManager;
 import android.app.admin.DevicePolicyManager.PasswordComplexity;
 import android.app.admin.PasswordMetrics;
@@ -101,7 +102,8 @@
                 PasswordUtils.crashCallingApplication(activityToken,
                         "Must have permission "
                                 + REQUEST_PASSWORD_COMPLEXITY + " to use extra "
-                                + EXTRA_PASSWORD_COMPLEXITY);
+                                + EXTRA_PASSWORD_COMPLEXITY,
+                        MissingRequestPasswordComplexityPermissionException.TYPE_ID);
                 finish();
                 return;
             }
diff --git a/src/com/android/settings/password/SetupChooseLockGeneric.java b/src/com/android/settings/password/SetupChooseLockGeneric.java
index 3261b81..968af32 100644
--- a/src/com/android/settings/password/SetupChooseLockGeneric.java
+++ b/src/com/android/settings/password/SetupChooseLockGeneric.java
@@ -21,6 +21,7 @@
 
 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_REQUESTED_MIN_COMPLEXITY;
 
+import android.app.RemoteServiceException.MissingRequestPasswordComplexityPermissionException;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
@@ -79,7 +80,8 @@
             if (!hasPermission) {
                 PasswordUtils.crashCallingApplication(activityToken,
                         "Must have permission " + REQUEST_PASSWORD_COMPLEXITY
-                                + " to use extra " + EXTRA_PASSWORD_COMPLEXITY);
+                                + " to use extra " + EXTRA_PASSWORD_COMPLEXITY,
+                        MissingRequestPasswordComplexityPermissionException.TYPE_ID);
                 finish();
                 return;
             }
diff --git a/src/com/android/settings/search/SearchFeatureProvider.java b/src/com/android/settings/search/SearchFeatureProvider.java
index 9b081e1..39e571f 100644
--- a/src/com/android/settings/search/SearchFeatureProvider.java
+++ b/src/com/android/settings/search/SearchFeatureProvider.java
@@ -33,8 +33,6 @@
 
 import com.android.settings.R;
 import com.android.settings.Utils;
-import com.android.settings.activityembedding.ActivityEmbeddingUtils;
-import com.android.settings.homepage.TopLevelSettings;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.search.SearchIndexableResources;
 
@@ -108,18 +106,8 @@
             FeatureFactory.getFactory(context).getMetricsFeatureProvider()
                     .logSettingsTileClick(KEY_HOMEPAGE_SEARCH_BAR, pageId);
 
-            if (ActivityEmbeddingUtils.isEmbeddingActivityEnabled(context)) {
-                final TopLevelSettings fragment = (TopLevelSettings) activity
-                        .getSupportFragmentManager().findFragmentById(R.id.main_content);
-                if (fragment != null) {
-                    fragment.disableMenuHighlight();
-                }
-                activity.startActivity(intent);
-            } else {
-                final Bundle bundle = ActivityOptions.makeSceneTransitionAnimation(activity)
-                        .toBundle();
-                activity.startActivity(intent, bundle);
-            }
+            final Bundle bundle = ActivityOptions.makeSceneTransitionAnimation(activity).toBundle();
+            activity.startActivity(intent, bundle);
         });
     }
 
diff --git a/src/com/android/settings/search/SearchResultTrampoline.java b/src/com/android/settings/search/SearchResultTrampoline.java
index a770126..f9cbc36 100644
--- a/src/com/android/settings/search/SearchResultTrampoline.java
+++ b/src/com/android/settings/search/SearchResultTrampoline.java
@@ -28,9 +28,11 @@
 import android.util.Log;
 
 import com.android.settings.SettingsActivity;
+import com.android.settings.SettingsApplication;
 import com.android.settings.SubSettings;
 import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
 import com.android.settings.activityembedding.ActivityEmbeddingUtils;
+import com.android.settings.homepage.SettingsHomepageActivity;
 import com.android.settings.overlay.FeatureFactory;
 
 import java.net.URISyntaxException;
@@ -99,12 +101,20 @@
             // navigation behavior.
             ActivityEmbeddingRulesController.registerSubSettingsPairRule(this,
                     false /* clearTop */);
-            // TODO: pass menu key to homepage
+
             intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
             startActivity(intent);
+
+            // Pass menu key to homepage
+            final SettingsHomepageActivity homeActivity =
+                    ((SettingsApplication) getApplicationContext()).getHomeActivity();
+            if (homeActivity != null) {
+                homeActivity.getMainFragment().setHighlightMenuKey(highlightMenuKey);
+            }
         } else {
             // Two-pane case
-            startActivity(SettingsActivity.getTrampolineIntent(intent, highlightMenuKey));
+            startActivity(SettingsActivity.getTrampolineIntent(intent, highlightMenuKey)
+                    .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
         }
 
         // Done.
diff --git a/src/com/android/settings/search/SearchStateReceiver.java b/src/com/android/settings/search/SearchStateReceiver.java
new file mode 100644
index 0000000..d1f6f16
--- /dev/null
+++ b/src/com/android/settings/search/SearchStateReceiver.java
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.search;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.settings.SettingsApplication;
+import com.android.settings.homepage.SettingsHomepageActivity;
+
+/**
+ * A broadcast receiver that monitors the search state to show/hide the menu highlight
+ */
+public class SearchStateReceiver extends BroadcastReceiver {
+
+    private static final String TAG = "SearchStateReceiver";
+    private static final String ACTION_SEARCH_START = "com.android.settings.SEARCH_START";
+    private static final String ACTION_SEARCH_EXIT = "com.android.settings.SEARCH_EXIT";
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        if (intent == null) {
+            Log.w(TAG, "Null intent");
+            return;
+        }
+
+        final SettingsHomepageActivity homeActivity =
+                ((SettingsApplication) context.getApplicationContext()).getHomeActivity();
+        if (homeActivity == null) {
+            return;
+        }
+
+        final String action = intent.getAction();
+        Log.d(TAG, "action: " + action);
+        if (TextUtils.equals(ACTION_SEARCH_START, action)) {
+            homeActivity.getMainFragment().setMenuHighlightShowed(false);
+        } else if (TextUtils.equals(ACTION_SEARCH_EXIT, action)) {
+            homeActivity.getMainFragment().setMenuHighlightShowed(true);
+        }
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
new file mode 100644
index 0000000..94f2dc6
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/display/LockscreenClockPreferenceControllerTest.java
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.display;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.preference.Preference;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public class LockscreenClockPreferenceControllerTest {
+
+    private static final String TEST_KEY = "test_key";
+    private static final String SETTING_KEY = Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK;
+
+    private Context mContext;
+    private ContentResolver mContentResolver;
+    private LockscreenClockPreferenceController mController;
+
+    @Mock
+    private Preference mPreference;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
+        mContentResolver = mContext.getContentResolver();
+        mController = new LockscreenClockPreferenceController(mContext, TEST_KEY);
+    }
+
+    @Test
+    public void isChecked_SettingIs1_returnTrue() {
+        Settings.Secure.putInt(mContentResolver, SETTING_KEY, 1);
+
+        assertThat(mController.isChecked()).isTrue();
+    }
+
+    @Test
+    public void isChecked_SettingIs0_returnFalse() {
+        Settings.Secure.putInt(mContentResolver, SETTING_KEY, 0);
+
+        assertThat(mController.isChecked()).isFalse();
+    }
+
+    @Test
+    public void isChecked_SettingIsNotSet_returnTrue() {
+        Settings.Secure.putString(mContentResolver, SETTING_KEY, null);
+
+        assertThat(mController.isChecked()).isTrue();
+    }
+
+    @Test
+    public void setChecked_true_SettingIsNot0() {
+        mController.setChecked(true);
+
+        assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isNotEqualTo(0);
+    }
+
+    @Test
+    public void setChecked_false_SettingIs0() {
+        mController.setChecked(false);
+
+        assertThat(Settings.Secure.getInt(mContentResolver, SETTING_KEY, 0)).isEqualTo(0);
+    }
+}
diff --git a/tests/unit/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java b/tests/unit/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
index 47e3ad9..02b8706 100644
--- a/tests/unit/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/NetworkSelectSettingsTest.java
@@ -166,6 +166,19 @@
         assertThat(mNetworkSelectSettings.doAggregation(testList)).isEqualTo(expected);
     }
 
+    @Test
+    public void doAggregation_hasDuplicateItemsDiffMccMncCase3_removeSamePlmnRatItem() {
+        List<CellInfo> testList = Arrays.asList(
+                createLteCellInfo(false, 123, "123", "232", "CarrierA"),
+                createLteCellInfo(false, 124, "123", "233", "CarrierA"),
+                createLteCellInfo(true, 125, "123", "234", "CarrierA"),
+                createGsmCellInfo(false, 126, "456", "232", "CarrierA"));
+        List<CellInfo> expected = Arrays.asList(
+                createLteCellInfo(true, 125, "123", "234", "CarrierA"),
+                createGsmCellInfo(false, 126, "456", "232", "CarrierA"));
+        assertThat(mNetworkSelectSettings.doAggregation(testList)).isEqualTo(expected);
+    }
+
     private CellInfoLte createLteCellInfo(boolean registered, int cellId, String mcc, String mnc,
             String plmnName) {
         CellIdentityLte cil = new CellIdentityLte(
diff --git a/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java
index 9eb67df..fac7772 100644
--- a/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java
@@ -80,7 +80,8 @@
                 mTelephonyManager).setVoNrEnabled(anyBoolean());
         mCarrierConfig = new PersistableBundle();
         doReturn(mCarrierConfig).when(mCarrierConfigManager).getConfigForSubId(SUB_ID);
-        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, false);
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL, false);
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, true);
         mCarrierConfig.putIntArray(CarrierConfigManager.KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY,
                 new int[]{1, 2});
 
@@ -92,7 +93,8 @@
     }
 
     @Test
-    public void getAvailabilityStatus_vonrDisabled_returnUnavailable() {
+    public void getAvailabilityStatus_vonrEnabledAndVisibleDisable_returnUnavailable() {
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL, true);
         mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, false);
 
         mController.init(SUB_ID);
@@ -102,7 +104,30 @@
     }
 
     @Test
-    public void getAvailabilityStatus_vonrEnabled_returnAvailable() {
+    public void getAvailabilityStatus_vonrDisabledAndVisibleDisable_returnUnavailable() {
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL, false);
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, false);
+
+        mController.init(SUB_ID);
+
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(
+                BasePreferenceController.CONDITIONALLY_UNAVAILABLE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_vonrDisabledAndVisibleEnable_returnUnavailable() {
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL, false);
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, true);
+
+        mController.init(SUB_ID);
+
+        assertThat(mController.getAvailabilityStatus()).isEqualTo(
+                BasePreferenceController.CONDITIONALLY_UNAVAILABLE);
+    }
+
+    @Test
+    public void getAvailabilityStatus_vonrEnabledAndVisibleEnable_returnAvailable() {
+        mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_ENABLED_BOOL, true);
         mCarrierConfig.putBoolean(CarrierConfigManager.KEY_VONR_SETTING_VISIBILITY_BOOL, true);
 
         mController.init(SUB_ID);
