diff --git a/src/com/android/settings/network/InternetPreferenceController.java b/src/com/android/settings/network/InternetPreferenceController.java
index 48cc884..e5a8690 100644
--- a/src/com/android/settings/network/InternetPreferenceController.java
+++ b/src/com/android/settings/network/InternetPreferenceController.java
@@ -29,11 +29,13 @@
 import android.graphics.drawable.Drawable;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
+import android.util.Log;
 
 import androidx.annotation.IdRes;
 import androidx.annotation.VisibleForTesting;
 import androidx.lifecycle.Lifecycle;
 import androidx.lifecycle.LifecycleObserver;
+import androidx.lifecycle.LifecycleOwner;
 import androidx.lifecycle.OnLifecycleEvent;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
@@ -43,9 +45,14 @@
 import com.android.settings.wifi.WifiSummaryUpdater;
 import com.android.settingslib.Utils;
 import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity;
+import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity;
+import com.android.settingslib.mobile.dataservice.UiccInfoEntity;
 import com.android.settingslib.utils.ThreadUtils;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -53,7 +60,7 @@
  */
 public class InternetPreferenceController extends AbstractPreferenceController implements
         LifecycleObserver, SummaryUpdater.OnSummaryChangeListener,
-        InternetUpdater.InternetChangeListener {
+        InternetUpdater.InternetChangeListener, MobileNetworkRepository.MobileNetworkCallback  {
 
     public static final String KEY = "internet_settings";
 
@@ -61,6 +68,9 @@
     private final WifiSummaryUpdater mSummaryHelper;
     private InternetUpdater mInternetUpdater;
     private @InternetUpdater.InternetType int mInternetType;
+    private LifecycleOwner mLifecycleOwner;
+    private MobileNetworkRepository mMobileNetworkRepository;
+    private List<SubscriptionInfoEntity> mSubInfoEntityList = new ArrayList<>();
 
     @VisibleForTesting
     static Map<Integer, Integer> sIconMap = new HashMap<>();
@@ -81,7 +91,8 @@
         sSummaryMap.put(INTERNET_ETHERNET, R.string.to_switch_networks_disconnect_ethernet);
     }
 
-    public InternetPreferenceController(Context context, Lifecycle lifecycle) {
+    public InternetPreferenceController(Context context, Lifecycle lifecycle,
+            LifecycleOwner lifecycleOwner) {
         super(context);
         if (lifecycle == null) {
             throw new IllegalArgumentException("Lifecycle must be set");
@@ -89,6 +100,8 @@
         mSummaryHelper = new WifiSummaryUpdater(mContext, this);
         mInternetUpdater = new InternetUpdater(context, lifecycle, this);
         mInternetType = mInternetUpdater.getInternetType();
+        mLifecycleOwner = lifecycleOwner;
+        mMobileNetworkRepository = new MobileNetworkRepository(context, this);
         lifecycle.addObserver(this);
     }
 
@@ -143,12 +156,14 @@
     /** @OnLifecycleEvent(ON_RESUME) */
     @OnLifecycleEvent(ON_RESUME)
     public void onResume() {
+        mMobileNetworkRepository.addRegister(mLifecycleOwner);
         mSummaryHelper.register(true);
     }
 
     /** @OnLifecycleEvent(ON_PAUSE) */
     @OnLifecycleEvent(ON_PAUSE)
     public void onPause() {
+        mMobileNetworkRepository.removeRegister();
         mSummaryHelper.register(false);
     }
 
@@ -187,27 +202,43 @@
 
     @VisibleForTesting
     void updateCellularSummary() {
-        final SubscriptionManager subscriptionManager =
-                mContext.getSystemService(SubscriptionManager.class);
-        if (subscriptionManager == null) {
-            return;
+        CharSequence summary = null;
+        for (SubscriptionInfoEntity subInfo : mSubInfoEntityList) {
+            if (subInfo.isSubscriptionVisible && subInfo.isActiveDataSubscriptionId) {
+                summary = subInfo.uniqueName;
+                break;
+            } else if (subInfo.isDefaultDataSubscription) {
+                summary = mContext.getString(
+                        R.string.mobile_data_temp_using, subInfo.uniqueName);
+            }
         }
-        SubscriptionInfo subInfo = subscriptionManager.getActiveSubscriptionInfo(
-                SubscriptionManager.getActiveDataSubscriptionId());
-        SubscriptionInfo defaultSubInfo = subscriptionManager.getDefaultDataSubscriptionInfo();
-        subInfo = subscriptionManager.isSubscriptionVisible(subInfo) ? subInfo : defaultSubInfo;
-        if (subInfo == null) {
+
+        if (summary == null) {
             return;
         }
-        CharSequence summary;
-        if (subInfo.equals(defaultSubInfo)) {
-            // DDS is active
-            summary = SubscriptionUtil.getUniqueSubscriptionDisplayName(subInfo, mContext);
-        } else {
-            summary = mContext.getString(
-                    R.string.mobile_data_temp_using,
-                    SubscriptionUtil.getUniqueSubscriptionDisplayName(subInfo, mContext));
-        }
         mPreference.setSummary(summary);
     }
+
+    @Override
+    public void onAvailableSubInfoChanged(List<SubscriptionInfoEntity> subInfoEntityList) {
+        if ((mSubInfoEntityList != null &&
+                (subInfoEntityList.isEmpty() || !subInfoEntityList.equals(mSubInfoEntityList)))
+                || (!subInfoEntityList.isEmpty() && mSubInfoEntityList == null)) {
+            mSubInfoEntityList = subInfoEntityList;
+            updateState(mPreference);
+        }
+    }
+
+    @Override
+    public void onActiveSubInfoChanged(List<SubscriptionInfoEntity> activeSubInfoList) {
+    }
+
+    @Override
+    public void onAllUiccInfoChanged(List<UiccInfoEntity> uiccInfoEntityList) {
+    }
+
+    @Override
+    public void onAllMobileNetworkInfoChanged(
+            List<MobileNetworkInfoEntity> mobileNetworkInfoEntityList) {
+    }
 }
diff --git a/src/com/android/settings/network/MobileNetworkRepository.java b/src/com/android/settings/network/MobileNetworkRepository.java
index 2e8ef0e..3b7a7ba 100644
--- a/src/com/android/settings/network/MobileNetworkRepository.java
+++ b/src/com/android/settings/network/MobileNetworkRepository.java
@@ -348,7 +348,8 @@
                     mSubscriptionManager.getDefaultVoiceSubscriptionId() == mSubId,
                     mSubscriptionManager.getDefaultSmsSubscriptionId() == mSubId,
                     mSubscriptionManager.getDefaultDataSubscriptionId() == mSubId,
-                    mSubscriptionManager.getDefaultSubscriptionId() == mSubId);
+                    mSubscriptionManager.getDefaultSubscriptionId() == mSubId,
+                    mSubscriptionManager.getActiveDataSubscriptionId() == mSubId);
         }
     }
 
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
index a94a1bf..39cf136 100644
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -97,7 +97,7 @@
         final MobilePlanPreferenceController mobilePlanPreferenceController =
                 new MobilePlanPreferenceController(context, mobilePlanHost);
         final InternetPreferenceController internetPreferenceController =
