From 3632e89ca0c75cb040a1bd61eb769c7ccdaaa0cb Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Wed, 25 Jul 2012 08:23:05 +0200 Subject: [PATCH] libril: Provide support for legacy ril With change Icc620fd191f8542f61bd38e365813753bfedefdf, RIL_VERSION_MIN was increased from 2 to 6, but this causes problems for a number of devices using ril blobs older than that. E/RILC ( 140): RIL_register: version 3 is to old, min version is 6 Consequently causing the ril system unable to connect to the rild socket. Conflicts: include/telephony/ril.h libril/Android.mk Change-Id: I82c1cc4dab8fcaa4ccaa099132133b0f3b1d8029 Conflicts: include/telephony/ril.h --- include/telephony/ril.h | 4 ++++ libril/Android.mk | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/telephony/ril.h b/include/telephony/ril.h index 8a09bdf4..be148346 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -29,7 +29,11 @@ extern "C" { #endif #define RIL_VERSION 9 /* Current version */ +#ifdef LEGACY_RIL +#define RIL_VERSION_MIN 2 /* Minimum RIL_VERSION supported */ +#else #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ +#endif #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 diff --git a/libril/Android.mk b/libril/Android.mk index f55a46c9..44e5cfeb 100644 --- a/libril/Android.mk +++ b/libril/Android.mk @@ -23,6 +23,10 @@ LOCAL_MODULE:= libril LOCAL_LDLIBS += -lpthread +ifeq ($(BOARD_USES_LEGACY_RIL),true) +LOCAL_CFLAGS += -DLEGACY_RIL +endif + include $(BUILD_SHARED_LIBRARY)