libril: Add support for xmm7260 modem.
authorAndreas Schneider <asn@cryptomilk.org>
Thu, 1 Jan 2015 18:00:04 +0000 (19:00 +0100)
committerEthan Chen <intervigil@gmail.com>
Mon, 16 Mar 2015 19:09:25 +0000 (12:09 -0700)
Change-Id: Ia3749bd4c43a2e233e722462dd6423fe8c692177
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
ril/Android.mk
ril/xmm6262/libril/Android.mk
ril/xmm6262/libril/ril.cpp

index 09768bd87d9bd81c2ac9c1e8f4e8020d565d6aaf..552477b70ffe2b1142e76b600d65747537f34b74 100644 (file)
@@ -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)
index ce6331364a21cd0e16bd8b014433d21cd49b0eb8..520c2479cfd53c414cac835f386525b5e271d842 100644 (file)
@@ -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)
index 733c9c1cfa44b328c0934f8d07323b94bff4279d..795fcd6c58f4a1b675f9b339cb1362c701257e72 100644 (file)
@@ -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,