diff options
-rw-r--r-- | CleanSpec.mk | 1 | ||||
-rw-r--r-- | include/telephony/ril.h | 74 | ||||
-rw-r--r-- | libril/ril.cpp | 238 | ||||
-rw-r--r-- | libril/ril_commands.h | 5 | ||||
-rw-r--r-- | libril/ril_unsol_commands.h | 6 | ||||
-rw-r--r-- | mock-ril/Android.mk | 3 | ||||
-rw-r--r-- | rild/Android.mk | 8 |
7 files changed, 313 insertions, 22 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk index b84e1b6..9608204 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -47,3 +47,4 @@ # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/rild) diff --git a/include/telephony/ril.h b/include/telephony/ril.h index 3a3d03f..af5e3a7 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -26,8 +26,8 @@ extern "C" { #endif -#define RIL_VERSION 6 /* Current version */ -#define RIL_VERSION_MIN 2 /* Minimum RIL_VERSION supported */ +#define RIL_VERSION 7 /* Current version */ +#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 @@ -71,6 +71,7 @@ typedef enum { typedef enum { RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ + /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network personalization locked, or SIM absent */ @@ -80,7 +81,8 @@ typedef enum { RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network personalization locked, or RUIM absent */ RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ - RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */ + RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ + RADIO_STATE_ON = 10 /* Radio is on */ } RIL_RadioState; typedef enum { @@ -99,7 +101,8 @@ typedef enum { RADIO_TECH_EVDO_B = 12, RADIO_TECH_EHRPD = 13, RADIO_TECH_LTE = 14, - RADIO_TECH_HSPAP = 15 // HSPA+ + RADIO_TECH_HSPAP = 15, // HSPA+ + RADIO_TECH_GSM = 16 // Only supports voice } RIL_RadioTechnology; // Do we want to split Data from Voice and the use @@ -529,16 +532,32 @@ typedef struct RIL_AppStatus applications[RIL_CARD_MAX_APPS]; } RIL_CardStatus_v6; -/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */ +/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH + * or as part of RIL_SimRefreshResponse_v7 + */ typedef enum { /* A file on SIM has been updated. data[1] contains the EFID. */ SIM_FILE_UPDATE = 0, - /* SIM initialized. All files should be re-read. data[1] contains AID that caused REFRESH */ + /* SIM initialized. All files should be re-read. */ SIM_INIT = 1, /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ SIM_RESET = 2 } RIL_SimRefreshResult; +typedef struct { + RIL_SimRefreshResult result; + int ef_id; /* is the EFID of the updated file if the result is */ + /* SIM_FILE_UPDATE or 0 for any other result. */ + char * aid; /* is AID(application ID) of the card application */ + /* See ETSI 102.221 8.1 and 101.220 4 */ + /* For SIM_FILE_UPDATE result it can be set to AID of */ + /* application in which updated EF resides or it can be */ + /* NULL if EF is outside of an application. */ + /* For SIM_INIT result this field is set to AID of */ + /* application that caused REFRESH */ + /* For SIM_RESET result it is NULL. */ +} RIL_SimRefreshResponse_v7; + /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ typedef struct { char * number; /* Remote party number */ @@ -1013,7 +1032,7 @@ typedef struct { * * Get the SIM IMSI * - * Only valid when radio state is "RADIO_STATE_SIM_READY" + * Only valid when radio state is "RADIO_STATE_ON" * * "data" is const char ** * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. @@ -3268,6 +3287,23 @@ typedef struct { */ #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 +/** + * RIL_REQUEST_VOICE_RADIO_TECH + * + * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only + * when radio state is RADIO_STATE_ON + * + * "data" is NULL + * "response" is int * + * ((int *) response)[0] is of type const RIL_RadioTechnology + * + * Valid errors: + * SUCCESS + * RADIO_NOT_AVAILABLE + * GENERIC_FAILURE + */ +#define RIL_REQUEST_VOICE_RADIO_TECH 108 + /***********************************************************************/ @@ -3515,14 +3551,17 @@ typedef struct { * Indicates that file(s) on the SIM have been updated, or the SIM * has been reinitialized. * + * In the case where RIL is version 6 or older: * "data" is an int * * ((int *)data)[0] is a RIL_SimRefreshResult. * ((int *)data)[1] is the EFID of the updated file if the result is - * SIM_FILE_UPDATE, AID(application ID) of the card application - * triggering the REFRESH if the result is SIM_INIT, or NULL for any other result. + * SIM_FILE_UPDATE or NULL for any other result. * - * Note: If the radio state changes as a result of the SIM refresh (eg, - * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED + * In the case where RIL is version 7: + * "data" is a RIL_SimRefreshResponse_v7 * + * + * Note: If the SIM state changes as a result of the SIM refresh (eg, + * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED * should be sent. */ #define RIL_UNSOL_SIM_REFRESH 1017 @@ -3732,6 +3771,19 @@ typedef struct { */ #define RIL_UNSOL_RIL_CONNECTED 1034 +/** + * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED + * + * Indicates that voice technology has changed. Contains new radio technology + * as a data in the message. + * + * "data" is int * + * ((int *)data)[0] is of type const RIL_RadioTechnology + * + */ +#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 + + /***********************************************************************/ diff --git a/libril/ril.cpp b/libril/ril.cpp index 5fba532..b8aba01 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -202,6 +202,8 @@ static void dispatchCallForward(Parcel& p, RequestInfo *pRI); static void dispatchRaw(Parcel& p, RequestInfo *pRI); static void dispatchSmsWrite (Parcel &p, RequestInfo *pRI); static void dispatchDataCall (Parcel& p, RequestInfo *pRI); +static void dispatchVoiceRadioTech (Parcel& p, RequestInfo *pRI); +static void dispatchCdmaSubscriptionSource (Parcel& p, RequestInfo *pRI); static void dispatchCdmaSms(Parcel &p, RequestInfo *pRI); static void dispatchCdmaSmsAck(Parcel &p, RequestInfo *pRI); @@ -230,6 +232,11 @@ static int responseRilSignalStrength(Parcel &p,void *response, size_t responsele static int responseCallRing(Parcel &p, void *response, size_t responselen); static int responseCdmaSignalInfoRecord(Parcel &p,void *response, size_t responselen); static int responseCdmaCallWaiting(Parcel &p,void *response, size_t responselen); +static int responseSimRefresh(Parcel &p, void *response, size_t responselen); + +static int decodeVoiceRadioTechnology (RIL_RadioState radioState); +static int decodeCdmaSubscriptionSource (RIL_RadioState radioState); +static RIL_RadioState processRadioState(RIL_RadioState newRadioState); extern "C" const char * requestToString(int request); extern "C" const char * failCauseToString(RIL_Errno); @@ -254,6 +261,25 @@ static UnsolResponseInfo s_unsolResponses[] = { #include "ril_unsol_commands.h" }; +/* For older RILs that do not support new commands RIL_REQUEST_VOICE_RADIO_TECH and + RIL_UNSOL_VOICE_RADIO_TECH_CHANGED messages, decode the voice radio tech from + radio state message and store it. Every time there is a change in Radio State + check to see if voice radio tech changes and notify telephony + */ +int voiceRadioTech = -1; + +/* For older RILs that do not support new commands RIL_REQUEST_GET_CDMA_SUBSCRIPTION_SOURCE + and RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED messages, decode the subscription + source from radio state and store it. Every time there is a change in Radio State + check to see if subscription source changed and notify telephony + */ +int cdmaSubscriptionSource = -1; + +/* For older RILs that do not send RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, decode the + SIM/RUIM state from radio state and store it. Every time there is a change in Radio State, + check to see if SIM/RUIM status changed and notify telephony + */ +int simRuimStatus = -1; static char * strdupReadString(Parcel &p) { @@ -1219,6 +1245,60 @@ static void dispatchDataCall(Parcel& p, RequestInfo *pRI) { } } +// For backwards compatibility with RILs that dont support RIL_REQUEST_VOICE_RADIO_TECH. +// When all RILs handle this request, this function can be removed and +// the request can be sent directly to the RIL using dispatchVoid. +static void dispatchVoiceRadioTech(Parcel& p, RequestInfo *pRI) { + RIL_RadioState state = s_callbacks.onStateRequest(); + + if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) { + RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0); + } + + // RILs that support RADIO_STATE_ON should support this request. + if (RADIO_STATE_ON == state) { + dispatchVoid(p, pRI); + return; + } + + // For Older RILs, that do not support RADIO_STATE_ON, assume that they + // will not support this new request either and decode Voice Radio Technology + // from Radio State + voiceRadioTech = decodeVoiceRadioTechnology(state); + + if (voiceRadioTech < 0) + RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0); + else + RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &voiceRadioTech, sizeof(int)); +} + +// For backwards compatibility in RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE:. +// When all RILs handle this request, this function can be removed and +// the request can be sent directly to the RIL using dispatchVoid. +static void dispatchCdmaSubscriptionSource(Parcel& p, RequestInfo *pRI) { + RIL_RadioState state = s_callbacks.onStateRequest(); + + if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) { + RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0); + } + + // RILs that support RADIO_STATE_ON should support this request. + if (RADIO_STATE_ON == state) { + dispatchVoid(p, pRI); + return; + } + + // For Older RILs, that do not support RADIO_STATE_ON, assume that they + // will not support this new request either and decode CDMA Subscription Source + // from Radio State + cdmaSubscriptionSource = decodeCdmaSubscriptionSource(state); + + if (cdmaSubscriptionSource < 0) + RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0); + else + RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &cdmaSubscriptionSource, sizeof(int)); +} + static int blockingWrite(int fd, const void *buffer, size_t len) { size_t writeOffset = 0; @@ -2035,6 +2115,40 @@ static int responseCdmaCallWaiting(Parcel &p, void *response, return 0; } +static int responseSimRefresh(Parcel &p, void *response, size_t responselen) { + if (response == NULL && responselen != 0) { + ALOGE("responseSimRefresh: invalid response: NULL"); + return RIL_ERRNO_INVALID_RESPONSE; + } + + startResponse; + if (s_callbacks.version == 7) { + RIL_SimRefreshResponse_v7 *p_cur = ((RIL_SimRefreshResponse_v7 *) response); + p.writeInt32(p_cur->result); + p.writeInt32(p_cur->ef_id); + writeStringToParcel(p, p_cur->aid); + + appendPrintBuf("%sresult=%d, ef_id=%d, aid=%s", + printBuf, + p_cur->result, + p_cur->ef_id, + p_cur->aid); + } else { + int *p_cur = ((int *) response); + p.writeInt32(p_cur[0]); + p.writeInt32(p_cur[1]); + writeStringToParcel(p, NULL); + + appendPrintBuf("%sresult=%d, ef_id=%d", + printBuf, + p_cur[0], + p_cur[1]); + } + closeResponse; + + return 0; +} + static void triggerEvLoop() { int ret; if (!pthread_equal(pthread_self(), s_tid_dispatch)) { @@ -2866,6 +2980,123 @@ wakeTimeoutCallback (void *param) { } } +static int +decodeVoiceRadioTechnology (RIL_RadioState radioState) { + switch (radioState) { + case RADIO_STATE_SIM_NOT_READY: + case RADIO_STATE_SIM_LOCKED_OR_ABSENT: + case RADIO_STATE_SIM_READY: + return RADIO_TECH_UMTS; + + case RADIO_STATE_RUIM_NOT_READY: + case RADIO_STATE_RUIM_READY: + case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: + case RADIO_STATE_NV_NOT_READY: + case RADIO_STATE_NV_READY: + return RADIO_TECH_1xRTT; + + default: + ALOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState"); + return -1; + } +} + +static int +decodeCdmaSubscriptionSource (RIL_RadioState radioState) { + switch (radioState) { + case RADIO_STATE_SIM_NOT_READY: + case RADIO_STATE_SIM_LOCKED_OR_ABSENT: + case RADIO_STATE_SIM_READY: + case RADIO_STATE_RUIM_NOT_READY: + case RADIO_STATE_RUIM_READY: + case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: + return CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM; + + case RADIO_STATE_NV_NOT_READY: + case RADIO_STATE_NV_READY: + return CDMA_SUBSCRIPTION_SOURCE_NV; + + default: + ALOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState"); + return -1; + } +} + +static int +decodeSimStatus (RIL_RadioState radioState) { + switch (radioState) { + case RADIO_STATE_SIM_NOT_READY: + case RADIO_STATE_RUIM_NOT_READY: + case RADIO_STATE_NV_NOT_READY: + case RADIO_STATE_NV_READY: + return -1; + case RADIO_STATE_SIM_LOCKED_OR_ABSENT: + case RADIO_STATE_SIM_READY: + case RADIO_STATE_RUIM_READY: + case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: + return radioState; + default: + ALOGD("decodeSimStatus: Invoked with incorrect RadioState"); + return -1; + } +} + +static bool is3gpp2(int radioTech) { + switch (radioTech) { + case RADIO_TECH_IS95A: + case RADIO_TECH_IS95B: + case RADIO_TECH_1xRTT: + case RADIO_TECH_EVDO_0: + case RADIO_TECH_EVDO_A: + case RADIO_TECH_EVDO_B: + case RADIO_TECH_EHRPD: + return true; + default: + return false; + } +} + +/* If RIL sends SIM states or RUIM states, store the voice radio + * technology and subscription source information so that they can be + * returned when telephony framework requests them + */ +static RIL_RadioState +processRadioState(RIL_RadioState newRadioState) { + + if((newRadioState > RADIO_STATE_UNAVAILABLE) && (newRadioState < RADIO_STATE_ON)) { + int newVoiceRadioTech; + int newCdmaSubscriptionSource; + int newSimStatus; + + /* This is old RIL. Decode Subscription source and Voice Radio Technology + from Radio State and send change notifications if there has been a change */ + newVoiceRadioTech = decodeVoiceRadioTechnology(newRadioState); + if(newVoiceRadioTech != voiceRadioTech) { + voiceRadioTech = newVoiceRadioTech; + RIL_onUnsolicitedResponse (RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, + &voiceRadioTech, sizeof(voiceRadioTech)); + } + if(is3gpp2(newVoiceRadioTech)) { + newCdmaSubscriptionSource = decodeCdmaSubscriptionSource(newRadioState); + if(newCdmaSubscriptionSource != cdmaSubscriptionSource) { + cdmaSubscriptionSource = newCdmaSubscriptionSource; + RIL_onUnsolicitedResponse (RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, + &cdmaSubscriptionSource, sizeof(cdmaSubscriptionSource)); + } + } + newSimStatus = decodeSimStatus(newRadioState); + if(newSimStatus != simRuimStatus) { + simRuimStatus = newSimStatus; + RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0); + } + + /* Send RADIO_ON to telephony */ + newRadioState = RADIO_STATE_ON; + } + + return newRadioState; +} + extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data, size_t datalen) @@ -2874,6 +3105,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data, int ret; int64_t timeReceived = 0; bool shouldScheduleTimeout = false; + RIL_RadioState newState; if (s_registerCalled == 0) { // Ignore RIL_onUnsolicitedResponse before RIL_register @@ -2930,7 +3162,8 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data, // some things get more payload switch(unsolResponse) { case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: - p.writeInt32(s_callbacks.onStateRequest()); + newState = processRadioState(s_callbacks.onStateRequest()); + p.writeInt32(newState); appendPrintBuf("%s {%s}", printBuf, radioStateToString(s_callbacks.onStateRequest())); break; @@ -3062,6 +3295,7 @@ radioStateToString(RIL_RadioState s) { case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:return"RADIO_RUIM_LOCKED_OR_ABSENT"; case RADIO_STATE_NV_NOT_READY:return"RADIO_NV_NOT_READY"; case RADIO_STATE_NV_READY:return"RADIO_NV_READY"; + case RADIO_STATE_ON:return"RADIO_ON"; default: return "<unknown state>"; } } @@ -3196,6 +3430,7 @@ requestToString(int request) { case RIL_REQUEST_ISIM_AUTHENTICATION: return "ISIM_AUTHENTICATION"; case RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU: return "RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU"; case RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS: return "RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS"; + case RIL_REQUEST_VOICE_RADIO_TECH: return "VOICE_RADIO_TECH"; case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: return "UNSOL_RESPONSE_RADIO_STATE_CHANGED"; case RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED: return "UNSOL_RESPONSE_CALL_STATE_CHANGED"; case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED: return "UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED"; @@ -3230,6 +3465,7 @@ requestToString(int request) { case RIL_UNSOL_CDMA_PRL_CHANGED: return "UNSOL_CDMA_PRL_CHANGED"; case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE"; case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED"; + case RIL_UNSOL_VOICE_RADIO_TECH_CHANGED: return "UNSOL_VOICE_RADIO_TECH_CHANGED"; default: return "<unknown request>"; } } diff --git a/libril/ril_commands.h b/libril/ril_commands.h index 68a8b31..069ee75 100644 --- a/libril/ril_commands.h +++ b/libril/ril_commands.h @@ -25,7 +25,7 @@ {RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION, dispatchStrings, responseInts}, {RIL_REQUEST_GET_CURRENT_CALLS, dispatchVoid, responseCallList}, {RIL_REQUEST_DIAL, dispatchDial, responseVoid}, - {RIL_REQUEST_GET_IMSI, dispatchVoid, responseString}, + {RIL_REQUEST_GET_IMSI, dispatchStrings, responseString}, {RIL_REQUEST_HANGUP, dispatchInts, responseVoid}, {RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, dispatchVoid, responseVoid}, {RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND, dispatchVoid, responseVoid}, @@ -118,7 +118,8 @@ {RIL_REQUEST_SET_SMSC_ADDRESS, dispatchString, responseVoid}, {RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, dispatchInts, responseVoid}, {RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, dispatchVoid, responseVoid}, - {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, dispatchVoid, responseInts}, + {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, dispatchCdmaSubscriptionSource, responseInts}, {RIL_REQUEST_ISIM_AUTHENTICATION, dispatchString, responseString}, {RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU, dispatchStrings, responseVoid}, {RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS, dispatchString, responseSIM_IO}, + {RIL_REQUEST_VOICE_RADIO_TECH, dispatchVoiceRadioTech, responseInts}, diff --git a/libril/ril_unsol_commands.h b/libril/ril_unsol_commands.h index ce3ef20..7e3f8f0 100644 --- a/libril/ril_unsol_commands.h +++ b/libril/ril_unsol_commands.h @@ -31,7 +31,7 @@ {RIL_UNSOL_STK_EVENT_NOTIFY, responseString, WAKE_PARTIAL}, {RIL_UNSOL_STK_CALL_SETUP, responseInts, WAKE_PARTIAL}, {RIL_UNSOL_SIM_SMS_STORAGE_FULL, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_SIM_REFRESH, responseInts, WAKE_PARTIAL}, + {RIL_UNSOL_SIM_REFRESH, responseSimRefresh, WAKE_PARTIAL}, {RIL_UNSOL_CALL_RING, responseCallRing, WAKE_PARTIAL}, {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, responseVoid, WAKE_PARTIAL}, {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, responseCdmaSms, WAKE_PARTIAL}, @@ -48,5 +48,5 @@ {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, responseInts, WAKE_PARTIAL}, {RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL}, {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL} - + {RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL}, + {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}, diff --git a/mock-ril/Android.mk b/mock-ril/Android.mk index 540bf89..0560de1 100644 --- a/mock-ril/Android.mk +++ b/mock-ril/Android.mk @@ -11,6 +11,7 @@ src_py := src/py src_js := src/js src_proto := src/proto +ifneq ($(TARGET_BUILD_PDK), true) ifeq ($(TARGET_ARCH),arm) # Mock-ril only buid for debug variants ifneq ($(filter userdebug eng tests, $(TARGET_BUILD_VARIANT)),) @@ -76,6 +77,8 @@ LOCAL_SRC_FILES := $(call all-java-files-under, $(src_java)) \ include $(BUILD_STATIC_JAVA_LIBRARY) # ======================================================= +endif + src_cpp := src_java := src_py := diff --git a/rild/Android.mk b/rild/Android.mk index 5192fd9..c782933 100644 --- a/rild/Android.mk +++ b/rild/Android.mk @@ -9,15 +9,13 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libcutils \ - libril - -ifeq ($(TARGET_ARCH),arm) -LOCAL_SHARED_LIBRARIES += libdl -endif # arm + libril \ + libdl LOCAL_CFLAGS := -DRIL_SHLIB LOCAL_MODULE:= rild +LOCAL_MODULE_TAGS := optional include $(BUILD_EXECUTABLE) |