PhoneSwitcher to onEvaluate:
PhoneSwitcher.mDefaultDataChangedReceiver.onReceive->EVENT_DEFAULT_SUBSCRIPTION_CHANGED->onEvaluate(REQUESTS_UNCHANGED, "defaultChanged")
PhoneSwitcher.mSubscriptionsChangedListener.onSubscriptionsChanged->EVENT_SUBSCRIPTION_CHANGED->onEvaluate(REQUESTS_UNCHANGED, "subChanged")
(other to onEvaluate??)
onEvaluate to activate/deactivate:
PhoneSwitcher.onEvaluate
->List<Integer> newActivePhones = new ArrayList<Integer>();
->for (DcRequest dcRequest : mPrioritizedDcRequests)
->int phoneIdForRequest = phoneIdForRequest(dcRequest.networkRequest);
->newActivePhones.add(phoneIdForRequest);
->if (newActivePhones.size() >= mMaxActivePhones) break;
->for (int phoneId = 0; phoneId < mNumPhones; phoneId++)
->if (newActivePhones.contains(phoneId) == false)
->deactivate->RIL.setDataAllowed(false)
->for (int phoneId : newActivePhones)
->activate->RIL.setDataAllowed(true)
activate/deactivate to DcTracker.requestNetwork:
mActivePhoneRegistrants notifyRegistrants:
PhoneSwitcher.activate/deactivate->mActivePhoneRegistrants[phoneId].notifyRegistrants->TelephonyNetworkFactory.EVENT_ACTIVE_PHONE_SWITCH->onActivePhoneSwitch
TelephonyNetworkFactory.onActivePhoneSwitch/onDefaultChange->applyRequests->DcTracker.requestNetwork->...
setDataAllowed:
RIL.setDataAllowed->RIL_REQUEST_ALLOW_DATA->IRadio.setDataAllowed->...->ril_service.cpp->RadioImpl::setDataAllowed->dispatchInts(serial, mSlotId, RIL_REQUEST_ALLOW_DATA, 1, BOOL_TO_INT(allow))
->android::addRequestToList->Ril.cpp->addRequestToList
->CALL_ONREQUEST->RIL_RadioFunctions->onRequest->...
->...->reference-ril.c.onRequest->RIL_REQUEST_ALLOW_DATA->RIL_onRequestComplete->RIL_Env->OnRequestComplete
struct RIL_Env RilSapSocket::uimRilEnv = {
.OnRequestComplete = RilSapSocket::sOnRequestComplete,
.OnUnsolicitedResponse = RilSapSocket::sOnUnsolicitedResponse,
.RequestTimedCallback = RIL_requestTimedCallback
};
->...->RilSapSocket::sOnRequestComplete->onRequestComplete
[Android P][Network data][Notes1]PhoneSwitcher SUBSCRIPTION_CHANGED