summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2015-12-12 18:12:16 +1100
committertilaksidduram <tilaksidduram@gmail.com>2015-12-21 20:23:15 +0530
commit0e7e0240eb089f9c8c5e65b61ea625861e37d56f (patch)
treec7efdccd525dddf3ca32ddcdb17cd547ce418320
parentdd09dd0dc454ec211d50806a3ca3a7491ab42099 (diff)
downloaddevice_samsung_n7100-0e7e0240eb089f9c8c5e65b61ea625861e37d56f.zip
device_samsung_n7100-0e7e0240eb089f9c8c5e65b61ea625861e37d56f.tar.gz
device_samsung_n7100-0e7e0240eb089f9c8c5e65b61ea625861e37d56f.tar.bz2
n7100: ril-wrapper: fake GET_RADIO_CAPABILITY response
Samsung's RIL doesn't support this, but doesn't error on it either. Change-Id: I5a470c55fecf85183e9c7b4b37aef3b3cbffaf90
-rw-r--r--ril-wrapper/ril-wrapper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ril-wrapper/ril-wrapper.c b/ril-wrapper/ril-wrapper.c
index 8371870..886cb34 100644
--- a/ril-wrapper/ril-wrapper.c
+++ b/ril-wrapper/ril-wrapper.c
@@ -28,6 +28,18 @@
static RIL_RadioFunctions const *mRealRadioFuncs;
static const struct RIL_Env *mEnv;
+static void rilOnRequest(int request, void *data, size_t datalen, RIL_Token t)
+{
+ switch (request) {
+ case RIL_REQUEST_GET_RADIO_CAPABILITY:
+ RLOGW("Returning NOT_SUPPORTED on GET_RADIO_CAPABILITY");
+ mEnv->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
+ break;
+ default:
+ mRealRadioFuncs->onRequest(request, data, datalen, t);
+ }
+}
+
const RIL_RadioFunctions* RIL_Init(const struct RIL_Env *env, int argc, char **argv)
{
RIL_RadioFunctions const* (*fRealRilInit)(const struct RIL_Env *env, int argc, char **argv);
@@ -74,6 +86,7 @@ const RIL_RadioFunctions* RIL_Init(const struct RIL_Env *env, int argc, char **a
//copy the real RIL's info struct, then replace the onRequest pointer with our own
rilInfo = *mRealRadioFuncs;
+ rilInfo.onRequest = rilOnRequest;
RLOGD("Wrapped RIL version is '%s'\n", mRealRadioFuncs->getVersion());