Skip to content

Commit

Permalink
修复:v3.0.5在部分机型解析/config/query返回sim_info_list节点时报错
Browse files Browse the repository at this point in the history
  • Loading branch information
pppscn committed Jul 4, 2022
1 parent eacaa19 commit 93fb0b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/idormy/sms/forwarder/entity/SimInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import java.io.Serializable
data class SimInfo(
//运营商信息:中国移动 中国联通 中国电信
@SerializedName("carrier_name")
var mCarrierName: CharSequence? = null,
var mCarrierName: String? = null,
//集成电路卡识别码即SIM卡卡号
@SerializedName("icc_id")
var mIccId: CharSequence? = null,
var mIccId: String? = null,
//卡槽id:-1=没插入、 0=卡槽1 、1=卡槽2
@SerializedName("sim_slot_index")
var mSimSlotIndex: Int = 0,
//号码
@SerializedName("number")
var mNumber: CharSequence? = null,
var mNumber: String? = null,
//国家代码
@SerializedName("country_iso")
var mCountryIso: CharSequence? = null,
var mCountryIso: String? = null,
//SIM的 Subscription Id (SIM插入顺序)
@SerializedName("subscription_id")
var mSubscriptionId: Int = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class PhoneUtils private constructor() {
//1.1.1 有使用的卡,就遍历所有卡
for (subscriptionInfo in activeSubscriptionInfoList) {
val simInfo = SimInfo()
simInfo.mCarrierName = subscriptionInfo.carrierName
simInfo.mIccId = subscriptionInfo.iccId
simInfo.mCarrierName = subscriptionInfo.carrierName.toString()
simInfo.mIccId = subscriptionInfo.iccId.toString()
simInfo.mSimSlotIndex = subscriptionInfo.simSlotIndex
simInfo.mNumber = subscriptionInfo.number
simInfo.mCountryIso = subscriptionInfo.countryIso
simInfo.mNumber = subscriptionInfo.number.toString()
simInfo.mCountryIso = subscriptionInfo.countryIso.toString()
simInfo.mSubscriptionId = subscriptionInfo.subscriptionId
println(simInfo.toString())
infoList[simInfo.mSimSlotIndex] = simInfo
Expand Down

0 comments on commit 93fb0b6

Please sign in to comment.