APNs missing while numeric is null

Test: Visual Test
Fix: 312142091
Change-Id: I1920e3e2dd534d385d0282295e0c3680051d4728
This commit is contained in:
Charlotte Lu
2023-11-20 19:18:51 +08:00
parent e43645952f
commit 276f30e3b0

View File

@@ -72,6 +72,9 @@ data class ApnData(
val customizedConfig: CustomizedConfig = CustomizedConfig()
) {
fun getContentValues(context: Context): ContentValues {
val simCarrierId =
context.getSystemService(TelephonyManager::class.java)!!.createForSubscriptionId(subId)
.getSimCarrierId()
val values = ContentValues()
values.put(Telephony.Carriers.NAME, name)
values.put(Telephony.Carriers.APN, apn)
@@ -93,6 +96,7 @@ data class ApnData(
values.put(Telephony.Carriers.NETWORK_TYPE_BITMASK, networkType)
values.put(Telephony.Carriers.CARRIER_ENABLED, apnEnable)
values.put(Telephony.Carriers.EDITED_STATUS, Telephony.Carriers.USER_EDITED)
values.put(Telephony.Carriers.CARRIER_ID, simCarrierId)
return values
}
}