From 621e63ea3e1e1370d1e3f7779ab2ebf3369adb6b Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Mon, 22 Feb 2016 21:57:39 +0100 Subject: [PATCH] libril: Make ST-E Thor M7450 and Intel XMM7260 next gen modems as well Change-Id: I7cacda8cdaf9e285688c06c42ccf6629efc2af9d --- ril/libril/Android.mk | 12 +++++------- ril/libril/ril.cpp | 21 ++++++++------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/ril/libril/Android.mk b/ril/libril/Android.mk index c31b382..c5e1c5e 100644 --- a/ril/libril/Android.mk +++ b/ril/libril/Android.mk @@ -28,16 +28,14 @@ endif ifeq ($(BOARD_MODEM_TYPE),xmm6260) LOCAL_CFLAGS := -DMODEM_TYPE_XMM6260 endif -ifeq ($(BOARD_MODEM_TYPE),xmm7260) -LOCAL_CFLAGS := -DMODEM_TYPE_XMM7260 -endif -ifeq ($(BOARD_MODEM_TYPE),m7450) -LOCAL_CFLAGS := -DMODEM_TYPE_M7450 -endif -ifneq ($(filter ss333 mdm9x35,$(BOARD_MODEM_TYPE)),) +ifneq ($(filter m7450 mdm9x35 ss333 xmm7260,$(BOARD_MODEM_TYPE)),) LOCAL_CFLAGS := -DSAMSUNG_NEXT_GEN_MODEM endif +ifneq ($(filter m7450 xmm7260,$(BOARD_MODEM_TYPE)),) +LOCAL_CFLAGS += -DNEEDS_VIDEO_CALL_FIELD +endif + LOCAL_C_INCLUDES += $(TARGET_OUT_HEADER)/librilutils LOCAL_C_INCLUDES += external/nanopb-c diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index f1fecc8..888ee48 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -789,8 +789,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { int32_t sizeOfDial; int32_t t; int32_t uusPresent; -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) \ - || defined(SAMSUNG_NEXT_GEN_MODEM) +#ifdef SAMSUNG_NEXT_GEN_MODEM char *csv; #endif status_t status; @@ -807,8 +806,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { goto invalid; } -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) \ - || defined(SAMSUNG_NEXT_GEN_MODEM) +#ifdef SAMSUNG_NEXT_GEN_MODEM /* CallDetails.call_type */ status = p.readInt32(&t); if (status != NO_ERROR) { @@ -838,8 +836,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { } if (uusPresent == 0) { -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ - || defined(MODEM_TYPE_M7450) || defined(SAMSUNG_NEXT_GEN_MODEM) +#if defined(MODEM_TYPE_XMM6262) || defined(SAMSUNG_NEXT_GEN_MODEM) dial.uusInfo = NULL; #elif defined(MODEM_TYPE_XMM6260) /* Samsung hack */ @@ -2389,11 +2386,11 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p.writeInt32(p_cur->als); p.writeInt32(p_cur->isVoice); -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(SAMSUNG_NEXT_GEN_MODEM) -#ifndef SAMSUNG_NEXT_GEN_MODEM +#ifdef NEEDS_VIDEO_CALL_FIELD p.writeInt32(p_cur->isVideo); #endif +#ifdef SAMSUNG_NEXT_GEN_MODEM /* Pass CallDetails */ p.writeInt32(0); p.writeInt32(0); @@ -2428,7 +2425,7 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p_cur->als, (p_cur->isVoice)?"voc":"nonvoc", (p_cur->isVoicePrivacy)?"evp":"noevp"); -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(SAMSUNG_NEXT_GEN_MODEM) +#ifdef SAMSUNG_NEXT_GEN_MODEM appendPrintBuf("%s,%s,", printBuf, (p_cur->isVideo) ? "vid" : "novid"); @@ -3031,8 +3028,7 @@ static int responseRilSignalStrength(Parcel &p, p.writeInt32(p_cur->GW_SignalStrength.bitErrorRate); -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ - || defined(MODEM_TYPE_M7450) || defined(SAMSUNG_NEXT_GEN_MODEM) +#if defined(MODEM_TYPE_XMM6262) || defined(SAMSUNG_NEXT_GEN_MODEM) cdmaDbm = p_cur->CDMA_SignalStrength.dbm & 0xFF; if (cdmaDbm < 0) { cdmaDbm = 99; @@ -3045,8 +3041,7 @@ static int responseRilSignalStrength(Parcel &p, p.writeInt32(cdmaDbm); p.writeInt32(p_cur->CDMA_SignalStrength.ecio); -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ - || defined(MODEM_TYPE_M7450) || defined(SAMSUNG_NEXT_GEN_MODEM) +#if defined(MODEM_TYPE_XMM6262) || defined(SAMSUNG_NEXT_GEN_MODEM) evdoDbm = p_cur->EVDO_SignalStrength.dbm & 0xFF; if (evdoDbm < 0) { evdoDbm = 99; -- 2.20.1