diff --git a/app/src/main/java/dev/bluehouse/enablevolte/Moder.kt b/app/src/main/java/dev/bluehouse/enablevolte/Moder.kt
index 766cb8b..3ed0964 100644
--- a/app/src/main/java/dev/bluehouse/enablevolte/Moder.kt
+++ b/app/src/main/java/dev/bluehouse/enablevolte/Moder.kt
@@ -287,6 +287,9 @@ class SubscriptionModer(val subscriptionId: Int) : Moder() {
}
}
+ val isCrossSIMInNetwork: Int
+ get() = this.getIntValue(CarrierConfigManager.KEY_CROSS_SIM_SPN_FORMAT_INT)
+
val isVoWifiConfigEnabled: Boolean
get() = this.getBooleanValue(CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL)
diff --git a/app/src/main/java/dev/bluehouse/enablevolte/pages/Config.kt b/app/src/main/java/dev/bluehouse/enablevolte/pages/Config.kt
index 3cfc54d..db99444 100644
--- a/app/src/main/java/dev/bluehouse/enablevolte/pages/Config.kt
+++ b/app/src/main/java/dev/bluehouse/enablevolte/pages/Config.kt
@@ -54,6 +54,7 @@ fun Config(navController: NavController, subId: Int) {
var voLTEEnabled by rememberSaveable { mutableStateOf(false) }
var voNREnabled by rememberSaveable { mutableStateOf(false) }
var crossSIMEnabled by rememberSaveable { mutableStateOf(false) }
+ var crossSIMInNetworkName by rememberSaveable { mutableStateOf(false) }
var voWiFiEnabled by rememberSaveable { mutableStateOf(false) }
var voWiFiEnabledWhileRoaming by rememberSaveable { mutableStateOf(false) }
var showIMSinSIMInfo by rememberSaveable { mutableStateOf(false) }
@@ -89,6 +90,7 @@ fun Config(navController: NavController, subId: Int) {
voLTEEnabled = moder.isVoLteConfigEnabled
voNREnabled = VERSION.SDK_INT >= VERSION_CODES.UPSIDE_DOWN_CAKE && moder.isVoNrConfigEnabled
crossSIMEnabled = moder.isCrossSIMConfigEnabled
+ crossSIMInNetworkName = (moder.showCrossSIMInNetworkName == 2)
voWiFiEnabled = moder.isVoWifiConfigEnabled
voWiFiEnabledWhileRoaming = moder.isVoWifiWhileRoamingEnabled
showIMSinSIMInfo = VERSION.SDK_INT >= VERSION_CODES.R && moder.showIMSinSIMInfo
@@ -180,6 +182,18 @@ fun Config(navController: NavController, subId: Int) {
}
}
}
+ BooleanPropertyView(label = stringResource(R.string.add_crosssim_to_network_name), toggled = crossSIMInNetworkName, minSdk = VERSION_CODES.TIRAMISU) {
+ if (VERSION.SDK_INT >= VERSION_CODES.TIRAMISU) {
+ crossSIMInNetworkName = if (crossSIMInNetworkName) {
+ moder.updateCarrierConfig(CarrierConfigManager.KEY_CROSS_SIM_SPN_FORMAT_INT, 1)
+ false
+ } else {
+ moder.updateCarrierConfig(CarrierConfigManager.KEY_CROSS_SIM_SPN_FORMAT_INT, 2)
+ moder.restartIMSRegistration()
+ true
+ }
+ }
+ }
BooleanPropertyView(label = stringResource(R.string.enable_vowifi), toggled = voWiFiEnabled) {
voWiFiEnabled = if (voWiFiEnabled) {
moder.updateCarrierConfig(CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 041dbdf..3823e50 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -14,6 +14,7 @@
Enable VoLTE
Enable VoNR
Enable Backup Calling
+ Add \"Backup Calling"\ to Network Name
Enable VoWiFi
Enable VoWiFi while roaming
Show VoWiFi preference in Settings