mirror of
https://gitee.com/openharmony/telephony_ril_adapter
synced 2025-02-20 16:50:42 +00:00
dual cards switch.
Signed-off-by: dingxiaochen <dingxiaochen@huawei.com>
This commit is contained in:
parent
ffaef9c7e7
commit
f31cb698fd
@ -1360,36 +1360,5 @@ std::shared_ptr<PreferredNetworkTypeInfo> PreferredNetworkTypeInfo::UnMarshallin
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
bool RadioCapabilityInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
if (!ReadBaseInt32(parcel, ratFamily)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseString(parcel, modemId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RadioCapabilityInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
if (!WriteBaseInt32(parcel, ratFamily)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseString(parcel, modemId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::shared_ptr<RadioCapabilityInfo> RadioCapabilityInfo::UnMarshalling(Parcel &parcel)
|
||||
{
|
||||
std::shared_ptr<RadioCapabilityInfo> param = std::make_shared<RadioCapabilityInfo>();
|
||||
if (param == nullptr || !param->ReadFromParcel(parcel)) {
|
||||
param = nullptr;
|
||||
}
|
||||
return param;
|
||||
}
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -122,7 +122,7 @@ bool SimIoRequestInfo::ReadFromParcel(Parcel &parcel)
|
||||
}
|
||||
if (!ReadBaseString(parcel, aid)) {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -335,86 +335,6 @@ std::shared_ptr<SimPinInputTimes> SimPinInputTimes::UnMarshalling(Parcel &parcel
|
||||
return param;
|
||||
}
|
||||
|
||||
bool SimProtocolRequest::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
if (!ReadBaseInt32(parcel, serial)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseInt32(parcel, phase)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseInt32(parcel, protocol)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseInt32(parcel, slotId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimProtocolRequest::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
if (!WriteBaseInt32(parcel, serial)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseInt32(parcel, phase)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseInt32(parcel, protocol)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseInt32(parcel, slotId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::shared_ptr<SimProtocolRequest> SimProtocolRequest::UnMarshalling(Parcel &parcel)
|
||||
{
|
||||
std::shared_ptr<SimProtocolRequest> param = std::make_shared<SimProtocolRequest>();
|
||||
if (param == nullptr || !param->ReadFromParcel(parcel)) {
|
||||
param = nullptr;
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
bool SimProtocolResponse::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
if (!ReadBaseInt32(parcel, phase)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseInt32(parcel, result)) {
|
||||
return false;
|
||||
}
|
||||
if (!ReadBaseInt32(parcel, slotId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimProtocolResponse::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
if (!WriteBaseInt32(parcel, phase)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseInt32(parcel, result)) {
|
||||
return false;
|
||||
}
|
||||
if (!WriteBaseInt32(parcel, slotId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::shared_ptr<SimProtocolResponse> SimProtocolResponse::UnMarshalling(Parcel &parcel)
|
||||
{
|
||||
std::shared_ptr<SimProtocolResponse> param = std::make_shared<SimProtocolResponse>();
|
||||
if (param == nullptr || !param->ReadFromParcel(parcel)) {
|
||||
param = nullptr;
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
bool OpenLogicalChannelResponse::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
if (!ReadBaseInt32(parcel, sw1)) {
|
||||
|
@ -104,7 +104,7 @@ typedef enum {
|
||||
REG_NOTIFY_STAT_LAC_CELLID, /* AT command: +CREG,+CGREG,+CEREG,+C5GREG,n=2,notify data format type 2 */
|
||||
} HRilRegNotifyMode;
|
||||
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
typedef enum {
|
||||
CALL_FORWARD_REASON_UNCONDITIONAL,
|
||||
CALL_FORWARD_REASON_MOBILE_BUSY,
|
||||
@ -114,7 +114,7 @@ typedef enum {
|
||||
CALL_FORWARD_REASON_ALL_CCF, /* all conditional call forwarding */
|
||||
} CallForwardReasonType;
|
||||
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
typedef enum {
|
||||
CALL_FORWARD_ClassX_VOICE = 1,
|
||||
CALL_FORWARD_ClassX_DATA = 2,
|
||||
@ -126,7 +126,7 @@ typedef enum {
|
||||
CALL_FORWARD_ClassX_DPADA = 128, /* dedicated PAD access */
|
||||
} CallForwardClassX;
|
||||
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.11 Call forwarding number and conditions +CCFC
|
||||
typedef enum {
|
||||
CALL_FORWARD_MODE_DISABLE,
|
||||
CALL_FORWARD_MODE_ENABLE,
|
||||
@ -136,7 +136,7 @@ typedef enum {
|
||||
} CallForwardMode;
|
||||
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) Call related supplementary services +CHLD
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.22 Informative examples
|
||||
// 3GPP TS 27.007 V3.9.0 (2001-06) 7.22 Informative examples
|
||||
typedef enum {
|
||||
TYPE_HANG_UP_HOLD_WAIT = 1,
|
||||
TYPE_HANG_UP_ACTIVE = 2,
|
||||
@ -392,4 +392,41 @@ typedef enum {
|
||||
HRIL_SERVING_CELL_SECONDARY
|
||||
} HRilCellConnectionStatus;
|
||||
|
||||
typedef enum {
|
||||
HRIL_RADIO_PROTOCOL_PHASE_INITIAL, /* LM is configured is initial value and value after COMPLETE. */
|
||||
HRIL_RADIO_PROTOCOL_PHASE_CHECK, /* CHECK is sent before UPDATE and indicates that an UPDATE will be
|
||||
* forthcoming with these same parameters. */
|
||||
HRIL_RADIO_PROTOCOL_PHASE_UPDATE, /* UPDATE is sent after all LM's receive CHECK and returned success,
|
||||
* if any CHECK's fail no UPDATE will be sent. */
|
||||
HRIL_RADIO_PROTOCOL_PHASE_NOTIFY, /* NOTIFY is sent with HNOTI_SIM_RADIO_PROTOCOL_UPDATED. */
|
||||
HRIL_RADIO_PROTOCOL_PHASE_COMPLETE /* COMPLETE is sent after all previous phases have completed.
|
||||
* If an error occurs in any previous commands the
|
||||
* and fields will be the prior configuration thus
|
||||
* restoring the configuration to the previous value. An error returned
|
||||
* by this command will generally be ignored or may cause that logical
|
||||
* modem to be removed from service */
|
||||
} HRilRadioProtocolPhase;
|
||||
|
||||
typedef enum {
|
||||
HRIL_RADIO_PROTOCOL_TECH_UNKNOWN = 1 << RADIO_TECHNOLOGY_UNKNOWN,
|
||||
HRIL_RADIO_PROTOCOL_TECH_GSM = 1 << RADIO_TECHNOLOGY_GSM,
|
||||
HRIL_RADIO_PROTOCOL_TECH_1XRTT = 1 << RADIO_TECHNOLOGY_1XRTT,
|
||||
HRIL_RADIO_PROTOCOL_TECH_WCDMA = 1 << RADIO_TECHNOLOGY_WCDMA,
|
||||
HRIL_RADIO_PROTOCOL_TECH_HSPA = 1 << RADIO_TECHNOLOGY_HSPA,
|
||||
HRIL_RADIO_PROTOCOL_TECH_HSPAP = 1 << RADIO_TECHNOLOGY_HSPAP,
|
||||
HRIL_RADIO_PROTOCOL_TECH_TD_SCDMA = 1 << RADIO_TECHNOLOGY_TD_SCDMA,
|
||||
HRIL_RADIO_PROTOCOL_TECH_EVDO = 1 << RADIO_TECHNOLOGY_EVDO,
|
||||
HRIL_RADIO_PROTOCOL_TECH_EHRPD = 1 << RADIO_TECHNOLOGY_EHRPD,
|
||||
HRIL_RADIO_PROTOCOL_TECH_LTE = 1 << RADIO_TECHNOLOGY_LTE,
|
||||
HRIL_RADIO_PROTOCOL_TECH_LTE_CA = 1 << RADIO_TECHNOLOGY_LTE_CA,
|
||||
HRIL_RADIO_PROTOCOL_TECH_IWLAN = 1 << RADIO_TECHNOLOGY_IWLAN,
|
||||
HRIL_RADIO_PROTOCOL_TECH_NR = 1 << RADIO_TECHNOLOGY_NR
|
||||
} HRilRadioProtocolTech;
|
||||
|
||||
typedef enum {
|
||||
HRIL_RADIO_PROTOCOL_STATUS_NONE,
|
||||
HRIL_RADIO_PROTOCOL_STATUS_SUCCESS,
|
||||
HRIL_RADIO_PROTOCOL_STATUS_FAIL
|
||||
} HRilRadioProtocolStatus;
|
||||
|
||||
#endif // OHOS_HRIL_ENUM_H
|
||||
|
@ -332,15 +332,6 @@ struct PreferredNetworkTypeInfo : public HrilBaseParcel {
|
||||
std::shared_ptr<PreferredNetworkTypeInfo> UnMarshalling(Parcel &parcel);
|
||||
void Dump(std::string, int32_t);
|
||||
};
|
||||
|
||||
struct RadioCapabilityInfo : public HrilBaseParcel {
|
||||
int32_t ratFamily;
|
||||
std::string modemId;
|
||||
bool ReadFromParcel(Parcel &parcel);
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
std::shared_ptr<RadioCapabilityInfo> UnMarshalling(Parcel &parcel);
|
||||
void Dump(std::string, int32_t);
|
||||
};
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_RIL_NETWORK_PARCEL_H
|
||||
|
@ -40,6 +40,7 @@ typedef enum {
|
||||
HNOTI_SIM_STK_EVENT_NOTIFY,
|
||||
HNOTI_SIM_STK_CALL_SETUP_NOTIFY,
|
||||
HNOTI_SIM_REFRESH_NOTIFY,
|
||||
HNOTI_SIM_RADIO_PROTOCOL_UPDATED,
|
||||
|
||||
HNOTI_DATA_BASE = 1300,
|
||||
HNOTI_DATA_PDP_CONTEXT_LIST_UPDATED,
|
||||
|
@ -86,7 +86,8 @@ typedef enum {
|
||||
HREQ_SIM_UNLOCK_PUK2,
|
||||
HREQ_SIM_GET_SIM_PIN2_INPUT_TIMES,
|
||||
HREQ_SIM_SET_ACTIVE_SIM,
|
||||
HREQ_SIM_RADIO_PROTOCOL,
|
||||
HREQ_SIM_GET_RADIO_PROTOCOL,
|
||||
HREQ_SIM_SET_RADIO_PROTOCOL,
|
||||
HREQ_SIM_STK_SEND_TERMINAL_RESPONSE,
|
||||
HREQ_SIM_STK_SEND_ENVELOPE,
|
||||
HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT,
|
||||
|
@ -138,27 +138,6 @@ struct SimPinInputTimes : public HrilBaseParcel {
|
||||
void Dump(std::string, int32_t);
|
||||
};
|
||||
|
||||
struct SimProtocolRequest : public HrilBaseParcel {
|
||||
int32_t serial;
|
||||
int32_t phase;
|
||||
int32_t protocol;
|
||||
int32_t slotId;
|
||||
bool ReadFromParcel(Parcel &parcel);
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
std::shared_ptr<SimProtocolRequest> UnMarshalling(Parcel &parcel);
|
||||
void Dump(std::string, int32_t);
|
||||
};
|
||||
|
||||
struct SimProtocolResponse : public HrilBaseParcel {
|
||||
int32_t phase;
|
||||
int32_t result;
|
||||
int32_t slotId;
|
||||
bool ReadFromParcel(Parcel &parcel);
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
std::shared_ptr<SimProtocolResponse> UnMarshalling(Parcel &parcel);
|
||||
void Dump(std::string, int32_t);
|
||||
};
|
||||
|
||||
struct ApduSimIORequestInfo : public HrilBaseParcel {
|
||||
int32_t serial;
|
||||
int32_t channelId;
|
||||
|
@ -281,11 +281,6 @@ typedef struct {
|
||||
CurrentCellInfoVendor *currentCellInfo;
|
||||
} CurrentCellInfoList;
|
||||
|
||||
typedef struct {
|
||||
int32_t ratFamily;
|
||||
char modemId[MAX_CHAR_LEN];
|
||||
} HRilRadioCapability;
|
||||
|
||||
typedef struct {
|
||||
void (*GetImsRegStatus)(const ReqDataInfo *requestInfo);
|
||||
void (*GetSignalStrength)(const ReqDataInfo *requestInfo);
|
||||
@ -299,7 +294,6 @@ typedef struct {
|
||||
void (*SetNetworkSelectionMode)(const ReqDataInfo *requestInfo, const HRilSetNetworkModeInfo *data);
|
||||
void (*GetPreferredNetwork)(const ReqDataInfo *requestInfo);
|
||||
void (*SetPreferredNetwork)(const ReqDataInfo *requestInfo, const int32_t *data);
|
||||
void (*GetRadioCapability)(const ReqDataInfo *requestInfo);
|
||||
void (*GetPhysicalChannelConfig)(const ReqDataInfo *requestInfo);
|
||||
void (*SetLocateUpdates)(const ReqDataInfo *requestInfo, HRilRegNotifyMode mode);
|
||||
void (*SetNotificationFilter)(const ReqDataInfo *requestInfo, const int32_t *newFilter);
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "hril_enum.h"
|
||||
#include "hril_public_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -28,14 +27,14 @@ extern "C" {
|
||||
/* Form 3GPP TS 27.007 V4.3.0 (2001-12) 8.18, + CRSM */
|
||||
typedef struct {
|
||||
int32_t command; /* command passed on by the MT to the SIM; refer 3GPP TS 51.011 [28]
|
||||
* 176 READ BINARY
|
||||
* 178 READ RECORD
|
||||
* 192 GET RESPONSE
|
||||
* 214 UPDATE BINARY
|
||||
* 220 UPDATE RECORD
|
||||
* 242 STATUS
|
||||
* 203 RETRIEVE DATA
|
||||
* 219 SET DATA
|
||||
* 176 READ BINARY
|
||||
* 178 READ RECORD
|
||||
* 192 GET RESPONSE
|
||||
* 214 UPDATE BINARY
|
||||
* 220 UPDATE RECORD
|
||||
* 242 STATUS
|
||||
* 203 RETRIEVE DATA
|
||||
* 219 SET DATA
|
||||
*/
|
||||
int32_t fileid; /* this is the identifier of an elementary datafile on SIM.
|
||||
* Mandatory for every command except STATUS. */
|
||||
@ -96,17 +95,17 @@ typedef struct {
|
||||
typedef struct {
|
||||
char *fac; /* ("SC","AO","OI","OX","AI","IR","AB","AG","AC","FD","PN","PU","PP") */
|
||||
int32_t mode; /* 0 unlock
|
||||
* 1 lock
|
||||
* 2 query status */
|
||||
* 1 lock
|
||||
* 2 query status */
|
||||
int32_t status; /* 0 not active
|
||||
* 1 active */
|
||||
char *passwd; /* shall be the same as password specified for the facility
|
||||
* from the MT user interface or with command Change Password +CPWD */
|
||||
int32_t classx; /* is a sum of integers each representing a class of information (default 7 - voice, data and
|
||||
* fax): 1 voice (telephony) 2 data (refers to all bearer services; with <mode>=2 this may refer
|
||||
* only to some bearer service if TA does not support values 16, 32, 64 and 128) 4 fax (facsimile
|
||||
* services) 8 short message service 16 data circuit sync 32 data circuit async 64
|
||||
* dedicated packet access 128 dedicated PAD access */
|
||||
* fax): 1 voice (telephony) 2 data (refers to all bearer services; with <mode>=2 this may refer
|
||||
* only to some bearer service if TA does not support values 16, 32, 64 and 128) 4 fax (facsimile
|
||||
* services) 8 short message service 16 data circuit sync 32 data circuit async 64
|
||||
* dedicated packet access 128 dedicated PAD access */
|
||||
} HRilSimClock;
|
||||
|
||||
/* From 3GPP TS 27.007 7.5 */
|
||||
@ -129,16 +128,12 @@ typedef struct {
|
||||
} HRilPinInputTimes;
|
||||
|
||||
typedef struct {
|
||||
int32_t phase;
|
||||
int32_t protocol;
|
||||
int32_t slotId;
|
||||
} HRilSimProtocolRequest;
|
||||
|
||||
typedef struct {
|
||||
int32_t phase;
|
||||
int32_t result;
|
||||
int32_t slotId;
|
||||
} HRilSimProtocolResponse;
|
||||
int32_t sessionId;
|
||||
HRilRadioProtocolPhase phase;
|
||||
int32_t technology;
|
||||
int32_t modemId;
|
||||
HRilRadioProtocolStatus status;
|
||||
} HRilRadioProtocol;
|
||||
|
||||
typedef struct {
|
||||
int32_t channelId;
|
||||
@ -174,7 +169,8 @@ typedef struct {
|
||||
void (*SimStkSendEnvelope)(const ReqDataInfo *requestInfo, const char *strCmd);
|
||||
void (*SimStkSendCallSetupRequestResult)(const ReqDataInfo *requestInfo, int32_t accept);
|
||||
void (*SimStkIsReady)(const ReqDataInfo *requestInfo);
|
||||
void (*SetRadioProtocol)(const ReqDataInfo *requestInfo, const HRilSimProtocolRequest *data, size_t dataLen);
|
||||
void (*GetRadioProtocol)(const ReqDataInfo *requestInfo);
|
||||
void (*SetRadioProtocol)(const ReqDataInfo *requestInfo, const HRilRadioProtocol *data);
|
||||
void (*SimOpenLogicalChannel)(const ReqDataInfo *requestInfo, const char *appID, int32_t p2);
|
||||
void (*SimCloseLogicalChannel)(const ReqDataInfo *requestInfo, int32_t channelId);
|
||||
void (*SimTransmitApduLogicalChannel)(const ReqDataInfo *requestInfo, HRilApduSimIO *data, size_t dataLen);
|
||||
|
@ -156,8 +156,8 @@ public:
|
||||
int32_t SimStkSendEnvelope(int32_t slotId, int32_t serialId, const std::string &strCmd);
|
||||
int32_t SimStkSendCallSetupRequestResult(int32_t slotId, int32_t serialId, int32_t accept);
|
||||
int32_t SimStkIsReady(int32_t slotId, int32_t serialId);
|
||||
int32_t SetRadioProtocol(
|
||||
int32_t slotId, int32_t serialId, const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol);
|
||||
int32_t GetRadioProtocol(int32_t slotId, int32_t serialId);
|
||||
int32_t SetRadioProtocol(int32_t slotId, int32_t serialId, const HDI::Ril::V1_0::IRadioProtocol &radioProtocol);
|
||||
int32_t SimOpenLogicalChannel(int32_t slotId, int32_t serialId, const std::string &appID, int32_t p2);
|
||||
int32_t SimCloseLogicalChannel(int32_t slotId, int32_t serialId, int32_t channelId);
|
||||
int32_t SimTransmitApduLogicalChannel(
|
||||
@ -181,7 +181,6 @@ public:
|
||||
int32_t GetCurrentCellInfo(int32_t slotId, int32_t serialId);
|
||||
int32_t SetPreferredNetwork(int32_t slotId, int32_t serialId, int32_t preferredNetworkType);
|
||||
int32_t GetPreferredNetwork(int32_t slotId, int32_t serialId);
|
||||
int32_t GetRadioCapability(int32_t slotId, int32_t serialId);
|
||||
int32_t GetPhysicalChannelConfig(int32_t slotId, int32_t serialId);
|
||||
int32_t SetLocateUpdates(int32_t slotId, int32_t serialId, const HDI::Ril::V1_0::IHRilRegNotifyMode mode);
|
||||
int32_t SetNotificationFilter(int32_t slotId, int32_t serialId, int32_t newFilter);
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
int32_t SetNetworkSelectionMode(int32_t serialId, const HDI::Ril::V1_0::ISetNetworkModeInfo &networkModeInfo);
|
||||
int32_t SetPreferredNetwork(int32_t serialId, int32_t preferredNetworkType);
|
||||
int32_t GetPreferredNetwork(int32_t serialId);
|
||||
int32_t GetRadioCapability(int32_t serialId);
|
||||
int32_t GetPhysicalChannelConfig(int32_t serialId);
|
||||
int32_t SetLocateUpdates(int32_t serialId, const HDI::Ril::V1_0::IHRilRegNotifyMode mode);
|
||||
int32_t SetNotificationFilter(int32_t serialId, int32_t newFilter);
|
||||
@ -61,8 +60,6 @@ public:
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t GetPreferredNetworkResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t GetRadioCapabilityResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t GetNeighboringCellInfoListResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t GetCurrentCellInfoResponse(
|
||||
|
@ -47,7 +47,8 @@ public:
|
||||
int32_t SimStkSendEnvelope(int32_t serialId, const std::string &strCmd);
|
||||
int32_t SimStkSendCallSetupRequestResult(int32_t serialId, int32_t accept);
|
||||
int32_t SimStkIsReady(int32_t serialId);
|
||||
int32_t SetRadioProtocol(int32_t serialId, const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol);
|
||||
int32_t GetRadioProtocol(int32_t serialId);
|
||||
int32_t SetRadioProtocol(int32_t serialId, const HDI::Ril::V1_0::IRadioProtocol &radioProtocol);
|
||||
int32_t SimOpenLogicalChannel(int32_t serialId, const std::string &appID, int32_t p2);
|
||||
int32_t SimCloseLogicalChannel(int32_t serialId, int32_t channelId);
|
||||
int32_t SimTransmitApduLogicalChannel(
|
||||
@ -89,6 +90,8 @@ private:
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t SimStkIsReadyResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t GetRadioProtocolResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t SetRadioProtocolResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen);
|
||||
int32_t SimOpenLogicalChannelResponse(
|
||||
@ -114,6 +117,8 @@ private:
|
||||
int32_t SimStkEventNotify(int32_t notifyType, const HRilErrNumber e, const void *response, size_t responseLen);
|
||||
int32_t SimStkCallSetupNotify(int32_t notifyType, const HRilErrNumber e, const void *response, size_t responseLen);
|
||||
int32_t SimRefreshNotify(int32_t notifyType, const HRilErrNumber e, const void *response, size_t responseLen);
|
||||
int32_t SimRadioProtocolUpdated(
|
||||
int32_t notifyType, const HRilErrNumber e, const void *response, size_t responseLen);
|
||||
|
||||
private:
|
||||
bool IsSimResponse(uint32_t code);
|
||||
@ -123,8 +128,6 @@ private:
|
||||
std::unique_ptr<HRilSimClock> &rilSimLock, const OHOS::HDI::Ril::V1_0::ISimLockInfo &simLockInfo);
|
||||
void CopyToHRilSimPassword(
|
||||
std::unique_ptr<HRilSimPassword> &rilSimPassword, const OHOS::HDI::Ril::V1_0::ISimPasswordInfo &simPassword);
|
||||
void CopyToHRilSimProtocolRequest(std::unique_ptr<HRilSimProtocolRequest> &hRilSimProtocolRequest,
|
||||
const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol);
|
||||
void CopyToHRilApduSimIO(
|
||||
std::unique_ptr<HRilApduSimIO> &rilApduSimIO, const OHOS::HDI::Ril::V1_0::IApduSimIORequestInfo &apduSimIO);
|
||||
void CopyToHRilSimAuthentication(std::unique_ptr<HRilSimAuthenticationRequestInfo> &rilSimAuthInfo,
|
||||
@ -135,7 +138,9 @@ private:
|
||||
int32_t BuildSimIOResp(HDI::Ril::V1_0::IIccIoResultInfo &result, HRilRadioResponseInfo &responseInfo,
|
||||
const void *response, size_t responseLen);
|
||||
int32_t CheckCharData(const void *response, size_t responseLen);
|
||||
void BuildRadioProtocol(HDI::Ril::V1_0::IRadioProtocol &radioProtocol, const void *response);
|
||||
|
||||
private:
|
||||
const HRilSimReq *simFuncs_ = nullptr;
|
||||
};
|
||||
} // namespace Telephony
|
||||
|
@ -763,10 +763,15 @@ int32_t HRilManager::SimStkIsReady(int32_t slotId, int32_t serialId)
|
||||
return TaskSchedule(MODULE_HRIL_SIM, hrilSim_[slotId], &HRilSim::SimStkIsReady, serialId);
|
||||
}
|
||||
|
||||
int32_t HRilManager::SetRadioProtocol(
|
||||
int32_t slotId, int32_t serialId, const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol)
|
||||
int32_t HRilManager::GetRadioProtocol(int32_t slotId, int32_t serialId)
|
||||
{
|
||||
return TaskSchedule(MODULE_HRIL_SIM, hrilSim_[slotId], &HRilSim::SetRadioProtocol, serialId, protocol);
|
||||
return TaskSchedule(MODULE_HRIL_SIM, hrilSim_[slotId], &HRilSim::GetRadioProtocol, serialId);
|
||||
}
|
||||
|
||||
int32_t HRilManager::SetRadioProtocol(
|
||||
int32_t slotId, int32_t serialId, const HDI::Ril::V1_0::IRadioProtocol &radioProtocol)
|
||||
{
|
||||
return TaskSchedule(MODULE_HRIL_SIM, hrilSim_[slotId], &HRilSim::SetRadioProtocol, serialId, radioProtocol);
|
||||
}
|
||||
|
||||
int32_t HRilManager::SimOpenLogicalChannel(int32_t slotId, int32_t serialId, const std::string &appID, int32_t p2)
|
||||
@ -862,11 +867,6 @@ int32_t HRilManager::GetPreferredNetwork(int32_t slotId, int32_t serialId)
|
||||
return TaskSchedule(MODULE_HRIL_NETWORK, hrilNetwork_[slotId], &HRilNetwork::GetPreferredNetwork, serialId);
|
||||
}
|
||||
|
||||
int32_t HRilManager::GetRadioCapability(int32_t slotId, int32_t serialId)
|
||||
{
|
||||
return TaskSchedule(MODULE_HRIL_NETWORK, hrilNetwork_[slotId], &HRilNetwork::GetRadioCapability, serialId);
|
||||
}
|
||||
|
||||
int32_t HRilManager::GetPhysicalChannelConfig(int32_t slotId, int32_t serialId)
|
||||
{
|
||||
return TaskSchedule(MODULE_HRIL_NETWORK, hrilNetwork_[slotId], &HRilNetwork::GetPhysicalChannelConfig, serialId);
|
||||
|
@ -53,7 +53,6 @@ void HRilNetwork::AddHandlerToMap()
|
||||
respMemberFuncMap_[HREQ_NETWORK_GET_PREFERRED_NETWORK] = &HRilNetwork::GetPreferredNetworkResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_GET_NEIGHBORING_CELLINFO_LIST] = &HRilNetwork::GetNeighboringCellInfoListResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_GET_CURRENT_CELL_INFO] = &HRilNetwork::GetCurrentCellInfoResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_GET_RADIO_CAPABILITY] = &HRilNetwork::GetRadioCapabilityResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG] = &HRilNetwork::GetPhysicalChannelConfigResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_SET_LOCATE_UPDATES] = &HRilNetwork::SetLocateUpdatesResponse;
|
||||
respMemberFuncMap_[HREQ_NETWORK_SET_NOTIFICATION_FILTER] = &HRilNetwork::SetNotificationFilterResponse;
|
||||
@ -127,12 +126,6 @@ int32_t HRilNetwork::GetPreferredNetwork(int32_t serialId)
|
||||
&HRilNetworkReq::GetPreferredNetwork);
|
||||
}
|
||||
|
||||
int32_t HRilNetwork::GetRadioCapability(int32_t serialId)
|
||||
{
|
||||
return RequestVendor(
|
||||
serialId, HREQ_NETWORK_GET_RADIO_CAPABILITY, networkFuncs_, &HRilNetworkReq::GetRadioCapability);
|
||||
}
|
||||
|
||||
int32_t HRilNetwork::GetPhysicalChannelConfig(int32_t serialId)
|
||||
{
|
||||
return RequestVendor(serialId, HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG, networkFuncs_,
|
||||
@ -314,20 +307,6 @@ int32_t HRilNetwork::GetPreferredNetworkResponse(
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::GetPreferredNetworkResponse, preferredNetworkTypeInfo);
|
||||
}
|
||||
|
||||
int32_t HRilNetwork::GetRadioCapabilityResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
|
||||
{
|
||||
if (response == nullptr || responseLen != sizeof(HRilRadioCapability)) {
|
||||
TELEPHONY_LOGE("GetRadioCapabilityResponse response is invalid");
|
||||
return HRIL_ERR_INVALID_PARAMETER;
|
||||
}
|
||||
HDI::Ril::V1_0::IRadioCapabilityInfo radioCapabilityInfo = {};
|
||||
const HRilRadioCapability *hRilRadioCapability = static_cast<const HRilRadioCapability *>(response);
|
||||
radioCapabilityInfo.ratFamily = hRilRadioCapability->ratFamily;
|
||||
radioCapabilityInfo.modemId = hRilRadioCapability->modemId;
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::GetRadioCapabilityResponse, radioCapabilityInfo);
|
||||
}
|
||||
|
||||
int32_t HRilNetwork::GetNeighboringCellInfoListResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
|
||||
{
|
||||
|
@ -54,7 +54,8 @@ void HRilSim::AddHandlerToMap()
|
||||
respMemberFuncMap_[HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT] =
|
||||
&HRilSim::SimStkSendCallSetupRequestResultResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_STK_IS_READY] = &HRilSim::SimStkIsReadyResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_RADIO_PROTOCOL] = &HRilSim::SetRadioProtocolResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_GET_RADIO_PROTOCOL] = &HRilSim::GetRadioProtocolResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_SET_RADIO_PROTOCOL] = &HRilSim::SetRadioProtocolResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_OPEN_LOGICAL_CHANNEL] = &HRilSim::SimOpenLogicalChannelResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_CLOSE_LOGICAL_CHANNEL] = &HRilSim::SimCloseLogicalChannelResponse;
|
||||
respMemberFuncMap_[HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL] = &HRilSim::SimTransmitApduLogicalChannelResponse;
|
||||
@ -78,7 +79,7 @@ void HRilSim::AddHandlerToMap()
|
||||
reqMemberFuncMap_[HREQ_SIM_STK_SEND_ENVELOPE] = &HRilSim::SimStkSendEnvelope;
|
||||
reqMemberFuncMap_[HREQ_SIM_STK_SEND_CALL_SETUP_REQUEST_RESULT] = &HRilSim::SimStkSendCallSetupRequestResult;
|
||||
reqMemberFuncMap_[HREQ_SIM_STK_IS_READY] = &HRilSim::SimStkIsReady;
|
||||
reqMemberFuncMap_[HREQ_SIM_RADIO_PROTOCOL] = &HRilSim::SetRadioProtocol;
|
||||
reqMemberFuncMap_[HREQ_SIM_SET_RADIO_PROTOCOL] = &HRilSim::SetRadioProtocol;
|
||||
reqMemberFuncMap_[HREQ_SIM_OPEN_LOGICAL_CHANNEL] = &HRilSim::SimOpenLogicalChannel;
|
||||
reqMemberFuncMap_[HREQ_SIM_CLOSE_LOGICAL_CHANNEL] = &HRilSim::SimCloseLogicalChannel;
|
||||
reqMemberFuncMap_[HREQ_SIM_TRANSMIT_APDU_LOGICAL_CHANNEL] = &HRilSim::SimTransmitApduLogicalChannel;
|
||||
@ -97,6 +98,7 @@ void HRilSim::AddNotificationHandlerToMap()
|
||||
notiMemberFuncMap_[HNOTI_SIM_STK_EVENT_NOTIFY] = &HRilSim::SimStkEventNotify;
|
||||
notiMemberFuncMap_[HNOTI_SIM_STK_CALL_SETUP_NOTIFY] = &HRilSim::SimStkCallSetupNotify;
|
||||
notiMemberFuncMap_[HNOTI_SIM_REFRESH_NOTIFY] = &HRilSim::SimRefreshNotify;
|
||||
notiMemberFuncMap_[HNOTI_SIM_RADIO_PROTOCOL_UPDATED] = &HRilSim::SimRadioProtocolUpdated;
|
||||
}
|
||||
|
||||
int32_t HRilSim::GetSimIO(int32_t serialId, const OHOS::HDI::Ril::V1_0::ISimIoRequestInfo &simIO)
|
||||
@ -226,12 +228,26 @@ int32_t HRilSim::SimStkIsReady(int32_t serialId)
|
||||
return RequestVendor(serialId, HREQ_SIM_STK_IS_READY, simFuncs_, &HRilSimReq::SimStkIsReady);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SetRadioProtocol(int32_t serialId, const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol)
|
||||
int32_t HRilSim::GetRadioProtocol(int32_t serialId)
|
||||
{
|
||||
std::unique_ptr<HRilSimProtocolRequest> hRilSimProtocolRequest = std::make_unique<HRilSimProtocolRequest>();
|
||||
CopyToHRilSimProtocolRequest(hRilSimProtocolRequest, protocol);
|
||||
return RequestVendor(serialId, HREQ_SIM_RADIO_PROTOCOL, simFuncs_, &HRilSimReq::SetRadioProtocol,
|
||||
hRilSimProtocolRequest.get(), sizeof(*hRilSimProtocolRequest));
|
||||
TELEPHONY_LOGI("HRilSim::GetRadioProtocol slotId:%{public}d", GetSlotId());
|
||||
return RequestVendor(serialId, HREQ_SIM_GET_RADIO_PROTOCOL, simFuncs_, &HRilSimReq::GetRadioProtocol);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SetRadioProtocol(int32_t serialId, const HDI::Ril::V1_0::IRadioProtocol &radioProtocol)
|
||||
{
|
||||
HRilRadioProtocol hrilRadioProtocol = {};
|
||||
hrilRadioProtocol.sessionId = radioProtocol.sessionId;
|
||||
hrilRadioProtocol.phase = static_cast<HRilRadioProtocolPhase>(radioProtocol.phase);
|
||||
hrilRadioProtocol.technology = radioProtocol.technology;
|
||||
hrilRadioProtocol.modemId = radioProtocol.modemId;
|
||||
hrilRadioProtocol.status = static_cast<HRilRadioProtocolStatus>(radioProtocol.status);
|
||||
TELEPHONY_LOGI("HRilSim::SetRadioProtocol slotId:%{public}d, serialId:%{public}d"
|
||||
"sessionId:%{public}d, phase:%{public}d, technology:%{public}d, modemId:%{public}d, status:%{public}d",
|
||||
GetSlotId(), serialId, hrilRadioProtocol.sessionId, hrilRadioProtocol.phase, hrilRadioProtocol.technology,
|
||||
hrilRadioProtocol.modemId, hrilRadioProtocol.status);
|
||||
return RequestVendor(serialId, HREQ_SIM_SET_RADIO_PROTOCOL, simFuncs_,
|
||||
&HRilSimReq::SetRadioProtocol, &hrilRadioProtocol);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SimOpenLogicalChannel(int32_t serialId, const std::string &appID, int32_t p2)
|
||||
@ -431,19 +447,42 @@ int32_t HRilSim::SimStkIsReadyResponse(
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::SimStkIsReadyResponse);
|
||||
}
|
||||
|
||||
int32_t HRilSim::GetRadioProtocolResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
|
||||
{
|
||||
HDI::Ril::V1_0::IRadioProtocol radioProtocol = {};
|
||||
if (response == nullptr || responseLen != sizeof(HRilRadioProtocol)) {
|
||||
TELEPHONY_LOGE("GetRadioProtocolResponse response is invalid");
|
||||
if (responseInfo.error == HRilErrType::NONE) {
|
||||
responseInfo.error = HRilErrType::HRIL_ERR_INVALID_RESPONSE;
|
||||
}
|
||||
} else {
|
||||
BuildRadioProtocol(radioProtocol, response);
|
||||
TELEPHONY_LOGI("HRilSim::GetRadioProtocolResponse slotId:%{public}d, serial:%{public}d"
|
||||
"sessionId:%{public}d, phase:%{public}d, technology:%{public}d, modemId:%{public}d, status:%{public}d",
|
||||
GetSlotId(), responseInfo.serial, radioProtocol.sessionId, radioProtocol.phase, radioProtocol.technology,
|
||||
radioProtocol.modemId, radioProtocol.status);
|
||||
}
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::GetRadioProtocolResponse, radioProtocol);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SetRadioProtocolResponse(
|
||||
int32_t requestNum, HRilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
|
||||
{
|
||||
HDI::Ril::V1_0::ISimProtocolResponse pSimProtocol = {};
|
||||
if (response == nullptr || responseLen != sizeof(HRilSimProtocolResponse)) {
|
||||
TELEPHONY_LOGE("Invalid response: response is nullptr");
|
||||
return HRIL_ERR_INVALID_PARAMETER;
|
||||
HDI::Ril::V1_0::IRadioProtocol radioProtocol = {};
|
||||
if (response == nullptr || responseLen != sizeof(HRilRadioProtocol)) {
|
||||
TELEPHONY_LOGE("SetRadioProtocolResponse response is invalid");
|
||||
if (responseInfo.error == HRilErrType::NONE) {
|
||||
responseInfo.error = HRilErrType::HRIL_ERR_INVALID_RESPONSE;
|
||||
}
|
||||
} else {
|
||||
BuildRadioProtocol(radioProtocol, response);
|
||||
TELEPHONY_LOGI("HRilSim::SetRadioProtocolResponse slotId:%{public}d, serial:%{public}d"
|
||||
"sessionId:%{public}d, phase:%{public}d, technology:%{public}d, modemId:%{public}d, status:%{public}d",
|
||||
GetSlotId(), responseInfo.serial, radioProtocol.sessionId, radioProtocol.phase, radioProtocol.technology,
|
||||
radioProtocol.modemId, radioProtocol.status);
|
||||
}
|
||||
const HRilSimProtocolResponse *pSimProtocolResponse = static_cast<const HRilSimProtocolResponse *>(response);
|
||||
pSimProtocol.phase = pSimProtocolResponse->phase;
|
||||
pSimProtocol.result = pSimProtocolResponse->result;
|
||||
pSimProtocol.slotId = pSimProtocolResponse->slotId;
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::SetRadioProtocolResponse, pSimProtocol);
|
||||
return Response(responseInfo, &HDI::Ril::V1_0::IRilCallback::SetRadioProtocolResponse, radioProtocol);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SimOpenLogicalChannelResponse(
|
||||
@ -580,6 +619,22 @@ int32_t HRilSim::SimRefreshNotify(int32_t notifyType, const HRilErrNumber e, con
|
||||
return Notify(&HDI::Ril::V1_0::IRilCallback::SimRefreshNotify);
|
||||
}
|
||||
|
||||
int32_t HRilSim::SimRadioProtocolUpdated(
|
||||
int32_t notifyType, const HRilErrNumber e, const void *response, size_t responseLen)
|
||||
{
|
||||
if (response == nullptr || responseLen != sizeof(HRilRadioProtocol)) {
|
||||
TELEPHONY_LOGE("SimRadioProtocolUpdated response is invalid");
|
||||
return HRIL_ERR_INVALID_PARAMETER;
|
||||
}
|
||||
HDI::Ril::V1_0::IRadioProtocol radioProtocol = {};
|
||||
BuildRadioProtocol(radioProtocol, response);
|
||||
TELEPHONY_LOGI("SimRadioProtocolUpdated slotId:%{public}d, sessionId:%{public}d, phase:%{public}d, "
|
||||
"technology:%{public}d, modemId:%{public}d, status:%{public}d",
|
||||
radioProtocol.slotId, radioProtocol.sessionId, static_cast<int32_t>(radioProtocol.phase),
|
||||
radioProtocol.technology, radioProtocol.modemId, static_cast<int32_t>(radioProtocol.status));
|
||||
return Notify(&HDI::Ril::V1_0::IRilCallback::SimRadioProtocolUpdated, radioProtocol);
|
||||
}
|
||||
|
||||
bool HRilSim::IsSimResponse(uint32_t code)
|
||||
{
|
||||
return ((code >= HREQ_SIM_BASE) && (code < HREQ_DATA_BASE));
|
||||
@ -626,14 +681,6 @@ void HRilSim::CopyToHRilSimPassword(
|
||||
rilSimPassword->passwordLength = simPassword.passwordLength;
|
||||
}
|
||||
|
||||
void HRilSim::CopyToHRilSimProtocolRequest(std::unique_ptr<HRilSimProtocolRequest> &hRilSimProtocolRequest,
|
||||
const OHOS::HDI::Ril::V1_0::ISimProtocolRequest &protocol)
|
||||
{
|
||||
hRilSimProtocolRequest->phase = protocol.phase;
|
||||
hRilSimProtocolRequest->protocol = protocol.protocol;
|
||||
hRilSimProtocolRequest->slotId = protocol.slotId;
|
||||
}
|
||||
|
||||
void HRilSim::CopyToHRilApduSimIO(
|
||||
std::unique_ptr<HRilApduSimIO> &rilApduSimIO, const OHOS::HDI::Ril::V1_0::IApduSimIORequestInfo &apduSimIO)
|
||||
{
|
||||
@ -694,6 +741,7 @@ int32_t HRilSim::BuildSimIOResp(HDI::Ril::V1_0::IIccIoResultInfo &result, HRilRa
|
||||
result = ProcessIccIoResponse(responseInfo, response, responseLen);
|
||||
return HRIL_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t HRilSim::CheckCharData(const void *response, size_t responseLen)
|
||||
{
|
||||
if ((response == nullptr && responseLen != 0) || (responseLen % sizeof(char)) != 0) {
|
||||
@ -706,5 +754,16 @@ int32_t HRilSim::CheckCharData(const void *response, size_t responseLen)
|
||||
}
|
||||
return HRIL_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
void HRilSim::BuildRadioProtocol(HDI::Ril::V1_0::IRadioProtocol &radioProtocol, const void *response)
|
||||
{
|
||||
const HRilRadioProtocol *hrilRadioProtocol = static_cast<const HRilRadioProtocol *>(response);
|
||||
radioProtocol.slotId = GetSlotId();
|
||||
radioProtocol.sessionId = hrilRadioProtocol->sessionId;
|
||||
radioProtocol.phase = static_cast<HDI::Ril::V1_0::IRadioProtocolPhase>(hrilRadioProtocol->phase);
|
||||
radioProtocol.technology = hrilRadioProtocol->technology;
|
||||
radioProtocol.modemId = hrilRadioProtocol->modemId;
|
||||
radioProtocol.status = static_cast<HDI::Ril::V1_0::IRadioProtocolStatus>(hrilRadioProtocol->status);
|
||||
}
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
1
services/vendor/include/at_network.h
vendored
1
services/vendor/include/at_network.h
vendored
@ -66,7 +66,6 @@ void ReqGetCurrentCellInfo(const ReqDataInfo *requestInfo);
|
||||
void ReqGetNetworkSearchInformation(const ReqDataInfo *requestInfo);
|
||||
void ReqGetNetworkSelectionMode(const ReqDataInfo *requestInfo);
|
||||
void ReqSetNetworkSelectionMode(const ReqDataInfo *requestInfo, const HRilSetNetworkModeInfo *data);
|
||||
void ReqGetRadioCapability(const ReqDataInfo *requestInfo);
|
||||
void ReqSetPreferredNetwork(const ReqDataInfo *requestInfo, const int32_t *data);
|
||||
void ReqGetPreferredNetwork(const ReqDataInfo *requestInfo);
|
||||
void ReqGetPhysicalChannelConfig(const ReqDataInfo *requestInfo);
|
||||
|
3
services/vendor/include/at_sim.h
vendored
3
services/vendor/include/at_sim.h
vendored
@ -101,7 +101,8 @@ void ReqSimStkSendTerminalResponse(const ReqDataInfo *requestInfo, const char *s
|
||||
void ReqSimStkSendEnvelope(const ReqDataInfo *requestInfo, const char *strCmd);
|
||||
void ReqSimStkSendCallSetupRequestResult(const ReqDataInfo *requestInfo, int32_t accept);
|
||||
void ReqSimStkIsReady(const ReqDataInfo *requestInfo);
|
||||
void ReqSetRadioProtocol(const ReqDataInfo *requestInfo, const HRilSimProtocolRequest *data, size_t dataLen);
|
||||
void ReqGetRadioProtocol(const ReqDataInfo *requestInfo);
|
||||
void ReqSetRadioProtocol(const ReqDataInfo *requestInfo, const HRilRadioProtocol *data);
|
||||
void ReqSimOpenLogicalChannel(const ReqDataInfo *requestInfo, const char *appID, int32_t p2);
|
||||
void ReqSimCloseLogicalChannel(const ReqDataInfo *requestInfo, int32_t channelId);
|
||||
void ReqSimTransmitApduLogicalChannel(const ReqDataInfo *requestInfo, HRilApduSimIO *data, size_t dataLen);
|
||||
|
18
services/vendor/src/at_network.c
vendored
18
services/vendor/src/at_network.c
vendored
@ -1836,24 +1836,6 @@ void ReqGetPreferredNetwork(const ReqDataInfo *requestInfo)
|
||||
ResponseNetworkReport(requestInfo->slotId, requestInfo, HRIL_ERR_SUCCESS, &respDataAck);
|
||||
}
|
||||
|
||||
static HRilRadioCapability *GetRadioCapability(void)
|
||||
{
|
||||
static HRilRadioCapability hRilRadioCapability = {0};
|
||||
return &hRilRadioCapability;
|
||||
}
|
||||
|
||||
void ReqGetRadioCapability(const ReqDataInfo *requestInfo)
|
||||
{
|
||||
int32_t err = HRIL_ERR_SUCCESS;
|
||||
struct ReportInfo reportInfo;
|
||||
TELEPHONY_LOGE("ReqGetRadioCapability before ratFamily:%{public}d", GetRadioCapability()->ratFamily);
|
||||
GetRadioCapability()->ratFamily = RAF_AUTO;
|
||||
TELEPHONY_LOGE("ReqGetRadioCapability OnNetworkReport ");
|
||||
reportInfo = CreateReportInfo(requestInfo, err, HRIL_RESPONSE, 0);
|
||||
OnNetworkReport(
|
||||
requestInfo->slotId, reportInfo, (const uint8_t *)GetRadioCapability(), sizeof(HRilRadioCapability));
|
||||
}
|
||||
|
||||
void ProcessPhyChnlCfgNotify(struct ReportInfo reportInfo, char *srcStr)
|
||||
{
|
||||
int32_t contextIds[] = { 7, 8, 9 };
|
||||
|
67
services/vendor/src/at_sim.c
vendored
67
services/vendor/src/at_sim.c
vendored
@ -15,6 +15,7 @@
|
||||
|
||||
#include "at_sim.h"
|
||||
|
||||
#include "hril_notification.h"
|
||||
#include "securec.h"
|
||||
|
||||
#include "vendor_adapter.h"
|
||||
@ -1031,42 +1032,40 @@ void ReqSimStkIsReady(const ReqDataInfo *requestInfo)
|
||||
FreeResponseInfo(pResponse);
|
||||
}
|
||||
|
||||
void ReqSetRadioProtocol(const ReqDataInfo *requestInfo, const HRilSimProtocolRequest *data, size_t dataLen)
|
||||
void ReqGetRadioProtocol(const ReqDataInfo *requestInfo)
|
||||
{
|
||||
ResponseInfo *pResponse = NULL;
|
||||
HRilSimProtocolResponse simResponse = {0};
|
||||
HRilSimProtocolRequest *pSim = (HRilSimProtocolRequest *)data;
|
||||
if (pSim == NULL || dataLen == 0) {
|
||||
struct ReportInfo reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_INVALID_RESPONSE, HRIL_RESPONSE, 0);
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, NULL, 0);
|
||||
FreeResponseInfo(pResponse);
|
||||
return;
|
||||
}
|
||||
if (simResponse.phase == 0) {
|
||||
simResponse.phase = pSim->phase;
|
||||
simResponse.result = 0;
|
||||
simResponse.slotId = pSim->slotId;
|
||||
} else {
|
||||
simResponse.phase = pSim->phase;
|
||||
simResponse.result = 1;
|
||||
simResponse.slotId = pSim->slotId;
|
||||
}
|
||||
int32_t ret = SendCommandLock("AT+SPTESTMODE", "+SPTESTMODE", 0, &pResponse);
|
||||
if (ret != 0 || (pResponse != NULL && !pResponse->success)) {
|
||||
TELEPHONY_LOGE("AT+SPTESTMODE send failed");
|
||||
if (pResponse && pResponse->result) {
|
||||
ret = HRIL_ERR_SUCCESS;
|
||||
} else {
|
||||
ret = HRIL_ERR_GENERIC_FAILURE;
|
||||
}
|
||||
struct ReportInfo reportInfo = CreateReportInfo(requestInfo, ret, HRIL_RESPONSE, 0);
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, NULL, 0);
|
||||
FreeResponseInfo(pResponse);
|
||||
return;
|
||||
}
|
||||
TELEPHONY_LOGI("ReqGetRadioProtocol");
|
||||
struct ReportInfo reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_SUCCESS, HRIL_RESPONSE, 0);
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, (const uint8_t *)&simResponse, sizeof(simResponse));
|
||||
FreeResponseInfo(pResponse);
|
||||
HRilRadioProtocol radioProtocol = {};
|
||||
radioProtocol.sessionId = 0;
|
||||
radioProtocol.phase = HRIL_RADIO_PROTOCOL_PHASE_INITIAL;
|
||||
radioProtocol.technology = HRIL_RADIO_PROTOCOL_TECH_LTE;
|
||||
radioProtocol.modemId = 0;
|
||||
radioProtocol.status = HRIL_RADIO_PROTOCOL_STATUS_NONE;
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, (const uint8_t *)&radioProtocol, sizeof(HRilRadioProtocol));
|
||||
}
|
||||
|
||||
void ReqSetRadioProtocol(const ReqDataInfo *requestInfo, const HRilRadioProtocol *data)
|
||||
{
|
||||
HRilRadioProtocol *radioProtocol = (HRilRadioProtocol *)data;
|
||||
struct ReportInfo reportInfo = { 0 };
|
||||
if (radioProtocol == NULL) {
|
||||
reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_INVALID_RESPONSE, HRIL_RESPONSE, 0);
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (radioProtocol->phase != HRIL_RADIO_PROTOCOL_PHASE_UPDATE) {
|
||||
reportInfo = CreateReportInfo(requestInfo, HRIL_ERR_SUCCESS, HRIL_RESPONSE, 0);
|
||||
OnSimReport(GetSlotId(requestInfo), reportInfo, (const uint8_t *)radioProtocol, sizeof(HRilRadioProtocol));
|
||||
return;
|
||||
}
|
||||
radioProtocol->phase = HRIL_RADIO_PROTOCOL_PHASE_NOTIFY;
|
||||
radioProtocol->status = HRIL_RADIO_PROTOCOL_STATUS_SUCCESS;
|
||||
reportInfo.error = HRIL_ERR_SUCCESS;
|
||||
reportInfo.type = HRIL_NOTIFICATION;
|
||||
reportInfo.notifyId = HNOTI_SIM_RADIO_PROTOCOL_UPDATED;
|
||||
OnSimReport(GetSlotId(NULL), reportInfo, (const uint8_t *)radioProtocol, sizeof(HRilRadioProtocol));
|
||||
}
|
||||
|
||||
void ReqSimOpenLogicalChannel(const ReqDataInfo *requestInfo, const char *appID, int32_t p2)
|
||||
|
2
services/vendor/src/vendor_adapter.c
vendored
2
services/vendor/src/vendor_adapter.c
vendored
@ -109,6 +109,7 @@ static const HRilSimReq g_simReqOps = {
|
||||
.SimStkSendEnvelope = ReqSimStkSendEnvelope,
|
||||
.SimStkSendCallSetupRequestResult = ReqSimStkSendCallSetupRequestResult,
|
||||
.SimStkIsReady = ReqSimStkIsReady,
|
||||
.GetRadioProtocol = ReqGetRadioProtocol,
|
||||
.SetRadioProtocol = ReqSetRadioProtocol,
|
||||
.SimOpenLogicalChannel = ReqSimOpenLogicalChannel,
|
||||
.SimCloseLogicalChannel = ReqSimCloseLogicalChannel,
|
||||
@ -147,7 +148,6 @@ static const HRilNetworkReq g_networkReqOps = {
|
||||
.GetPreferredNetwork = ReqGetPreferredNetwork,
|
||||
.GetNeighboringCellInfoList = ReqGetNeighboringCellInfoList,
|
||||
.GetCurrentCellInfo = ReqGetCurrentCellInfo,
|
||||
.GetRadioCapability = ReqGetRadioCapability,
|
||||
.GetPhysicalChannelConfig = ReqGetPhysicalChannelConfig,
|
||||
.SetLocateUpdates = ReqSetLocateUpdates,
|
||||
.SetNotificationFilter = ReqSetNotificationFilter,
|
||||
|
@ -114,7 +114,6 @@ public:
|
||||
void SetDeviceState(int32_t deviceStateType, bool deviceStateOn, const AppExecFwk::InnerEvent::Pointer &result);
|
||||
void SetNetworkSelectionMode(int32_t mode, std::string plmn, const AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetPhysicalChannelConfig(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
void GetRadioCapability(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
void ShutDown(const AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetMeid(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
void GetVoiceRadioTechnology(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
|
@ -75,7 +75,6 @@ public:
|
||||
void OnRequestSetDeviceStateTest(OHOS::MessageParcel &data);
|
||||
void OnRequestGetPreferredNetworkTypeInfoTest(OHOS::MessageParcel &data);
|
||||
void OnResponseGetPhysicalChannelConfig(OHOS::MessageParcel &data);
|
||||
void OnResponseGetRadioCapability(OHOS::MessageParcel &data);
|
||||
void OnRequestGetMeidTest(OHOS::MessageParcel &data);
|
||||
void OnRequestGetModemVoiceRadioTest(OHOS::MessageParcel &data);
|
||||
void OnRequestGetBasebandVersionTest(OHOS::MessageParcel &data);
|
||||
@ -94,10 +93,11 @@ public:
|
||||
void OnResponseSendEnvelopeCmd(OHOS::MessageParcel &data);
|
||||
void OnResponseSendCallSetupRequestResult(OHOS::MessageParcel &data);
|
||||
void OnResponseSimStkIsReady(OHOS::MessageParcel &data);
|
||||
void PrintResponseInfo(const struct HRilRadioResponseInfo *rspInfo);
|
||||
|
||||
private:
|
||||
RilManagerTest *mRilManager_;
|
||||
};
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_RIL_RADIO_RESPONSE_test_H
|
||||
#endif // OHOS_RIL_RADIO_RESPONSE_test_H
|
||||
|
@ -80,7 +80,6 @@ public:
|
||||
void GetRilNetworkSelectionModeTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetRilPreferredNetwrokTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetPhysicalChannelConfigTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetRilRadioCapabilityTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetRilImeiTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void ShutDownTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetMeidTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
|
@ -90,7 +90,6 @@ public:
|
||||
int32_t GetNetworkSelectionMode(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
int32_t SetNetworkSelectionMode(int32_t mode, std::string plmn, const AppExecFwk::InnerEvent::Pointer &result);
|
||||
int32_t GetPhysicalChannelConfig(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
int32_t GetRadioCapability(const AppExecFwk::InnerEvent::Pointer &response);
|
||||
int32_t SetDeviceState(int32_t deviceStateType, bool deviceStateOn, const AppExecFwk::InnerEvent::Pointer &result);
|
||||
int32_t SendSms(std::string smscPdu, std::string pdu, const std::shared_ptr<AppExecFwk::EventHandler> &handler,
|
||||
const AppExecFwk::InnerEvent::Pointer &response);
|
||||
|
@ -53,7 +53,6 @@ public:
|
||||
void OnResponseGetNetworkRegistrationState(MessageParcel &data);
|
||||
void OnResponseGetCurrentOperator(MessageParcel &data);
|
||||
void OnRequestSetRadioStateTest(MessageParcel &data);
|
||||
void OnResponseGetRadioCapability(MessageParcel &data);
|
||||
void OnRequestShutDownTest(MessageParcel &data);
|
||||
void OnRequestGetRadioStateTest(MessageParcel &data);
|
||||
void OnRequestGetImeiTest(MessageParcel &data);
|
||||
|
@ -75,7 +75,6 @@ private:
|
||||
void GetRilNetworkSearchInfoTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetRilNetworkSelectionModeTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void SetRilNetworkSelectionModeTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetRilRadioCapabilityTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void GetPhysicalChannelConfigTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result);
|
||||
void SendRilCmSmsTest(const AppExecFwk::InnerEvent::Pointer &result);
|
||||
void SendRilCmSmsMoreModeTest(const AppExecFwk::InnerEvent::Pointer &result);
|
||||
|
@ -689,23 +689,6 @@ int32_t RilManagerTest::SetNetworkSelectionMode(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t RilManagerTest::GetRadioCapability(const AppExecFwk::InnerEvent::Pointer &response)
|
||||
{
|
||||
TELEPHONY_LOGI("RilManagerTest GetRadioCapability");
|
||||
if (cellularRadio_ == nullptr) {
|
||||
TELEPHONY_LOGE("RilManagerTest::GetRadioCapability cellularRadio_ == nullptr");
|
||||
return HRIL_ERR_NULL_POINT;
|
||||
}
|
||||
std::shared_ptr<HRilRequestTest> request = CreateRequest(HREQ_NETWORK_GET_RADIO_CAPABILITY, response);
|
||||
if (request == nullptr) {
|
||||
TELEPHONY_LOGE("RilManagerTest::GetRadioCapability request == nullptr");
|
||||
return HRIL_ERR_NULL_POINT;
|
||||
}
|
||||
int32_t ret = SendInt32Event(HREQ_NETWORK_GET_RADIO_CAPABILITY, request->serialId_);
|
||||
TELEPHONY_LOGI("SendInt32Event(ID:%{public}d) return: %{public}d", HREQ_NETWORK_GET_RADIO_CAPABILITY, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t RilManagerTest::GetPhysicalChannelConfig(const AppExecFwk::InnerEvent::Pointer &response)
|
||||
{
|
||||
TELEPHONY_LOGI("RilManagerTest GetPhysicalChannelConfig");
|
||||
|
@ -496,24 +496,6 @@ void RilRadioResponseTest::OnResponseGetCurrentOperator(MessageParcel &data)
|
||||
}
|
||||
}
|
||||
|
||||
void RilRadioResponseTest::OnResponseGetRadioCapability(MessageParcel &data)
|
||||
{
|
||||
TELEPHONY_LOGI("RilRadioResponseTest::OnResponseGetRadioCapability --> ");
|
||||
const uint8_t *spBuffer = data.ReadUnpadBuffer(sizeof(HRilRadioResponseInfo));
|
||||
if (spBuffer == nullptr) {
|
||||
TELEPHONY_LOGE("RilRadioResponseTest::OnResponseGetRadioCapability read spBuffer failed");
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<RadioCapabilityInfo> radioCapabilityInfo = std::make_shared<RadioCapabilityInfo>();
|
||||
if (radioCapabilityInfo == nullptr) {
|
||||
TELEPHONY_LOGE("RilRadioResponseTest::OnResponseGetRadioCapability radioCapabilityInfo == nullptr");
|
||||
return;
|
||||
}
|
||||
radioCapabilityInfo->ReadFromParcel(data);
|
||||
TELEPHONY_LOGI("RilRadioResponseTest::OnResponseGetRadioCapability --> finished: ratFamily=%{public}d",
|
||||
radioCapabilityInfo->ratFamily);
|
||||
}
|
||||
|
||||
void RilRadioResponseTest::OnRequestShutDownTest(MessageParcel &data)
|
||||
{
|
||||
TELEPHONY_LOGI("RilRadioResponseTest::OnRequestShutDownTest -->");
|
||||
|
@ -163,7 +163,6 @@ void RilUnitTest::AddNetworkRequestToMap()
|
||||
memberFuncMap_[HREQ_NETWORK_GET_NETWORK_SEARCH_INFORMATION] = &RilUnitTest::GetRilNetworkSearchInfoTest;
|
||||
memberFuncMap_[HREQ_NETWORK_GET_NETWORK_SELECTION_MODE] = &RilUnitTest::GetRilNetworkSelectionModeTest;
|
||||
memberFuncMap_[HREQ_NETWORK_SET_NETWORK_SELECTION_MODE] = &RilUnitTest::SetRilNetworkSelectionModeTest;
|
||||
memberFuncMap_[HREQ_NETWORK_GET_RADIO_CAPABILITY] = &RilUnitTest::GetRilRadioCapabilityTest;
|
||||
memberFuncMap_[HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG] = &RilUnitTest::GetPhysicalChannelConfigTest;
|
||||
}
|
||||
|
||||
@ -415,14 +414,6 @@ void RilUnitTest::SetRilNetworkSelectionModeTest(const OHOS::AppExecFwk::InnerEv
|
||||
ASSERT_EQ(0, ret);
|
||||
}
|
||||
|
||||
void RilUnitTest::GetRilRadioCapabilityTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result)
|
||||
{
|
||||
TELEPHONY_LOGI("RilUnitTest::GetRilRadioCapabilityTest -->");
|
||||
int32_t ret = mRilManager_->GetRadioCapability(result);
|
||||
TELEPHONY_LOGI("RilUnitTest::GetRilRadioCapabilityTest --> finished, return: %{public}d", ret);
|
||||
ASSERT_EQ(0, ret);
|
||||
}
|
||||
|
||||
void RilUnitTest::GetPhysicalChannelConfigTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result)
|
||||
{
|
||||
TELEPHONY_LOGI("RilUnitTest::GetPhysicalChannelConfigTest -->");
|
||||
@ -1255,24 +1246,6 @@ HWTEST_F(RilUnitTest, Telephony_RilAdapter_SetRilNetworkSelectionModeTest_1100,
|
||||
OnProcessTest(HREQ_NETWORK_SET_NETWORK_SELECTION_MODE, event);
|
||||
}
|
||||
|
||||
HWTEST_F(RilUnitTest, Telephony_RilAdapter_GetRilRadioCapabilityTest_0100, Function | MediumTest | Level3)
|
||||
{
|
||||
OnInit();
|
||||
auto event = OHOS::AppExecFwk::InnerEvent::Get(HREQ_NETWORK_GET_RADIO_CAPABILITY);
|
||||
event->SetOwner(GetHandler());
|
||||
RilManagerTest::slotId = HRIL_SIM_SLOT_0;
|
||||
OnProcessTest(HREQ_NETWORK_GET_RADIO_CAPABILITY, event);
|
||||
}
|
||||
|
||||
HWTEST_F(RilUnitTest, Telephony_RilAdapter_GetRilRadioCapabilityTest_1100, Function | MediumTest | Level3)
|
||||
{
|
||||
OnInit();
|
||||
auto event = OHOS::AppExecFwk::InnerEvent::Get(HREQ_NETWORK_GET_RADIO_CAPABILITY);
|
||||
event->SetOwner(GetHandler());
|
||||
RilManagerTest::slotId = HRIL_SIM_SLOT_1;
|
||||
OnProcessTest(HREQ_NETWORK_GET_RADIO_CAPABILITY, event);
|
||||
}
|
||||
|
||||
HWTEST_F(RilUnitTest, Telephony_RilAdapter_GetPhysicalChannelConfigTest_0100, Function | MediumTest | Level3)
|
||||
{
|
||||
OnInit();
|
||||
|
@ -771,20 +771,6 @@ void RilManagerTest::GetPhysicalChannelConfig(const AppExecFwk::InnerEvent::Poin
|
||||
SendInt32Event(HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG, request->serialId_);
|
||||
}
|
||||
|
||||
void RilManagerTest::GetRadioCapability(const AppExecFwk::InnerEvent::Pointer &response)
|
||||
{
|
||||
if (cellularRadio_ == nullptr) {
|
||||
TELEPHONY_LOGE("RilManagerTest::GetRadioCapability cellularRadio_ == nullptr");
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<HRilRequestTest> request = CreateRequest(HREQ_NETWORK_GET_RADIO_CAPABILITY, response);
|
||||
if (request == nullptr) {
|
||||
TELEPHONY_LOGE("RilManagerTest::GetRadioCapability request == nullptr");
|
||||
return;
|
||||
}
|
||||
SendInt32Event(HREQ_NETWORK_GET_RADIO_CAPABILITY, request->serialId_);
|
||||
}
|
||||
|
||||
void RilManagerTest::GetMeid(const AppExecFwk::InnerEvent::Pointer &response)
|
||||
{
|
||||
if (cellularRadio_ != nullptr) {
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
#include "ril_radio_response_test.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "hril_request.h"
|
||||
#include "telephony_log_wrapper.h"
|
||||
|
||||
@ -189,9 +187,6 @@ int32_t RilRadioResponseTest::OnRemoteRequest(
|
||||
case HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG:
|
||||
OnResponseGetPhysicalChannelConfig(data);
|
||||
break;
|
||||
case HREQ_NETWORK_GET_RADIO_CAPABILITY:
|
||||
OnResponseGetRadioCapability(data);
|
||||
break;
|
||||
case HREQ_MODEM_GET_MEID:
|
||||
OnRequestGetMeidTest(data);
|
||||
break;
|
||||
@ -270,7 +265,7 @@ int32_t RilRadioResponseTest::OnRemoteRequest(
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PrintResponseInfo(const struct HRilRadioResponseInfo *rspInfo)
|
||||
void RilRadioResponseTest::PrintResponseInfo(const struct HRilRadioResponseInfo *rspInfo)
|
||||
{
|
||||
if (rspInfo == nullptr) {
|
||||
return;
|
||||
@ -1320,22 +1315,6 @@ void RilRadioResponseTest::OnResponseGetPhysicalChannelConfig(OHOS::MessageParce
|
||||
}
|
||||
}
|
||||
|
||||
void RilRadioResponseTest::OnResponseGetRadioCapability(OHOS::MessageParcel &data)
|
||||
{
|
||||
const uint8_t *spBuffer = data.ReadUnpadBuffer(sizeof(HRilRadioResponseInfo));
|
||||
if (spBuffer == nullptr) {
|
||||
TELEPHONY_LOGE("RilRadioResponseTest::OnResponseGetRadioCapability read spBuffer failed");
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<RadioCapabilityInfo> radioCapabilityInfo = std::make_shared<RadioCapabilityInfo>();
|
||||
if (radioCapabilityInfo == nullptr) {
|
||||
TELEPHONY_LOGE("RilRadioResponseTest::OnResponseGetRadioCapability radioCapabilityInfo == nullptr");
|
||||
return;
|
||||
}
|
||||
radioCapabilityInfo->ReadFromParcel(data);
|
||||
cout << "OnResponseGetRadioCapability: ratFamily = " << radioCapabilityInfo->ratFamily << endl;
|
||||
}
|
||||
|
||||
void RilRadioResponseTest::OnRequestGetLinkBandwidthInfoTest(OHOS::MessageParcel &data)
|
||||
{
|
||||
TELEPHONY_LOGI("RilRadioResponseTest::OnRequestGetLinkBandwidthInfoTest --> ");
|
||||
|
@ -524,13 +524,6 @@ void RilUnitTest::GetPhysicalChannelConfigTest(const OHOS::AppExecFwk::InnerEven
|
||||
TELEPHONY_LOGI("RilUnitTest::GetPhysicalChannelConfigTest --> finished");
|
||||
}
|
||||
|
||||
void RilUnitTest::GetRilRadioCapabilityTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result)
|
||||
{
|
||||
TELEPHONY_LOGI("RilUnitTest::GetRilRadioCapabilityTest -->");
|
||||
mRilManager_->GetRadioCapability(result);
|
||||
TELEPHONY_LOGI("RilUnitTest::GetRilRadioCapabilityTest --> finished");
|
||||
}
|
||||
|
||||
void RilUnitTest::SendRilCmSmsTest(const OHOS::AppExecFwk::InnerEvent::Pointer &result)
|
||||
{
|
||||
TELEPHONY_LOGI("RilUnitTest::SendRilCmSmsTest -->");
|
||||
@ -1185,7 +1178,6 @@ void RilUnitTest::OnInitNetworkProcessInterface()
|
||||
memberFuncMap_[HREQ_NETWORK_SET_LOCATE_UPDATES] = &RilUnitTest::SetRilLocationUpdateTest;
|
||||
memberFuncMap_[HREQ_NETWORK_SET_NOTIFICATION_FILTER] = &RilUnitTest::SetRilNotificationFilterTest;
|
||||
memberFuncMap_[HREQ_NETWORK_SET_DEVICE_STATE] = &RilUnitTest::SetRilDeviceStateTest;
|
||||
memberFuncMap_[HREQ_NETWORK_GET_RADIO_CAPABILITY] = &RilUnitTest::GetRilRadioCapabilityTest;
|
||||
memberFuncMap_[HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG] = &RilUnitTest::GetPhysicalChannelConfigTest;
|
||||
}
|
||||
|
||||
@ -1373,7 +1365,6 @@ static int32_t PrintNetworkMenu()
|
||||
cout << "----> [" << HREQ_NETWORK_SET_NOTIFICATION_FILTER
|
||||
<< "] ---->[ HREQ_NETWORK_SET_NOTIFICATION_FILTER ]" << endl;
|
||||
cout << "----> [" << HREQ_NETWORK_SET_DEVICE_STATE << "] ---->[ HREQ_NETWORK_SET_DEVICE_STATE ]" << endl;
|
||||
cout << "----> [" << HREQ_NETWORK_GET_RADIO_CAPABILITY << "] ---->[ HREQ_NETWORK_GET_RADIO_CAPABILITY ]" << endl;
|
||||
cout << "----> [" << HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG
|
||||
<< "] ---->[ HREQ_NETWORK_GET_PHYSICAL_CHANNEL_CONFIG ]" << endl;
|
||||
int32_t choice = InputInt32(HREQ_NETWORK_BASE, HREQ_COMMON_BASE - 1, "Command");
|
||||
|
Loading…
x
Reference in New Issue
Block a user