|
|
|
@ -282,8 +282,8 @@ static void dispatchSimAuthentication(Parcel &p, RequestInfo *pRI); |
|
|
|
|
static void dispatchDataProfile(Parcel &p, RequestInfo *pRI); |
|
|
|
|
static void dispatchRadioCapability(Parcel &p, RequestInfo *pRI); |
|
|
|
|
static int responseInts(Parcel &p, void *response, size_t responselen); |
|
|
|
|
static int responseIntsGetPreferredNetworkType(Parcel &p, void *response, size_t responselen); |
|
|
|
|
static int responseStrings(Parcel &p, void *response, size_t responselen); |
|
|
|
|
static int responseStringsNetworks(Parcel &p, void *response, size_t responselen); |
|
|
|
|
static int responseStrings(Parcel &p, void *response, size_t responselen, bool network_search); |
|
|
|
|
static int responseString(Parcel &p, void *response, size_t responselen); |
|
|
|
|
static int responseVoid(Parcel &p, void *response, size_t responselen); |
|
|
|
@ -2224,6 +2224,41 @@ responseInts(Parcel &p, void *response, size_t responselen) { |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int |
|
|
|
|
responseIntsGetPreferredNetworkType(Parcel &p, void *response, size_t responselen) { |
|
|
|
|
int numInts; |
|
|
|
|
|
|
|
|
|
if (response == NULL && responselen != 0) { |
|
|
|
|
RLOGE("invalid response: NULL"); |
|
|
|
|
return RIL_ERRNO_INVALID_RESPONSE; |
|
|
|
|
} |
|
|
|
|
if (responselen % sizeof(int) != 0) { |
|
|
|
|
RLOGE("responseInts: invalid response length %d expected multiple of %d\n", |
|
|
|
|
(int)responselen, (int)sizeof(int)); |
|
|
|
|
return RIL_ERRNO_INVALID_RESPONSE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int *p_int = (int *) response; |
|
|
|
|
|
|
|
|
|
numInts = responselen / sizeof(int); |
|
|
|
|
p.writeInt32 (numInts); |
|
|
|
|
|
|
|
|
|
/* each int*/ |
|
|
|
|
startResponse; |
|
|
|
|
for (int i = 0 ; i < numInts ; i++) { |
|
|
|
|
if (i == 0 && p_int[0] == 7) { |
|
|
|
|
RLOGD("REQUEST_GET_PREFERRED_NETWORK_TYPE: NETWORK_MODE_GLOBAL => NETWORK_MODE_WCDMA_PREF"); |
|
|
|
|
p_int[0] = 0; |
|
|
|
|
} |
|
|
|
|
appendPrintBuf("%s%d,", printBuf, p_int[i]); |
|
|
|
|
p.writeInt32(p_int[i]); |
|
|
|
|
} |
|
|
|
|
removeLastChar; |
|
|
|
|
closeResponse; |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** response is a char **, pointing to an array of char *'s
|
|
|
|
|
The parcel will begin with the version */ |
|
|
|
|
static int responseStringsWithVersion(int version, Parcel &p, void *response, size_t responselen) { |
|
|
|
@ -2236,10 +2271,6 @@ static int responseStrings(Parcel &p, void *response, size_t responselen) { |
|
|
|
|
return responseStrings(p, response, responselen, false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int responseStringsNetworks(Parcel &p, void *response, size_t responselen) { |
|
|
|
|
return responseStrings(p, response, responselen, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** response is a char **, pointing to an array of char *'s */ |
|
|
|
|
static int responseStrings(Parcel &p, void *response, size_t responselen, bool network_search) { |
|
|
|
|
int numStrings; |
|
|
|
|