#define CALL_ONSTATEREQUEST(a) s_vendorFunctions->onStateRequest()
#endif
+#ifdef OEM_HOOK_DISABLED
+constexpr bool kOemHookEnabled = false;
+#else
+constexpr bool kOemHookEnabled = true;
+#endif
+
RIL_RadioFunctions *s_vendorFunctions = NULL;
static CommandInfo *s_commands;
RLOGD("sendRequestRawResponse: serial %d", serial);
#endif
+ if (!kOemHookEnabled) return 0;
+
if (oemHookService[slotId]->mOemHookResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
RLOGD("sendRequestStringsResponse: serial %d", serial);
#endif
+ if (!kOemHookEnabled) return 0;
+
if (oemHookService[slotId]->mOemHookResponse != NULL) {
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
int radio::oemHookRawInd(int slotId,
int indicationType, int token, RIL_Errno e, void *response,
size_t responseLen) {
+ if (!kOemHookEnabled) return 0;
+
if (oemHookService[slotId] != NULL && oemHookService[slotId]->mOemHookIndication != NULL) {
if (response == NULL || responseLen == 0) {
RLOGE("oemHookRawInd: invalid response");
radioService[i] = new RadioImpl;
radioService[i]->mSlotId = i;
- oemHookService[i] = new OemHookImpl;
- oemHookService[i]->mSlotId = i;
RLOGD("registerService: starting IRadio %s", serviceNames[i]);
android::status_t status = radioService[i]->registerAsService(serviceNames[i]);
- status = oemHookService[i]->registerAsService(serviceNames[i]);
+
+ if (kOemHookEnabled) {
+ oemHookService[i] = new OemHookImpl;
+ oemHookService[i]->mSlotId = i;
+ status = oemHookService[i]->registerAsService(serviceNames[i]);
+ }
ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);