X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=libril%2Fril.cpp;fp=libril%2Fril.cpp;h=8936f3656143ce322eb7b6b7e7b30224b3d61464;hb=6bfaf64c427b4d48a4fb1931eb8b5c0f79ce20f1;hp=ef93e5b8c069e22937e7f3f514fa687a99fd61c3;hpb=61bedcf4f339fb2eecb2e50bbd5637d0b70a9004;p=android-x86%2Fhardware-ril.git diff --git a/libril/ril.cpp b/libril/ril.cpp index ef93e5b..8936f36 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -305,14 +305,10 @@ static int responseCellInfoList(Parcel &p, void *response, size_t responselen); static int responseHardwareConfig(Parcel &p, void *response, size_t responselen); static int responseDcRtInfo(Parcel &p, void *response, size_t responselen); static int responseRadioCapability(Parcel &p, void *response, size_t responselen); -static int responseSSData(Parcel &p, void *response, size_t responselen); - static int decodeVoiceRadioTechnology (RIL_RadioState radioState); static int decodeCdmaSubscriptionSource (RIL_RadioState radioState); static RIL_RadioState processRadioState(RIL_RadioState newRadioState); -static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType); - #ifdef RIL_SHLIB #if defined(ANDROID_MULTI_SIM) extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data, @@ -3242,84 +3238,6 @@ static int responseRadioCapability(Parcel &p, void *response, size_t responselen return 0; } -static int responseSSData(Parcel &p, void *response, size_t responselen) { - RLOGD("In responseSSData"); - int num; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response length was %d expected %d", - (int)responselen, (int)sizeof (RIL_SIM_IO_Response)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof(RIL_StkCcUnsolSsResponse)) { - RLOGE("invalid response length %d, expected %d", - (int)responselen, (int)sizeof(RIL_StkCcUnsolSsResponse)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - RIL_StkCcUnsolSsResponse *p_cur = (RIL_StkCcUnsolSsResponse *) response; - p.writeInt32(p_cur->serviceType); - p.writeInt32(p_cur->requestType); - p.writeInt32(p_cur->teleserviceType); - p.writeInt32(p_cur->serviceClass); - p.writeInt32(p_cur->result); - - if (isServiceTypeCfQuery(p_cur->serviceType, p_cur->requestType)) { - RLOGD("responseSSData CF type, num of Cf elements %d", p_cur->cfData.numValidIndexes); - if (p_cur->cfData.numValidIndexes > NUM_SERVICE_CLASSES) { - RLOGE("numValidIndexes is greater than max value %d, " - "truncating it to max value", NUM_SERVICE_CLASSES); - p_cur->cfData.numValidIndexes = NUM_SERVICE_CLASSES; - } - /* number of call info's */ - p.writeInt32(p_cur->cfData.numValidIndexes); - - for (int i = 0; i < p_cur->cfData.numValidIndexes; i++) { - RIL_CallForwardInfo cf = p_cur->cfData.cfInfo[i]; - - p.writeInt32(cf.status); - p.writeInt32(cf.reason); - p.writeInt32(cf.serviceClass); - p.writeInt32(cf.toa); - writeStringToParcel(p, cf.number); - p.writeInt32(cf.timeSeconds); - appendPrintBuf("%s[%s,reason=%d,cls=%d,toa=%d,%s,tout=%d],", printBuf, - (cf.status==1)?"enable":"disable", cf.reason, cf.serviceClass, cf.toa, - (char*)cf.number, cf.timeSeconds); - RLOGD("Data: %d,reason=%d,cls=%d,toa=%d,num=%s,tout=%d],", cf.status, - cf.reason, cf.serviceClass, cf.toa, (char*)cf.number, cf.timeSeconds); - } - } else { - p.writeInt32 (SS_INFO_MAX); - - /* each int*/ - for (int i = 0; i < SS_INFO_MAX; i++) { - appendPrintBuf("%s%d,", printBuf, p_cur->ssInfo[i]); - RLOGD("Data: %d",p_cur->ssInfo[i]); - p.writeInt32(p_cur->ssInfo[i]); - } - } - removeLastChar; - closeResponse; - - return 0; -} - -static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType) { - if ((reqType == SS_INTERROGATION) && - (serType == SS_CFU || - serType == SS_CF_BUSY || - serType == SS_CF_NO_REPLY || - serType == SS_CF_NOT_REACHABLE || - serType == SS_CF_ALL || - serType == SS_CF_ALL_CONDITIONAL)) { - return true; - } - return false; -} - static void triggerEvLoop() { int ret; if (!pthread_equal(pthread_self(), s_tid_dispatch)) {