From ce404a1f53169825c52426e03fc1c6869ea24326 Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Wed, 14 Feb 2018 00:13:18 +0100 Subject: [PATCH] ril: Add support for imsType parcel member This is needed for Samsung devices like the Galaxy A5 2017. Change-Id: I3b89cf8ac232fef5629b439dbf5d2f21bdb264a2 --- ril/libril/Android.mk | 4 ++++ ril/libril/ril.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/ril/libril/Android.mk b/ril/libril/Android.mk index 85ec40c..89e67c4 100644 --- a/ril/libril/Android.mk +++ b/ril/libril/Android.mk @@ -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 diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 405e415..0e3433b 100755 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -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); -- 2.20.1