Merge "APNs missing while numeric is null" into main
This commit is contained in:
@@ -72,6 +72,9 @@ data class ApnData(
|
|||||||
val customizedConfig: CustomizedConfig = CustomizedConfig()
|
val customizedConfig: CustomizedConfig = CustomizedConfig()
|
||||||
) {
|
) {
|
||||||
fun getContentValues(context: Context): ContentValues {
|
fun getContentValues(context: Context): ContentValues {
|
||||||
|
val simCarrierId =
|
||||||
|
context.getSystemService(TelephonyManager::class.java)!!.createForSubscriptionId(subId)
|
||||||
|
.getSimCarrierId()
|
||||||
val values = ContentValues()
|
val values = ContentValues()
|
||||||
values.put(Telephony.Carriers.NAME, name)
|
values.put(Telephony.Carriers.NAME, name)
|
||||||
values.put(Telephony.Carriers.APN, apn)
|
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.NETWORK_TYPE_BITMASK, networkType)
|
||||||
values.put(Telephony.Carriers.CARRIER_ENABLED, apnEnable)
|
values.put(Telephony.Carriers.CARRIER_ENABLED, apnEnable)
|
||||||
values.put(Telephony.Carriers.EDITED_STATUS, Telephony.Carriers.USER_EDITED)
|
values.put(Telephony.Carriers.EDITED_STATUS, Telephony.Carriers.USER_EDITED)
|
||||||
|
values.put(Telephony.Carriers.CARRIER_ID, simCarrierId)
|
||||||
return values
|
return values
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user