char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
} RIL_CDMA_SignalInfoRecord;
-// NEWRIL:TODO Remove #define NEWRIL and RIL_CallOld when we have the new ril
-#define NEWRIL 0
-#if !NEWRIL
-typedef struct {
- RIL_CallState state;
- int index; /* Connection Index for use with, eg, AT+CHLD */
- int toa; /* type of address, eg 145 = intl */
- char isMpty; /* nonzero if is mpty call */
- char isMT; /* nonzero if call is mobile terminated */
- char als; /* ALS line indicator if available
- (0 = line 1) */
- char isVoice; /* nonzero if this is is a voice call */
- char * number; /* Remote party number */
- char numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
-} RIL_CallOld;
-#endif
-
typedef struct {
RIL_CallState state;
int index; /* Connection Index for use with, eg, AT+CHLD */
p.writeInt32(num);
for (int i = 0 ; i < num ; i++) {
- /* NEWRIL:TODO Remove this conditional and the else clause when we have the new ril */
-#if NEWRIL
- LOGD("Compilied for NEWRIL"); // NEWRIL:TODO remove when we have the new ril
RIL_Call *p_cur = ((RIL_Call **) response)[i];
/* each call info */
p.writeInt32(p_cur->state);
p_cur->numberPresentation,
p_cur->name,
p_cur->namePresentation);
-#else
- LOGD("Old RIL");
- RIL_CallOld *p_cur = ((RIL_CallOld **) response)[i];
- /* each call info */
- p.writeInt32(p_cur->state);
- p.writeInt32(p_cur->index);
- p.writeInt32(p_cur->toa);
- p.writeInt32(p_cur->isMpty);
- p.writeInt32(p_cur->isMT);
- p.writeInt32(p_cur->als);
- p.writeInt32(p_cur->isVoice);
- p.writeInt32(0); // p_cur->isVoicePrivacy);
- writeStringToParcel (p, p_cur->number);
- p.writeInt32(p_cur->numberPresentation);
- writeStringToParcel (p, "a-person");
- p.writeInt32(2); // p_cur->namePresentation);
- appendPrintBuf("%s[id=%d,%s,toa=%d,",
- printBuf,
- p_cur->index,
- callStateToString(p_cur->state),
- p_cur->toa);
- appendPrintBuf("%s%s,%s,als=%d,%s,%s,",
- printBuf,
- (p_cur->isMpty)?"conf":"norm",
- (p_cur->isMT)?"mt":"mo",
- p_cur->als,
- (p_cur->isVoice)?"voc":"nonvoc");
- appendPrintBuf("%s%s,cli=%d]",
- printBuf,
- p_cur->number,
- p_cur->numberPresentation);
-#endif
}
removeLastChar;
closeResponse;
for (int i = 0; i < 5; i++) {
p.writeInt32(0);
}
+
+ startResponse;
+ appendPrintBuf("%s[signalStrength=%d,bitErrorRate=%d]",
+ printBuf,
+ p_cur->signalStrength, p_cur->bitErrorRate);
+ closeResponse;
} else if (responselen == sizeof (RIL_SignalStrength)) {
// New RIL
RIL_SignalStrength *p_cur = ((RIL_SignalStrength *) response);
p.writeInt32(p_cur->EVDO_SignalStrength.dbm);
p.writeInt32(p_cur->EVDO_SignalStrength.ecio);
p.writeInt32(p_cur->EVDO_SignalStrength.signalNoiseRatio);
+
+ startResponse;
+ appendPrintBuf("%s[signalStrength=%d,bitErrorRate=%d,
+ CDMA_SignalStrength.dbm=%d,CDMA_SignalStrength.ecio=%d,
+ EVDO_SignalStrength.dbm =%d,EVDO_SignalStrength.ecio=%d,
+ EVDO_SignalStrength.signalNoiseRatio=%d]",
+ printBuf,
+ p_cur->GW_SignalStrength.signalStrength,
+ p_cur->GW_SignalStrength.bitErrorRate,
+ p_cur->CDMA_SignalStrength.dbm,
+ p_cur->CDMA_SignalStrength.ecio,
+ p_cur->EVDO_SignalStrength.dbm,
+ p_cur->EVDO_SignalStrength.ecio,
+ p_cur->EVDO_SignalStrength.signalNoiseRatio);
+ closeResponse;
} else {
LOGE("invalid response length");
return RIL_ERRNO_INVALID_RESPONSE;
}
- startResponse;
- appendPrintBuf("%s[signalStrength=%d,bitErrorRate=%d,\
- CDMA_SignalStrength.dbm=%d,CDMA_SignalStrength.ecio=%d,\
- EVDO_SignalStrength.dbm =%d,EVDO_SignalStrength.ecio=%d,\
- EVDO_SignalStrength.signalNoiseRatio=%d]",
- printBuf,
- p_cur->GW_SignalStrength.signalStrength,
- p_cur->GW_SignalStrength.bitErrorRate,
- p_cur->CDMA_SignalStrength.dbm,
- p_cur->CDMA_SignalStrength.ecio,
- p_cur->EVDO_SignalStrength.dbm,
- p_cur->EVDO_SignalStrength.ecio,
- p_cur->EVDO_SignalStrength.signalNoiseRatio);
- closeResponse;
return 0;
}
* Note: directly modified line and has *p_call point directly into
* modified line
*/
-#if NEWRIL
static int callFromCLCCLine(char *line, RIL_Call *p_call)
-#else
-static int callFromCLCCLine(char *line, RIL_CallOld *p_call)
-#endif
{
//+CLCC: 1,0,2,0,0,\"+18005551212\",145
// index,isMT,state,mode,isMpty(,number,TOA)?
ATLine *p_cur;
int countCalls;
int countValidCalls;
-#if NEWRIL
RIL_Call *p_calls;
RIL_Call **pp_calls;
-#else
- RIL_CallOld *p_calls;
- RIL_CallOld **pp_calls;
-#endif
int i;
int needRepoll = 0;
/* yes, there's an array of pointers and then an array of structures */
-#if NEWRIL
pp_calls = (RIL_Call **)alloca(countCalls * sizeof(RIL_Call *));
p_calls = (RIL_Call *)alloca(countCalls * sizeof(RIL_Call));
memset (p_calls, 0, countCalls * sizeof(RIL_Call));
-#else
- pp_calls = (RIL_CallOld **)alloca(countCalls * sizeof(RIL_CallOld *));
- p_calls = (RIL_CallOld *)alloca(countCalls * sizeof(RIL_CallOld));
- memset (p_calls, 0, countCalls * sizeof(RIL_CallOld));
-#endif
/* init the pointer array */
for(i = 0; i < countCalls ; i++) {
s_repollCallsCount = 0;
#endif /*WORKAROUND_ERRONEOUS_ANSWER*/
-#if NEWRIL
RIL_onRequestComplete(t, RIL_E_SUCCESS, pp_calls,
countValidCalls * sizeof (RIL_Call *));
-#else
- RIL_onRequestComplete(t, RIL_E_SUCCESS, pp_calls,
- countValidCalls * sizeof (RIL_CallOld *));
-#endif
at_response_free(p_response);