freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

telephony框架設(shè)計解析-文庫吧資料

2025-07-01 23:08本頁面
  

【正文】 /*package*/ void internalNotifyRegistrant (Object result, Throwable exception) { //此處的handler就是注冊時的handler Handler h = getHandler()。 = what。 //PS:://public final class RIL extends BaseCommands implements CommandsInterface public void setOnRestrictedStateChanged(Handler h, int what, Object obj) { mRestrictedStateRegistrant = new Registrant (h, what, obj)。 (msg)。 = what。 if (h == null) { clear()。這里的what是哪里來的,這樣或許我們就可以知道此處是如何通知觀察者的了 public void notifyRegistrant(AsyncResult ar) { internalNotifyRegistrant (, )。 exception = ex。 //上面的new個對象new AsyncResult (null, ret, null),進(jìn)入AsyncResult類中查看此構(gòu)造函數(shù) //由構(gòu)造函數(shù)可只modem返回的參數(shù)ret傳給了AsyncResult的result參數(shù) public AsyncResult (Object uo, Object r, Throwable ex) { userObj = uo。定義類型是Registrant,后面分析有用 ( new AsyncResult (null, ret, null))。 if (mRestrictedStateRegistrant != null) { //ret的定義是Object ret。四、Telephony中觀察者模式設(shè)計ServiceStateTracker、DcTracker、CallTracker以及其繼承類中大都是使用觀察者模式進(jìn)行監(jiān)聽回調(diào)執(zhí)行,下面我們舉例來分析觀察者模式中重要的參數(shù)問題。 }//sim信息卡相關(guān)獲取服務(wù) private IPhoneSubInfo getSubscriberInfo() { return ((iphonesubinfo))。 private ITelephony getITelephony() { return (())。 private ITelephonyRegistry getTelephonyRegistry() { return (())。 }三、Telephony中AIDL模式設(shè)計Telephony中有很多地方在使用跨進(jìn)程數(shù)據(jù)調(diào)用維持手機(jī)的整體運行,所以有些服務(wù)died之后可能會導(dǎo)致phone進(jìn)程crash。 } (LOG_TAG, Creating Phone with type = + phoneType + sub = + i)。 if (phoneType == ) { phone = (PhoneBase) getGsmPhone(i)。 i++) { PhoneBase phone = null。 } } ................. //在這里我們可以發(fā)現(xiàn)phone類型是由網(wǎng)絡(luò)模式?jīng)Q定的 //,位每個卡槽的sim創(chuàng)建一個phone類型,在整個telephony運行過程中,和卡槽始終對應(yīng) //,然后就可以進(jìn)行相關(guān)設(shè)置,此處使用了代理模式 for (int i = 0。 !()) { try { networkModes[i] = (value)。 if (value != null amp。 i++) { // reads the system properties and makes mandsinterface // Get preferred network type. networkModes[i] = 。 區(qū)分運營商的類一般如下1. GSMPhone和CDMAPhone 繼承自PhoneBase2. GsmServiceStateTracker和CdmaServiceStateTracker 繼承自ServiceStateTracker3. GsmCallTracker和CdmaCallTracker 繼承自CallTracker第二種和第三種在第一種的類的內(nèi)部初始化,所以有第一種決定,只需要關(guān)心第一種phone類型是如何來確定的, //(例如是GSM ONLY還是LTE...),telephony中有關(guān)網(wǎng)絡(luò)模式此處不做詳細(xì)講述,后面再單獨講解 for (int i = 0。 mLooper = ()。 mNotifier = notifier。 } protected PhoneBase(String name, PhoneNotifier notifier, Context context, CommandsInterface ci, boolean unitTestMode, int phoneId) { mPhoneId = phoneId。 log(GSMPhone: constructor: sub = + mPhoneId)。 (this, EVENT_SS, null)。 (this, EVENT_SSN, null)。 (this, EVENT_RADIO_ON, null)。 } (this, EVENT_RADIO_AVAILABLE, null)。//以上三個是telephony中非常重要的三個tracker,此處不做詳細(xì)流程分析 if (!unitTestMode) { mSimPhoneBookIntManager = new SimPhoneBookInterfaceManager(this)。//telephony中處理注冊狀態(tài),信號等相關(guān)初始化 mSST = new GsmServiceStateTracker(this)。 }//這個mCi就是就連接RIL的經(jīng)過RIL往modem發(fā)送指令//每張卡對應(yīng)一個phone對應(yīng)一個mCi對應(yīng)modem處理相應(yīng)的sim卡//下面這四個變量都是對應(yīng)卡對應(yīng)變量 ()。 public GSMPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, boolean unitTestMode, int phoneId) { super(GSM, notifier, context, ci, unitTestMode, phoneId)。 } } } } 此時的phone類型就出來了。 i numPhones。 ().updatePhonesAvailability(sProxyPhones)。 (LOG_TAG, Creating SubInfoRecordUpdater )。 // Set up monitor to watch for changes to SMS packages // (context)。 if (ponentName != null) { packageName = ()。 // Ensure that we have a default SMS app. Requesting the app with // updateIfNeeded set to true is enough to configure a default SMS app. ComponentName ponentName = (context, true /* updateIfNeeded */)。 // Set the default phone in base class. // FIXME: This is a first best guess at what the defaults will be. It // FIXME: needs to be done in a more controlled manner in the future. sProxyPhone = sProxyPhones[0]。 sProxyPhones[i] = new PhoneProxy(phone)。 } else if (phoneType == ) { phone = new CDMALTEPhone(context, sCommandsInterfaces[i], sPhoneNotifier, i)。 int phoneType = (networkModes[i])。 i numPhones。 // Instantiate UiccController so that all other classes can just // call getInstance() //,framework中對sim卡的處理,讀寫等等操作 mUiccController = (context, sCommandsInterfaces)。 } (LOG_TAG, Creating SubscriptionController)。
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1