Framework層sim卡相關的設計

一、UiccControllerjava

二、SubscriptionControlerandroid

 

 

關於切換主卡的實例:ip

/frameworks/opt/telephony/src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java的updateSubscriptionInfoByIccId()在調用setDefaultDataSubId時是否作了客製化?

======具體log分析===================================================================
05-17 16:59:12.271325 9935 9970 I AT : AT< +ESIMS: 0,11 (RIL_URC_READER, tid:0) //-->拔出卡1,SIM卡爲ABSENT
05-17 16:59:12.343410 1465 1465 D IccCardProxy: broadcastIccStateChangedIntent intent ACTION_SIM_STATE_CHANGED value=ABSENT reason=null for mPhoneId=0 (slot 0)

05-17 16:59:12.517455 1465 10476 D SubscriptionInfoUpdater: SIM1 hot plug out //-->Framework拿到卡1的拔出狀態
05-17 16:59:12.517517 1465 10476 D SubscriptionInfoUpdater: checkAllIccIdReady +, retry_count = 10
05-17 16:59:12.517548 1465 10476 D SubscriptionInfoUpdater: No SIM insert :0
05-17 16:59:12.517564 1465 10476 D SubscriptionInfoUpdater: iccId[0] = N/A
05-17 16:59:12.517593 1465 10476 D SubscriptionInfoUpdater: iccId[1] = 89860116851066658343 //-->卡2拔出狀態還沒拿到,iccid是有效值
05-17 16:59:12.517611 1465 10476 D SubscriptionInfoUpdater: [updateSubscriptionInfoIfNeed]+
05-17 16:59:12.517667 1465 10476 D SubscriptionInfoUpdater: [updateSubscriptionInfoIfNeed] icc id change, slot[0]
05-17 16:59:12.517709 1465 10476 D SubscriptionInfoUpdater: All IccIds query complete
05-17 16:59:12.518369 1465 10476 D SubscriptionInfoUpdater: [updateSubscriptionInfoIfNeed]- return: true
05-17 16:59:12.518607 1465 10477 D SubscriptionInfoUpdater: updateSubscriptionInfoByIccId:+ Start

05-17 16:59:12.556791 9935 9976 I AT : AT< +ESIMS: 0,11 (RIL_URC2_READER, tid:0) //-->拔出卡2

05-17 16:59:12.995745 1465 10477 D SubscriptionInfoUpdater: zhoush subInfos size = 1 //-->這個log是貴公司添加的
05-17 16:59:12.995763 1465 10477 D SubscriptionInfoUpdater: zhoush setDefaultDataSubId(subInfos.get(0).getSubscriptionId() //-->這裏客製化?只有一張卡時切成主卡?

05-17 16:59:12.997524 1465 10477 D SubscriptionController: [setDefaultDataSubId] num phones=2, subId=2 //-->準備切主卡到卡2
05-17 16:59:12.998199 1465 10477 D SubscriptionController: [setDefaultDataSubId] phoneId=0 subId=-2 RAF=65536
05-17 16:59:12.998633 1465 10477 D SubscriptionController: [setDefaultDataSubId] phoneId=1 subId=2 RAF=81930
05-17 16:59:13.007282 1465 10477 D ProxyController: do setRadioCapability //-->開始sim switch
05-17 16:59:13.146071 1465 10477 D SubscriptionInfoUpdater: updateSubscriptionInfoByIccId:- SsubscriptionInfo update complete

05-17 16:59:13.649356 9935 9958 I AT : AT> AT+ES3G=2, 7 (RIL_CMD_READER_3, tid:482091226192) //-->切主卡到卡2的AT

05-17 16:59:13.976900 1465 1465 D IccCardProxy: broadcastIccStateChangedIntent intent ACTION_SIM_STATE_CHANGED value=ABSENT reason=null for mPhoneId=1 (slot 1)
05-17 16:59:14.130866 1465 10528 D SubscriptionInfoUpdater: SIM2 hot plug out //-->這時候Framework纔拿到卡2的拔出狀態
05-17 16:59:14.190058 1465 10529 D SubscriptionInfoUpdater: updateSubscriptionInfoByIccId:- SsubscriptionInfo update complete
 ci

相關文章
相關標籤/搜索