diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index 4096925..b5f13db 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -50,12 +50,14 @@
             android:layout_height="wrap_content"
             android:layout_weight="1">
 
-            <ImageView
+            <com.google.android.setupdesign.view.IllustrationVideoView
+                xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:app="http://schemas.android.com/apk/res-auto"
+                android:id="@+id/face_enroll_introduction_animation"
                 style="@style/SudContentIllustration"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:contentDescription="@null"
-                android:src="@drawable/face_enroll_introduction" />
+                app:sudVideo="@raw/face_enroll_introduction_animation" />
 
         </com.google.android.setupdesign.view.FillContentLayout>
 
diff --git a/res/raw/face_enroll_introduction_animation.mp4 b/res/raw/face_enroll_introduction_animation.mp4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/res/raw/face_enroll_introduction_animation.mp4
diff --git a/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java b/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
index 7be441a..671624e 100644
--- a/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
+++ b/src/com/android/settings/wifi/details/WifiDetailPreferenceController.java
@@ -173,7 +173,7 @@
                     // fall through
                 case WifiManager.NETWORK_STATE_CHANGED_ACTION:
                 case WifiManager.RSSI_CHANGED_ACTION:
-                    updateInfo();
+                    updateLiveNetworkInfo();
                     break;
             }
         }
@@ -336,7 +336,7 @@
         mNetwork = mWifiManager.getCurrentNetwork();
         mLinkProperties = mConnectivityManager.getLinkProperties(mNetwork);
         mNetworkCapabilities = mConnectivityManager.getNetworkCapabilities(mNetwork);
-        updateInfo();
+        updateLiveNetworkInfo();
         mContext.registerReceiver(mReceiver, mFilter);
         mConnectivityManager.registerNetworkCallback(mNetworkRequest, mNetworkCallback,
                 mHandler);
@@ -353,7 +353,30 @@
         mConnectivityManager.unregisterNetworkCallback(mNetworkCallback);
     }
 
-    private void updateInfo() {
+    // TODO(b/124707751): Refactoring the code later, keeping it currently for stability.
+    protected void updateSavedNetworkInfo() {
+        mSignalStrengthPref.setVisible(false);
+        mFrequencyPref.setVisible(false);
+        mTxLinkSpeedPref.setVisible(false);
+        mRxLinkSpeedPref.setVisible(false);
+
+        // MAC Address Pref
+        mMacAddressPref.setSummary(mWifiConfig.getRandomizedMacAddress().toString());
+
+        // TODO(b/124700353): Change header to data usage chart
+        mEntityHeaderController.setSummary(mAccessPoint.getSettingsSummary())
+                .done(mFragment.getActivity(), true /* rebind */);
+
+        updateIpLayerInfo();
+
+        // Update whether the forget button should be displayed.
+        mButtonsPref.setButton1Visible(canForgetNetwork());
+
+        // TODO(b/124700405): Check if showing share button is fine to added for saved network
+        mButtonsPref.setButton3Visible(false);
+    }
+
+    private void updateLiveNetworkInfo() {
         // No need to fetch LinkProperties and NetworkCapabilities, they are updated by the
         // callbacks. mNetwork doesn't change except in onResume.
         mNetworkInfo = mConnectivityManager.getNetworkInfo(mNetwork);
diff --git a/src/com/android/settings/wifi/details/WifiDetailSavedNetworkPreferenceController.java b/src/com/android/settings/wifi/details/WifiDetailSavedNetworkPreferenceController.java
new file mode 100644
index 0000000..3407890
--- /dev/null
+++ b/src/com/android/settings/wifi/details/WifiDetailSavedNetworkPreferenceController.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.wifi.details;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.wifi.WifiManager;
+import android.os.Handler;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+import com.android.settingslib.wifi.AccessPoint;
+
+public class WifiDetailSavedNetworkPreferenceController extends WifiDetailPreferenceController {
+
+    WifiDetailSavedNetworkPreferenceController(AccessPoint accessPoint,
+            ConnectivityManager connectivityManager, Context context,
+            Fragment fragment, Handler handler,
+            Lifecycle lifecycle,
+            WifiManager wifiManager,
+            MetricsFeatureProvider metricsFeatureProvider,
+            IconInjector injector) {
+        super(accessPoint, connectivityManager, context, fragment, handler, lifecycle, wifiManager,
+                metricsFeatureProvider, injector);
+    }
+
+    public static WifiDetailSavedNetworkPreferenceController newInstance(
+            AccessPoint accessPoint,
+            ConnectivityManager connectivityManager,
+            Context context,
+            Fragment fragment,
+            Handler handler,
+            Lifecycle lifecycle,
+            WifiManager wifiManager,
+            MetricsFeatureProvider metricsFeatureProvider) {
+        return new WifiDetailSavedNetworkPreferenceController(
+                accessPoint, connectivityManager, context, fragment, handler, lifecycle,
+                wifiManager, metricsFeatureProvider, new IconInjector(context));
+    }
+
+    @Override
+    public void onPause() {
+        // Do nothing
+    }
+
+    @Override
+    public void onResume() {
+        updateSavedNetworkInfo();
+    }
+}
diff --git a/src/com/android/settings/wifi/details/WifiNetworkDetailsFragment.java b/src/com/android/settings/wifi/details/WifiNetworkDetailsFragment.java
index ab470bf..fd2e14a 100644
--- a/src/com/android/settings/wifi/details/WifiNetworkDetailsFragment.java
+++ b/src/com/android/settings/wifi/details/WifiNetworkDetailsFragment.java
@@ -51,6 +51,9 @@
 
     private static final String TAG = "WifiNetworkDetailsFrg";
 
+    // Extra for if current fragment shows saved network status or not.
+    public static final String EXTRA_IS_SAVED_NETWORK = "SavedNetwork";
+
     private AccessPoint mAccessPoint;
     private WifiDetailPreferenceController mWifiDetailPreferenceController;
 
@@ -122,15 +125,31 @@
     protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         final ConnectivityManager cm = context.getSystemService(ConnectivityManager.class);
-        mWifiDetailPreferenceController = WifiDetailPreferenceController.newInstance(
-                mAccessPoint,
-                cm,
-                context,
-                this,
-                new Handler(Looper.getMainLooper()),  // UI thread.
-                getSettingsLifecycle(),
-                context.getSystemService(WifiManager.class),
-                mMetricsFeatureProvider);
+
+        final boolean isDisplaySavedNetworkDetails =
+                getArguments().getBoolean(EXTRA_IS_SAVED_NETWORK, false /* defaultValue */);
+        if (isDisplaySavedNetworkDetails) {
+            mWifiDetailPreferenceController =
+                    WifiDetailSavedNetworkPreferenceController.newInstance(
+                            mAccessPoint,
+                            cm,
+                            context,
+                            this,
+                            new Handler(Looper.getMainLooper()),  // UI thread.
+                            getSettingsLifecycle(),
+                            context.getSystemService(WifiManager.class),
+                            mMetricsFeatureProvider);
+        } else {
+            mWifiDetailPreferenceController = WifiDetailPreferenceController.newInstance(
+                    mAccessPoint,
+                    cm,
+                    context,
+                    this,
+                    new Handler(Looper.getMainLooper()),  // UI thread.
+                    getSettingsLifecycle(),
+                    context.getSystemService(WifiManager.class),
+                    mMetricsFeatureProvider);
+        }
 
         controllers.add(mWifiDetailPreferenceController);
         controllers.add(new WifiMeteredPreferenceController(context, mAccessPoint.getConfig()));
diff --git a/src/com/android/settings/wifi/savedaccesspoints/SavedAccessPointsWifiSettings.java b/src/com/android/settings/wifi/savedaccesspoints/SavedAccessPointsWifiSettings.java
index 7b2574f..6a9e8a2 100644
--- a/src/com/android/settings/wifi/savedaccesspoints/SavedAccessPointsWifiSettings.java
+++ b/src/com/android/settings/wifi/savedaccesspoints/SavedAccessPointsWifiSettings.java
@@ -23,13 +23,18 @@
 import android.content.DialogInterface;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;
+import android.util.FeatureFlagUtils;
 import android.util.Log;
 
 import com.android.settings.R;
+import com.android.settings.core.FeatureFlags;
+import com.android.settings.core.SubSettingLauncher;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.development.featureflags.FeatureFlagPersistent;
 import com.android.settings.wifi.WifiConfigUiBase;
 import com.android.settings.wifi.WifiDialog;
 import com.android.settings.wifi.WifiSettings;
+import com.android.settings.wifi.details.WifiNetworkDetailsFragment;
 import com.android.settingslib.wifi.AccessPoint;
 import com.android.settingslib.wifi.AccessPointPreference;
 
@@ -95,7 +100,23 @@
             mAccessPointSavedState = null;
         }
 
-        showDialog(WifiSettings.WIFI_DIALOG_ID);
+        if (usingDetailsFragment(getContext())) {
+            if (mSelectedAccessPoint == null) {
+                mSelectedAccessPoint = new AccessPoint(getActivity(), mAccessPointSavedState);
+            }
+            final Bundle savedState = new Bundle();
+            mSelectedAccessPoint.saveWifiState(savedState);
+            savedState.putBoolean(WifiNetworkDetailsFragment.EXTRA_IS_SAVED_NETWORK, true);
+
+            new SubSettingLauncher(getContext())
+                    .setTitleText(mSelectedAccessPoint.getTitle())
+                    .setDestination(WifiNetworkDetailsFragment.class.getName())
+                    .setArguments(savedState)
+                    .setSourceMetricsCategory(getMetricsCategory())
+                    .launch();
+        } else {
+            showDialog(WifiSettings.WIFI_DIALOG_ID);
+        }
     }
 
     @Override
@@ -166,4 +187,15 @@
     public void onCancel(DialogInterface dialog) {
         mSelectedAccessPoint = null;
     }
+
+    /**
+     * Checks if showing WifiNetworkDetailsFragment when clicking saved network item.
+     */
+    public static boolean usingDetailsFragment(Context context) {
+        if (FeatureFlagUtils.isEnabled(context, FeatureFlags.MOBILE_NETWORK_V2)
+                && FeatureFlagPersistent.isEnabled(context, FeatureFlags.NETWORK_INTERNET_V2)) {
+            return false;    // TODO(b/124695272): mark true when UI is ready.
+        }
+        return false;
+    }
 }
