Merge "[Satellite] Move entitlment check to auto type only." into main
diff --git a/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java b/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
index 18217fd..dde35eb 100644
--- a/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
+++ b/src/com/android/settings/network/telephony/satellite/SatelliteSettingPreferenceController.java
@@ -186,17 +186,17 @@
             return;
         }
 
-        if (!mCarrierConfigs.getBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)) {
-            preference.setSummary(R.string.satellite_setting_summary_without_entitlement);
-            return;
-        }
-
         if (isCarrierRoamingNtnConnectedTypeManual()) {
             preference.setSummary(
                     mCarrierRoamingNtnModeCallback.isSatelliteSmsAvailable()
                             ? R.string.satellite_setting_enabled_summary
                             : R.string.satellite_setting_disabled_summary);
         } else {
+            if (!mCarrierConfigs.getBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL)) {
+                preference.setSummary(R.string.satellite_setting_summary_without_entitlement);
+                return;
+            }
+
             try {
                 Set<Integer> restrictionReason =
                         mSatelliteManager.getAttachRestrictionReasonsForCarrier(mSubId);
diff --git a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
index c67f0ac..c527d68 100644
--- a/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
+++ b/tests/unit/src/com/android/settings/network/telephony/satellite/SatelliteSettingsPreferenceControllerTest.java
@@ -217,7 +217,10 @@
 
     @Test
     @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
-    public void summary_noEntitlement_showSummaryWithoutEntitlement() {
+    public void summary_noEntitlementAndTypeIsAuto_showSummaryWithoutEntitlement() {
+        mCarrierConfig.putInt(
+                CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT,
+                CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC);
         mCarrierConfig.putBoolean(
                 KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL,
                 false);
@@ -237,9 +240,6 @@
     @Test
     @EnableFlags(com.android.settings.flags.Flags.FLAG_SATELLITE_OEM_SETTINGS_UX_MIGRATION)
     public void summary_smsAvailableForManualType_showSummaryWithAccount() {
-        mCarrierConfig.putBoolean(
-                KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL,
-                true);
         mCarrierConfig.putInt(
                 CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT,
                 CARRIER_ROAMING_NTN_CONNECT_MANUAL);