From ffe632e35624519561df34208659092db2969544 Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Tue, 13 Feb 2018 23:51:12 +0100 Subject: [PATCH] ril: Add support for roamingProtocol parcel member This is needed for Samsung devices like the Galaxy A5 2017. Change-Id: I549130b838377d8a8668ac59b51c314fe9e7f5ab --- ril/libril/Android.mk | 4 ++++ ril/libril/ril_service.cpp | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ril/libril/Android.mk b/ril/libril/Android.mk index 056390f3..46a596c3 100644 --- a/ril/libril/Android.mk +++ b/ril/libril/Android.mk @@ -50,6 +50,10 @@ ifeq ($(BOARD_MODEM_NEEDS_VIDEO_CALL_FIELD), true) LOCAL_CFLAGS += -DNEEDS_VIDEO_CALL_FIELD endif +ifeq ($(BOARD_NEEDS_ROAMING_PROTOCOL_FIELD), true) +LOCAL_CFLAGS += -DNEEDS_ROAMING_PROTOCOL_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_service.cpp b/ril/libril/ril_service.cpp index f36ceb33..d1fa581c 100644 --- a/ril/libril/ril_service.cpp +++ b/ril/libril/ril_service.cpp @@ -1941,6 +1941,13 @@ Return RadioImpl::setInitialAttachApn(int32_t serial, const DataProfileInf return Void(); } +#ifdef NEEDS_ROAMING_PROTOCOL_FIELD + if (!copyHidlStringToRil(&iaa.roamingProtocol, dataProfileInfo.roamingProtocol, pRI)) { + memsetAndFreeStrings(4, iaa.apn, iaa.protocol, iaa.username, iaa.roamingProtocol); + return Void(); + } +#endif + CALL_ONREQUEST(RIL_REQUEST_SET_INITIAL_ATTACH_APN, &iaa, sizeof(iaa), pRI, mSlotId); memsetAndFreeStrings(4, iaa.apn, iaa.protocol, iaa.username, iaa.password);