#define LOG_TAG "RILC"
-#include <android/hardware/radio/1.0/IRadio.h>
+#include <android/hardware/radio/1.1/IRadio.h>
+#include <android/hardware/radio/1.1/IRadioResponse.h>
+#include <android/hardware/radio/1.1/IRadioIndication.h>
+#include <android/hardware/radio/1.1/types.h>
+
#include <android/hardware/radio/deprecated/1.0/IOemHook.h>
#include <hwbinder/IPCThreadState.h>
using ::android::hardware::configureRpcThreadpool;
using ::android::hardware::joinRpcThreadpool;
using ::android::hardware::Return;
-using ::android::hardware::Status;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::hidl_array;
+using ::android::hardware::radio::V1_1::NetworkScanRequest;
+using ::android::hardware::radio::V1_1::KeepaliveRequest;
using ::android::hardware::Void;
using android::CommandInfo;
using android::RequestInfo;
sp<RadioImpl> radioService[SIM_COUNT];
sp<OemHookImpl> oemHookService[SIM_COUNT];
// counter used for synchronization. It is incremented every time response callbacks are updated.
-volatile int32_t mCounter[SIM_COUNT];
+volatile int32_t mCounterRadio[SIM_COUNT];
+volatile int32_t mCounterOemHook[SIM_COUNT];
#else
sp<RadioImpl> radioService[1];
sp<OemHookImpl> oemHookService[1];
// counter used for synchronization. It is incremented every time response callbacks are updated.
-volatile int32_t mCounter[1];
+volatile int32_t mCounterRadio[1];
+volatile int32_t mCounterOemHook[1];
#endif
static pthread_rwlock_t radioServiceRwlock = PTHREAD_RWLOCK_INITIALIZER;
void convertRilCellInfoListToHal(void *response, size_t responseLen, hidl_vec<CellInfo>& records);
-struct RadioImpl : public IRadio {
+struct RadioImpl : public ::android::hardware::radio::V1_1::IRadio {
int32_t mSlotId;
sp<IRadioResponse> mRadioResponse;
sp<IRadioIndication> mRadioIndication;
Return<void> getAvailableNetworks(int32_t serial);
+ Return<void> startNetworkScan(int32_t serial, const NetworkScanRequest& request);
+
+ Return<void> stopNetworkScan(int32_t serial);
+
Return<void> startDtmf(int32_t serial,
const ::android::hardware::hidl_string& s);
Return<void> getDataCallList(int32_t serial);
- Return<void> sendScreenState(int32_t serial, bool enable);
-
Return<void> setSuppServiceNotifications(int32_t serial, bool enable);
Return<void> writeSmsToSim(int32_t serial,
Return<void> iccTransmitApduBasicChannel(int32_t serial, const SimApdu& message);
Return<void> iccOpenLogicalChannel(int32_t serial,
- const ::android::hardware::hidl_string& aid);
+ const ::android::hardware::hidl_string& aid, int32_t p2);
Return<void> iccCloseLogicalChannel(int32_t serial, int32_t channelId);
Return<void> setIndicationFilter(int32_t serial, int32_t indicationFilter);
+ Return<void> startKeepalive(int32_t serial, const KeepaliveRequest& keepalive);
+
+ Return<void> stopKeepalive(int32_t serial, int32_t sessionHandle);
+
Return<void> setSimCardPower(int32_t serial, bool powerUp);
+ Return<void> setSimCardPower_1_1(int32_t serial,
+ const ::android::hardware::radio::V1_1::CardPowerState state);
Return<void> responseAcknowledgement();
+ Return<void> setCarrierInfoForImsiEncryption(int32_t serial,
+ const ::android::hardware::radio::V1_1::ImsiEncryptionInfo& message);
+
void checkReturnStatus(Return<void>& ret);
};
char *ptr = va_arg(ap, char *);
if (ptr) {
#ifdef MEMSET_FREED
- // TODO: Should pass in the maximum length of the string
- memsetString(ptr);
+#define MAX_STRING_LENGTH 4096
+ memset(ptr, 0, strnlen(ptr, MAX_STRING_LENGTH));
#endif
free(ptr);
}
}
void sendErrorResponse(RequestInfo *pRI, RIL_Errno err) {
- android::Parcel p; // TODO: should delete this after translation of all commands is complete
- pRI->pCI->responseFunction(p, (int) pRI->socket_id, pRI->pCI->requestNumber,
+ pRI->pCI->responseFunction((int) pRI->socket_id,
(int) RadioResponseType::SOLICITED, pRI->token, err, NULL, 0);
}
sendErrorResponse(pRI, RIL_E_NO_MEMORY);
return false;
}
- strncpy(*dest, src, len + 1);
+ strncpy(*dest, src.c_str(), len + 1);
return true;
}
va_start(ap, countStrings);
for (int i = 0; i < countStrings; i++) {
const char* str = va_arg(ap, const char *);
- if (!copyHidlStringToRil(&pStrings[i], str, pRI)) {
+ if (!copyHidlStringToRil(&pStrings[i], hidl_string(str), pRI)) {
va_end(ap);
for (int j = 0; j < i; j++) {
memsetAndFreeStrings(1, pStrings[j]);
return false;
}
- RIL_SIM_APDU apdu;
- memset (&apdu, 0, sizeof(RIL_SIM_APDU));
+ RIL_SIM_APDU apdu = {};
apdu.sessionid = message.sessionId;
apdu.cla = message.cla;
return true;
}
-void checkReturnStatus(int32_t slotId, Return<void>& ret) {
+void checkReturnStatus(int32_t slotId, Return<void>& ret, bool isRadioService) {
if (ret.isOk() == false) {
RLOGE("checkReturnStatus: unable to call response/indication callback");
// Remote process hosting the callbacks must be dead. Reset the callback objects;
// Caller should already hold rdlock, release that first
// note the current counter to avoid overwriting updates made by another thread before
// write lock is acquired.
- int counter = mCounter[slotId];
+ int counter = isRadioService ? mCounterRadio[slotId] : mCounterOemHook[slotId];
pthread_rwlock_t *radioServiceRwlockPtr = radio::getRadioServiceRwlock(slotId);
int ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);
assert(ret == 0);
// make sure the counter value has not changed
- if (counter == mCounter[slotId]) {
- radioService[slotId]->mRadioResponse = NULL;
- radioService[slotId]->mRadioIndication = NULL;
- oemHookService[slotId]->mOemHookResponse = NULL;
- oemHookService[slotId]->mOemHookIndication = NULL;
- mCounter[slotId]++;
+ if (counter == (isRadioService ? mCounterRadio[slotId] : mCounterOemHook[slotId])) {
+ if (isRadioService) {
+ radioService[slotId]->mRadioResponse = NULL;
+ radioService[slotId]->mRadioIndication = NULL;
+ } else {
+ oemHookService[slotId]->mOemHookResponse = NULL;
+ oemHookService[slotId]->mOemHookIndication = NULL;
+ }
+ isRadioService ? mCounterRadio[slotId]++ : mCounterOemHook[slotId]++;
} else {
RLOGE("checkReturnStatus: not resetting responseFunctions as they likely "
"got updated on another thread");
}
void RadioImpl::checkReturnStatus(Return<void>& ret) {
- ::checkReturnStatus(mSlotId, ret);
+ ::checkReturnStatus(mSlotId, ret, true);
}
Return<void> RadioImpl::setResponseFunctions(
const ::android::sp<IRadioResponse>& radioResponseParam,
const ::android::sp<IRadioIndication>& radioIndicationParam) {
- RLOGD("RadioImpl::setResponseFunctions");
+ RLOGD("setResponseFunctions");
pthread_rwlock_t *radioServiceRwlockPtr = radio::getRadioServiceRwlock(mSlotId);
int ret = pthread_rwlock_wrlock(radioServiceRwlockPtr);
mRadioResponse = radioResponseParam;
mRadioIndication = radioIndicationParam;
- mCounter[mSlotId]++;
+ mCounterRadio[mSlotId]++;
ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);
+ // client is connected. Send initial indications.
+ android::onNewCommandConnect((RIL_SOCKET_ID) mSlotId);
+
return Void();
}
Return<void> RadioImpl::getIccCardStatus(int32_t serial) {
- RLOGD("RadioImpl::getIccCardStatus: serial %d", serial);
+#if VDBG
+ RLOGD("getIccCardStatus: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_SIM_STATUS);
return Void();
}
Return<void> RadioImpl::supplyIccPinForApp(int32_t serial, const hidl_string& pin,
const hidl_string& aid) {
- RLOGD("RadioImpl::supplyIccPinForApp: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPinForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_PIN,
- 2, (const char *)pin, (const char *)aid);
+ 2, pin.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::supplyIccPukForApp(int32_t serial, const hidl_string& puk,
const hidl_string& pin, const hidl_string& aid) {
- RLOGD("RadioImpl::supplyIccPukForApp: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPukForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_PUK,
- 3, (const char *)puk, (const char *)pin, (const char *)aid);
+ 3, puk.c_str(), pin.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::supplyIccPin2ForApp(int32_t serial, const hidl_string& pin2,
const hidl_string& aid) {
- RLOGD("RadioImpl::supplyIccPin2ForApp: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPin2ForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_PIN2,
- 2, (const char *)pin2, (const char *)aid);
+ 2, pin2.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::supplyIccPuk2ForApp(int32_t serial, const hidl_string& puk2,
const hidl_string& pin2, const hidl_string& aid) {
- RLOGD("RadioImpl::supplyIccPuk2ForApp: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPuk2ForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_PUK2,
- 3, (const char *)puk2, (const char *)pin2, (const char *)aid);
+ 3, puk2.c_str(), pin2.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::changeIccPinForApp(int32_t serial, const hidl_string& oldPin,
const hidl_string& newPin, const hidl_string& aid) {
- RLOGD("RadioImpl::changeIccPinForApp: serial %d", serial);
+#if VDBG
+ RLOGD("changeIccPinForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_CHANGE_SIM_PIN,
- 3, (const char *)oldPin, (const char *)newPin, (const char *)aid);
+ 3, oldPin.c_str(), newPin.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::changeIccPin2ForApp(int32_t serial, const hidl_string& oldPin2,
const hidl_string& newPin2, const hidl_string& aid) {
- RLOGD("RadioImpl::changeIccPin2ForApp: serial %d", serial);
+#if VDBG
+ RLOGD("changeIccPin2ForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_CHANGE_SIM_PIN2,
- 3, (const char *)oldPin2, (const char *)newPin2, (const char *)aid);
+ 3, oldPin2.c_str(), newPin2.c_str(), aid.c_str());
return Void();
}
Return<void> RadioImpl::supplyNetworkDepersonalization(int32_t serial,
const hidl_string& netPin) {
- RLOGD("RadioImpl::supplyNetworkDepersonalization: serial %d", serial);
+#if VDBG
+ RLOGD("supplyNetworkDepersonalization: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION,
- 1, (const char *)netPin);
+ 1, netPin.c_str());
return Void();
}
Return<void> RadioImpl::getCurrentCalls(int32_t serial) {
- RLOGD("RadioImpl::getCurrentCalls: serial %d", serial);
+#if VDBG
+ RLOGD("getCurrentCalls: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CURRENT_CALLS);
return Void();
}
Return<void> RadioImpl::dial(int32_t serial, const Dial& dialInfo) {
- RLOGD("RadioImpl::dial: serial %d", serial);
+#if VDBG
+ RLOGD("dial: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_DIAL);
if (pRI == NULL) {
return Void();
}
Return<void> RadioImpl::getImsiForApp(int32_t serial, const hidl_string& aid) {
- RLOGD("RadioImpl::getImsiForApp: serial %d", serial);
+#if VDBG
+ RLOGD("getImsiForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_GET_IMSI,
- 1, (const char *) aid);
+ 1, aid.c_str());
return Void();
}
Return<void> RadioImpl::hangup(int32_t serial, int32_t gsmIndex) {
- RLOGD("RadioImpl::hangup: serial %d", serial);
+#if VDBG
+ RLOGD("hangup: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_HANGUP, 1, gsmIndex);
return Void();
}
Return<void> RadioImpl::hangupWaitingOrBackground(int32_t serial) {
- RLOGD("RadioImpl::hangupWaitingOrBackground: serial %d", serial);
+#if VDBG
+ RLOGD("hangupWaitingOrBackground: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND);
return Void();
}
Return<void> RadioImpl::hangupForegroundResumeBackground(int32_t serial) {
- RLOGD("RadioImpl::hangupForegroundResumeBackground: serial %d", serial);
+#if VDBG
+ RLOGD("hangupForegroundResumeBackground: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND);
return Void();
}
Return<void> RadioImpl::switchWaitingOrHoldingAndActive(int32_t serial) {
- RLOGD("RadioImpl::switchWaitingOrHoldingAndActive: serial %d", serial);
+#if VDBG
+ RLOGD("switchWaitingOrHoldingAndActive: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE);
return Void();
}
Return<void> RadioImpl::conference(int32_t serial) {
- RLOGD("RadioImpl::conference: serial %d", serial);
+#if VDBG
+ RLOGD("conference: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CONFERENCE);
return Void();
}
Return<void> RadioImpl::rejectCall(int32_t serial) {
- RLOGD("RadioImpl::rejectCall: serial %d", serial);
+#if VDBG
+ RLOGD("rejectCall: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_UDUB);
return Void();
}
Return<void> RadioImpl::getLastCallFailCause(int32_t serial) {
- RLOGD("RadioImpl::getLastCallFailCause: serial %d", serial);
+#if VDBG
+ RLOGD("getLastCallFailCause: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_LAST_CALL_FAIL_CAUSE);
return Void();
}
Return<void> RadioImpl::getSignalStrength(int32_t serial) {
- RLOGD("RadioImpl::getSignalStrength: serial %d", serial);
+#if VDBG
+ RLOGD("getSignalStrength: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_SIGNAL_STRENGTH);
return Void();
}
Return<void> RadioImpl::getVoiceRegistrationState(int32_t serial) {
- RLOGD("RadioImpl::getVoiceRegistrationState: serial %d", serial);
+#if VDBG
+ RLOGD("getVoiceRegistrationState: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_VOICE_REGISTRATION_STATE);
return Void();
}
Return<void> RadioImpl::getDataRegistrationState(int32_t serial) {
- RLOGD("RadioImpl::getDataRegistrationState: serial %d", serial);
+#if VDBG
+ RLOGD("getDataRegistrationState: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_DATA_REGISTRATION_STATE);
return Void();
}
Return<void> RadioImpl::getOperator(int32_t serial) {
- RLOGD("RadioImpl::getOperator: serial %d", serial);
+#if VDBG
+ RLOGD("getOperator: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_OPERATOR);
return Void();
}
Return<void> RadioImpl::setRadioPower(int32_t serial, bool on) {
- RLOGD("RadioImpl::setRadioPower: serial %d on %d", serial, on);
+ RLOGD("setRadioPower: serial %d on %d", serial, on);
dispatchInts(serial, mSlotId, RIL_REQUEST_RADIO_POWER, 1, BOOL_TO_INT(on));
return Void();
}
Return<void> RadioImpl::sendDtmf(int32_t serial, const hidl_string& s) {
- RLOGD("RadioImpl::sendDtmf: serial %d", serial);
- dispatchString(serial, mSlotId, RIL_REQUEST_DTMF, (const char *) s);
+#if VDBG
+ RLOGD("sendDtmf: serial %d", serial);
+#endif
+ dispatchString(serial, mSlotId, RIL_REQUEST_DTMF, s.c_str());
return Void();
}
Return<void> RadioImpl::sendSms(int32_t serial, const GsmSmsMessage& message) {
- RLOGD("RadioImpl::sendSms: serial %d", serial);
+#if VDBG
+ RLOGD("sendSms: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_SEND_SMS,
- 2, (const char *) message.smscPdu, (const char *) message.pdu);
+ 2, message.smscPdu.c_str(), message.pdu.c_str());
return Void();
}
Return<void> RadioImpl::sendSMSExpectMore(int32_t serial, const GsmSmsMessage& message) {
- RLOGD("RadioImpl::sendSMSExpectMore: serial %d", serial);
+#if VDBG
+ RLOGD("sendSMSExpectMore: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_SEND_SMS_EXPECT_MORE,
- 2, (const char *) message.smscPdu, (const char *) message.pdu);
+ 2, message.smscPdu.c_str(), message.pdu.c_str());
return Void();
}
-const char *convertMvnoTypeToString(MvnoType type) {
+static bool convertMvnoTypeToString(MvnoType type, char *&str) {
switch (type) {
- case MvnoType::IMSI: return "imsi";
- case MvnoType::GID: return "gid";
- case MvnoType::SPN: return "spn";
- default: return NULL;
+ case MvnoType::IMSI:
+ str = (char *)"imsi";
+ return true;
+ case MvnoType::GID:
+ str = (char *)"gid";
+ return true;
+ case MvnoType::SPN:
+ str = (char *)"spn";
+ return true;
+ case MvnoType::NONE:
+ str = (char *)"";
+ return true;
}
+ return false;
}
Return<void> RadioImpl::setupDataCall(int32_t serial, RadioTechnology radioTechnology,
const DataProfileInfo& dataProfileInfo, bool modemCognitive,
bool roamingAllowed, bool isRoaming) {
- RLOGD("RadioImpl::setupDataCall: serial %d", serial);
+#if VDBG
+ RLOGD("setupDataCall: serial %d", serial);
+#endif
if (s_vendorFunctions->version >= 4 && s_vendorFunctions->version <= 14) {
const hidl_string &protocol =
std::to_string((int) dataProfileInfo.authType).c_str(),
protocol.c_str());
} else if (s_vendorFunctions->version >= 15) {
- const char *mvnoTypeStr = convertMvnoTypeToString(dataProfileInfo.mvnoType);
- if (mvnoTypeStr == NULL) {
+ char *mvnoTypeStr = NULL;
+ if (!convertMvnoTypeToString(dataProfileInfo.mvnoType, mvnoTypeStr)) {
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_SETUP_DATA_CALL);
if (pRI != NULL) {
dataProfileInfo.roamingProtocol.c_str(),
std::to_string(dataProfileInfo.supportedApnTypesBitmap).c_str(),
std::to_string(dataProfileInfo.bearerBitmap).c_str(),
- BOOL_TO_INT(modemCognitive),
+ modemCognitive ? "1" : "0",
std::to_string(dataProfileInfo.mtu).c_str(),
mvnoTypeStr,
dataProfileInfo.mvnoMatchData.c_str(),
- BOOL_TO_INT(roamingAllowed));
+ roamingAllowed ? "1" : "0");
} else {
RLOGE("Unsupported RIL version %d, min version expected 4", s_vendorFunctions->version);
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
}
Return<void> RadioImpl::iccIOForApp(int32_t serial, const IccIo& iccIo) {
- RLOGD("RadioImpl::iccIOForApp: serial %d", serial);
+#if VDBG
+ RLOGD("iccIOForApp: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SIM_IO);
if (pRI == NULL) {
return Void();
}
- RIL_SIM_IO_v6 rilIccIo;
+ RIL_SIM_IO_v6 rilIccIo = {};
rilIccIo.command = iccIo.command;
rilIccIo.fileid = iccIo.fileId;
if (!copyHidlStringToRil(&rilIccIo.path, iccIo.path, pRI)) {
}
Return<void> RadioImpl::sendUssd(int32_t serial, const hidl_string& ussd) {
- RLOGD("RadioImpl::sendUssd: serial %d", serial);
- dispatchString(serial, mSlotId, RIL_REQUEST_SEND_USSD, (const char *) ussd);
+#if VDBG
+ RLOGD("sendUssd: serial %d", serial);
+#endif
+ dispatchString(serial, mSlotId, RIL_REQUEST_SEND_USSD, ussd.c_str());
return Void();
}
Return<void> RadioImpl::cancelPendingUssd(int32_t serial) {
- RLOGD("RadioImpl::cancelPendingUssd: serial %d", serial);
+#if VDBG
+ RLOGD("cancelPendingUssd: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CANCEL_USSD);
return Void();
}
Return<void> RadioImpl::getClir(int32_t serial) {
- RLOGD("RadioImpl::getClir: serial %d", serial);
+#if VDBG
+ RLOGD("getClir: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CLIR);
return Void();
}
Return<void> RadioImpl::setClir(int32_t serial, int32_t status) {
- RLOGD("RadioImpl::setClir: serial %d", serial);
+#if VDBG
+ RLOGD("setClir: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_CLIR, 1, status);
return Void();
}
Return<void> RadioImpl::getCallForwardStatus(int32_t serial, const CallForwardInfo& callInfo) {
- RLOGD("RadioImpl::getCallForwardStatus: serial %d", serial);
+#if VDBG
+ RLOGD("getCallForwardStatus: serial %d", serial);
+#endif
dispatchCallForwardStatus(serial, mSlotId, RIL_REQUEST_QUERY_CALL_FORWARD_STATUS,
callInfo);
return Void();
}
Return<void> RadioImpl::setCallForward(int32_t serial, const CallForwardInfo& callInfo) {
- RLOGD("RadioImpl::setCallForward: serial %d", serial);
+#if VDBG
+ RLOGD("setCallForward: serial %d", serial);
+#endif
dispatchCallForwardStatus(serial, mSlotId, RIL_REQUEST_SET_CALL_FORWARD,
callInfo);
return Void();
}
Return<void> RadioImpl::getCallWaiting(int32_t serial, int32_t serviceClass) {
- RLOGD("RadioImpl::getCallWaiting: serial %d", serial);
+#if VDBG
+ RLOGD("getCallWaiting: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_QUERY_CALL_WAITING, 1, serviceClass);
return Void();
}
Return<void> RadioImpl::setCallWaiting(int32_t serial, bool enable, int32_t serviceClass) {
- RLOGD("RadioImpl::setCallWaiting: serial %d", serial);
+#if VDBG
+ RLOGD("setCallWaiting: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_CALL_WAITING, 2, BOOL_TO_INT(enable),
serviceClass);
return Void();
Return<void> RadioImpl::acknowledgeLastIncomingGsmSms(int32_t serial,
bool success, SmsAcknowledgeFailCause cause) {
- RLOGD("RadioImpl::acknowledgeLastIncomingGsmSms: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeLastIncomingGsmSms: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SMS_ACKNOWLEDGE, 2, BOOL_TO_INT(success),
cause);
return Void();
}
Return<void> RadioImpl::acceptCall(int32_t serial) {
- RLOGD("RadioImpl::acceptCall: serial %d", serial);
+#if VDBG
+ RLOGD("acceptCall: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_ANSWER);
return Void();
}
Return<void> RadioImpl::deactivateDataCall(int32_t serial,
int32_t cid, bool reasonRadioShutDown) {
- RLOGD("RadioImpl::deactivateDataCall: serial %d", serial);
+#if VDBG
+ RLOGD("deactivateDataCall: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_DEACTIVATE_DATA_CALL,
- 2, (const char *) (std::to_string(cid)).c_str(), reasonRadioShutDown ? "1" : "0");
+ 2, (std::to_string(cid)).c_str(), reasonRadioShutDown ? "1" : "0");
return Void();
}
Return<void> RadioImpl::getFacilityLockForApp(int32_t serial, const hidl_string& facility,
const hidl_string& password, int32_t serviceClass,
const hidl_string& appId) {
- RLOGD("RadioImpl::getFacilityLockForApp: serial %d", serial);
+#if VDBG
+ RLOGD("getFacilityLockForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_QUERY_FACILITY_LOCK,
- 4, (const char *) facility, (const char *) password,
- (const char *) (std::to_string(serviceClass)).c_str(), (const char *) appId);
+ 4, facility.c_str(), password.c_str(),
+ (std::to_string(serviceClass)).c_str(), appId.c_str());
return Void();
}
Return<void> RadioImpl::setFacilityLockForApp(int32_t serial, const hidl_string& facility,
bool lockState, const hidl_string& password,
int32_t serviceClass, const hidl_string& appId) {
- RLOGD("RadioImpl::setFacilityLockForApp: serial %d", serial);
+#if VDBG
+ RLOGD("setFacilityLockForApp: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_SET_FACILITY_LOCK,
- 5, (const char *) facility, lockState ? "1" : "0", (const char *) password,
- (const char *) (std::to_string(serviceClass)).c_str(), (const char *) appId);
+ 5, facility.c_str(), lockState ? "1" : "0", password.c_str(),
+ (std::to_string(serviceClass)).c_str(), appId.c_str() );
return Void();
}
Return<void> RadioImpl::setBarringPassword(int32_t serial, const hidl_string& facility,
const hidl_string& oldPassword,
const hidl_string& newPassword) {
- RLOGD("RadioImpl::setBarringPassword: serial %d", serial);
+#if VDBG
+ RLOGD("setBarringPassword: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_CHANGE_BARRING_PASSWORD,
- 2, (const char *) oldPassword, (const char *) newPassword);
+ 2, oldPassword.c_str(), newPassword.c_str());
return Void();
}
Return<void> RadioImpl::getNetworkSelectionMode(int32_t serial) {
- RLOGD("RadioImpl::getNetworkSelectionMode: serial %d", serial);
+#if VDBG
+ RLOGD("getNetworkSelectionMode: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE);
return Void();
}
Return<void> RadioImpl::setNetworkSelectionModeAutomatic(int32_t serial) {
- RLOGD("RadioImpl::setNetworkSelectionModeAutomatic: serial %d", serial);
+#if VDBG
+ RLOGD("setNetworkSelectionModeAutomatic: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC);
return Void();
}
Return<void> RadioImpl::setNetworkSelectionModeManual(int32_t serial,
const hidl_string& operatorNumeric) {
- RLOGD("RadioImpl::setNetworkSelectionModeManual: serial %d", serial);
+#if VDBG
+ RLOGD("setNetworkSelectionModeManual: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL,
- (const char *) operatorNumeric);
+ operatorNumeric.c_str());
return Void();
}
Return<void> RadioImpl::getAvailableNetworks(int32_t serial) {
- RLOGD("RadioImpl::getAvailableNetworks: serial %d", serial);
+#if VDBG
+ RLOGD("getAvailableNetworks: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_QUERY_AVAILABLE_NETWORKS);
return Void();
}
+Return<void> RadioImpl::startNetworkScan(int32_t serial, const NetworkScanRequest& request) {
+#if VDBG
+ RLOGD("startNetworkScan: serial %d", serial);
+#endif
+
+ RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_START_NETWORK_SCAN);
+ if (pRI == NULL) {
+ return Void();
+ }
+
+ if (request.specifiers.size() > MAX_RADIO_ACCESS_NETWORKS) {
+ sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+ return Void();
+ }
+
+ RIL_NetworkScanRequest scan_request = {};
+
+ scan_request.type = (RIL_ScanType) request.type;
+ scan_request.interval = request.interval;
+ scan_request.specifiers_length = request.specifiers.size();
+ for (size_t i = 0; i < request.specifiers.size(); ++i) {
+ if (request.specifiers[i].geranBands.size() > MAX_BANDS ||
+ request.specifiers[i].utranBands.size() > MAX_BANDS ||
+ request.specifiers[i].eutranBands.size() > MAX_BANDS ||
+ request.specifiers[i].channels.size() > MAX_CHANNELS) {
+ sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+ return Void();
+ }
+ const ::android::hardware::radio::V1_1::RadioAccessSpecifier& ras_from =
+ request.specifiers[i];
+ RIL_RadioAccessSpecifier& ras_to = scan_request.specifiers[i];
+
+ ras_to.radio_access_network = (RIL_RadioAccessNetworks) ras_from.radioAccessNetwork;
+ ras_to.channels_length = ras_from.channels.size();
+
+ std::copy(ras_from.channels.begin(), ras_from.channels.end(), ras_to.channels);
+ const std::vector<uint32_t> * bands = nullptr;
+ switch (request.specifiers[i].radioAccessNetwork) {
+ case ::android::hardware::radio::V1_1::RadioAccessNetworks::GERAN:
+ ras_to.bands_length = ras_from.geranBands.size();
+ bands = (std::vector<uint32_t> *) &ras_from.geranBands;
+ break;
+ case ::android::hardware::radio::V1_1::RadioAccessNetworks::UTRAN:
+ ras_to.bands_length = ras_from.utranBands.size();
+ bands = (std::vector<uint32_t> *) &ras_from.utranBands;
+ break;
+ case ::android::hardware::radio::V1_1::RadioAccessNetworks::EUTRAN:
+ ras_to.bands_length = ras_from.eutranBands.size();
+ bands = (std::vector<uint32_t> *) &ras_from.eutranBands;
+ break;
+ default:
+ sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+ return Void();
+ }
+ // safe to copy to geran_bands because it's a union member
+ for (size_t idx = 0; idx < ras_to.bands_length; ++idx) {
+ ras_to.bands.geran_bands[idx] = (RIL_GeranBands) (*bands)[idx];
+ }
+ }
+
+ s_vendorFunctions->onRequest(
+ RIL_REQUEST_START_NETWORK_SCAN, &scan_request, sizeof(scan_request), pRI);
+
+ return Void();
+}
+
+Return<void> RadioImpl::stopNetworkScan(int32_t serial) {
+#if VDBG
+ RLOGD("stopNetworkScan: serial %d", serial);
+#endif
+ dispatchVoid(serial, mSlotId, RIL_REQUEST_STOP_NETWORK_SCAN);
+ return Void();
+}
+
Return<void> RadioImpl::startDtmf(int32_t serial, const hidl_string& s) {
- RLOGD("RadioImpl::startDtmf: serial %d", serial);
+#if VDBG
+ RLOGD("startDtmf: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_DTMF_START,
- (const char *) s);
+ s.c_str());
return Void();
}
Return<void> RadioImpl::stopDtmf(int32_t serial) {
- RLOGD("RadioImpl::stopDtmf: serial %d", serial);
+#if VDBG
+ RLOGD("stopDtmf: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_DTMF_STOP);
return Void();
}
Return<void> RadioImpl::getBasebandVersion(int32_t serial) {
- RLOGD("RadioImpl::getBasebandVersion: serial %d", serial);
+#if VDBG
+ RLOGD("getBasebandVersion: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_BASEBAND_VERSION);
return Void();
}
Return<void> RadioImpl::separateConnection(int32_t serial, int32_t gsmIndex) {
- RLOGD("RadioImpl::separateConnection: serial %d", serial);
+#if VDBG
+ RLOGD("separateConnection: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SEPARATE_CONNECTION, 1, gsmIndex);
return Void();
}
Return<void> RadioImpl::setMute(int32_t serial, bool enable) {
- RLOGD("RadioImpl::setMute: serial %d", serial);
+#if VDBG
+ RLOGD("setMute: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_MUTE, 1, BOOL_TO_INT(enable));
return Void();
}
Return<void> RadioImpl::getMute(int32_t serial) {
- RLOGD("RadioImpl::getMute: serial %d", serial);
+#if VDBG
+ RLOGD("getMute: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_MUTE);
return Void();
}
Return<void> RadioImpl::getClip(int32_t serial) {
- RLOGD("RadioImpl::getClip: serial %d", serial);
+#if VDBG
+ RLOGD("getClip: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_QUERY_CLIP);
return Void();
}
Return<void> RadioImpl::getDataCallList(int32_t serial) {
- RLOGD("RadioImpl::getDataCallList: serial %d", serial);
+#if VDBG
+ RLOGD("getDataCallList: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_DATA_CALL_LIST);
return Void();
}
-Return<void> RadioImpl::sendScreenState(int32_t serial, bool enable) {
- // TODO: Completely remove this from HIDL intreface
- RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SCREEN_STATE);
- sendErrorResponse(pRI, RIL_E_REQUEST_NOT_SUPPORTED);
- return Void();
-}
-
Return<void> RadioImpl::setSuppServiceNotifications(int32_t serial, bool enable) {
- RLOGD("RadioImpl::setSuppServiceNotifications: serial %d", serial);
+#if VDBG
+ RLOGD("setSuppServiceNotifications: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION, 1,
BOOL_TO_INT(enable));
return Void();
}
Return<void> RadioImpl::writeSmsToSim(int32_t serial, const SmsWriteArgs& smsWriteArgs) {
- RLOGD("RadioImpl::writeSmsToSim: serial %d", serial);
+#if VDBG
+ RLOGD("writeSmsToSim: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_WRITE_SMS_TO_SIM);
if (pRI == NULL) {
return Void();
}
Return<void> RadioImpl::deleteSmsOnSim(int32_t serial, int32_t index) {
- RLOGD("RadioImpl::deleteSmsOnSim: serial %d", serial);
+#if VDBG
+ RLOGD("deleteSmsOnSim: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_DELETE_SMS_ON_SIM, 1, index);
return Void();
}
Return<void> RadioImpl::setBandMode(int32_t serial, RadioBandMode mode) {
- RLOGD("RadioImpl::setBandMode: serial %d", serial);
+#if VDBG
+ RLOGD("setBandMode: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_BAND_MODE, 1, mode);
return Void();
}
Return<void> RadioImpl::getAvailableBandModes(int32_t serial) {
- RLOGD("RadioImpl::getAvailableBandModes: serial %d", serial);
+#if VDBG
+ RLOGD("getAvailableBandModes: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE);
return Void();
}
Return<void> RadioImpl::sendEnvelope(int32_t serial, const hidl_string& command) {
- RLOGD("RadioImpl::sendEnvelope: serial %d", serial);
+#if VDBG
+ RLOGD("sendEnvelope: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND,
- (const char *) command);
+ command.c_str());
return Void();
}
Return<void> RadioImpl::sendTerminalResponseToSim(int32_t serial,
const hidl_string& commandResponse) {
- RLOGD("RadioImpl::sendTerminalResponseToSim: serial %d", serial);
+#if VDBG
+ RLOGD("sendTerminalResponseToSim: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE,
- (const char *) commandResponse);
+ commandResponse.c_str());
return Void();
}
Return<void> RadioImpl::handleStkCallSetupRequestFromSim(int32_t serial, bool accept) {
- RLOGD("RadioImpl::handleStkCallSetupRequestFromSim: serial %d", serial);
+#if VDBG
+ RLOGD("handleStkCallSetupRequestFromSim: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM,
1, BOOL_TO_INT(accept));
return Void();
}
Return<void> RadioImpl::explicitCallTransfer(int32_t serial) {
- RLOGD("RadioImpl::explicitCallTransfer: serial %d", serial);
+#if VDBG
+ RLOGD("explicitCallTransfer: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_EXPLICIT_CALL_TRANSFER);
return Void();
}
Return<void> RadioImpl::setPreferredNetworkType(int32_t serial, PreferredNetworkType nwType) {
- RLOGD("RadioImpl::setPreferredNetworkType: serial %d", serial);
+#if VDBG
+ RLOGD("setPreferredNetworkType: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE, 1, nwType);
return Void();
}
Return<void> RadioImpl::getPreferredNetworkType(int32_t serial) {
- RLOGD("RadioImpl::getPreferredNetworkType: serial %d", serial);
+#if VDBG
+ RLOGD("getPreferredNetworkType: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE);
return Void();
}
Return<void> RadioImpl::getNeighboringCids(int32_t serial) {
- RLOGD("RadioImpl::getNeighboringCids: serial %d", serial);
+#if VDBG
+ RLOGD("getNeighboringCids: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_NEIGHBORING_CELL_IDS);
return Void();
}
Return<void> RadioImpl::setLocationUpdates(int32_t serial, bool enable) {
- RLOGD("RadioImpl::setLocationUpdates: serial %d", serial);
+#if VDBG
+ RLOGD("setLocationUpdates: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_LOCATION_UPDATES, 1, BOOL_TO_INT(enable));
return Void();
}
Return<void> RadioImpl::setCdmaSubscriptionSource(int32_t serial, CdmaSubscriptionSource cdmaSub) {
- RLOGD("RadioImpl::setCdmaSubscriptionSource: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaSubscriptionSource: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE, 1, cdmaSub);
return Void();
}
Return<void> RadioImpl::setCdmaRoamingPreference(int32_t serial, CdmaRoamingType type) {
- RLOGD("RadioImpl::setCdmaRoamingPreference: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaRoamingPreference: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE, 1, type);
return Void();
}
Return<void> RadioImpl::getCdmaRoamingPreference(int32_t serial) {
- RLOGD("RadioImpl::getCdmaRoamingPreference: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaRoamingPreference: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE);
return Void();
}
Return<void> RadioImpl::setTTYMode(int32_t serial, TtyMode mode) {
- RLOGD("RadioImpl::setTTYMode: serial %d", serial);
+#if VDBG
+ RLOGD("setTTYMode: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_TTY_MODE, 1, mode);
return Void();
}
Return<void> RadioImpl::getTTYMode(int32_t serial) {
- RLOGD("RadioImpl::getTTYMode: serial %d", serial);
+#if VDBG
+ RLOGD("getTTYMode: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_QUERY_TTY_MODE);
return Void();
}
Return<void> RadioImpl::setPreferredVoicePrivacy(int32_t serial, bool enable) {
- RLOGD("RadioImpl::setPreferredVoicePrivacy: serial %d", serial);
+#if VDBG
+ RLOGD("setPreferredVoicePrivacy: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE,
1, BOOL_TO_INT(enable));
return Void();
}
Return<void> RadioImpl::getPreferredVoicePrivacy(int32_t serial) {
- RLOGD("RadioImpl::getPreferredVoicePrivacy: serial %d", serial);
+#if VDBG
+ RLOGD("getPreferredVoicePrivacy: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE);
return Void();
}
Return<void> RadioImpl::sendCDMAFeatureCode(int32_t serial, const hidl_string& featureCode) {
- RLOGD("RadioImpl::sendCDMAFeatureCode: serial %d", serial);
+#if VDBG
+ RLOGD("sendCDMAFeatureCode: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_CDMA_FLASH,
- (const char *) featureCode);
+ featureCode.c_str());
return Void();
}
Return<void> RadioImpl::sendBurstDtmf(int32_t serial, const hidl_string& dtmf, int32_t on,
int32_t off) {
- RLOGD("RadioImpl::sendBurstDtmf: serial %d", serial);
+#if VDBG
+ RLOGD("sendBurstDtmf: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_CDMA_BURST_DTMF,
- 3, (const char *) dtmf, (const char *) (std::to_string(on)).c_str(),
- (const char *) (std::to_string(off)).c_str());
+ 3, dtmf.c_str(), (std::to_string(on)).c_str(),
+ (std::to_string(off)).c_str());
return Void();
}
void constructCdmaSms(RIL_CDMA_SMS_Message &rcsm, const CdmaSmsMessage& sms) {
- memset(&rcsm, 0, sizeof(rcsm));
-
rcsm.uTeleserviceID = sms.teleserviceId;
rcsm.bIsServicePresent = BOOL_TO_INT(sms.isServicePresent);
rcsm.uServicecategory = sms.serviceCategory;
}
Return<void> RadioImpl::sendCdmaSms(int32_t serial, const CdmaSmsMessage& sms) {
- RLOGD("RadioImpl::sendCdmaSms: serial %d", serial);
+#if VDBG
+ RLOGD("sendCdmaSms: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_CDMA_SEND_SMS);
if (pRI == NULL) {
return Void();
}
- RIL_CDMA_SMS_Message rcsm;
+ RIL_CDMA_SMS_Message rcsm = {};
constructCdmaSms(rcsm, sms);
s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &rcsm, sizeof(rcsm), pRI);
}
Return<void> RadioImpl::acknowledgeLastIncomingCdmaSms(int32_t serial, const CdmaSmsAck& smsAck) {
- RLOGD("RadioImpl::acknowledgeLastIncomingCdmaSms: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeLastIncomingCdmaSms: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE);
if (pRI == NULL) {
return Void();
}
Return<void> RadioImpl::getGsmBroadcastConfig(int32_t serial) {
- RLOGD("RadioImpl::getGsmBroadcastConfig: serial %d", serial);
+#if VDBG
+ RLOGD("getGsmBroadcastConfig: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG);
return Void();
}
Return<void> RadioImpl::setGsmBroadcastConfig(int32_t serial,
const hidl_vec<GsmBroadcastSmsConfigInfo>&
configInfo) {
- RLOGD("RadioImpl::setGsmBroadcastConfig: serial %d", serial);
+#if VDBG
+ RLOGD("setGsmBroadcastConfig: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG);
if (pRI == NULL) {
}
Return<void> RadioImpl::setGsmBroadcastActivation(int32_t serial, bool activate) {
- RLOGD("RadioImpl::setGsmBroadcastActivation: serial %d", serial);
+#if VDBG
+ RLOGD("setGsmBroadcastActivation: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION,
1, BOOL_TO_INT(!activate));
return Void();
}
Return<void> RadioImpl::getCdmaBroadcastConfig(int32_t serial) {
- RLOGD("RadioImpl::getCdmaBroadcastConfig: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaBroadcastConfig: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG);
return Void();
}
Return<void> RadioImpl::setCdmaBroadcastConfig(int32_t serial,
const hidl_vec<CdmaBroadcastSmsConfigInfo>&
configInfo) {
- RLOGD("RadioImpl::setCdmaBroadcastConfig: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaBroadcastConfig: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG);
if (pRI == NULL) {
}
Return<void> RadioImpl::setCdmaBroadcastActivation(int32_t serial, bool activate) {
- RLOGD("RadioImpl::setCdmaBroadcastActivation: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaBroadcastActivation: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION,
1, BOOL_TO_INT(!activate));
return Void();
}
Return<void> RadioImpl::getCDMASubscription(int32_t serial) {
- RLOGD("RadioImpl::getCDMASubscription: serial %d", serial);
+#if VDBG
+ RLOGD("getCDMASubscription: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CDMA_SUBSCRIPTION);
return Void();
}
Return<void> RadioImpl::writeSmsToRuim(int32_t serial, const CdmaSmsWriteArgs& cdmaSms) {
- RLOGD("RadioImpl::writeSmsToRuim: serial %d", serial);
+#if VDBG
+ RLOGD("writeSmsToRuim: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM);
if (pRI == NULL) {
}
Return<void> RadioImpl::deleteSmsOnRuim(int32_t serial, int32_t index) {
- RLOGD("RadioImpl::deleteSmsOnRuim: serial %d", serial);
+#if VDBG
+ RLOGD("deleteSmsOnRuim: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM, 1, index);
return Void();
}
Return<void> RadioImpl::getDeviceIdentity(int32_t serial) {
- RLOGD("RadioImpl::getDeviceIdentity: serial %d", serial);
+#if VDBG
+ RLOGD("getDeviceIdentity: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_DEVICE_IDENTITY);
return Void();
}
Return<void> RadioImpl::exitEmergencyCallbackMode(int32_t serial) {
- RLOGD("RadioImpl::exitEmergencyCallbackMode: serial %d", serial);
+#if VDBG
+ RLOGD("exitEmergencyCallbackMode: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE);
return Void();
}
Return<void> RadioImpl::getSmscAddress(int32_t serial) {
- RLOGD("RadioImpl::getSmscAddress: serial %d", serial);
+#if VDBG
+ RLOGD("getSmscAddress: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_SMSC_ADDRESS);
return Void();
}
Return<void> RadioImpl::setSmscAddress(int32_t serial, const hidl_string& smsc) {
- RLOGD("RadioImpl::setSmscAddress: serial %d", serial);
+#if VDBG
+ RLOGD("setSmscAddress: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_SET_SMSC_ADDRESS,
- (const char *) smsc);
+ smsc.c_str());
return Void();
}
Return<void> RadioImpl::reportSmsMemoryStatus(int32_t serial, bool available) {
- RLOGD("RadioImpl::reportSmsMemoryStatus: serial %d", serial);
+#if VDBG
+ RLOGD("reportSmsMemoryStatus: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, 1,
BOOL_TO_INT(available));
return Void();
}
Return<void> RadioImpl::reportStkServiceIsRunning(int32_t serial) {
- RLOGD("RadioImpl::reportStkServiceIsRunning: serial %d", serial);
+#if VDBG
+ RLOGD("reportStkServiceIsRunning: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING);
return Void();
}
Return<void> RadioImpl::getCdmaSubscriptionSource(int32_t serial) {
- RLOGD("RadioImpl::getCdmaSubscriptionSource: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaSubscriptionSource: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE);
return Void();
}
Return<void> RadioImpl::requestIsimAuthentication(int32_t serial, const hidl_string& challenge) {
- RLOGD("RadioImpl::requestIsimAuthentication: serial %d", serial);
+#if VDBG
+ RLOGD("requestIsimAuthentication: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_ISIM_AUTHENTICATION,
- (const char *) challenge);
+ challenge.c_str());
return Void();
}
Return<void> RadioImpl::acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success,
const hidl_string& ackPdu) {
- RLOGD("RadioImpl::acknowledgeIncomingGsmSmsWithPdu: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeIncomingGsmSmsWithPdu: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU,
- 2, success ? "1" : "0", (const char *) ackPdu);
+ 2, success ? "1" : "0", ackPdu.c_str());
return Void();
}
Return<void> RadioImpl::sendEnvelopeWithStatus(int32_t serial, const hidl_string& contents) {
- RLOGD("RadioImpl::sendEnvelopeWithStatus: serial %d", serial);
+#if VDBG
+ RLOGD("sendEnvelopeWithStatus: serial %d", serial);
+#endif
dispatchString(serial, mSlotId, RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS,
- (const char *) contents);
+ contents.c_str());
return Void();
}
Return<void> RadioImpl::getVoiceRadioTechnology(int32_t serial) {
- RLOGD("RadioImpl::getVoiceRadioTechnology: serial %d", serial);
+#if VDBG
+ RLOGD("getVoiceRadioTechnology: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_VOICE_RADIO_TECH);
return Void();
}
Return<void> RadioImpl::getCellInfoList(int32_t serial) {
- RLOGD("RadioImpl::getCellInfoList: serial %d", serial);
+#if VDBG
+ RLOGD("getCellInfoList: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CELL_INFO_LIST);
return Void();
}
Return<void> RadioImpl::setCellInfoListRate(int32_t serial, int32_t rate) {
- RLOGD("RadioImpl::setCellInfoListRate: serial %d", serial);
+#if VDBG
+ RLOGD("setCellInfoListRate: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, 1, rate);
return Void();
}
Return<void> RadioImpl::setInitialAttachApn(int32_t serial, const DataProfileInfo& dataProfileInfo,
bool modemCognitive, bool isRoaming) {
- RLOGD("RadioImpl::setInitialAttachApn: serial %d", serial);
+#if VDBG
+ RLOGD("setInitialAttachApn: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_SET_INITIAL_ATTACH_APN);
if (pRI == NULL) {
(isRoaming ? dataProfileInfo.roamingProtocol : dataProfileInfo.protocol);
if (!copyHidlStringToRil(&iaa.protocol, protocol, pRI)) {
+ memsetAndFreeStrings(1, iaa.apn);
return Void();
}
iaa.authtype = (int) dataProfileInfo.authType;
if (!copyHidlStringToRil(&iaa.username, dataProfileInfo.user, pRI)) {
+ memsetAndFreeStrings(2, iaa.apn, iaa.protocol);
return Void();
}
if (!copyHidlStringToRil(&iaa.password, dataProfileInfo.password, pRI)) {
+ memsetAndFreeStrings(3, iaa.apn, iaa.protocol, iaa.username);
return Void();
}
return Void();
}
if (!copyHidlStringToRil(&iaa.protocol, dataProfileInfo.protocol, pRI)) {
+ memsetAndFreeStrings(1, iaa.apn);
return Void();
}
if (!copyHidlStringToRil(&iaa.roamingProtocol, dataProfileInfo.roamingProtocol, pRI)) {
+ memsetAndFreeStrings(2, iaa.apn, iaa.protocol);
return Void();
}
iaa.authtype = (int) dataProfileInfo.authType;
if (!copyHidlStringToRil(&iaa.username, dataProfileInfo.user, pRI)) {
+ memsetAndFreeStrings(3, iaa.apn, iaa.protocol, iaa.roamingProtocol);
return Void();
}
if (!copyHidlStringToRil(&iaa.password, dataProfileInfo.password, pRI)) {
+ memsetAndFreeStrings(4, iaa.apn, iaa.protocol, iaa.roamingProtocol, iaa.username);
return Void();
}
iaa.supportedTypesBitmask = dataProfileInfo.supportedApnTypesBitmap;
iaa.modemCognitive = BOOL_TO_INT(modemCognitive);
iaa.mtu = dataProfileInfo.mtu;
- // Note that there is no need for memory allocation/free.
- iaa.mvnoType = (char *) convertMvnoTypeToString(dataProfileInfo.mvnoType);
- if (iaa.mvnoType == NULL) {
+ if (!convertMvnoTypeToString(dataProfileInfo.mvnoType, iaa.mvnoType)) {
sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+ memsetAndFreeStrings(5, iaa.apn, iaa.protocol, iaa.roamingProtocol, iaa.username,
+ iaa.password);
return Void();
}
if (!copyHidlStringToRil(&iaa.mvnoMatchData, dataProfileInfo.mvnoMatchData, pRI)) {
+ memsetAndFreeStrings(5, iaa.apn, iaa.protocol, iaa.roamingProtocol, iaa.username,
+ iaa.password);
return Void();
}
}
Return<void> RadioImpl::getImsRegistrationState(int32_t serial) {
- RLOGD("RadioImpl::getImsRegistrationState: serial %d", serial);
+#if VDBG
+ RLOGD("getImsRegistrationState: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_IMS_REGISTRATION_STATE);
return Void();
}
if (!copyHidlStringToRil(&pStrings[0], message.gsmMessage[0].smscPdu, pRI)) {
#ifdef MEMSET_FREED
- memset(pStrings, 0, datalen);
+ memset(pStrings, 0, dataLen);
#endif
free(pStrings);
return false;
if (!copyHidlStringToRil(&pStrings[1], message.gsmMessage[0].pdu, pRI)) {
memsetAndFreeStrings(1, pStrings[0]);
#ifdef MEMSET_FREED
- memset(pStrings, 0, datalen);
+ memset(pStrings, 0, dataLen);
#endif
free(pStrings);
return false;
}
#ifdef MEMSET_FREED
- memset(pStrings, 0, datalen);
+ memset(pStrings, 0, dataLen);
#endif
free(pStrings);
}
bool dispatchImsCdmaSms(const ImsSmsMessage& message, RequestInfo *pRI) {
- RIL_IMS_SMS_Message rism;
- RIL_CDMA_SMS_Message rcsm;
+ RIL_IMS_SMS_Message rism = {};
+ RIL_CDMA_SMS_Message rcsm = {};
if (message.cdmaMessage.size() != 1) {
RLOGE("dispatchImsCdmaSms: Invalid len %s", requestToString(pRI->pCI->requestNumber));
}
Return<void> RadioImpl::sendImsSms(int32_t serial, const ImsSmsMessage& message) {
- RLOGD("RadioImpl::sendImsSms: serial %d", serial);
+#if VDBG
+ RLOGD("sendImsSms: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_IMS_SEND_SMS);
if (pRI == NULL) {
return Void();
} else if (RADIO_TECH_3GPP2 == format) {
dispatchImsCdmaSms(message, pRI);
} else {
- RLOGE("RadioImpl::sendImsSms: Invalid radio tech %s",
+ RLOGE("sendImsSms: Invalid radio tech %s",
requestToString(pRI->pCI->requestNumber));
sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
}
}
Return<void> RadioImpl::iccTransmitApduBasicChannel(int32_t serial, const SimApdu& message) {
- RLOGD("RadioImpl::iccTransmitApduBasicChannel: serial %d", serial);
+#if VDBG
+ RLOGD("iccTransmitApduBasicChannel: serial %d", serial);
+#endif
dispatchIccApdu(serial, mSlotId, RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC, message);
return Void();
}
-Return<void> RadioImpl::iccOpenLogicalChannel(int32_t serial, const hidl_string& aid) {
- RLOGD("RadioImpl::iccOpenLogicalChannel: serial %d", serial);
- dispatchString(serial, mSlotId, RIL_REQUEST_SIM_OPEN_CHANNEL,
- (const char *) aid);
+Return<void> RadioImpl::iccOpenLogicalChannel(int32_t serial, const hidl_string& aid, int32_t p2) {
+#if VDBG
+ RLOGD("iccOpenLogicalChannel: serial %d", serial);
+#endif
+ if (s_vendorFunctions->version < 15) {
+ dispatchString(serial, mSlotId, RIL_REQUEST_SIM_OPEN_CHANNEL, aid.c_str());
+ } else {
+ RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SIM_OPEN_CHANNEL);
+ if (pRI == NULL) {
+ return Void();
+ }
+
+ RIL_OpenChannelParams params = {};
+
+ params.p2 = p2;
+
+ if (!copyHidlStringToRil(¶ms.aidPtr, aid, pRI)) {
+ return Void();
+ }
+
+ s_vendorFunctions->onRequest(pRI->pCI->requestNumber, ¶ms, sizeof(params), pRI);
+
+ memsetAndFreeStrings(1, params.aidPtr);
+ }
return Void();
}
Return<void> RadioImpl::iccCloseLogicalChannel(int32_t serial, int32_t channelId) {
- RLOGD("RadioImpl::iccCloseLogicalChannel: serial %d", serial);
+#if VDBG
+ RLOGD("iccCloseLogicalChannel: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SIM_CLOSE_CHANNEL, 1, channelId);
return Void();
}
Return<void> RadioImpl::iccTransmitApduLogicalChannel(int32_t serial, const SimApdu& message) {
- RLOGD("RadioImpl::iccTransmitApduLogicalChannel: serial %d", serial);
+#if VDBG
+ RLOGD("iccTransmitApduLogicalChannel: serial %d", serial);
+#endif
dispatchIccApdu(serial, mSlotId, RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL, message);
return Void();
}
Return<void> RadioImpl::nvReadItem(int32_t serial, NvItem itemId) {
- RLOGD("RadioImpl::nvReadItem: serial %d", serial);
+#if VDBG
+ RLOGD("nvReadItem: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_NV_READ_ITEM);
if (pRI == NULL) {
return Void();
}
- RIL_NV_ReadItem nvri;
- memset (&nvri, 0, sizeof(nvri));
+ RIL_NV_ReadItem nvri = {};
nvri.itemID = (RIL_NV_Item) itemId;
s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &nvri, sizeof(nvri), pRI);
}
Return<void> RadioImpl::nvWriteItem(int32_t serial, const NvWriteItem& item) {
- RLOGD("RadioImpl::nvWriteItem: serial %d", serial);
+#if VDBG
+ RLOGD("nvWriteItem: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_NV_WRITE_ITEM);
if (pRI == NULL) {
return Void();
}
- RIL_NV_WriteItem nvwi;
- memset (&nvwi, 0, sizeof(nvwi));
+ RIL_NV_WriteItem nvwi = {};
nvwi.itemID = (RIL_NV_Item) item.itemId;
}
Return<void> RadioImpl::nvWriteCdmaPrl(int32_t serial, const hidl_vec<uint8_t>& prl) {
- RLOGD("RadioImpl::nvWriteCdmaPrl: serial %d", serial);
+#if VDBG
+ RLOGD("nvWriteCdmaPrl: serial %d", serial);
+#endif
dispatchRaw(serial, mSlotId, RIL_REQUEST_NV_WRITE_CDMA_PRL, prl);
return Void();
}
Return<void> RadioImpl::nvResetConfig(int32_t serial, ResetNvType resetType) {
- RLOGD("RadioImpl::nvResetConfig: serial %d", serial);
- dispatchInts(serial, mSlotId, RIL_REQUEST_NV_RESET_CONFIG, 1, (int) resetType);
+ int rilResetType = -1;
+#if VDBG
+ RLOGD("nvResetConfig: serial %d", serial);
+#endif
+ /* Convert ResetNvType to RIL.h values
+ * RIL_REQUEST_NV_RESET_CONFIG
+ * 1 - reload all NV items
+ * 2 - erase NV reset (SCRTN)
+ * 3 - factory reset (RTN)
+ */
+ switch(resetType) {
+ case ResetNvType::RELOAD:
+ rilResetType = 1;
+ break;
+ case ResetNvType::ERASE:
+ rilResetType = 2;
+ break;
+ case ResetNvType::FACTORY_RESET:
+ rilResetType = 3;
+ break;
+ }
+ dispatchInts(serial, mSlotId, RIL_REQUEST_NV_RESET_CONFIG, 1, rilResetType);
return Void();
}
Return<void> RadioImpl::setUiccSubscription(int32_t serial, const SelectUiccSub& uiccSub) {
- RLOGD("RadioImpl::setUiccSubscription: serial %d", serial);
+#if VDBG
+ RLOGD("setUiccSubscription: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_SET_UICC_SUBSCRIPTION);
if (pRI == NULL) {
}
Return<void> RadioImpl::setDataAllowed(int32_t serial, bool allow) {
- RLOGD("RadioImpl::setDataAllowed: serial %d", serial);
+#if VDBG
+ RLOGD("setDataAllowed: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_ALLOW_DATA, 1, BOOL_TO_INT(allow));
return Void();
}
Return<void> RadioImpl::getHardwareConfig(int32_t serial) {
- RLOGD("RadioImpl::getHardwareConfig: serial %d", serial);
+#if VDBG
+ RLOGD("getHardwareConfig: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_HARDWARE_CONFIG);
return Void();
}
Return<void> RadioImpl::requestIccSimAuthentication(int32_t serial, int32_t authContext,
const hidl_string& authData, const hidl_string& aid) {
- RLOGD("RadioImpl::requestIccSimAuthentication: serial %d", serial);
+#if VDBG
+ RLOGD("requestIccSimAuthentication: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SIM_AUTHENTICATION);
if (pRI == NULL) {
return Void();
}
- RIL_SimAuthentication pf;
- memset (&pf, 0, sizeof(pf));
+ RIL_SimAuthentication pf = {};
pf.authContext = authContext;
Return<void> RadioImpl::setDataProfile(int32_t serial, const hidl_vec<DataProfileInfo>& profiles,
bool isRoaming) {
- RLOGD("RadioImpl::setDataProfile: serial %d", serial);
+#if VDBG
+ RLOGD("setDataProfile: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SET_DATA_PROFILE);
if (pRI == NULL) {
return Void();
pRI)) {
success = false;
}
-
if (success && !copyHidlStringToRil(&dataProfiles[i].mvnoMatchData,
profiles[i].mvnoMatchData, pRI)) {
success = false;
}
- if (success) {
- dataProfiles[i].mvnoType = (char *) convertMvnoTypeToString(profiles[i].mvnoType);
- if (dataProfiles[i].mvnoType == NULL) {
- sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
- success = false;
- }
+ if (success && !convertMvnoTypeToString(profiles[i].mvnoType,
+ dataProfiles[i].mvnoType)) {
+ sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+ success = false;
}
if (!success) {
}
Return<void> RadioImpl::requestShutdown(int32_t serial) {
- RLOGD("RadioImpl::requestShutdown: serial %d", serial);
+#if VDBG
+ RLOGD("requestShutdown: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_SHUTDOWN);
return Void();
}
Return<void> RadioImpl::getRadioCapability(int32_t serial) {
- RLOGD("RadioImpl::getRadioCapability: serial %d", serial);
+#if VDBG
+ RLOGD("getRadioCapability: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_RADIO_CAPABILITY);
return Void();
}
Return<void> RadioImpl::setRadioCapability(int32_t serial, const RadioCapability& rc) {
- RLOGD("RadioImpl::setRadioCapability: serial %d", serial);
+#if VDBG
+ RLOGD("setRadioCapability: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SET_RADIO_CAPABILITY);
if (pRI == NULL) {
return Void();
}
- RIL_RadioCapability rilRc;
- memset (&rilRc, 0, sizeof(rilRc));
+ RIL_RadioCapability rilRc = {};
// TODO : set rilRc.version using HIDL version ?
rilRc.session = rc.session;
rilRc.phase = (int) rc.phase;
rilRc.rat = (int) rc.raf;
rilRc.status = (int) rc.status;
- strncpy(rilRc.logicalModemUuid, (const char *) rc.logicalModemUuid, MAX_UUID_LENGTH);
+ strncpy(rilRc.logicalModemUuid, rc.logicalModemUuid.c_str(), MAX_UUID_LENGTH);
s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &rilRc, sizeof(rilRc), pRI);
}
Return<void> RadioImpl::startLceService(int32_t serial, int32_t reportInterval, bool pullMode) {
- RLOGD("RadioImpl::startLceService: serial %d", serial);
+#if VDBG
+ RLOGD("startLceService: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_START_LCE, 2, reportInterval,
BOOL_TO_INT(pullMode));
return Void();
}
Return<void> RadioImpl::stopLceService(int32_t serial) {
- RLOGD("RadioImpl::stopLceService: serial %d", serial);
+#if VDBG
+ RLOGD("stopLceService: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_STOP_LCE);
return Void();
}
Return<void> RadioImpl::pullLceData(int32_t serial) {
- RLOGD("RadioImpl::pullLceData: serial %d", serial);
+#if VDBG
+ RLOGD("pullLceData: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_PULL_LCEDATA);
return Void();
}
Return<void> RadioImpl::getModemActivityInfo(int32_t serial) {
- RLOGD("RadioImpl::getModemActivityInfo: serial %d", serial);
+#if VDBG
+ RLOGD("getModemActivityInfo: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_ACTIVITY_INFO);
return Void();
}
Return<void> RadioImpl::setAllowedCarriers(int32_t serial, bool allAllowed,
const CarrierRestrictions& carriers) {
- RLOGD("RadioImpl::setAllowedCarriers: serial %d", serial);
+#if VDBG
+ RLOGD("setAllowedCarriers: serial %d", serial);
+#endif
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_SET_CARRIER_RESTRICTIONS);
if (pRI == NULL) {
cr.len_allowed_carriers = carriers.allowedCarriers.size();
allowedCarriers = (RIL_Carrier *)calloc(cr.len_allowed_carriers, sizeof(RIL_Carrier));
if (allowedCarriers == NULL) {
- RLOGE("RadioImpl::setAllowedCarriers: Memory allocation failed for request %s",
+ RLOGE("setAllowedCarriers: Memory allocation failed for request %s",
requestToString(pRI->pCI->requestNumber));
sendErrorResponse(pRI, RIL_E_NO_MEMORY);
return Void();
cr.len_excluded_carriers = carriers.excludedCarriers.size();
excludedCarriers = (RIL_Carrier *)calloc(cr.len_excluded_carriers, sizeof(RIL_Carrier));
if (excludedCarriers == NULL) {
- RLOGE("RadioImpl::setAllowedCarriers: Memory allocation failed for request %s",
+ RLOGE("setAllowedCarriers: Memory allocation failed for request %s",
requestToString(pRI->pCI->requestNumber));
sendErrorResponse(pRI, RIL_E_NO_MEMORY);
#ifdef MEMSET_FREED
cr.excluded_carriers = excludedCarriers;
for (int i = 0; i < cr.len_allowed_carriers; i++) {
- allowedCarriers[i].mcc = (const char *) carriers.allowedCarriers[i].mcc;
- allowedCarriers[i].mnc = (const char *) carriers.allowedCarriers[i].mnc;
+ allowedCarriers[i].mcc = carriers.allowedCarriers[i].mcc.c_str();
+ allowedCarriers[i].mnc = carriers.allowedCarriers[i].mnc.c_str();
allowedCarriers[i].match_type = (RIL_CarrierMatchType) carriers.allowedCarriers[i].matchType;
- allowedCarriers[i].match_data = (const char *) carriers.allowedCarriers[i].matchData;
+ allowedCarriers[i].match_data = carriers.allowedCarriers[i].matchData.c_str();
}
for (int i = 0; i < cr.len_excluded_carriers; i++) {
- excludedCarriers[i].mcc = (const char *) carriers.excludedCarriers[i].mcc;
- excludedCarriers[i].mnc = (const char *) carriers.excludedCarriers[i].mnc;
+ excludedCarriers[i].mcc = carriers.excludedCarriers[i].mcc.c_str();
+ excludedCarriers[i].mnc = carriers.excludedCarriers[i].mnc.c_str();
excludedCarriers[i].match_type =
(RIL_CarrierMatchType) carriers.excludedCarriers[i].matchType;
- excludedCarriers[i].match_data = (const char *) carriers.excludedCarriers[i].matchData;
+ excludedCarriers[i].match_data = carriers.excludedCarriers[i].matchData.c_str();
}
s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &cr, sizeof(RIL_CarrierRestrictions), pRI);
}
Return<void> RadioImpl::getAllowedCarriers(int32_t serial) {
- RLOGD("RadioImpl::getAllowedCarriers: serial %d", serial);
+#if VDBG
+ RLOGD("getAllowedCarriers: serial %d", serial);
+#endif
dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CARRIER_RESTRICTIONS);
return Void();
}
Return<void> RadioImpl::sendDeviceState(int32_t serial, DeviceStateType deviceStateType,
bool state) {
- RLOGD("RadioImpl::sendDeviceState: serial %d", serial);
+#if VDBG
+ RLOGD("sendDeviceState: serial %d", serial);
+#endif
if (s_vendorFunctions->version < 15) {
if (deviceStateType == DeviceStateType::LOW_DATA_EXPECTED) {
- RLOGD("RadioImpl::sendDeviceState: calling screen state %d", BOOL_TO_INT(!state));
+ RLOGD("sendDeviceState: calling screen state %d", BOOL_TO_INT(!state));
dispatchInts(serial, mSlotId, RIL_REQUEST_SCREEN_STATE, 1, BOOL_TO_INT(!state));
} else {
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
}
Return<void> RadioImpl::setIndicationFilter(int32_t serial, int32_t indicationFilter) {
- RLOGD("RadioImpl::setIndicationFilter: serial %d", serial);
+#if VDBG
+ RLOGD("setIndicationFilter: serial %d", serial);
+#endif
if (s_vendorFunctions->version < 15) {
RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER);
}
Return<void> RadioImpl::setSimCardPower(int32_t serial, bool powerUp) {
- RLOGD("RadioImpl::setSimCardPower: serial %d", serial);
+#if VDBG
+ RLOGD("setSimCardPower: serial %d", serial);
+#endif
dispatchInts(serial, mSlotId, RIL_REQUEST_SET_SIM_CARD_POWER, 1, BOOL_TO_INT(powerUp));
return Void();
}
+Return<void> RadioImpl::setSimCardPower_1_1(int32_t serial,
+ const ::android::hardware::radio::V1_1::CardPowerState state) {
+#if VDBG
+ RLOGD("setSimCardPower_1_1: serial %d state %d", serial, state);
+#endif
+ dispatchInts(serial, mSlotId, RIL_REQUEST_SET_SIM_CARD_POWER, 1, state);
+ return Void();
+}
+
Return<void> RadioImpl::responseAcknowledgement() {
android::releaseWakeLock();
return Void();
Return<void> OemHookImpl::setResponseFunctions(
const ::android::sp<IOemHookResponse>& oemHookResponseParam,
const ::android::sp<IOemHookIndication>& oemHookIndicationParam) {
+#if VDBG
RLOGD("OemHookImpl::setResponseFunctions");
+#endif
pthread_rwlock_t *radioServiceRwlockPtr = radio::getRadioServiceRwlock(mSlotId);
int ret = pthread_rwlock_wrlock(radioServiceRwlockPtr);
mOemHookResponse = oemHookResponseParam;
mOemHookIndication = oemHookIndicationParam;
- mCounter[mSlotId]++;
+ mCounterOemHook[mSlotId]++;
ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);
}
Return<void> OemHookImpl::sendRequestRaw(int32_t serial, const hidl_vec<uint8_t>& data) {
+#if VDBG
RLOGD("OemHookImpl::sendRequestRaw: serial %d", serial);
+#endif
dispatchRaw(serial, mSlotId, RIL_REQUEST_OEM_HOOK_RAW, data);
return Void();
}
Return<void> OemHookImpl::sendRequestStrings(int32_t serial,
const hidl_vec<hidl_string>& data) {
+#if VDBG
RLOGD("OemHookImpl::sendRequestStrings: serial %d", serial);
+#endif
dispatchStrings(serial, mSlotId, RIL_REQUEST_OEM_HOOK_STRINGS, data);
return Void();
}
+Return<void> RadioImpl::setCarrierInfoForImsiEncryption(int32_t serial,
+ const ::android::hardware::radio::V1_1::ImsiEncryptionInfo& data) {
+ RLOGD("setCarrierInfoForImsiEncryption: serial %d", serial);
+ RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION);
+ RIL_CarrierInfoForImsiEncryption imsiEncryption = {};
+
+ if (!copyHidlStringToRil(&imsiEncryption.mnc, data.mnc, pRI)) {
+ return Void();
+ }
+ if (!copyHidlStringToRil(&imsiEncryption.mcc, data.mcc, pRI)) {
+ memsetAndFreeStrings(1, imsiEncryption.mnc);
+ return Void();
+ }
+ if (!copyHidlStringToRil(&imsiEncryption.keyIdentifier, data.keyIdentifier, pRI)) {
+ memsetAndFreeStrings(2, imsiEncryption.mnc, imsiEncryption.mcc);
+ return Void();
+ }
+ int32_t lSize = data.carrierKey.size();
+ imsiEncryption.carrierKey = new uint8_t[lSize];
+ memcpy(imsiEncryption.carrierKey, data.carrierKey.data(), lSize);
+ imsiEncryption.expirationTime = data.expirationTime;
+ s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &imsiEncryption, sizeof(RIL_CarrierInfoForImsiEncryption), pRI);
+ delete(imsiEncryption.carrierKey);
+ return Void();
+}
+
+Return<void> RadioImpl::startKeepalive(int32_t serial, const KeepaliveRequest& keepalive) {
+ RLOGD("startKeepalive: serial %d", serial);
+ return Void();
+}
+
+Return<void> RadioImpl::stopKeepalive(int32_t serial, int32_t sessionHandle) {
+ RLOGD("stopKeepalive: serial %d", serial);
+ return Void();
+}
+
+
/***************************************************************************************************
* RESPONSE FUNCTIONS
* Functions above are used for requests going from framework to vendor code. The ones below are
Return<void> retStatus = radioService[slotId]->mRadioResponse->acknowledgeRequest(serial);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acknowledgeRequest: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("acknowledgeRequest: radioService[%d]->mRadioResponse == NULL", slotId);
}
}
responseInfo.error = (RadioError) e;
}
+int responseIntOrEmpty(RadioResponseInfo& responseInfo, int serial, int responseType, RIL_Errno e,
+ void *response, size_t responseLen) {
+ populateResponseInfo(responseInfo, serial, responseType, e);
+ int ret = -1;
+
+ if (response == NULL && responseLen == 0) {
+ // Earlier RILs did not send a response for some cases although the interface
+ // expected an integer as response. Do not return error if response is empty. Instead
+ // Return -1 in those cases to maintain backward compatibility.
+ } else if (response == NULL || responseLen != sizeof(int)) {
+ RLOGE("responseIntOrEmpty: Invalid response");
+ if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
+ } else {
+ int *p_int = (int *) response;
+ ret = p_int[0];
+ }
+ return ret;
+}
+
int responseInt(RadioResponseInfo& responseInfo, int serial, int responseType, RIL_Errno e,
void *response, size_t responseLen) {
populateResponseInfo(responseInfo, serial, responseType, e);
return ret;
}
-int radio::getIccCardStatusResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getIccCardStatusResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
CardStatus cardStatus = {};
- if (response == NULL || responseLen != sizeof(RIL_CardStatus_v6)) {
- RLOGE("radio::getIccCardStatusResponse: Invalid response");
+ RIL_CardStatus_v6 *p_cur = ((RIL_CardStatus_v6 *) response);
+ if (response == NULL || responseLen != sizeof(RIL_CardStatus_v6)
+ || p_cur->gsm_umts_subscription_app_index >= p_cur->num_applications
+ || p_cur->cdma_subscription_app_index >= p_cur->num_applications
+ || p_cur->ims_subscription_app_index >= p_cur->num_applications) {
+ RLOGE("getIccCardStatusResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
- RIL_CardStatus_v6 *p_cur = ((RIL_CardStatus_v6 *) response);
cardStatus.cardState = (CardState) p_cur->card_state;
cardStatus.universalPinState = (PinState) p_cur->universal_pin_state;
cardStatus.gsmUmtsSubscriptionAppIndex = p_cur->gsm_umts_subscription_app_index;
RIL_AppStatus *rilAppStatus = p_cur->applications;
cardStatus.applications.resize(p_cur->num_applications);
AppStatus *appStatus = cardStatus.applications.data();
- RLOGD("radio::getIccCardStatusResponse: num_applications %d", p_cur->num_applications);
+#if VDBG
+ RLOGD("getIccCardStatusResponse: num_applications %d", p_cur->num_applications);
+#endif
for (int i = 0; i < p_cur->num_applications; i++) {
appStatus[i].appType = (AppType) rilAppStatus[i].app_type;
appStatus[i].appState = (AppState) rilAppStatus[i].app_state;
getIccCardStatusResponse(responseInfo, cardStatus);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getIccCardStatusResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getIccCardStatusResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::supplyIccPinForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::supplyIccPinForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::supplyIccPinForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPinForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
supplyIccPinForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::supplyIccPinForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("supplyIccPinForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::supplyIccPukForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::supplyIccPukForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::supplyIccPukForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPukForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->supplyIccPukForAppResponse(
responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::supplyIccPukForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("supplyIccPukForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::supplyIccPin2ForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::supplyIccPin2ForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::supplyIccPin2ForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPin2ForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
supplyIccPin2ForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::supplyIccPin2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("supplyIccPin2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::supplyIccPuk2ForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::supplyIccPuk2ForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::supplyIccPuk2ForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("supplyIccPuk2ForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
supplyIccPuk2ForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::supplyIccPuk2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("supplyIccPuk2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::changeIccPinForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::changeIccPinForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::changeIccPinForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("changeIccPinForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
changeIccPinForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::changeIccPinForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("changeIccPinForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::changeIccPin2ForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::changeIccPin2ForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::changeIccPin2ForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("changeIccPin2ForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
changeIccPin2ForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::changeIccPin2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("changeIccPin2ForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::supplyNetworkDepersonalizationResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::supplyNetworkDepersonalizationResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::supplyNetworkDepersonalizationResponse: serial %d", serial);
+#if VDBG
+ RLOGD("supplyNetworkDepersonalizationResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus = radioService[slotId]->mRadioResponse->
supplyNetworkDepersonalizationResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::supplyNetworkDepersonalizationResponse: radioService[%d]->mRadioResponse == "
+ RLOGE("supplyNetworkDepersonalizationResponse: radioService[%d]->mRadioResponse == "
"NULL", slotId);
}
return 0;
}
-int radio::getCurrentCallsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCurrentCallsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getCurrentCallsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCurrentCallsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<Call> calls;
if (response == NULL || (responseLen % sizeof(RIL_Call *)) != 0) {
- RLOGE("radio::getCurrentCallsResponse: Invalid response");
+ RLOGE("getCurrentCallsResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int num = responseLen / sizeof(RIL_Call *);
getCurrentCallsResponse(responseInfo, calls);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCurrentCallsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getCurrentCallsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::dialResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::dialResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::dialResponse: serial %d", serial);
+#if VDBG
+ RLOGD("dialResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
Return<void> retStatus = radioService[slotId]->mRadioResponse->dialResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::dialResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("dialResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getIMSIForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getIMSIForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getIMSIForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getIMSIForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getIMSIForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getIMSIForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::hangupConnectionResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::hangupConnectionResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::hangupConnectionResponse: serial %d", serial);
+#if VDBG
+ RLOGD("hangupConnectionResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::hangupConnectionResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("hangupConnectionResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::hangupWaitingOrBackgroundResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::hangupWaitingOrBackgroundResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::hangupWaitingOrBackgroundResponse: serial %d", serial);
+#if VDBG
+ RLOGD("hangupWaitingOrBackgroundResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::hangupWaitingOrBackgroundResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("hangupWaitingOrBackgroundResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::hangupForegroundResumeBackgroundResponse(android::Parcel &p, int slotId,
- int requestNumber,
- int responseType, int serial, RIL_Errno e,
- void *response, size_t responseLen) {
- RLOGD("radio::hangupWaitingOrBackgroundResponse: serial %d", serial);
+int radio::hangupForegroundResumeBackgroundResponse(int slotId, int responseType, int serial,
+ RIL_Errno e, void *response,
+ size_t responseLen) {
+#if VDBG
+ RLOGD("hangupWaitingOrBackgroundResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::hangupWaitingOrBackgroundResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("hangupWaitingOrBackgroundResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::switchWaitingOrHoldingAndActiveResponse(android::Parcel &p, int slotId,
- int requestNumber,
- int responseType, int serial, RIL_Errno e,
- void *response, size_t responseLen) {
- RLOGD("radio::switchWaitingOrHoldingAndActiveResponse: serial %d", serial);
+int radio::switchWaitingOrHoldingAndActiveResponse(int slotId, int responseType, int serial,
+ RIL_Errno e, void *response,
+ size_t responseLen) {
+#if VDBG
+ RLOGD("switchWaitingOrHoldingAndActiveResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::switchWaitingOrHoldingAndActiveResponse: radioService[%d]->mRadioResponse "
+ RLOGE("switchWaitingOrHoldingAndActiveResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::conferenceResponse(android::Parcel &p, int slotId, int requestNumber, int responseType,
+int radio::conferenceResponse(int slotId, int responseType,
int serial, RIL_Errno e, void *response, size_t responseLen) {
- RLOGD("radio::conferenceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("conferenceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::conferenceResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("conferenceResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::rejectCallResponse(android::Parcel &p, int slotId, int requestNumber, int responseType,
+int radio::rejectCallResponse(int slotId, int responseType,
int serial, RIL_Errno e, void *response, size_t responseLen) {
- RLOGD("radio::rejectCallResponse: serial %d", serial);
+#if VDBG
+ RLOGD("rejectCallResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::rejectCallResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("rejectCallResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getLastCallFailCauseResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getLastCallFailCauseResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getLastCallFailCauseResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getLastCallFailCauseResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
LastCallFailCauseInfo info = {};
info.vendorCause = hidl_string();
if (response == NULL) {
- RLOGE("radio::getCurrentCallsResponse Invalid response: NULL");
+ RLOGE("getCurrentCallsResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else if (responseLen == sizeof(int)) {
int *pInt = (int *) response;
info.causeCode = (LastCallFailCause) pFailCauseInfo->cause_code;
info.vendorCause = convertCharPtrToHidlString(pFailCauseInfo->vendor_cause);
} else {
- RLOGE("radio::getCurrentCallsResponse Invalid response: NULL");
+ RLOGE("getCurrentCallsResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
}
responseInfo, info);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getLastCallFailCauseResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getLastCallFailCauseResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getSignalStrengthResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getSignalStrengthResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getSignalStrengthResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getSignalStrengthResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
SignalStrength signalStrength = {};
if (response == NULL || responseLen != sizeof(RIL_SignalStrength_v10)) {
- RLOGE("radio::getSignalStrengthResponse: Invalid response");
+ RLOGE("getSignalStrengthResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
convertRilSignalStrengthToHal(response, responseLen, signalStrength);
responseInfo, signalStrength);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getSignalStrengthResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getSignalStrengthResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
int numStrings, char** response) {
RIL_CellIdentity_v16 rilCellIdentity;
- int32_t *tmp = (int32_t*)&rilCellIdentity;
-
- for (int i = 0; i < sizeof(RIL_CellIdentity_v16)/sizeof(int32_t); i++) {
- tmp[i] = -1;
- }
+ memset(&rilCellIdentity, -1, sizeof(RIL_CellIdentity_v16));
rilCellIdentity.cellInfoType = getCellInfoTypeRadioTechnology(response[3]);
switch(rilCellIdentity.cellInfoType) {
case RIL_CELL_INFO_TYPE_CDMA:{
rilCellIdentity.cellIdentityCdma.basestationId =
convertResponseStringEntryToInt(response, 4, numStrings);
- rilCellIdentity.cellIdentityCdma.longitude =
- convertResponseStringEntryToInt(response, 5, numStrings);
+ /* Order of Lat. and Long. swapped between RIL and HIDL interface versions. */
rilCellIdentity.cellIdentityCdma.latitude =
+ convertResponseStringEntryToInt(response, 5, numStrings);
+ rilCellIdentity.cellIdentityCdma.longitude =
convertResponseStringEntryToInt(response, 6, numStrings);
rilCellIdentity.cellIdentityCdma.systemId =
convertResponseStringEntryToInt(response, 8, numStrings);
break;
}
+ case RIL_CELL_INFO_TYPE_LTE:{
+ rilCellIdentity.cellIdentityLte.tac =
+ convertResponseStringEntryToInt(response, 1, numStrings);
+ rilCellIdentity.cellIdentityLte.ci =
+ convertResponseStringEntryToInt(response, 2, numStrings);
+ break;
+ }
+
default: {
break;
}
int numStrings, char** response) {
RIL_CellIdentity_v16 rilCellIdentity;
- int32_t *tmp = (int32_t*)&rilCellIdentity;
-
- for (int i = 0; i < sizeof(RIL_CellIdentity_v16)/sizeof(int32_t); i++) {
- tmp[i] = -1;
- }
+ memset(&rilCellIdentity, -1, sizeof(RIL_CellIdentity_v16));
rilCellIdentity.cellInfoType = getCellInfoTypeRadioTechnology(response[3]);
switch(rilCellIdentity.cellInfoType) {
fillCellIdentityResponse(cellIdentity, rilCellIdentity);
}
-int radio::getVoiceRegistrationStateResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getVoiceRegistrationStateResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getVoiceRegistrationStateResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getVoiceRegistrationStateResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
VoiceRegStateResult voiceRegResponse = {};
int numStrings = responseLen / sizeof(char *);
if (response == NULL) {
- RLOGE("radio::getVoiceRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getVoiceRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else if (s_vendorFunctions->version <= 14) {
if (numStrings != 15) {
- RLOGE("radio::getVoiceRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getVoiceRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
char **resp = (char **) response;
(RIL_VoiceRegistrationStateResponse *)response;
if (responseLen != sizeof(RIL_VoiceRegistrationStateResponse)) {
- RLOGE("radio::getVoiceRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getVoiceRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
voiceRegResponse.regState = (RegState) voiceRegState->regState;
responseInfo, voiceRegResponse);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getVoiceRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getVoiceRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getDataRegistrationStateResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getDataRegistrationStateResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getDataRegistrationStateResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getDataRegistrationStateResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
DataRegStateResult dataRegResponse = {};
if (response == NULL) {
- RLOGE("radio::getDataRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getDataRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else if (s_vendorFunctions->version <= 14) {
int numStrings = responseLen / sizeof(char *);
if ((numStrings != 6) && (numStrings != 11)) {
- RLOGE("radio::getDataRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getDataRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
char **resp = (char **) response;
(RIL_DataRegistrationStateResponse *)response;
if (responseLen != sizeof(RIL_DataRegistrationStateResponse)) {
- RLOGE("radio::getDataRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getDataRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
dataRegResponse.regState = (RegState) dataRegState->regState;
dataRegResponse);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getDataRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getDataRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getOperatorResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getOperatorResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getOperatorResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getOperatorResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_string numeric;
int numStrings = responseLen / sizeof(char *);
if (response == NULL || numStrings != 3) {
- RLOGE("radio::getOperatorResponse Invalid response: NULL");
+ RLOGE("getOperatorResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
responseInfo, longName, shortName, numeric);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getOperatorResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getOperatorResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setRadioPowerResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setRadioPowerResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setRadioPowerResponse: serial %d", serial);
+ RLOGD("setRadioPowerResponse: serial %d", serial);
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setRadioPowerResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setRadioPowerResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendDtmfResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendDtmfResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendDtmfResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendDtmfResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendDtmfResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("sendDtmfResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return result;
}
-int radio::sendSmsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendSmsResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendSmsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendSmsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::sendSMSExpectMoreResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendSMSExpectMoreResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendSMSExpectMoreResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendSMSExpectMoreResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendSMSExpectMoreResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendSMSExpectMoreResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setupDataCallResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setupDataCallResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setupDataCallResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setupDataCallResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
SetupDataCallResult result = {};
if (response == NULL || responseLen != sizeof(RIL_Data_Call_Response_v11)) {
- RLOGE("radio::setupDataCallResponse: Invalid response");
+ RLOGE("setupDataCallResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
result.status = DataCallFailCause::ERROR_UNSPECIFIED;
result.type = hidl_string();
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setupDataCallResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setupDataCallResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
return result;
}
-int radio::iccIOForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::iccIOForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::radio::iccIOForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("iccIOForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::iccIOForAppResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("iccIOForAppResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::sendUssdResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendUssdResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendUssdResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendUssdResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendUssdResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("sendUssdResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::cancelPendingUssdResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::cancelPendingUssdResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::cancelPendingUssdResponse: serial %d", serial);
+#if VDBG
+ RLOGD("cancelPendingUssdResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cancelPendingUssdResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("cancelPendingUssdResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getClirResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getClirResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getClirResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getClirResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
int n = -1, m = -1;
int numInts = responseLen / sizeof(int);
if (response == NULL || numInts != 2) {
- RLOGE("radio::getClirResponse Invalid response: NULL");
+ RLOGE("getClirResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
n, m);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getClirResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getClirResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setClirResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setClirResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setClirResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setClirResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setClirResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setClirResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getCallForwardStatusResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCallForwardStatusResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getCallForwardStatusResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCallForwardStatusResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<CallForwardInfo> callForwardInfos;
if (response == NULL || responseLen % sizeof(RIL_CallForwardInfo *) != 0) {
- RLOGE("radio::getCallForwardStatusResponse Invalid response: NULL");
+ RLOGE("getCallForwardStatusResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int num = responseLen / sizeof(RIL_CallForwardInfo *);
responseInfo, callForwardInfos);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCallForwardStatusResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getCallForwardStatusResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setCallForwardResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCallForwardResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setCallForwardResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCallForwardResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCallForwardResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setCallForwardResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getCallWaitingResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCallWaitingResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getCallWaitingResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCallWaitingResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
int serviceClass = -1;
int numInts = responseLen / sizeof(int);
if (response == NULL || numInts != 2) {
- RLOGE("radio::getCallWaitingResponse Invalid response: NULL");
+ RLOGE("getCallWaitingResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
enable = pInt[0] == 1 ? true : false;
serviceClass = pInt[1];
}
- Return<void> retStatus = radioService[slotId]->mRadioResponse->getClirResponse(responseInfo,
- enable, serviceClass);
+ Return<void> retStatus = radioService[slotId]->mRadioResponse->getCallWaitingResponse(
+ responseInfo, enable, serviceClass);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCallWaitingResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getCallWaitingResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setCallWaitingResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCallWaitingResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setCallWaitingResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCallWaitingResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCallWaitingResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setCallWaitingResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::acknowledgeLastIncomingGsmSmsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::acknowledgeLastIncomingGsmSmsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::acknowledgeLastIncomingGsmSmsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeLastIncomingGsmSmsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acknowledgeLastIncomingGsmSmsResponse: radioService[%d]->mRadioResponse "
+ RLOGE("acknowledgeLastIncomingGsmSmsResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::acceptCallResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::acceptCallResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::acceptCallResponse: serial %d", serial);
+#if VDBG
+ RLOGD("acceptCallResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acceptCallResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("acceptCallResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::deactivateDataCallResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::deactivateDataCallResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::deactivateDataCallResponse: serial %d", serial);
+#if VDBG
+ RLOGD("deactivateDataCallResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::deactivateDataCallResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("deactivateDataCallResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getFacilityLockForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getFacilityLockForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getFacilityLockForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getFacilityLockForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
getFacilityLockForAppResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getFacilityLockForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getFacilityLockForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setFacilityLockForAppResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setFacilityLockForAppResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setFacilityLockForAppResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setFacilityLockForAppResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
- int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+ int ret = responseIntOrEmpty(responseInfo, serial, responseType, e, response, responseLen);
Return<void> retStatus
= radioService[slotId]->mRadioResponse->setFacilityLockForAppResponse(responseInfo,
ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setFacilityLockForAppResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setFacilityLockForAppResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setBarringPasswordResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setBarringPasswordResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::acceptCallResponse: serial %d", serial);
+#if VDBG
+ RLOGD("acceptCallResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setBarringPasswordResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setBarringPasswordResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setBarringPasswordResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getNetworkSelectionModeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getNetworkSelectionModeResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getNetworkSelectionModeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getNetworkSelectionModeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
bool manual = false;
int serviceClass;
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::getNetworkSelectionModeResponse Invalid response: NULL");
+ RLOGE("getNetworkSelectionModeResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
manual);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getNetworkSelectionModeResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getNetworkSelectionModeResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setNetworkSelectionModeAutomaticResponse(android::Parcel &p, int slotId,
- int requestNumber,
- int responseType, int serial, RIL_Errno e,
- void *response, size_t responseLen) {
- RLOGD("radio::setNetworkSelectionModeAutomaticResponse: serial %d", serial);
+int radio::setNetworkSelectionModeAutomaticResponse(int slotId, int responseType, int serial,
+ RIL_Errno e, void *response,
+ size_t responseLen) {
+#if VDBG
+ RLOGD("setNetworkSelectionModeAutomaticResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setNetworkSelectionModeAutomaticResponse: radioService[%d]->mRadioResponse "
+ RLOGE("setNetworkSelectionModeAutomaticResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::setNetworkSelectionModeManualResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setNetworkSelectionModeManualResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setNetworkSelectionModeManualResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setNetworkSelectionModeManualResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acceptCallResponse: radioService[%d]->setNetworkSelectionModeManualResponse "
+ RLOGE("acceptCallResponse: radioService[%d]->setNetworkSelectionModeManualResponse "
"== NULL", slotId);
}
}
}
-int radio::getAvailableNetworksResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getAvailableNetworksResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getAvailableNetworksResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getAvailableNetworksResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
hidl_vec<OperatorInfo> networks;
if (response == NULL || responseLen % (4 * sizeof(char *))!= 0) {
- RLOGE("radio::getAvailableNetworksResponse Invalid response: NULL");
+ RLOGE("getAvailableNetworksResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
char **resp = (char **) response;
int numStrings = responseLen / sizeof(char *);
networks.resize(numStrings/4);
- for (int i = 0; i < numStrings; i = i + 4) {
- networks[i].alphaLong = convertCharPtrToHidlString(resp[i]);
- networks[i].alphaShort = convertCharPtrToHidlString(resp[i + 1]);
- networks[i].operatorNumeric = convertCharPtrToHidlString(resp[i + 2]);
+ for (int i = 0, j = 0; i < numStrings; i = i + 4, j++) {
+ networks[j].alphaLong = convertCharPtrToHidlString(resp[i]);
+ networks[j].alphaShort = convertCharPtrToHidlString(resp[i + 1]);
+ networks[j].operatorNumeric = convertCharPtrToHidlString(resp[i + 2]);
int status = convertOperatorStatusToInt(resp[i + 3]);
if (status == -1) {
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
- networks[i].status = (OperatorStatus) status;
+ networks[j].status = (OperatorStatus) status;
}
}
}
networks);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getAvailableNetworksResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getAvailableNetworksResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::startDtmfResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::startDtmfResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::startDtmfResponse: serial %d", serial);
+#if VDBG
+ RLOGD("startDtmfResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->startDtmfResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::startDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("startDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::stopDtmfResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::stopDtmfResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::stopDtmfResponse: serial %d", serial);
+#if VDBG
+ RLOGD("stopDtmfResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->stopDtmfResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stopDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("stopDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getBasebandVersionResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getBasebandVersionResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getBasebandVersionResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getBasebandVersionResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getBasebandVersionResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getBasebandVersionResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::separateConnectionResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::separateConnectionResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::separateConnectionResponse: serial %d", serial);
+#if VDBG
+ RLOGD("separateConnectionResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->separateConnectionResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::separateConnectionResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("separateConnectionResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setMuteResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setMuteResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setMuteResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setMuteResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setMuteResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setMuteResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setMuteResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getMuteResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getMuteResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getMuteResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getMuteResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
bool enable = false;
int serviceClass;
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::getMuteResponse Invalid response: NULL");
+ RLOGE("getMuteResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
enable);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getMuteResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getMuteResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getClipResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getClipResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getClipResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getClipResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
(ClipStatus) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getClipResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getClipResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getDataCallListResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getDataCallListResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getDataCallListResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getDataCallListResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<SetupDataCallResult> ret;
if (response == NULL || responseLen % sizeof(RIL_Data_Call_Response_v11) != 0) {
- RLOGE("radio::getDataCallListResponse: invalid response");
+ RLOGE("getDataCallListResponse: invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
convertRilDataCallListToHal(response, responseLen, ret);
responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getDataCallListResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getDataCallListResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setSuppServiceNotificationsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setSuppServiceNotificationsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setSuppServiceNotificationsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setSuppServiceNotificationsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setSuppServiceNotificationsResponse: radioService[%d]->mRadioResponse "
+ RLOGE("setSuppServiceNotificationsResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::deleteSmsOnSimResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::deleteSmsOnSimResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::deleteSmsOnSimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("deleteSmsOnSimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->deleteSmsOnSimResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::deleteSmsOnSimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("deleteSmsOnSimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setBandModeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setBandModeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setBandModeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setBandModeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setBandModeResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setBandModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setBandModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::writeSmsToSimResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::writeSmsToSimResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::writeSmsToSimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("writeSmsToSimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->writeSmsToSimResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::writeSmsToSimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("writeSmsToSimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getAvailableBandModesResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getAvailableBandModesResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getAvailableBandModesResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getAvailableBandModesResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
hidl_vec<RadioBandMode> modes;
if (response == NULL || responseLen % sizeof(int) != 0) {
- RLOGE("radio::getAvailableBandModesResponse Invalid response: NULL");
+ RLOGE("getAvailableBandModesResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
modes);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getAvailableBandModesResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getAvailableBandModesResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendEnvelopeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendEnvelopeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendEnvelopeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendEnvelopeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendEnvelopeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendEnvelopeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::sendTerminalResponseToSimResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendTerminalResponseToSimResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendTerminalResponseToSimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendTerminalResponseToSimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendTerminalResponseToSimResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("sendTerminalResponseToSimResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::handleStkCallSetupRequestFromSimResponse(android::Parcel &p, int slotId,
- int requestNumber, int responseType, int serial,
+int radio::handleStkCallSetupRequestFromSimResponse(int slotId,
+ int responseType, int serial,
RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::handleStkCallSetupRequestFromSimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("handleStkCallSetupRequestFromSimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::handleStkCallSetupRequestFromSimResponse: radioService[%d]->mRadioResponse "
+ RLOGE("handleStkCallSetupRequestFromSimResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::explicitCallTransferResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::explicitCallTransferResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::explicitCallTransferResponse: serial %d", serial);
+#if VDBG
+ RLOGD("explicitCallTransferResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->explicitCallTransferResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::explicitCallTransferResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("explicitCallTransferResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setPreferredNetworkTypeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setPreferredNetworkTypeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setPreferredNetworkTypeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setPreferredNetworkTypeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setPreferredNetworkTypeResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setPreferredNetworkTypeResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
}
-int radio::getPreferredNetworkTypeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getPreferredNetworkTypeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getPreferredNetworkTypeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getPreferredNetworkTypeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, (PreferredNetworkType) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getPreferredNetworkTypeResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getPreferredNetworkTypeResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getNeighboringCidsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getNeighboringCidsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getNeighboringCidsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getNeighboringCidsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<NeighboringCell> cells;
if (response == NULL || responseLen % sizeof(RIL_NeighboringCell *) != 0) {
- RLOGE("radio::getNeighboringCidsResponse Invalid response: NULL");
+ RLOGE("getNeighboringCidsResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int num = responseLen / sizeof(RIL_NeighboringCell *);
cells);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getNeighboringCidsResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getNeighboringCidsResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setLocationUpdatesResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setLocationUpdatesResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setLocationUpdatesResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setLocationUpdatesResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setLocationUpdatesResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setLocationUpdatesResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setLocationUpdatesResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setCdmaSubscriptionSourceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCdmaSubscriptionSourceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setCdmaSubscriptionSourceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaSubscriptionSourceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCdmaSubscriptionSourceResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setCdmaSubscriptionSourceResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setCdmaRoamingPreferenceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCdmaRoamingPreferenceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setCdmaRoamingPreferenceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaRoamingPreferenceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCdmaRoamingPreferenceResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setCdmaRoamingPreferenceResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getCdmaRoamingPreferenceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCdmaRoamingPreferenceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getCdmaRoamingPreferenceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaRoamingPreferenceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, (CdmaRoamingType) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCdmaRoamingPreferenceResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getCdmaRoamingPreferenceResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setTTYModeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setTTYModeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setTTYModeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setTTYModeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setTTYModeResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setTTYModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setTTYModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getTTYModeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getTTYModeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getTTYModeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getTTYModeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
(TtyMode) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getTTYModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getTTYModeResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setPreferredVoicePrivacyResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setPreferredVoicePrivacyResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setPreferredVoicePrivacyResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setPreferredVoicePrivacyResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setPreferredVoicePrivacyResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setPreferredVoicePrivacyResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getPreferredVoicePrivacyResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getPreferredVoicePrivacyResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getPreferredVoicePrivacyResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getPreferredVoicePrivacyResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
bool enable = false;
int numInts = responseLen / sizeof(int);
if (response == NULL || numInts != 1) {
- RLOGE("radio::getPreferredVoicePrivacyResponse Invalid response: NULL");
+ RLOGE("getPreferredVoicePrivacyResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
responseInfo, enable);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getPreferredVoicePrivacyResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getPreferredVoicePrivacyResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendCDMAFeatureCodeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendCDMAFeatureCodeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendCDMAFeatureCodeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendCDMAFeatureCodeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->sendCDMAFeatureCodeResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendCDMAFeatureCodeResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("sendCDMAFeatureCodeResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendBurstDtmfResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendBurstDtmfResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendBurstDtmfResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendBurstDtmfResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->sendBurstDtmfResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendBurstDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendBurstDtmfResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::sendCdmaSmsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendCdmaSmsResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendCdmaSmsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendCdmaSmsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->sendCdmaSmsResponse(responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendCdmaSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendCdmaSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::acknowledgeLastIncomingCdmaSmsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::acknowledgeLastIncomingCdmaSmsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::acknowledgeLastIncomingCdmaSmsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeLastIncomingCdmaSmsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acknowledgeLastIncomingCdmaSmsResponse: radioService[%d]->mRadioResponse "
+ RLOGE("acknowledgeLastIncomingCdmaSmsResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::getGsmBroadcastConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getGsmBroadcastConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getGsmBroadcastConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getGsmBroadcastConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<GsmBroadcastSmsConfigInfo> configs;
if (response == NULL || responseLen % sizeof(RIL_GSM_BroadcastSmsConfigInfo *) != 0) {
- RLOGE("radio::getGsmBroadcastConfigResponse Invalid response: NULL");
+ RLOGE("getGsmBroadcastConfigResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int num = responseLen / sizeof(RIL_GSM_BroadcastSmsConfigInfo *);
configs);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getGsmBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getGsmBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setGsmBroadcastConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setGsmBroadcastConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setGsmBroadcastConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setGsmBroadcastConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setGsmBroadcastConfigResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setGsmBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setGsmBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setGsmBroadcastActivationResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setGsmBroadcastActivationResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setGsmBroadcastActivationResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setGsmBroadcastActivationResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setGsmBroadcastActivationResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setGsmBroadcastActivationResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getCdmaBroadcastConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCdmaBroadcastConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getCdmaBroadcastConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaBroadcastConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<CdmaBroadcastSmsConfigInfo> configs;
if (response == NULL || responseLen % sizeof(RIL_CDMA_BroadcastSmsConfigInfo *) != 0) {
- RLOGE("radio::getCdmaBroadcastConfigResponse Invalid response: NULL");
+ RLOGE("getCdmaBroadcastConfigResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int num = responseLen / sizeof(RIL_CDMA_BroadcastSmsConfigInfo *);
configs);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCdmaBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getCdmaBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setCdmaBroadcastConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCdmaBroadcastConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setCdmaBroadcastConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaBroadcastConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCdmaBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setCdmaBroadcastConfigResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setCdmaBroadcastActivationResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCdmaBroadcastActivationResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setCdmaBroadcastActivationResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCdmaBroadcastActivationResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCdmaBroadcastActivationResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setCdmaBroadcastActivationResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getCDMASubscriptionResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCDMASubscriptionResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getCDMASubscriptionResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCDMASubscriptionResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
int numStrings = responseLen / sizeof(char *);
hidl_string emptyString;
if (response == NULL || numStrings != 5) {
- RLOGE("radio::getOperatorResponse Invalid response: NULL");
+ RLOGE("getOperatorResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
Return<void> retStatus
= radioService[slotId]->mRadioResponse->getCDMASubscriptionResponse(
radioService[slotId]->checkReturnStatus(retStatus);
}
} else {
- RLOGE("radio::getCDMASubscriptionResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getCDMASubscriptionResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::writeSmsToRuimResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::writeSmsToRuimResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::writeSmsToRuimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("writeSmsToRuimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->writeSmsToRuimResponse(responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::writeSmsToRuimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("writeSmsToRuimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::deleteSmsOnRuimResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::deleteSmsOnRuimResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::deleteSmsOnRuimResponse: serial %d", serial);
+#if VDBG
+ RLOGD("deleteSmsOnRuimResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->deleteSmsOnRuimResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::deleteSmsOnRuimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("deleteSmsOnRuimResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getDeviceIdentityResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getDeviceIdentityResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getDeviceIdentityResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getDeviceIdentityResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
int numStrings = responseLen / sizeof(char *);
hidl_string emptyString;
if (response == NULL || numStrings != 4) {
- RLOGE("radio::getDeviceIdentityResponse Invalid response: NULL");
+ RLOGE("getDeviceIdentityResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
Return<void> retStatus
= radioService[slotId]->mRadioResponse->getDeviceIdentityResponse(responseInfo,
radioService[slotId]->checkReturnStatus(retStatus);
}
} else {
- RLOGE("radio::getDeviceIdentityResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getDeviceIdentityResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::exitEmergencyCallbackModeResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::exitEmergencyCallbackModeResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::exitEmergencyCallbackModeResponse: serial %d", serial);
+#if VDBG
+ RLOGD("exitEmergencyCallbackModeResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::exitEmergencyCallbackModeResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("exitEmergencyCallbackModeResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getSmscAddressResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getSmscAddressResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getSmscAddressResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getSmscAddressResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getSmscAddressResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getSmscAddressResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setSmscAddressResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setSmscAddressResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setSmscAddressResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setSmscAddressResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setSmscAddressResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setSmscAddressResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setSmscAddressResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::reportSmsMemoryStatusResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::reportSmsMemoryStatusResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::reportSmsMemoryStatusResponse: serial %d", serial);
+#if VDBG
+ RLOGD("reportSmsMemoryStatusResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->reportSmsMemoryStatusResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::reportSmsMemoryStatusResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("reportSmsMemoryStatusResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::reportStkServiceIsRunningResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::reportStkServiceIsRunningResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::reportStkServiceIsRunningResponse: serial %d", serial);
+#if VDBG
+ RLOGD("reportStkServiceIsRunningResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
reportStkServiceIsRunningResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::reportStkServiceIsRunningResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("reportStkServiceIsRunningResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getCdmaSubscriptionSourceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getCdmaSubscriptionSourceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getCdmaSubscriptionSourceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCdmaSubscriptionSourceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, (CdmaSubscriptionSource) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCdmaSubscriptionSourceResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getCdmaSubscriptionSourceResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::requestIsimAuthenticationResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::requestIsimAuthenticationResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::requestIsimAuthenticationResponse: serial %d", serial);
+#if VDBG
+ RLOGD("requestIsimAuthenticationResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::requestIsimAuthenticationResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("requestIsimAuthenticationResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::acknowledgeIncomingGsmSmsWithPduResponse(android::Parcel &p, int slotId,
- int requestNumber, int responseType,
+int radio::acknowledgeIncomingGsmSmsWithPduResponse(int slotId,
+ int responseType,
int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::acknowledgeIncomingGsmSmsWithPduResponse: serial %d", serial);
+#if VDBG
+ RLOGD("acknowledgeIncomingGsmSmsWithPduResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::acknowledgeIncomingGsmSmsWithPduResponse: radioService[%d]->mRadioResponse "
+ RLOGE("acknowledgeIncomingGsmSmsWithPduResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::sendEnvelopeWithStatusResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendEnvelopeWithStatusResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendEnvelopeWithStatusResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendEnvelopeWithStatusResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendEnvelopeWithStatusResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("sendEnvelopeWithStatusResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getVoiceRadioTechnologyResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getVoiceRadioTechnologyResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getVoiceRadioTechnologyResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getVoiceRadioTechnologyResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, (RadioTechnology) ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getVoiceRadioTechnologyResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getVoiceRadioTechnologyResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getCellInfoListResponse(android::Parcel &p, int slotId,
- int requestNumber, int responseType,
+int radio::getCellInfoListResponse(int slotId,
+ int responseType,
int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::getCellInfoListResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getCellInfoListResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<CellInfo> ret;
if (response == NULL || responseLen % sizeof(RIL_CellInfo_v12) != 0) {
- RLOGE("radio::getCellInfoListResponse: Invalid response");
+ RLOGE("getCellInfoListResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
convertRilCellInfoListToHal(response, responseLen, ret);
responseInfo, ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getCellInfoListResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getCellInfoListResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setCellInfoListRateResponse(android::Parcel &p, int slotId,
- int requestNumber, int responseType,
+int radio::setCellInfoListRateResponse(int slotId,
+ int responseType,
int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::setCellInfoListRateResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setCellInfoListRateResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setCellInfoListRateResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setCellInfoListRateResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setCellInfoListRateResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setInitialAttachApnResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setInitialAttachApnResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setInitialAttachApnResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setInitialAttachApnResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setInitialAttachApnResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setInitialAttachApnResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setInitialAttachApnResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getImsRegistrationStateResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getImsRegistrationStateResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getImsRegistrationStateResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getImsRegistrationStateResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
int ratFamily = 0;
int numInts = responseLen / sizeof(int);
if (response == NULL || numInts != 2) {
- RLOGE("radio::getImsRegistrationStateResponse Invalid response: NULL");
+ RLOGE("getImsRegistrationStateResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
responseInfo, isRegistered, (RadioTechnologyFamily) ratFamily);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getImsRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getImsRegistrationStateResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendImsSmsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendImsSmsResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::sendImsSmsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendImsSmsResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->sendImsSmsResponse(responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendSmsResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::iccTransmitApduBasicChannelResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::iccTransmitApduBasicChannelResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::iccTransmitApduBasicChannelResponse: serial %d", serial);
+#if VDBG
+ RLOGD("iccTransmitApduBasicChannelResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::iccTransmitApduBasicChannelResponse: radioService[%d]->mRadioResponse "
+ RLOGE("iccTransmitApduBasicChannelResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::iccOpenLogicalChannelResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::iccOpenLogicalChannelResponse(int slotId,
int responseType, int serial, RIL_Errno e, void *response,
size_t responseLen) {
- RLOGD("radio::iccOpenLogicalChannelResponse: serial %d", serial);
+#if VDBG
+ RLOGD("iccOpenLogicalChannelResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<int8_t> selectResponse;
int numInts = responseLen / sizeof(int);
if (response == NULL || responseLen % sizeof(int) != 0) {
- RLOGE("radio::iccOpenLogicalChannelResponse Invalid response: NULL");
+ RLOGE("iccOpenLogicalChannelResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
int *pInt = (int *) response;
channelId, selectResponse);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::iccOpenLogicalChannelResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("iccOpenLogicalChannelResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::iccCloseLogicalChannelResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::iccCloseLogicalChannelResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::iccCloseLogicalChannelResponse: serial %d", serial);
+#if VDBG
+ RLOGD("iccCloseLogicalChannelResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::iccCloseLogicalChannelResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("iccCloseLogicalChannelResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::iccTransmitApduLogicalChannelResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::iccTransmitApduLogicalChannelResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::iccTransmitApduLogicalChannelResponse: serial %d", serial);
+#if VDBG
+ RLOGD("iccTransmitApduLogicalChannelResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::iccTransmitApduLogicalChannelResponse: radioService[%d]->mRadioResponse "
+ RLOGE("iccTransmitApduLogicalChannelResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::nvReadItemResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::nvReadItemResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::nvReadItemResponse: serial %d", serial);
+#if VDBG
+ RLOGD("nvReadItemResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::nvReadItemResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("nvReadItemResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::nvWriteItemResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::nvWriteItemResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::nvWriteItemResponse: serial %d", serial);
+#if VDBG
+ RLOGD("nvWriteItemResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->nvWriteItemResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::nvWriteItemResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("nvWriteItemResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::nvWriteCdmaPrlResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::nvWriteCdmaPrlResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::nvWriteCdmaPrlResponse: serial %d", serial);
+#if VDBG
+ RLOGD("nvWriteCdmaPrlResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->nvWriteCdmaPrlResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::nvWriteCdmaPrlResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("nvWriteCdmaPrlResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::nvResetConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::nvResetConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::nvResetConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("nvResetConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->nvResetConfigResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::nvResetConfigResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("nvResetConfigResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setUiccSubscriptionResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setUiccSubscriptionResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setUiccSubscriptionResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setUiccSubscriptionResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setUiccSubscriptionResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setUiccSubscriptionResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setUiccSubscriptionResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setDataAllowedResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setDataAllowedResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setDataAllowedResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setDataAllowedResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setDataAllowedResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setDataAllowedResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setDataAllowedResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getHardwareConfigResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getHardwareConfigResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getHardwareConfigResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getHardwareConfigResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<HardwareConfig> result;
if (response == NULL || responseLen % sizeof(RIL_HardwareConfig) != 0) {
- RLOGE("radio::hardwareConfigChangedInd: invalid response");
+ RLOGE("hardwareConfigChangedInd: invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
convertRilHardwareConfigListToHal(response, responseLen, result);
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getHardwareConfigResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getHardwareConfigResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::requestIccSimAuthenticationResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::requestIccSimAuthenticationResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::requestIccSimAuthenticationResponse: serial %d", serial);
+#if VDBG
+ RLOGD("requestIccSimAuthenticationResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::requestIccSimAuthenticationResponse: radioService[%d]->mRadioResponse "
+ RLOGE("requestIccSimAuthenticationResponse: radioService[%d]->mRadioResponse "
"== NULL", slotId);
}
return 0;
}
-int radio::setDataProfileResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setDataProfileResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setDataProfileResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setDataProfileResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setDataProfileResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setDataProfileResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setDataProfileResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::requestShutdownResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::requestShutdownResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::requestShutdownResponse: serial %d", serial);
+#if VDBG
+ RLOGD("requestShutdownResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->requestShutdownResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::requestShutdownResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("requestShutdownResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
}
-int radio::getRadioCapabilityResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getRadioCapabilityResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getRadioCapabilityResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getRadioCapabilityResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getRadioCapabilityResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("getRadioCapabilityResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setRadioCapabilityResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setRadioCapabilityResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setRadioCapabilityResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setRadioCapabilityResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setRadioCapabilityResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("setRadioCapabilityResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
return result;
}
-int radio::startLceServiceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::startLceServiceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::startLceServiceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("startLceServiceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::startLceServiceResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("startLceServiceResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::stopLceServiceResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::stopLceServiceResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::stopLceServiceResponse: serial %d", serial);
+#if VDBG
+ RLOGD("stopLceServiceResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stopLceServiceResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("stopLceServiceResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::pullLceDataResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::pullLceDataResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::pullLceDataResponse: serial %d", serial);
+#if VDBG
+ RLOGD("pullLceDataResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
LceDataInfo result = {};
if (response == NULL || responseLen != sizeof(RIL_LceDataInfo)) {
- RLOGE("radio::pullLceDataResponse: Invalid response");
+ RLOGE("pullLceDataResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
convertRilLceDataInfoToHal(response, responseLen, result);
responseInfo, result);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::pullLceDataResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("pullLceDataResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::getModemActivityInfoResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getModemActivityInfoResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getModemActivityInfoResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getModemActivityInfoResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
ActivityStatsInfo info;
if (response == NULL || responseLen != sizeof(RIL_ActivityStatsInfo)) {
- RLOGE("radio::getModemActivityInfoResponse Invalid response: NULL");
+ RLOGE("getModemActivityInfoResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
RIL_ActivityStatsInfo *resp = (RIL_ActivityStatsInfo *)response;
info);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getModemActivityInfoResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getModemActivityInfoResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::setAllowedCarriersResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setAllowedCarriersResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setAllowedCarriersResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setAllowedCarriersResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
ret);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::getAllowedCarriersResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::getAllowedCarriersResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::getAllowedCarriersResponse: serial %d", serial);
+#if VDBG
+ RLOGD("getAllowedCarriersResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
CarrierRestrictions carrierInfo = {};
bool allAllowed = true;
- if (response == NULL || responseLen != sizeof(RIL_CarrierRestrictions)) {
- RLOGE("radio::getAllowedCarriersResponse Invalid response: NULL");
+ if (response == NULL) {
+#if VDBG
+ RLOGD("getAllowedCarriersResponse response is NULL: all allowed");
+#endif
+ carrierInfo.allowedCarriers.resize(0);
+ carrierInfo.excludedCarriers.resize(0);
+ } else if (responseLen != sizeof(RIL_CarrierRestrictions)) {
+ RLOGE("getAllowedCarriersResponse Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
RIL_CarrierRestrictions *pCr = (RIL_CarrierRestrictions *)response;
allAllowed, carrierInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::getAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("getAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendDeviceStateResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendDeviceStateResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responselen) {
- RLOGD("radio::sendDeviceStateResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendDeviceStateResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->sendDeviceStateResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::sendDeviceStateResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("sendDeviceStateResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::setIndicationFilterResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setCarrierInfoForImsiEncryptionResponse(int slotId,
+ int responseType, int serial, RIL_Errno e,
+ void *response, size_t responseLen) {
+ RLOGD("setCarrierInfoForImsiEncryptionResponse: serial %d", serial);
+ if (radioService[slotId]->mRadioResponse != NULL) {
+ RadioResponseInfo responseInfo = {};
+ populateResponseInfo(responseInfo, serial, responseType, e);
+ Return<sp<::android::hardware::radio::V1_1::IRadioResponse>> ret =
+ ::android::hardware::radio::V1_1::IRadioResponse::castFrom(
+ radioService[slotId]->mRadioResponse);
+ if (ret.isOk()) {
+ sp<::android::hardware::radio::V1_1::IRadioResponse> radioResponseV1_1 = ret;
+ Return<void> retStatus
+ = radioResponseV1_1->setCarrierInfoForImsiEncryptionResponse(responseInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGE("setCarrierInfoForImsiEncryptionResponse: ret.isOk() == false for "
+ "radioService[%d]" , slotId);
+ }
+ } else {
+ RLOGE("setCarrierInfoForImsiEncryptionResponse: radioService[%d]->mRadioResponse == NULL",
+ slotId);
+ }
+ return 0;
+}
+
+int radio::setIndicationFilterResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responselen) {
- RLOGD("radio::setIndicationFilterResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setIndicationFilterResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
= radioService[slotId]->mRadioResponse->setIndicationFilterResponse(responseInfo);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::setIndicationFilterResponse: radioService[%d]->mRadioResponse == NULL",
+ RLOGE("setIndicationFilterResponse: radioService[%d]->mRadioResponse == NULL",
slotId);
}
return 0;
}
-
-int radio::setSimCardPowerResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::setSimCardPowerResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::setSimCardPowerResponse: serial %d", serial);
+#if VDBG
+ RLOGD("setSimCardPowerResponse: serial %d", serial);
+#endif
if (radioService[slotId]->mRadioResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
- Return<void> retStatus
- = radioService[slotId]->mRadioResponse->setSimCardPowerResponse(responseInfo);
- radioService[slotId]->checkReturnStatus(retStatus);
+ Return<sp<::android::hardware::radio::V1_1::IRadioResponse>> ret =
+ ::android::hardware::radio::V1_1::IRadioResponse::castFrom(
+ radioService[slotId]->mRadioResponse);
+ if (ret.isOk()) {
+ sp<::android::hardware::radio::V1_1::IRadioResponse> radioResponseV1_1 = ret;
+ Return<void> retStatus
+ = radioResponseV1_1->setSimCardPowerResponse_1_1(responseInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGD("setSimCardPowerResponse: ret.isOK() == false for radioService[%d]",
+ slotId);
+ Return<void> retStatus
+ = radioService[slotId]->mRadioResponse->setSimCardPowerResponse(responseInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ }
+ } else {
+ RLOGE("setSimCardPowerResponse: radioService[%d]->mRadioResponse == NULL",
+ slotId);
+ }
+ return 0;
+}
+
+int radio::startNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
+ void *response, size_t responseLen) {
+#if VDBG
+ RLOGD("startNetworkScanResponse: serial %d", serial);
+#endif
+
+ if (radioService[slotId]->mRadioResponse != NULL) {
+ RadioResponseInfo responseInfo = {};
+ populateResponseInfo(responseInfo, serial, responseType, e);
+ Return<sp<::android::hardware::radio::V1_1::IRadioResponse>> ret =
+ ::android::hardware::radio::V1_1::IRadioResponse::castFrom(
+ radioService[slotId]->mRadioResponse);
+ if (ret.isOk()) {
+ sp<::android::hardware::radio::V1_1::IRadioResponse> radioResponseV1_1 = ret;
+ Return<void> retStatus = radioResponseV1_1->startNetworkScanResponse(responseInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGD("startNetworkScanResponse: ret.isOK() == false for radioService[%d]", slotId);
+ }
} else {
- RLOGE("radio::setSimCardPowerResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ RLOGE("startNetworkScanResponse: radioService[%d]->mRadioResponse == NULL", slotId);
}
return 0;
}
-int radio::sendRequestRawResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::stopNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
+ void *response, size_t responseLen) {
+#if VDBG
+ RLOGD("stopNetworkScanResponse: serial %d", serial);
+#endif
+
+ if (radioService[slotId]->mRadioResponse != NULL) {
+ RadioResponseInfo responseInfo = {};
+ populateResponseInfo(responseInfo, serial, responseType, e);
+ Return<sp<::android::hardware::radio::V1_1::IRadioResponse>> ret =
+ ::android::hardware::radio::V1_1::IRadioResponse::castFrom(
+ radioService[slotId]->mRadioResponse);
+ if (ret.isOk()) {
+ sp<::android::hardware::radio::V1_1::IRadioResponse> radioResponseV1_1 = ret;
+ Return<void> retStatus = radioResponseV1_1->stopNetworkScanResponse(responseInfo);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGD("stopNetworkScanResponse: ret.isOK() == false for radioService[%d]", slotId);
+ }
+ } else {
+ RLOGE("stopNetworkScanResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+ }
+
+ return 0;
+}
+
+int radio::sendRequestRawResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendRequestRawResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendRequestRawResponse: serial %d", serial);
+#endif
if (oemHookService[slotId]->mOemHookResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<uint8_t> data;
if (response == NULL) {
- RLOGE("radio::sendRequestRawResponse: Invalid response");
+ RLOGE("sendRequestRawResponse: Invalid response");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
data.setToExternal((uint8_t *) response, responseLen);
}
Return<void> retStatus = oemHookService[slotId]->mOemHookResponse->
sendRequestRawResponse(responseInfo, data);
- checkReturnStatus(slotId, retStatus);
+ checkReturnStatus(slotId, retStatus, false);
} else {
- RLOGE("radio::sendRequestRawResponse: oemHookService[%d]->mOemHookResponse == NULL",
+ RLOGE("sendRequestRawResponse: oemHookService[%d]->mOemHookResponse == NULL",
slotId);
}
return 0;
}
-int radio::sendRequestStringsResponse(android::Parcel &p, int slotId, int requestNumber,
+int radio::sendRequestStringsResponse(int slotId,
int responseType, int serial, RIL_Errno e,
void *response, size_t responseLen) {
- RLOGD("radio::sendRequestStringsResponse: serial %d", serial);
+#if VDBG
+ RLOGD("sendRequestStringsResponse: serial %d", serial);
+#endif
if (oemHookService[slotId]->mOemHookResponse != NULL) {
RadioResponseInfo responseInfo = {};
hidl_vec<hidl_string> data;
if (response == NULL || responseLen % sizeof(char *) != 0) {
- RLOGE("radio::sendRequestStringsResponse Invalid response: NULL");
+ RLOGE("sendRequestStringsResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
} else {
char **resp = (char **) response;
Return<void> retStatus
= oemHookService[slotId]->mOemHookResponse->sendRequestStringsResponse(
responseInfo, data);
- checkReturnStatus(slotId, retStatus);
+ checkReturnStatus(slotId, retStatus, false);
} else {
- RLOGE("radio::sendRequestStringsResponse: oemHookService[%d]->mOemHookResponse == "
+ RLOGE("sendRequestStringsResponse: oemHookService[%d]->mOemHookResponse == "
"NULL", slotId);
}
(RadioIndicationType::UNSOLICITED_ACK_EXP);
}
-void radio::radioStateChangedInd(int slotId, int indicationType, RIL_RadioState radioState) {
+int radio::radioStateChangedInd(int slotId,
+ int indicationType, int token, RIL_Errno e, void *response,
+ size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::radioStateChangedInd: radioState %d", radioState);
+ RadioState radioState = (RadioState) s_vendorFunctions->onStateRequest();
+ RLOGD("radioStateChangedInd: radioState %d", radioState);
Return<void> retStatus = radioService[slotId]->mRadioIndication->radioStateChanged(
- convertIntToRadioIndicationType(indicationType), (RadioState) radioState);
+ convertIntToRadioIndicationType(indicationType), radioState);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::radioStateChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("radioStateChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
+
+ return 0;
}
-int radio::callStateChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::callStateChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::callStateChangedInd");
+#if VDBG
+ RLOGD("callStateChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->callStateChanged(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::callStateChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("callStateChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::networkStateChangedInd(android::Parcel &p, int slotId, int requestNumber,
- int indicationType, int token, RIL_Errno e, void *response,
- size_t responseLen) {
+int radio::networkStateChangedInd(int slotId,
+ int indicationType, int token, RIL_Errno e, void *response,
+ size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::networkStateChangedInd");
+#if VDBG
+ RLOGD("networkStateChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->networkStateChanged(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::networkStateChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("networkStateChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return bytes;
}
-int radio::newSmsInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::newSmsInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::newSmsInd: invalid response");
+ RLOGE("newSmsInd: invalid response");
return 0;
}
uint8_t *bytes = convertHexStringToBytes(response, responseLen);
if (bytes == NULL) {
- RLOGE("radio::newSmsInd: convertHexStringToBytes failed");
+ RLOGE("newSmsInd: convertHexStringToBytes failed");
return 0;
}
hidl_vec<uint8_t> pdu;
pdu.setToExternal(bytes, responseLen/2);
- RLOGD("radio::newSmsInd");
+#if VDBG
+ RLOGD("newSmsInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->newSms(
convertIntToRadioIndicationType(indicationType), pdu);
radioService[slotId]->checkReturnStatus(retStatus);
free(bytes);
} else {
- RLOGE("radio::newSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("newSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::newSmsStatusReportInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::newSmsStatusReportInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::newSmsStatusReportInd: invalid response");
+ RLOGE("newSmsStatusReportInd: invalid response");
return 0;
}
uint8_t *bytes = convertHexStringToBytes(response, responseLen);
if (bytes == NULL) {
- RLOGE("radio::newSmsStatusReportInd: convertHexStringToBytes failed");
+ RLOGE("newSmsStatusReportInd: convertHexStringToBytes failed");
return 0;
}
hidl_vec<uint8_t> pdu;
pdu.setToExternal(bytes, responseLen/2);
- RLOGD("radio::newSmsStatusReportInd");
+#if VDBG
+ RLOGD("newSmsStatusReportInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->newSmsStatusReport(
convertIntToRadioIndicationType(indicationType), pdu);
radioService[slotId]->checkReturnStatus(retStatus);
free(bytes);
} else {
- RLOGE("radio::newSmsStatusReportInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("newSmsStatusReportInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::newSmsOnSimInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::newSmsOnSimInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::newSmsOnSimInd: invalid response");
+ RLOGE("newSmsOnSimInd: invalid response");
return 0;
}
int32_t recordNumber = ((int32_t *) response)[0];
- RLOGD("radio::newSmsOnSimInd: slotIndex %d", recordNumber);
+#if VDBG
+ RLOGD("newSmsOnSimInd: slotIndex %d", recordNumber);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->newSmsOnSim(
convertIntToRadioIndicationType(indicationType), recordNumber);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::newSmsOnSimInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("newSmsOnSimInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::onUssdInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::onUssdInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != 2 * sizeof(char *)) {
- RLOGE("radio::onUssdInd: invalid response");
+ RLOGE("onUssdInd: invalid response");
return 0;
}
char **strings = (char **) response;
char *mode = strings[0];
hidl_string msg = convertCharPtrToHidlString(strings[1]);
UssdModeType modeType = (UssdModeType) atoi(mode);
- RLOGD("radio::onUssdInd: mode %s", mode);
+#if VDBG
+ RLOGD("onUssdInd: mode %s", mode);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->onUssd(
convertIntToRadioIndicationType(indicationType), modeType, msg);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::onUssdInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("onUssdInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::nitzTimeReceivedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::nitzTimeReceivedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::nitzTimeReceivedInd: invalid response");
+ RLOGE("nitzTimeReceivedInd: invalid response");
return 0;
}
hidl_string nitzTime = convertCharPtrToHidlString((char *) response);
int64_t timeReceived = android::elapsedRealtime();
- RLOGD("radio::nitzTimeReceivedInd: nitzTime %s receivedTime %" PRId64, nitzTime.c_str(),
+#if VDBG
+ RLOGD("nitzTimeReceivedInd: nitzTime %s receivedTime %" PRId64, nitzTime.c_str(),
timeReceived);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->nitzTimeReceived(
convertIntToRadioIndicationType(indicationType), nitzTime, timeReceived);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::nitzTimeReceivedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("nitzTimeReceivedInd: radioService[%d]->mRadioIndication == NULL", slotId);
return -1;
}
signalStrength.tdScdma.rscp = rilSignalStrength->TD_SCDMA_SignalStrength.rscp;
}
-int radio::currentSignalStrengthInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::currentSignalStrengthInd(int slotId,
int indicationType, int token, RIL_Errno e,
void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_SignalStrength_v10)) {
- RLOGE("radio::currentSignalStrengthInd: invalid response");
+ RLOGE("currentSignalStrengthInd: invalid response");
return 0;
}
SignalStrength signalStrength = {};
convertRilSignalStrengthToHal(response, responseLen, signalStrength);
- RLOGD("radio::currentSignalStrengthInd");
+#if VDBG
+ RLOGD("currentSignalStrengthInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->currentSignalStrength(
convertIntToRadioIndicationType(indicationType), signalStrength);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::currentSignalStrengthInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("currentSignalStrengthInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
}
}
-int radio::dataCallListChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::dataCallListChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen % sizeof(RIL_Data_Call_Response_v11) != 0) {
- RLOGE("radio::dataCallListChangedInd: invalid response");
+ RLOGE("dataCallListChangedInd: invalid response");
return 0;
}
hidl_vec<SetupDataCallResult> dcList;
convertRilDataCallListToHal(response, responseLen, dcList);
- RLOGD("radio::dataCallListChangedInd");
+#if VDBG
+ RLOGD("dataCallListChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->dataCallListChanged(
convertIntToRadioIndicationType(indicationType), dcList);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::dataCallListChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("dataCallListChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::suppSvcNotifyInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::suppSvcNotifyInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_SuppSvcNotification)) {
- RLOGE("radio::suppSvcNotifyInd: invalid response");
+ RLOGE("suppSvcNotifyInd: invalid response");
return 0;
}
suppSvc.type = ssn->type;
suppSvc.number = convertCharPtrToHidlString(ssn->number);
- RLOGD("radio::suppSvcNotifyInd: isMT %d code %d index %d type %d",
+#if VDBG
+ RLOGD("suppSvcNotifyInd: isMT %d code %d index %d type %d",
suppSvc.isMT, suppSvc.code, suppSvc.index, suppSvc.type);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->suppSvcNotify(
convertIntToRadioIndicationType(indicationType), suppSvc);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::suppSvcNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("suppSvcNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::stkSessionEndInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::stkSessionEndInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::stkSessionEndInd");
+#if VDBG
+ RLOGD("stkSessionEndInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->stkSessionEnd(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stkSessionEndInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("stkSessionEndInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::stkProactiveCommandInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::stkProactiveCommandInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::stkProactiveCommandInd: invalid response");
+ RLOGE("stkProactiveCommandInd: invalid response");
return 0;
}
- RLOGD("radio::stkProactiveCommandInd");
+#if VDBG
+ RLOGD("stkProactiveCommandInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->stkProactiveCommand(
convertIntToRadioIndicationType(indicationType),
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stkProactiveCommandInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("stkProactiveCommandInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::stkEventNotifyInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::stkEventNotifyInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::stkEventNotifyInd: invalid response");
+ RLOGE("stkEventNotifyInd: invalid response");
return 0;
}
- RLOGD("radio::stkEventNotifyInd");
+#if VDBG
+ RLOGD("stkEventNotifyInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->stkEventNotify(
convertIntToRadioIndicationType(indicationType),
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stkEventNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("stkEventNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::stkCallSetupInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::stkCallSetupInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::stkCallSetupInd: invalid response");
+ RLOGE("stkCallSetupInd: invalid response");
return 0;
}
int32_t timeout = ((int32_t *) response)[0];
- RLOGD("radio::stkCallSetupInd: timeout %d", timeout);
+#if VDBG
+ RLOGD("stkCallSetupInd: timeout %d", timeout);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->stkCallSetup(
convertIntToRadioIndicationType(indicationType), timeout);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stkCallSetupInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("stkCallSetupInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::simSmsStorageFullInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::simSmsStorageFullInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::simSmsStorageFullInd");
+#if VDBG
+ RLOGD("simSmsStorageFullInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->simSmsStorageFull(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::simSmsStorageFullInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("simSmsStorageFullInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::simRefreshInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::simRefreshInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_SimRefreshResponse_v7)) {
- RLOGE("radio::simRefreshInd: invalid response");
+ RLOGE("simRefreshInd: invalid response");
return 0;
}
refreshResult.efId = simRefreshResponse->ef_id;
refreshResult.aid = convertCharPtrToHidlString(simRefreshResponse->aid);
- RLOGD("radio::simRefreshInd: type %d efId %d", refreshResult.type, refreshResult.efId);
+#if VDBG
+ RLOGD("simRefreshInd: type %d efId %d", refreshResult.type, refreshResult.efId);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->simRefresh(
convertIntToRadioIndicationType(indicationType), refreshResult);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::simRefreshInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("simRefreshInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
record.signal = signalInfoRecord->signal;
}
-int radio::callRingInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::callRingInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
bool isGsm;
} else {
isGsm = false;
if (responseLen != sizeof (RIL_CDMA_SignalInfoRecord)) {
- RLOGE("radio::callRingInd: invalid response");
+ RLOGE("callRingInd: invalid response");
return 0;
}
convertRilCdmaSignalInfoRecordToHal((RIL_CDMA_SignalInfoRecord *) response, record);
}
- RLOGD("radio::callRingInd: isGsm %d", isGsm);
+#if VDBG
+ RLOGD("callRingInd: isGsm %d", isGsm);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->callRing(
convertIntToRadioIndicationType(indicationType), isGsm, record);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::callRingInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("callRingInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::simStatusChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::simStatusChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::simStatusChangedInd");
+#if VDBG
+ RLOGD("simStatusChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->simStatusChanged(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::simStatusChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("simStatusChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::cdmaNewSmsInd(android::Parcel &p, int slotId, int requestNumber, int indicationType,
+int radio::cdmaNewSmsInd(int slotId, int indicationType,
int token, RIL_Errno e, void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_CDMA_SMS_Message)) {
- RLOGE("radio::cdmaNewSmsInd: invalid response");
+ RLOGE("cdmaNewSmsInd: invalid response");
return 0;
}
digitLimit = MIN((rilMsg->uBearerDataLen), RIL_CDMA_SMS_BEARER_DATA_MAX);
msg.bearerData.setToExternal(rilMsg->aBearerData, digitLimit);
- RLOGD("radio::cdmaNewSmsInd");
+#if VDBG
+ RLOGD("cdmaNewSmsInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaNewSms(
convertIntToRadioIndicationType(indicationType), msg);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaNewSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("cdmaNewSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::newBroadcastSmsInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::newBroadcastSmsInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::newBroadcastSmsInd: invalid response");
+ RLOGE("newBroadcastSmsInd: invalid response");
return 0;
}
hidl_vec<uint8_t> data;
data.setToExternal((uint8_t *) response, responseLen);
- RLOGD("radio::newBroadcastSmsInd");
+#if VDBG
+ RLOGD("newBroadcastSmsInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->newBroadcastSms(
convertIntToRadioIndicationType(indicationType), data);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::newBroadcastSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("newBroadcastSmsInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::cdmaRuimSmsStorageFullInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaRuimSmsStorageFullInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::cdmaRuimSmsStorageFullInd");
+#if VDBG
+ RLOGD("cdmaRuimSmsStorageFullInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaRuimSmsStorageFull(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaRuimSmsStorageFullInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("cdmaRuimSmsStorageFullInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::restrictedStateChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::restrictedStateChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::restrictedStateChangedInd: invalid response");
+ RLOGE("restrictedStateChangedInd: invalid response");
return 0;
}
int32_t state = ((int32_t *) response)[0];
- RLOGD("radio::restrictedStateChangedInd: state %d", state);
+#if VDBG
+ RLOGD("restrictedStateChangedInd: state %d", state);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->restrictedStateChanged(
convertIntToRadioIndicationType(indicationType), (PhoneRestrictedState) state);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::restrictedStateChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("restrictedStateChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::enterEmergencyCallbackModeInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::enterEmergencyCallbackModeInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::enterEmergencyCallbackModeInd");
+#if VDBG
+ RLOGD("enterEmergencyCallbackModeInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->enterEmergencyCallbackMode(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::enterEmergencyCallbackModeInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("enterEmergencyCallbackModeInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::cdmaCallWaitingInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaCallWaitingInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_CDMA_CallWaiting_v6)) {
- RLOGE("radio::cdmaCallWaitingInd: invalid response");
+ RLOGE("cdmaCallWaitingInd: invalid response");
return 0;
}
callWaitingRecord.numberType = (CdmaCallWaitingNumberType) callWaitingRil->number_type;
callWaitingRecord.numberPlan = (CdmaCallWaitingNumberPlan) callWaitingRil->number_plan;
- RLOGD("radio::cdmaCallWaitingInd");
+#if VDBG
+ RLOGD("cdmaCallWaitingInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaCallWaiting(
convertIntToRadioIndicationType(indicationType), callWaitingRecord);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaCallWaitingInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("cdmaCallWaitingInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::cdmaOtaProvisionStatusInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaOtaProvisionStatusInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::cdmaOtaProvisionStatusInd: invalid response");
+ RLOGE("cdmaOtaProvisionStatusInd: invalid response");
return 0;
}
int32_t status = ((int32_t *) response)[0];
- RLOGD("radio::cdmaOtaProvisionStatusInd: status %d", status);
+#if VDBG
+ RLOGD("cdmaOtaProvisionStatusInd: status %d", status);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaOtaProvisionStatus(
convertIntToRadioIndicationType(indicationType), (CdmaOtaProvisionStatus) status);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaOtaProvisionStatusInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("cdmaOtaProvisionStatusInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::cdmaInfoRecInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaInfoRecInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_CDMA_InformationRecords)) {
- RLOGE("radio::cdmaInfoRecInd: invalid response");
+ RLOGE("cdmaInfoRecInd: invalid response");
return 0;
}
char* string8 = NULL;
int num = MIN(recordsRil->numberOfInfoRecs, RIL_CDMA_MAX_NUMBER_OF_INFO_RECS);
if (recordsRil->numberOfInfoRecs > RIL_CDMA_MAX_NUMBER_OF_INFO_RECS) {
- RLOGE("radio::cdmaInfoRecInd: received %d recs which is more than %d, dropping "
+ RLOGE("cdmaInfoRecInd: received %d recs which is more than %d, dropping "
"additional ones", recordsRil->numberOfInfoRecs,
RIL_CDMA_MAX_NUMBER_OF_INFO_RECS);
}
case RIL_CDMA_DISPLAY_INFO_REC:
case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC: {
if (infoRec->rec.display.alpha_len > CDMA_ALPHA_INFO_BUFFER_LENGTH) {
- RLOGE("radio::cdmaInfoRecInd: invalid display info response length %d "
+ RLOGE("cdmaInfoRecInd: invalid display info response length %d "
"expected not more than %d", (int) infoRec->rec.display.alpha_len,
CDMA_ALPHA_INFO_BUFFER_LENGTH);
return 0;
}
string8 = (char*) malloc((infoRec->rec.display.alpha_len + 1) * sizeof(char));
if (string8 == NULL) {
- RLOGE("radio::cdmaInfoRecInd: Memory allocation failed for "
+ RLOGE("cdmaInfoRecInd: Memory allocation failed for "
"responseCdmaInformationRecords");
return 0;
}
case RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC:
case RIL_CDMA_CONNECTED_NUMBER_INFO_REC: {
if (infoRec->rec.number.len > CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- RLOGE("radio::cdmaInfoRecInd: invalid display info response length %d "
+ RLOGE("cdmaInfoRecInd: invalid display info response length %d "
"expected not more than %d", (int) infoRec->rec.number.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
return 0;
}
string8 = (char*) malloc((infoRec->rec.number.len + 1) * sizeof(char));
if (string8 == NULL) {
- RLOGE("radio::cdmaInfoRecInd: Memory allocation failed for "
+ RLOGE("cdmaInfoRecInd: Memory allocation failed for "
"responseCdmaInformationRecords");
return 0;
}
case RIL_CDMA_REDIRECTING_NUMBER_INFO_REC: {
if (infoRec->rec.redir.redirectingNumber.len >
CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- RLOGE("radio::cdmaInfoRecInd: invalid display info response length %d "
+ RLOGE("cdmaInfoRecInd: invalid display info response length %d "
"expected not more than %d\n",
(int)infoRec->rec.redir.redirectingNumber.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
string8 = (char*) malloc((infoRec->rec.redir.redirectingNumber.len + 1) *
sizeof(char));
if (string8 == NULL) {
- RLOGE("radio::cdmaInfoRecInd: Memory allocation failed for "
+ RLOGE("cdmaInfoRecInd: Memory allocation failed for "
"responseCdmaInformationRecords");
return 0;
}
}
case RIL_CDMA_T53_RELEASE_INFO_REC:
- RLOGE("radio::cdmaInfoRecInd: RIL_CDMA_T53_RELEASE_INFO_REC: INVALID");
+ RLOGE("cdmaInfoRecInd: RIL_CDMA_T53_RELEASE_INFO_REC: INVALID");
return 0;
default:
- RLOGE("radio::cdmaInfoRecInd: Incorrect name value");
+ RLOGE("cdmaInfoRecInd: Incorrect name value");
return 0;
}
}
- RLOGD("radio::cdmaInfoRecInd");
+#if VDBG
+ RLOGD("cdmaInfoRecInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaInfoRec(
convertIntToRadioIndicationType(indicationType), records);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaInfoRecInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("cdmaInfoRecInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::indicateRingbackToneInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::indicateRingbackToneInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::indicateRingbackToneInd: invalid response");
+ RLOGE("indicateRingbackToneInd: invalid response");
return 0;
}
bool start = ((int32_t *) response)[0];
- RLOGD("radio::indicateRingbackToneInd: start %d", start);
+#if VDBG
+ RLOGD("indicateRingbackToneInd: start %d", start);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->indicateRingbackTone(
convertIntToRadioIndicationType(indicationType), start);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::indicateRingbackToneInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("indicateRingbackToneInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::resendIncallMuteInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::resendIncallMuteInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::resendIncallMuteInd");
+#if VDBG
+ RLOGD("resendIncallMuteInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->resendIncallMute(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::resendIncallMuteInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("resendIncallMuteInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::cdmaSubscriptionSourceChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaSubscriptionSourceChangedInd(int slotId,
int indicationType, int token, RIL_Errno e,
void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::cdmaSubscriptionSourceChangedInd: invalid response");
+ RLOGE("cdmaSubscriptionSourceChangedInd: invalid response");
return 0;
}
int32_t cdmaSource = ((int32_t *) response)[0];
- RLOGD("radio::cdmaSubscriptionSourceChangedInd: cdmaSource %d", cdmaSource);
+#if VDBG
+ RLOGD("cdmaSubscriptionSourceChangedInd: cdmaSource %d", cdmaSource);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->
cdmaSubscriptionSourceChanged(convertIntToRadioIndicationType(indicationType),
(CdmaSubscriptionSource) cdmaSource);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaSubscriptionSourceChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("cdmaSubscriptionSourceChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::cdmaPrlChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cdmaPrlChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::cdmaPrlChangedInd: invalid response");
+ RLOGE("cdmaPrlChangedInd: invalid response");
return 0;
}
int32_t version = ((int32_t *) response)[0];
- RLOGD("radio::cdmaPrlChangedInd: version %d", version);
+#if VDBG
+ RLOGD("cdmaPrlChangedInd: version %d", version);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cdmaPrlChanged(
convertIntToRadioIndicationType(indicationType), version);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cdmaPrlChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("cdmaPrlChangedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::exitEmergencyCallbackModeInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::exitEmergencyCallbackModeInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::exitEmergencyCallbackModeInd");
+#if VDBG
+ RLOGD("exitEmergencyCallbackModeInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->exitEmergencyCallbackMode(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::exitEmergencyCallbackModeInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("exitEmergencyCallbackModeInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::rilConnectedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::rilConnectedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::rilConnectedInd");
+ RLOGD("rilConnectedInd");
Return<void> retStatus = radioService[slotId]->mRadioIndication->rilConnected(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::rilConnectedInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("rilConnectedInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::voiceRadioTechChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::voiceRadioTechChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::voiceRadioTechChangedInd: invalid response");
+ RLOGE("voiceRadioTechChangedInd: invalid response");
return 0;
}
int32_t rat = ((int32_t *) response)[0];
- RLOGD("radio::voiceRadioTechChangedInd: rat %d", rat);
+#if VDBG
+ RLOGD("voiceRadioTechChangedInd: rat %d", rat);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->voiceRadioTechChanged(
convertIntToRadioIndicationType(indicationType), (RadioTechnology) rat);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::voiceRadioTechChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("voiceRadioTechChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
}
}
-int radio::cellInfoListInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::cellInfoListInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen % sizeof(RIL_CellInfo_v12) != 0) {
- RLOGE("radio::cellInfoListInd: invalid response");
+ RLOGE("cellInfoListInd: invalid response");
return 0;
}
hidl_vec<CellInfo> records;
convertRilCellInfoListToHal(response, responseLen, records);
- RLOGD("radio::cellInfoListInd");
+#if VDBG
+ RLOGD("cellInfoListInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->cellInfoList(
convertIntToRadioIndicationType(indicationType), records);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::cellInfoListInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("cellInfoListInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::imsNetworkStateChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::imsNetworkStateChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
- RLOGD("radio::imsNetworkStateChangedInd");
+#if VDBG
+ RLOGD("imsNetworkStateChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->imsNetworkStateChanged(
convertIntToRadioIndicationType(indicationType));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::imsNetworkStateChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("imsNetworkStateChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::subscriptionStatusChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::subscriptionStatusChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::subscriptionStatusChangedInd: invalid response");
+ RLOGE("subscriptionStatusChangedInd: invalid response");
return 0;
}
bool activate = ((int32_t *) response)[0];
- RLOGD("radio::subscriptionStatusChangedInd: activate %d", activate);
+#if VDBG
+ RLOGD("subscriptionStatusChangedInd: activate %d", activate);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->subscriptionStatusChanged(
convertIntToRadioIndicationType(indicationType), activate);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::subscriptionStatusChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("subscriptionStatusChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return 0;
}
-int radio::srvccStateNotifyInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::srvccStateNotifyInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(int)) {
- RLOGE("radio::srvccStateNotifyInd: invalid response");
+ RLOGE("srvccStateNotifyInd: invalid response");
return 0;
}
int32_t state = ((int32_t *) response)[0];
- RLOGD("radio::srvccStateNotifyInd: rat %d", state);
+#if VDBG
+ RLOGD("srvccStateNotifyInd: rat %d", state);
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->srvccStateNotify(
convertIntToRadioIndicationType(indicationType), (SrvccState) state);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::srvccStateNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("srvccStateNotifyInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
}
-int radio::hardwareConfigChangedInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::hardwareConfigChangedInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen % sizeof(RIL_HardwareConfig) != 0) {
- RLOGE("radio::hardwareConfigChangedInd: invalid response");
+ RLOGE("hardwareConfigChangedInd: invalid response");
return 0;
}
hidl_vec<HardwareConfig> configs;
convertRilHardwareConfigListToHal(response, responseLen, configs);
- RLOGD("radio::hardwareConfigChangedInd");
+#if VDBG
+ RLOGD("hardwareConfigChangedInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->hardwareConfigChanged(
convertIntToRadioIndicationType(indicationType), configs);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::hardwareConfigChangedInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("hardwareConfigChangedInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
rc.status = (android::hardware::radio::V1_0::RadioCapabilityStatus) rilRadioCapability->status;
}
-int radio::radioCapabilityIndicationInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::radioCapabilityIndicationInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_RadioCapability)) {
- RLOGE("radio::radioCapabilityIndicationInd: invalid response");
+ RLOGE("radioCapabilityIndicationInd: invalid response");
return 0;
}
RadioCapability rc = {};
convertRilRadioCapabilityToHal(response, responseLen, rc);
- RLOGD("radio::radioCapabilityIndicationInd");
+#if VDBG
+ RLOGD("radioCapabilityIndicationInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->radioCapabilityIndication(
convertIntToRadioIndicationType(indicationType), rc);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::radioCapabilityIndicationInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("radioCapabilityIndicationInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
return false;
}
-int radio::onSupplementaryServiceIndicationInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::onSupplementaryServiceIndicationInd(int slotId,
int indicationType, int token, RIL_Errno e,
void *response, size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_StkCcUnsolSsResponse)) {
- RLOGE("radio::onSupplementaryServiceIndicationInd: invalid response");
+ RLOGE("onSupplementaryServiceIndicationInd: invalid response");
return 0;
}
ss.result = (RadioError) rilSsResponse->result;
if (isServiceTypeCfQuery(rilSsResponse->serviceType, rilSsResponse->requestType)) {
- RLOGD("radio::onSupplementaryServiceIndicationInd CF type, num of Cf elements %d",
+#if VDBG
+ RLOGD("onSupplementaryServiceIndicationInd CF type, num of Cf elements %d",
rilSsResponse->cfData.numValidIndexes);
+#endif
if (rilSsResponse->cfData.numValidIndexes > NUM_SERVICE_CLASSES) {
- RLOGE("radio::onSupplementaryServiceIndicationInd numValidIndexes is greater than "
+ RLOGE("onSupplementaryServiceIndicationInd numValidIndexes is greater than "
"max value %d, truncating it to max value", NUM_SERVICE_CLASSES);
rilSsResponse->cfData.numValidIndexes = NUM_SERVICE_CLASSES;
}
cfInfo->toa = cf.toa;
cfInfo->number = convertCharPtrToHidlString(cf.number);
cfInfo->timeSeconds = cf.timeSeconds;
- RLOGD("radio::onSupplementaryServiceIndicationInd: "
+#if VDBG
+ RLOGD("onSupplementaryServiceIndicationInd: "
"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);
+#endif
}
} else {
ss.ssInfo.resize(1);
/* each int */
ss.ssInfo[0].ssInfo.resize(SS_INFO_MAX);
for (int i = 0; i < SS_INFO_MAX; i++) {
- RLOGD("radio::onSupplementaryServiceIndicationInd: Data: %d",
+#if VDBG
+ RLOGD("onSupplementaryServiceIndicationInd: Data: %d",
rilSsResponse->ssInfo[i]);
+#endif
ss.ssInfo[0].ssInfo[i] = rilSsResponse->ssInfo[i];
}
}
- RLOGD("radio::onSupplementaryServiceIndicationInd");
+#if VDBG
+ RLOGD("onSupplementaryServiceIndicationInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->
onSupplementaryServiceIndication(convertIntToRadioIndicationType(indicationType),
ss);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::onSupplementaryServiceIndicationInd: "
+ RLOGE("onSupplementaryServiceIndicationInd: "
"radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::stkCallControlAlphaNotifyInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::stkCallControlAlphaNotifyInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::stkCallControlAlphaNotifyInd: invalid response");
+ RLOGE("stkCallControlAlphaNotifyInd: invalid response");
return 0;
}
- RLOGD("radio::stkCallControlAlphaNotifyInd");
+#if VDBG
+ RLOGD("stkCallControlAlphaNotifyInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->stkCallControlAlphaNotify(
convertIntToRadioIndicationType(indicationType),
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::stkCallControlAlphaNotifyInd: radioService[%d]->mRadioIndication == NULL",
+ RLOGE("stkCallControlAlphaNotifyInd: radioService[%d]->mRadioIndication == NULL",
slotId);
}
lce.lceSuspended = rilLceDataInfo->lce_suspended;
}
-int radio::lceDataInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::lceDataInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_LceDataInfo)) {
- RLOGE("radio::lceDataInd: invalid response");
+ RLOGE("lceDataInd: invalid response");
return 0;
}
LceDataInfo lce = {};
convertRilLceDataInfoToHal(response, responseLen, lce);
- RLOGD("radio::lceDataInd");
+#if VDBG
+ RLOGD("lceDataInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->lceData(
convertIntToRadioIndicationType(indicationType), lce);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::lceDataInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("lceDataInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::pcoDataInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::pcoDataInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen != sizeof(RIL_PCO_Data)) {
- RLOGE("radio::pcoDataInd: invalid response");
+ RLOGE("pcoDataInd: invalid response");
return 0;
}
pco.pcoId = rilPcoData->pco_id;
pco.contents.setToExternal((uint8_t *) rilPcoData->contents, rilPcoData->contents_length);
- RLOGD("radio::pcoDataInd");
+#if VDBG
+ RLOGD("pcoDataInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->pcoData(
convertIntToRadioIndicationType(indicationType), pco);
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::pcoDataInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("pcoDataInd: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::modemResetInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::modemResetInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::modemResetInd: invalid response");
+ RLOGE("modemResetInd: invalid response");
return 0;
}
- RLOGD("radio::modemResetInd");
+#if VDBG
+ RLOGD("modemResetInd");
+#endif
Return<void> retStatus = radioService[slotId]->mRadioIndication->modemReset(
convertIntToRadioIndicationType(indicationType),
convertCharPtrToHidlString((char *) response));
radioService[slotId]->checkReturnStatus(retStatus);
} else {
- RLOGE("radio::modemResetInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ RLOGE("modemResetInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ }
+
+ return 0;
+}
+
+int radio::networkScanResultInd(int slotId,
+ int indicationType, int token, RIL_Errno e, void *response,
+ size_t responseLen) {
+#if VDBG
+ RLOGD("networkScanResultInd");
+#endif
+ if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
+ if (response == NULL || responseLen == 0) {
+ RLOGE("networkScanResultInd: invalid response");
+ return 0;
+ }
+ RLOGD("networkScanResultInd");
+
+#if VDBG
+ RLOGD("networkScanResultInd");
+#endif
+
+ Return<sp<::android::hardware::radio::V1_1::IRadioIndication>> ret =
+ ::android::hardware::radio::V1_1::IRadioIndication::castFrom(
+ radioService[slotId]->mRadioIndication);
+ if (ret.isOk()) {
+ RIL_NetworkScanResult *networkScanResult = (RIL_NetworkScanResult *) response;
+
+ ::android::hardware::radio::V1_1::NetworkScanResult result;
+ result.status =
+ (::android::hardware::radio::V1_1::ScanStatus) networkScanResult->status;
+ result.error = (RadioError) e;
+ convertRilCellInfoListToHal(
+ networkScanResult->network_infos,
+ networkScanResult->network_infos_length * sizeof(RIL_CellInfo_v12),
+ result.networkInfos);
+
+ sp<::android::hardware::radio::V1_1::IRadioIndication> radioIndicationV1_1 = ret;
+ Return<void> retStatus = radioIndicationV1_1->networkScanResult(
+ convertIntToRadioIndicationType(indicationType), result);
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGE("networkScanResultInd: ret.isOk() == false for radioService[%d]", slotId);
+ }
+ } else {
+ RLOGE("networkScanResultInd: radioService[%d]->mRadioIndication == NULL", slotId);
+ }
+ return 0;
+}
+
+int radio::carrierInfoForImsiEncryption(int slotId,
+ int indicationType, int token, RIL_Errno e, void *response,
+ size_t responseLen) {
+ if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
+ if (response == NULL || responseLen == 0) {
+ RLOGE("carrierInfoForImsiEncryption: invalid response");
+ return 0;
+ }
+ RLOGD("carrierInfoForImsiEncryption");
+ Return<sp<::android::hardware::radio::V1_1::IRadioIndication>> ret =
+ ::android::hardware::radio::V1_1::IRadioIndication::castFrom(
+ radioService[slotId]->mRadioIndication);
+ if (ret.isOk()) {
+ sp<::android::hardware::radio::V1_1::IRadioIndication> radioIndicationV1_1 = ret;
+ Return<void> retStatus = radioIndicationV1_1->carrierInfoForImsiEncryption(
+ convertIntToRadioIndicationType(indicationType));
+ radioService[slotId]->checkReturnStatus(retStatus);
+ } else {
+ RLOGE("carrierInfoForImsiEncryptionResponse: ret.isOk() == false for radioService[%d]",
+ slotId);
+ }
+ } else {
+ RLOGE("carrierInfoForImsiEncryption: radioService[%d]->mRadioIndication == NULL", slotId);
}
return 0;
}
-int radio::oemHookRawInd(android::Parcel &p, int slotId, int requestNumber,
+int radio::oemHookRawInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
if (oemHookService[slotId] != NULL && oemHookService[slotId]->mOemHookIndication != NULL) {
if (response == NULL || responseLen == 0) {
- RLOGE("radio::oemHookRawInd: invalid response");
+ RLOGE("oemHookRawInd: invalid response");
return 0;
}
hidl_vec<uint8_t> data;
data.setToExternal((uint8_t *) response, responseLen);
- RLOGD("radio::oemHookRawInd");
+#if VDBG
+ RLOGD("oemHookRawInd");
+#endif
Return<void> retStatus = oemHookService[slotId]->mOemHookIndication->oemHookRaw(
convertIntToRadioIndicationType(indicationType), data);
- checkReturnStatus(slotId, retStatus);
+ checkReturnStatus(slotId, retStatus, false);
} else {
- RLOGE("radio::oemHookRawInd: oemHookService[%d]->mOemHookIndication == NULL", slotId);
+ RLOGE("oemHookRawInd: oemHookService[%d]->mOemHookIndication == NULL", slotId);
}
return 0;
using namespace android::hardware;
int simCount = 1;
const char *serviceNames[] = {
- android::RIL_getRilSocketName()
- #if (SIM_COUNT >= 2)
- , SOCKET2_NAME_RIL
- #if (SIM_COUNT >= 3)
- , SOCKET3_NAME_RIL
- #if (SIM_COUNT >= 4)
- , SOCKET4_NAME_RIL
- #endif
- #endif
- #endif
- };
-
- const char *oemHookServiceNames[] = {
- OEM_HOOK_SERVICE_NAME
+ android::RIL_getServiceName()
#if (SIM_COUNT >= 2)
- , OEM_HOOK2_SERVICE_NAME
+ , RIL2_SERVICE_NAME
#if (SIM_COUNT >= 3)
- , OEM_HOOK3_SERVICE_NAME
+ , RIL3_SERVICE_NAME
#if (SIM_COUNT >= 4)
- , OEM_HOOK4_SERVICE_NAME
+ , RIL4_SERVICE_NAME
#endif
#endif
#endif
radioService[i]->mSlotId = i;
oemHookService[i] = new OemHookImpl;
oemHookService[i]->mSlotId = i;
- RLOGD("radio::registerService: starting IRadio %s", serviceNames[i]);
+ RLOGD("registerService: starting android::hardware::radio::V1_1::IRadio %s",
+ serviceNames[i]);
android::status_t status = radioService[i]->registerAsService(serviceNames[i]);
- status = oemHookService[i]->registerAsService(oemHookServiceNames[i]);
+ status = oemHookService[i]->registerAsService(serviceNames[i]);
ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);