Add the config to show the pSIM conversion menu and set it to false

Bug: b/314881248
Test: manual done
Change-Id: I258471182cb9092fade50881f52f7299c10c8da2
diff --git a/res/values/config.xml b/res/values/config.xml
index 0b48515..6f784dd 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -790,4 +790,7 @@
 
     <!-- Whether to disable location toggle for ChromeOS devices-->
     <bool name="config_disable_location_toggle_for_chrome">false</bool>
+
+    <!-- Whether to display pSIM conversion menu in Settings.-->
+    <bool name="config_psim_conversion_menu_enabled">false</bool>
 </resources>
diff --git a/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java b/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
index 799543f..27b8c16 100644
--- a/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
+++ b/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
@@ -42,6 +42,7 @@
 import androidx.preference.PreferenceScreen;
 
 import com.android.internal.telephony.util.TelephonyUtils;
+import com.android.settings.R;
 import com.android.settings.network.MobileNetworkRepository;
 import com.android.settings.network.SubscriptionUtil;
 import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -110,6 +111,9 @@
          * To avoid showing users dialogs that can cause confusion,
          * add conditions to allow conversion in the absence of active eSIM.
          */
+        if (!mContext.getResources().getBoolean(R.bool.config_psim_conversion_menu_enabled)) {
+            return CONDITIONALLY_UNAVAILABLE;
+        }
         if (findConversionSupportComponent()) {
             return mSubscriptionInfoEntity != null && mSubscriptionInfoEntity.isActiveSubscriptionId
                     && !mSubscriptionInfoEntity.isEmbedded && isActiveSubscription(subId)