#define ANDROID_WAKE_LOCK_USECS 200000
#define PROPERTY_RIL_IMPL "gsm.version.ril-impl"
-#define PROPERTY_QAN_ELEMENTS "ro.ril.telephony.mqanelements"
// match with constant in RIL.java
#define MAX_COMMAND_BYTES (8 * 1024)
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);
static int responseCallList(Parcel &p, void *response, size_t responselen);
/** response is a char **, pointing to an array of char *'s */
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;
if (response == NULL && responselen != 0) {
char **p_cur = (char **) response;
numStrings = responselen / sizeof(char *);
- if (network_search) {
- int32_t QANElements;
-
- /*
- * This needs to be set to same value as mQANElements in the RIL
- * Telephony class.
- */
- QANElements = property_get_int32(PROPERTY_QAN_ELEMENTS, 4);
- p.writeInt32 ((numStrings / 5) * QANElements);
- } else {
- p.writeInt32 (numStrings);
- }
+ p.writeInt32 (numStrings);
/* each string*/
startResponse;
for (int i = 0 ; i < numStrings ; i++) {
- if (network_search && ((i + 1) % 5 == 0))
- continue;
appendPrintBuf("%s%s,", printBuf, (char*)p_cur[i]);
writeStringToParcel (p, p_cur[i]);
}
{RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE, dispatchVoid, responseInts},
{RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, dispatchVoid, responseVoid},
{RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, dispatchString, responseVoid},
- {RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , dispatchVoid, responseStringsNetworks},
+ {RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , dispatchVoid, responseStrings},
{RIL_REQUEST_DTMF_START, dispatchString, responseVoid},
{RIL_REQUEST_DTMF_STOP, dispatchVoid, responseVoid},
{RIL_REQUEST_BASEBAND_VERSION, dispatchVoid, responseString},