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 responseLceStatus(Parcel &p, void *response, size_t responselen);
+static int responseLceData(Parcel &p, void *response, size_t responselen);
static int decodeVoiceRadioTechnology (RIL_RadioState radioState);
static int decodeCdmaSubscriptionSource (RIL_RadioState radioState);
return 0;
}
+static int responseLceStatus(Parcel &p, void *response, size_t responselen) {
+ if (response == NULL || responselen != sizeof(RIL_LceStatusInfo)) {
+ if (response == NULL) {
+ RLOGE("invalid response: NULL");
+ }
+ else {
+ RLOGE("responseLceStatus: invalid response length %d expecting len: d%",
+ sizeof(RIL_LceStatusInfo), responselen);
+ }
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ RIL_LceStatusInfo *p_cur = (RIL_LceStatusInfo *)response;
+ p.write((void *)p_cur, 1); // p_cur->lce_status takes one byte.
+ p.writeInt32(p_cur->actual_interval_ms);
+
+ startResponse;
+ appendPrintBuf("LCE Status: %d, actual_interval_ms: %d",
+ p_cur->lce_status, p_cur->actual_interval_ms);
+ closeResponse;
+
+ return 0;
+}
+
+static int responseLceData(Parcel &p, void *response, size_t responselen) {
+ if (response == NULL || responselen != sizeof(RIL_LceDataInfo)) {
+ if (response == NULL) {
+ RLOGE("invalid response: NULL");
+ }
+ else {
+ RLOGE("responseLceData: invalid response length %d expecting len: d%",
+ sizeof(RIL_LceDataInfo), responselen);
+ }
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ RIL_LceDataInfo *p_cur = (RIL_LceDataInfo *)response;
+ p.writeInt32(p_cur->last_hop_capacity_kbps);
+
+ /* p_cur->confidence_level and p_cur->lce_suspended take 1 byte each.*/
+ p.write((void *)&(p_cur->confidence_level), 1);
+ p.write((void *)&(p_cur->lce_suspended), 1);
+
+ startResponse;
+ appendPrintBuf("LCE info received: capacity %d confidence level %d
+ and suspended %d",
+ p_cur->last_hop_capacity_kbps, p_cur->confidence_level,
+ p_cur->lce_suspended);
+ closeResponse;
+
+ return 0;
+}
+
/**
* A write on the wakeup fd is done just to pop us out of select()
* We empty the buffer here and then ril_event will reset the timers on the
{RIL_REQUEST_SHUTDOWN, dispatchVoid, responseVoid},
{RIL_REQUEST_GET_RADIO_CAPABILITY, dispatchVoid, responseRadioCapability},
{RIL_REQUEST_SET_RADIO_CAPABILITY, dispatchRadioCapability, responseRadioCapability},
+ {RIL_REQUEST_START_LCE, dispatchInts, responseLceStatus},
+ {RIL_REQUEST_STOP_LCE, dispatchVoid, responseLceStatus},
+ {RIL_REQUEST_PULL_LCEDATA, dispatchVoid, responseLceData},