From 29472681221cd610b2e04d32498201dda41c1bd3 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 1 Jan 2015 19:00:04 +0100 Subject: [PATCH] libril: Add support for xmm7260 modem. Change-Id: Ia3749bd4c43a2e233e722462dd6423fe8c692177 Signed-off-by: Andreas Schneider --- ril/Android.mk | 2 +- ril/xmm6262/libril/Android.mk | 4 ++++ ril/xmm6262/libril/ril.cpp | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/ril/Android.mk b/ril/Android.mk index 09768bd8..552477b7 100644 --- a/ril/Android.mk +++ b/ril/Android.mk @@ -20,7 +20,7 @@ ifeq ($(BOARD_VENDOR),samsung) # libril ifeq ($(BOARD_PROVIDES_LIBRIL),true) -ifneq ($(filter xmm6262 xmm6360,$(BOARD_MODEM_TYPE)),) +ifneq ($(filter xmm6262 xmm6360 xmm7260,$(BOARD_MODEM_TYPE)),) include $(RIL_PATH)/xmm6262/libril/Android.mk endif ifeq ($(BOARD_MODEM_TYPE),xmm6260) diff --git a/ril/xmm6262/libril/Android.mk b/ril/xmm6262/libril/Android.mk index ce633136..520c2479 100644 --- a/ril/xmm6262/libril/Android.mk +++ b/ril/xmm6262/libril/Android.mk @@ -19,6 +19,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_CFLAGS := +ifeq ($(BOARD_MODEM_TYPE),xmm7260) +LOCAL_CFLAGS += -DMODEM_TYPE_XMM7260 +endif + LOCAL_MODULE:= libril include $(BUILD_SHARED_LIBRARY) diff --git a/ril/xmm6262/libril/ril.cpp b/ril/xmm6262/libril/ril.cpp index 733c9c1c..795fcd6c 100644 --- a/ril/xmm6262/libril/ril.cpp +++ b/ril/xmm6262/libril/ril.cpp @@ -633,6 +633,9 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { int32_t sizeOfDial; int32_t t; int32_t uusPresent; +#ifdef MODEM_TYPE_XMM7260 + char *csv; +#endif status_t status; memset (&dial, 0, sizeof(dial)); @@ -646,6 +649,25 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { goto invalid; } +#ifdef MODEM_TYPE_XMM7260 + /* CallDetails.call_type */ + status = p.readInt32(&t); + if (status != NO_ERROR) { + goto invalid; + } + /* CallDetails.call_domain */ + p.readInt32(&t); + if (status != NO_ERROR) { + goto invalid; + } + /* CallDetails.getCsvFromExtra */ + csv = strdupReadString(p); + if (csv == NULL) { + goto invalid; + } + free(csv); +#endif + if (s_callbacks.version < 3) { // Remove when partners upgrade to version 3 uusPresent = 0; sizeOfDial = sizeof(dial) - sizeof(RIL_UUS_Info *); @@ -1817,6 +1839,16 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p.writeInt32(p_cur->isMT); p.writeInt32(p_cur->als); p.writeInt32(p_cur->isVoice); + +#ifdef MODEM_TYPE_XMM7260 + p.writeInt32(p_cur->isVideo); + + /* Pass CallDetails */ + p.writeInt32(0); + p.writeInt32(0); + writeStringToParcel(p, ""); +#endif + p.writeInt32(p_cur->isVoicePrivacy); writeStringToParcel(p, p_cur->number); p.writeInt32(p_cur->numberPresentation); @@ -1845,6 +1877,11 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p_cur->als, (p_cur->isVoice)?"voc":"nonvoc", (p_cur->isVoicePrivacy)?"evp":"noevp"); +#ifdef MODEM_TYPE_XMM7260 + appendPrintBuf("%s,%s,", + printBuf, + (p_cur->isVideo) ? "vid" : "novid"); +#endif appendPrintBuf("%s%s,cli=%d,name='%s',%d]", printBuf, p_cur->number,