-                new InternetPreferenceController(context, lifecycle);
+                new InternetPreferenceController(context, lifecycle, lifecycleOwner);
 
         final VpnPreferenceController vpnPreferenceController =
                 new VpnPreferenceController(context);
diff --git a/tests/unit/src/com/android/settings/network/InternetPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/InternetPreferenceControllerTest.java
index 6d9e49d..65edb3e 100644
--- a/tests/unit/src/com/android/settings/network/InternetPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/InternetPreferenceControllerTest.java
@@ -42,6 +42,7 @@
 import android.telephony.SubscriptionManager;
 
 import androidx.lifecycle.Lifecycle;
+import androidx.lifecycle.LifecycleOwner;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceManager;
 import androidx.preference.PreferenceScreen;
@@ -73,6 +74,7 @@
     private InternetPreferenceController mController;
     private PreferenceScreen mScreen;
     private Preference mPreference;
+    private LifecycleOwner mLifecycleOwner;
 
     @Before
     public void setUp() {
@@ -84,7 +86,8 @@
         when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(wifiManager);
         when(wifiManager.getWifiState()).thenReturn(WifiManager.WIFI_STATE_DISABLED);
 
-        mController = new InternetPreferenceController(mContext, mock(Lifecycle.class));
+        mController = new InternetPreferenceController(mContext, mock(Lifecycle.class),
+                mLifecycleOwner);
         mController.sIconMap.put(INTERNET_WIFI, 0);
         if (Looper.myLooper() == null) {
             Looper.prepare();
diff --git a/tests/unit/src/com/android/settings/network/NetworkProviderCallsSmsControllerTest.java b/tests/unit/src/com/android/settings/network/NetworkProviderCallsSmsControllerTest.java
index 88cf775..007251a 100644
--- a/tests/unit/src/com/android/settings/network/NetworkProviderCallsSmsControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/NetworkProviderCallsSmsControllerTest.java
@@ -170,8 +170,8 @@
                 TelephonyManager.DEFAULT_PORT_INDEX, false, null,
                 SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, displayName, false,
                 "1234567890", true, "default", false, isValid,
-                true, isActive, isAvailable, isDefaultCall,
-                isDefaultSms, false, false);
+                true, isActive, isAvailable, isDefaultCall, isDefaultSms, false, false,
+                false);
     }
 
     @Test
diff --git a/tests/unit/src/com/android/settings/network/NetworkProviderDownloadedSimListControllerTest.java b/tests/unit/src/com/android/settings/network/NetworkProviderDownloadedSimListControllerTest.java
index dd61b56..7dbef05 100644
--- a/tests/unit/src/com/android/settings/network/NetworkProviderDownloadedSimListControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/NetworkProviderDownloadedSimListControllerTest.java
@@ -150,7 +150,7 @@
                 mcc, mnc, countryIso, true, cardId, TelephonyManager.DEFAULT_PORT_INDEX, false,
                 null, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, displayName, false,
                 "1234567890", true, defaultSimConfig.toString(), false, isValid, true, isActive,
-                isAvailable, isDefaultCall, isDefaultSms, isDefaultData, false);
+                isAvailable, isDefaultCall, isDefaultSms, isDefaultData, false, false);
     }
 
     private String setSummaryResId(String resName) {
diff --git a/tests/unit/src/com/android/settings/network/NetworkProviderSimListControllerTest.java b/tests/unit/src/com/android/settings/network/NetworkProviderSimListControllerTest.java
index 16f8afd..16995d5 100644
--- a/tests/unit/src/com/android/settings/network/NetworkProviderSimListControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/NetworkProviderSimListControllerTest.java
@@ -156,8 +156,7 @@
                 mcc, mnc, countryIso, false, cardId, TelephonyManager.DEFAULT_PORT_INDEX, false,
                 null, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, displayName, false,
                 "1234567890", true, defaultSimConfig.toString(), false, isValid, true, isActive,
-                isAvailable,
-                isDefaultCall, isDefaultSms, false, false);
+                isAvailable, isDefaultCall, isDefaultSms, false, false, false);
     }
 
     private String setSummaryResId(String resName, String value) {
