Commit 7e0cfcc7 by zhangchengbo

fix:优化Sim卡切换运营商提示

parent 387f1818
......@@ -56,6 +56,7 @@ import com.secspace.sms.extensions.*
import com.secspace.sms.helpers.*
import com.secspace.sms.messaging.*
import com.secspace.sms.models.*
import com.secspace.sms.util.VendorSelectUtil
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
......@@ -924,7 +925,9 @@ class ThreadActivity : SimpleActivity() {
numbers.forEach {
config.saveUseSIMIdAtNumber(it, currentSubscriptionId)
}
toast(currentSIMCard.label)
val selectVendorResult = VendorSelectUtil.showSimCardOperator(currentSIMCard.label)
Log.d(TAG, "setupSIMSelector: selectVendorResult = $selectVendorResult")
toast("切换为卡${currentSIMCard.id} $selectVendorResult")
}
}
......
package com.secspace.sms.util
object VendorSelectUtil {
fun showSimCardOperator(type :String):String{
if(type.contains("CMCC",true) || type.contains("China Mobile",true)){
return "中国移动"
}else if(type.contains("China Unicom",true)){
return "中国联通"
}else if(type.contains("China Telecom",true)){
return "中国电信"
}
return ""
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment