ril: Add support for imsType parcel member
authorChristopher N. Hesse <raymanfx@gmail.com>
Tue, 13 Feb 2018 23:13:18 +0000 (00:13 +0100)
committerChristopher N. Hesse <raymanfx@gmail.com>
Fri, 16 Feb 2018 02:21:48 +0000 (02:21 +0000)
This is needed for Samsung devices like the Galaxy A5 2017.

Change-Id: I3b89cf8ac232fef5629b439dbf5d2f21bdb264a2

ril/libril/Android.mk
ril/libril/ril.cpp

index 85ec40c287ffd62095bdf629dcbcf28c8e29bb5a..89e67c4bb94fdb0dfd73280f1e63f6c84879ebcb 100644 (file)
@@ -47,6 +47,10 @@ ifeq ($(BOARD_NEEDS_ROAMING_PROTOCOL_FIELD), true)
 LOCAL_CFLAGS += -DNEEDS_ROAMING_PROTOCOL_FIELD
 endif
 
+ifeq ($(BOARD_NEEDS_IMS_TYPE_FIELD), true)
+LOCAL_CFLAGS += -DNEEDS_IMS_TYPE_FIELD
+endif
+
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
 LOCAL_C_INCLUDES += external/nanopb-c
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
index 405e4154edc8ca46aec59557a6aea8951742a36e..0e3433bca59629ae3d64845f415cf41cd6579cd5 100755 (executable)
@@ -1860,11 +1860,21 @@ static void dispatchSetInitialAttachApn(Parcel &p, RequestInfo *pRI)
         pf.roamingProtocol = "IP";
 #endif
 
+#ifdef NEEDS_IMS_TYPE_FIELD
+    if (p.readInt32(&t) == NO_ERROR)
+        pf.imsType = (int) t;
+    else
+        pf.imsType = 0;
+#endif
+
     startRequest;
     appendPrintBuf("%sapn=%s, protocol=%s, authtype=%d, username=%s, password=%s",
             printBuf, pf.apn, pf.protocol, pf.authtype, pf.username, pf.password);
 #ifdef NEEDS_ROAMING_PROTOCOL_FIELD
     appendPrintBuf("%sroamingProtocol=%s", printBuf, pf.roamingProtocol);
+#endif
+#ifdef NEEDS_IMS_TYPE_FIELD
+    appendPrintBuf("%simsType=%d", printBuf, pf.pf.imsType);
 #endif
     closeRequest;
     printRequest(pRI->token, pRI->pCI->requestNumber);