mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Don't use C-style cast."
This commit is contained in:
@@ -28,14 +28,14 @@ namespace aidl = ::aidl::android::hardware::radio::data;
|
||||
|
||||
V1_5::DataProfileInfo toHidl(const aidl::DataProfileInfo& info) {
|
||||
return {
|
||||
.profileId = V1_0::DataProfileId{info.profileId},
|
||||
.profileId = static_cast<V1_0::DataProfileId>(info.profileId),
|
||||
.apn = info.apn,
|
||||
.protocol = V1_4::PdpProtocolType{info.protocol},
|
||||
.roamingProtocol = V1_4::PdpProtocolType{info.roamingProtocol},
|
||||
.authType = V1_0::ApnAuthType{info.authType},
|
||||
.protocol = static_cast<V1_4::PdpProtocolType>(info.protocol),
|
||||
.roamingProtocol = static_cast<V1_4::PdpProtocolType>(info.roamingProtocol),
|
||||
.authType = static_cast<V1_0::ApnAuthType>(info.authType),
|
||||
.user = info.user,
|
||||
.password = info.password,
|
||||
.type = V1_0::DataProfileInfoType{info.type},
|
||||
.type = static_cast<V1_0::DataProfileInfoType>(info.type),
|
||||
.maxConnsTime = info.maxConnsTime,
|
||||
.maxConns = info.maxConns,
|
||||
.waitTime = info.waitTime,
|
||||
@@ -74,7 +74,7 @@ V1_6::SliceInfo toHidl(const aidl::SliceInfo& info) {
|
||||
.sliceDifferentiator = info.sliceDifferentiator,
|
||||
.mappedHplmnSst = static_cast<V1_6::SliceServiceType>(info.mappedHplmnSst),
|
||||
.mappedHplmnSD = info.mappedHplmnSd,
|
||||
.status = V1_6::SliceStatus{info.status},
|
||||
.status = static_cast<V1_6::SliceStatus>(info.status),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ V1_6::OsAppId toHidl(const aidl::OsAppId& appId) {
|
||||
|
||||
V1_1::KeepaliveRequest toHidl(const aidl::KeepaliveRequest& keep) {
|
||||
return {
|
||||
.type = V1_1::KeepaliveType{keep.type},
|
||||
.type = static_cast<V1_1::KeepaliveType>(keep.type),
|
||||
.sourceAddress = keep.sourceAddress,
|
||||
.sourcePort = keep.sourcePort,
|
||||
.destinationAddress = keep.destinationAddress,
|
||||
|
||||
@@ -45,11 +45,11 @@ static aidl::CdmaSmsAddress toAidl(const V1_0::CdmaSmsAddress& addr) {
|
||||
|
||||
static V1_0::CdmaSmsAddress toHidl(const aidl::CdmaSmsAddress& addr) {
|
||||
return {
|
||||
.digitMode = V1_0::CdmaSmsDigitMode{addr.digitMode},
|
||||
.digitMode = static_cast<V1_0::CdmaSmsDigitMode>(addr.digitMode),
|
||||
.numberMode = addr.isNumberModeDataNetwork ? V1_0::CdmaSmsNumberMode::DATA_NETWORK
|
||||
: V1_0::CdmaSmsNumberMode::NOT_DATA_NETWORK,
|
||||
.numberType = V1_0::CdmaSmsNumberType{addr.numberType},
|
||||
.numberPlan = V1_0::CdmaSmsNumberPlan{addr.numberPlan},
|
||||
.numberType = static_cast<V1_0::CdmaSmsNumberType>(addr.numberType),
|
||||
.numberPlan = static_cast<V1_0::CdmaSmsNumberPlan>(addr.numberPlan),
|
||||
.digits = addr.digits,
|
||||
};
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static aidl::CdmaSmsSubaddress toAidl(const V1_0::CdmaSmsSubaddress& addr) {
|
||||
|
||||
static V1_0::CdmaSmsSubaddress toHidl(const aidl::CdmaSmsSubaddress& addr) {
|
||||
return {
|
||||
.subaddressType = V1_0::CdmaSmsSubaddressType{addr.subaddressType},
|
||||
.subaddressType = static_cast<V1_0::CdmaSmsSubaddressType>(addr.subaddressType),
|
||||
.odd = addr.odd,
|
||||
.digits = addr.digits,
|
||||
};
|
||||
@@ -94,7 +94,7 @@ V1_0::CdmaSmsMessage toHidl(const aidl::CdmaSmsMessage& msg) {
|
||||
|
||||
V1_0::ImsSmsMessage toHidl(const aidl::ImsSmsMessage& msg) {
|
||||
return {
|
||||
.tech = V1_0::RadioTechnologyFamily{msg.tech},
|
||||
.tech = static_cast<V1_0::RadioTechnologyFamily>(msg.tech),
|
||||
.retry = msg.retry,
|
||||
.messageRef = msg.messageRef,
|
||||
.cdmaMessage = toHidl(msg.cdmaMessage),
|
||||
@@ -147,14 +147,14 @@ V1_0::GsmBroadcastSmsConfigInfo toHidl(const aidl::GsmBroadcastSmsConfigInfo& in
|
||||
|
||||
V1_0::CdmaSmsWriteArgs toHidl(const aidl::CdmaSmsWriteArgs& args) {
|
||||
return {
|
||||
.status = V1_0::CdmaSmsWriteArgsStatus{args.status},
|
||||
.status = static_cast<V1_0::CdmaSmsWriteArgsStatus>(args.status),
|
||||
.message = toHidl(args.message),
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::SmsWriteArgs toHidl(const aidl::SmsWriteArgs& args) {
|
||||
return {
|
||||
.status = V1_0::SmsWriteArgsStatus{args.status},
|
||||
.status = static_cast<V1_0::SmsWriteArgsStatus>(args.status),
|
||||
.pdu = args.pdu,
|
||||
.smsc = args.smsc,
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace aidl = ::aidl::android::hardware::radio::modem;
|
||||
|
||||
V1_0::NvWriteItem toHidl(const aidl::NvWriteItem& item) {
|
||||
return {
|
||||
.itemId = V1_0::NvItem{item.itemId},
|
||||
.itemId = static_cast<V1_0::NvItem>(item.itemId),
|
||||
.value = item.value,
|
||||
};
|
||||
}
|
||||
@@ -48,10 +48,10 @@ aidl::RadioCapability toAidl(const V1_0::RadioCapability& capa) {
|
||||
V1_0::RadioCapability toHidl(const aidl::RadioCapability& capa) {
|
||||
return {
|
||||
.session = capa.session,
|
||||
.phase = V1_0::RadioCapabilityPhase{capa.phase},
|
||||
.phase = static_cast<V1_0::RadioCapabilityPhase>(capa.phase),
|
||||
.raf = toHidlBitfield<V1_0::RadioAccessFamily>(capa.raf),
|
||||
.logicalModemUuid = capa.logicalModemUuid,
|
||||
.status = V1_0::RadioCapabilityStatus{capa.status},
|
||||
.status = static_cast<V1_0::RadioCapabilityStatus>(capa.status),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ V1_5::NgranBands toHidl(aidl::NgranBands band) {
|
||||
|
||||
V1_5::SignalThresholdInfo toHidl(const aidl::SignalThresholdInfo& info) {
|
||||
return {
|
||||
.signalMeasurement = V1_5::SignalMeasurementType{info.signalMeasurement},
|
||||
.signalMeasurement = static_cast<V1_5::SignalMeasurementType>(info.signalMeasurement),
|
||||
.hysteresisMs = info.hysteresisMs,
|
||||
.hysteresisDb = info.hysteresisDb,
|
||||
.thresholds = info.thresholds,
|
||||
@@ -155,7 +155,7 @@ V1_5::RadioAccessSpecifier toHidl(const aidl::RadioAccessSpecifier& spec) {
|
||||
|
||||
V1_5::NetworkScanRequest toHidl(const aidl::NetworkScanRequest& req) {
|
||||
return {
|
||||
.type = V1_1::ScanType{req.type},
|
||||
.type = static_cast<V1_1::ScanType>(req.type),
|
||||
.interval = req.interval,
|
||||
.specifiers = toHidl(req.specifiers),
|
||||
.maxSearchTime = req.maxSearchTime,
|
||||
|
||||
@@ -65,7 +65,7 @@ V1_0::Carrier toHidl(const aidl::Carrier& carrier) {
|
||||
return {
|
||||
.mcc = carrier.mcc,
|
||||
.mnc = carrier.mnc,
|
||||
.matchType = V1_0::CarrierMatchType{carrier.matchType},
|
||||
.matchType = static_cast<V1_0::CarrierMatchType>(carrier.matchType),
|
||||
.matchData = carrier.matchData,
|
||||
};
|
||||
}
|
||||
@@ -107,7 +107,7 @@ V1_1::ImsiEncryptionInfo toHidl(const aidl::ImsiEncryptionInfo& info) {
|
||||
V1_6::ImsiEncryptionInfo toHidl_1_6(const aidl::ImsiEncryptionInfo& info) {
|
||||
return {
|
||||
.base = toHidl(info),
|
||||
.keyType = V1_6::PublicKeyType{info.keyType},
|
||||
.keyType = static_cast<V1_6::PublicKeyType>(info.keyType),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -29,15 +29,15 @@ namespace aidl = ::aidl::android::hardware::radio::voice;
|
||||
V1_0::Dial toHidl(const aidl::Dial& info) {
|
||||
return {
|
||||
.address = info.address,
|
||||
.clir = V1_0::Clir{info.clir},
|
||||
.clir = static_cast<V1_0::Clir>(info.clir),
|
||||
.uusInfo = toHidl(info.uusInfo),
|
||||
};
|
||||
}
|
||||
|
||||
V1_0::UusInfo toHidl(const aidl::UusInfo& info) {
|
||||
return {
|
||||
.uusType = V1_0::UusType{info.uusType},
|
||||
.uusDcs = V1_0::UusDcs{info.uusDcs},
|
||||
.uusType = static_cast<V1_0::UusType>(info.uusType),
|
||||
.uusDcs = static_cast<V1_0::UusDcs>(info.uusDcs),
|
||||
.uusData = info.uusData,
|
||||
};
|
||||
}
|
||||
@@ -55,7 +55,7 @@ aidl::CallForwardInfo toAidl(const V1_0::CallForwardInfo& info) {
|
||||
|
||||
V1_0::CallForwardInfo toHidl(const aidl::CallForwardInfo& info) {
|
||||
return {
|
||||
.status = V1_0::CallForwardInfoStatus{info.status},
|
||||
.status = static_cast<V1_0::CallForwardInfoStatus>(info.status),
|
||||
.reason = info.reason,
|
||||
.serviceClass = info.serviceClass,
|
||||
.toa = info.toa,
|
||||
|
||||
Reference in New Issue
Block a user