diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-05-11 08:39:57 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-05-11 08:39:57 +0000 |
commit | ddb1cf1ae7be47845ffb00cff077118e89217bd9 (patch) | |
tree | db0534b8c15743db5fdd42833e294b5be7860579 | |
parent | 123bbff342b68703af80711f740be51beee16b65 (diff) | |
parent | d21d1f8093cb7f300cc0285000bcd160855094ba (diff) | |
download | android_hardware_ril-ddb1cf1ae7be47845ffb00cff077118e89217bd9.tar.gz android_hardware_ril-ddb1cf1ae7be47845ffb00cff077118e89217bd9.tar.bz2 android_hardware_ril-ddb1cf1ae7be47845ffb00cff077118e89217bd9.zip |
release-request-051da47e-713f-4e09-8f6c-698fb4d4e92e-for-git_oc-dr1-release-3997165 snap-temp-L04400000062809322
Change-Id: I051c393aef4e80f0586585e6decee651b5b81a97
-rw-r--r-- | include/telephony/ril.h | 223 | ||||
-rw-r--r-- | libril/ril.cpp | 2 | ||||
-rw-r--r-- | libril/ril_service.cpp | 38 | ||||
-rw-r--r-- | reference-ril/Android.mk | 4 |
4 files changed, 254 insertions, 13 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h index ad10627..b8a539c 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -2507,6 +2507,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SIGNAL_STRENGTH 19 @@ -2535,6 +2541,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 @@ -2556,6 +2568,10 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_OPERATOR 22 @@ -2581,6 +2597,16 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * INVALID_STATE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * DEVICE_IN_USE + * OPERATION_NOT_ALLOWED + * INVALID_MODEM_STATE + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_RADIO_POWER 23 @@ -2765,7 +2791,8 @@ typedef struct { * * Other errors could include: * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, - * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. + * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED, + * INVALID_ARGUMENTS * * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL */ @@ -3060,6 +3087,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_GET_IMEI 38 @@ -3078,6 +3111,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_GET_IMEISV 39 @@ -3130,6 +3169,10 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * INVALID_CALL_ID + * INVALID_STATE + * INVALID_ARGUMENTS + * REQUEST_NOT_SUPPORTED * * See also: RIL_REQUEST_SETUP_DATA_CALL */ @@ -3254,6 +3297,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 @@ -3274,6 +3323,12 @@ typedef struct { * RADIO_NOT_AVAILABLE * ILLEGAL_SIM_OR_ME * OPERATION_NOT_ALLOWED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and * no retries needed, such as illegal SIM or ME. @@ -3297,6 +3352,13 @@ typedef struct { * RADIO_NOT_AVAILABLE * ILLEGAL_SIM_OR_ME * OPERATION_NOT_ALLOWED + * INVALID_STATE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and * no retries needed, such as illegal SIM or ME. @@ -3332,6 +3394,9 @@ typedef struct { * INTERNAL_ERR * NO_MEMORY * MODEM_ERR + * REQUEST_NOT_SUPPORTED + * CANCELLED + * OPERATION_NOT_ALLOWED * */ #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 @@ -3401,6 +3466,12 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * EMPTY_RECORD + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_BASEBAND_VERSION 51 @@ -3655,6 +3726,11 @@ typedef struct { * * Valid errors: * SUCCESS + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SCREEN_STATE 61 @@ -3751,6 +3827,12 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE */ @@ -3770,6 +3852,11 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * See also: RIL_REQUEST_SET_BAND_MODE */ @@ -3909,6 +3996,12 @@ typedef struct { * RADIO_NOT_AVAILABLE (radio resetting) * OPERATION_NOT_ALLOWED * MODE_NOT_SUPPORTED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 @@ -3926,6 +4019,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */ @@ -3942,6 +4041,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NO_NETWORK_FOUND + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 @@ -3964,6 +4069,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED */ @@ -4005,6 +4116,13 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED + * OPERATION_NOT_ALLOWED */ #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 @@ -4025,6 +4143,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 @@ -4197,6 +4321,12 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 @@ -4434,6 +4564,14 @@ typedef struct { * Valid errors: * SUCCESS * RIL_E_SUBSCRIPTION_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED + * */ #define RIL_REQUEST_CDMA_SUBSCRIPTION 95 @@ -4513,6 +4651,14 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED + * */ #define RIL_REQUEST_DEVICE_IDENTITY 98 @@ -4531,6 +4677,12 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 @@ -4731,6 +4883,17 @@ typedef struct { * "data" is NULL * * "response" is an array of RIL_CellInfo_v12. + * + * Valid errors: + * SUCCESS + * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NO_NETWORK_FOUND + * REQUEST_NOT_SUPPORTED + * */ #define RIL_REQUEST_GET_CELL_INFO_LIST 109 @@ -4750,6 +4913,11 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 @@ -4777,6 +4945,14 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * SUBSCRIPTION_NOT_AVAILABLE + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED + * */ #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 @@ -4996,6 +5172,12 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) * SUBSCRIPTION_NOT_SUPPORTED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122 @@ -5016,6 +5198,14 @@ typedef struct { * * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * INVALID_ARGUMENTS + * DEVICE_IN_USE + * INVALID_MODEM_STATE + * REQUEST_NOT_SUPPORTED * */ #define RIL_REQUEST_ALLOW_DATA 123 @@ -5066,6 +5256,7 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE + * REQUEST_NOT_SUPPORTED * * See also: RIL_UNSOL_DC_RT_INFO_CHANGED */ @@ -5118,6 +5309,10 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SHUTDOWN 129 @@ -5132,6 +5327,8 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * INVALID_STATE + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_GET_RADIO_CAPABILITY 130 @@ -5151,6 +5348,13 @@ typedef struct { * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds. * RADIO_NOT_AVAILABLE * OPERATION_NOT_ALLOWED + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * MODEM_ERR + * INVALID_STATE + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SET_RADIO_CAPABILITY 131 @@ -5169,6 +5373,8 @@ typedef struct { * SUCCESS * RADIO_NOT_AVAILABLE * LCE_NOT_SUPPORTED + * INTERNAL_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_START_LCE 132 @@ -5217,6 +5423,12 @@ typedef struct { * * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * MODEM_ERR + * NOT_PROVISIONED + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_GET_ACTIVITY_INFO 135 @@ -5287,6 +5499,11 @@ typedef struct { * Valid errors: * SUCCESS * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * INVALID_ARGUMENTS + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SEND_DEVICE_STATE 138 @@ -5308,6 +5525,10 @@ typedef struct { * SUCCESS * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist) * RADIO_NOT_AVAILABLE (radio resetting) + * NO_MEMORY + * INTERNAL_ERR + * SYSTEM_ERR + * REQUEST_NOT_SUPPORTED */ #define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139 diff --git a/libril/ril.cpp b/libril/ril.cpp index 54832e1..aca9d0d 100644 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -807,7 +807,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, } #if VDBG - RLOGI("%s UNSOLICITED: %s length:%d", rilSocketIdToString(soc_id), + RLOGI("%s UNSOLICITED: %s length:%zu", rilSocketIdToString(soc_id), requestToString(unsolResponse), datalen); #endif diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp index 404047f..427b89d 100644 --- a/libril/ril_service.cpp +++ b/libril/ril_service.cpp @@ -19,6 +19,7 @@ #include <android/hardware/radio/1.1/IRadio.h> #include <android/hardware/radio/1.1/IRadioResponse.h> #include <android/hardware/radio/1.1/IRadioIndication.h> +#include <android/hardware/radio/1.1/types.h> #include <android/hardware/radio/deprecated/1.0/IOemHook.h> @@ -31,9 +32,6 @@ #define INVALID_HEX_CHAR 16 -// Enable verbose logging -#define VDBG 0 - using namespace android::hardware::radio::V1_0; using namespace android::hardware::radio::deprecated::V1_0; using ::android::hardware::configureRpcThreadpool; @@ -425,6 +423,8 @@ struct RadioImpl : public ::android::hardware::radio::V1_1::IRadio { Return<void> setIndicationFilter(int32_t serial, int32_t indicationFilter); Return<void> setSimCardPower(int32_t serial, bool powerUp); + Return<void> setSimCardPower_1_1(int32_t serial, + const ::android::hardware::radio::V1_1::CardPowerState state); Return<void> responseAcknowledgement(); @@ -2657,6 +2657,15 @@ Return<void> RadioImpl::setSimCardPower(int32_t serial, bool powerUp) { return Void(); } +Return<void> RadioImpl::setSimCardPower_1_1(int32_t serial, + const ::android::hardware::radio::V1_1::CardPowerState state) { +#if VDBG + RLOGD("setSimCardPower_1_1: serial %d state %d", serial, state); +#endif + dispatchInts(serial, mSlotId, RIL_REQUEST_SET_SIM_CARD_POWER, 1, state); + return Void(); +} + Return<void> RadioImpl::responseAcknowledgement() { android::releaseWakeLock(); return Void(); @@ -6315,7 +6324,6 @@ int radio::setIndicationFilterResponse(int slotId, return 0; } - int radio::setSimCardPowerResponse(int slotId, int responseType, int serial, RIL_Errno e, void *response, size_t responseLen) { @@ -6326,13 +6334,25 @@ int radio::setSimCardPowerResponse(int slotId, if (radioService[slotId]->mRadioResponse != NULL) { RadioResponseInfo responseInfo = {}; populateResponseInfo(responseInfo, serial, responseType, e); - Return<void> retStatus - = radioService[slotId]->mRadioResponse->setSimCardPowerResponse(responseInfo); - radioService[slotId]->checkReturnStatus(retStatus); + Return<sp<::android::hardware::radio::V1_1::IRadioResponse>> ret = + ::android::hardware::radio::V1_1::IRadioResponse::castFrom( + radioService[slotId]->mRadioResponse); + if (ret.isOk()) { + sp<::android::hardware::radio::V1_1::IRadioResponse> radioResponseV1_1 = ret; + Return<void> retStatus + = radioResponseV1_1->setSimCardPowerResponse_1_1(responseInfo); + radioService[slotId]->checkReturnStatus(retStatus); + } else { + RLOGD("setSimCardPowerResponse: ret.isOK() == false for radioService[%d]", + slotId); + Return<void> retStatus + = radioService[slotId]->mRadioResponse->setSimCardPowerResponse(responseInfo); + radioService[slotId]->checkReturnStatus(retStatus); + } } else { - RLOGE("setSimCardPowerResponse: radioService[%d]->mRadioResponse == NULL", slotId); + RLOGE("setSimCardPowerResponse: radioService[%d]->mRadioResponse == NULL", + slotId); } - return 0; } diff --git a/reference-ril/Android.mk b/reference-ril/Android.mk index a82ef50..6afdbd3 100644 --- a/reference-ril/Android.mk +++ b/reference-ril/Android.mk @@ -34,6 +34,8 @@ ifeq ($(TARGET_DEVICE),dream) LOCAL_CFLAGS += -DPOLL_CALL_STATE -DUSE_QMI endif +LOCAL_VENDOR_MODULE:= true + ifeq (foo,foo) #build shared library LOCAL_SHARED_LIBRARIES += \ @@ -48,5 +50,3 @@ else LOCAL_MODULE:= reference-ril include $(BUILD_EXECUTABLE) endif - -LOCAL_VENDOR_MODULE:= true |