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

Bug: b/314881248
Test: manual done
Change-Id: I258471182cb9092fade50881f52f7299c10c8da2
This commit is contained in:
Hyunho
2024-01-10 05:55:48 +00:00
parent c1c500ae67
commit b6a6b1e91a
2 changed files with 7 additions and 0 deletions

View File

@@ -790,4 +790,7 @@
<!-- Whether to disable location toggle for ChromeOS devices--> <!-- Whether to disable location toggle for ChromeOS devices-->
<bool name="config_disable_location_toggle_for_chrome">false</bool> <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> </resources>

View File

@@ -42,6 +42,7 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceScreen; import androidx.preference.PreferenceScreen;
import com.android.internal.telephony.util.TelephonyUtils; import com.android.internal.telephony.util.TelephonyUtils;
import com.android.settings.R;
import com.android.settings.network.MobileNetworkRepository; import com.android.settings.network.MobileNetworkRepository;
import com.android.settings.network.SubscriptionUtil; import com.android.settings.network.SubscriptionUtil;
import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -110,6 +111,9 @@ public class ConvertToEsimPreferenceController extends TelephonyBasePreferenceCo
* To avoid showing users dialogs that can cause confusion, * To avoid showing users dialogs that can cause confusion,
* add conditions to allow conversion in the absence of active eSIM. * 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()) { if (findConversionSupportComponent()) {
return mSubscriptionInfoEntity != null && mSubscriptionInfoEntity.isActiveSubscriptionId return mSubscriptionInfoEntity != null && mSubscriptionInfoEntity.isActiveSubscriptionId
&& !mSubscriptionInfoEntity.isEmbedded && isActiveSubscription(subId) && !mSubscriptionInfoEntity.isEmbedded && isActiveSubscription(subId)