From: Christopher N. Hesse Date: Tue, 13 Feb 2018 23:13:18 +0000 (+0100) Subject: ril: Add support for imsType parcel member X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce404a1f53169825c52426e03fc1c6869ea24326;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git ril: Add support for imsType parcel member This is needed for Samsung devices like the Galaxy A5 2017. Change-Id: I3b89cf8ac232fef5629b439dbf5d2f21bdb264a2 --- 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);