Merge "Don't use C-style cast." am: d08759dc42 am: fe65055051 am: eeaec2158f am: 6a4a51ec4c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2178554

Change-Id: I242e8079f8efc1c67bd7d628afc14602f061a578
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-08-09 07:11:41 +00:00
committed by Automerger Merge Worker
6 changed files with 25 additions and 25 deletions

View File

@@ -28,14 +28,14 @@ namespace aidl = ::aidl::android::hardware::radio::data;
V1_5::DataProfileInfo toHidl(const aidl::DataProfileInfo& info) { V1_5::DataProfileInfo toHidl(const aidl::DataProfileInfo& info) {
return { return {
.profileId = V1_0::DataProfileId{info.profileId}, .profileId = static_cast<V1_0::DataProfileId>(info.profileId),
.apn = info.apn, .apn = info.apn,
.protocol = V1_4::PdpProtocolType{info.protocol}, .protocol = static_cast<V1_4::PdpProtocolType>(info.protocol),
.roamingProtocol = V1_4::PdpProtocolType{info.roamingProtocol}, .roamingProtocol = static_cast<V1_4::PdpProtocolType>(info.roamingProtocol),
.authType = V1_0::ApnAuthType{info.authType}, .authType = static_cast<V1_0::ApnAuthType>(info.authType),
.user = info.user, .user = info.user,
.password = info.password, .password = info.password,
.type = V1_0::DataProfileInfoType{info.type}, .type = static_cast<V1_0::DataProfileInfoType>(info.type),
.maxConnsTime = info.maxConnsTime, .maxConnsTime = info.maxConnsTime,
.maxConns = info.maxConns, .maxConns = info.maxConns,
.waitTime = info.waitTime, .waitTime = info.waitTime,
@@ -74,7 +74,7 @@ V1_6::SliceInfo toHidl(const aidl::SliceInfo& info) {
.sliceDifferentiator = info.sliceDifferentiator, .sliceDifferentiator = info.sliceDifferentiator,
.mappedHplmnSst = static_cast<V1_6::SliceServiceType>(info.mappedHplmnSst), .mappedHplmnSst = static_cast<V1_6::SliceServiceType>(info.mappedHplmnSst),
.mappedHplmnSD = info.mappedHplmnSd, .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) { V1_1::KeepaliveRequest toHidl(const aidl::KeepaliveRequest& keep) {
return { return {
.type = V1_1::KeepaliveType{keep.type}, .type = static_cast<V1_1::KeepaliveType>(keep.type),
.sourceAddress = keep.sourceAddress, .sourceAddress = keep.sourceAddress,
.sourcePort = keep.sourcePort, .sourcePort = keep.sourcePort,
.destinationAddress = keep.destinationAddress, .destinationAddress = keep.destinationAddress,

View File

@@ -45,11 +45,11 @@ static aidl::CdmaSmsAddress toAidl(const V1_0::CdmaSmsAddress& addr) {
static V1_0::CdmaSmsAddress toHidl(const aidl::CdmaSmsAddress& addr) { static V1_0::CdmaSmsAddress toHidl(const aidl::CdmaSmsAddress& addr) {
return { return {
.digitMode = V1_0::CdmaSmsDigitMode{addr.digitMode}, .digitMode = static_cast<V1_0::CdmaSmsDigitMode>(addr.digitMode),
.numberMode = addr.isNumberModeDataNetwork ? V1_0::CdmaSmsNumberMode::DATA_NETWORK .numberMode = addr.isNumberModeDataNetwork ? V1_0::CdmaSmsNumberMode::DATA_NETWORK
: V1_0::CdmaSmsNumberMode::NOT_DATA_NETWORK, : V1_0::CdmaSmsNumberMode::NOT_DATA_NETWORK,
.numberType = V1_0::CdmaSmsNumberType{addr.numberType}, .numberType = static_cast<V1_0::CdmaSmsNumberType>(addr.numberType),
.numberPlan = V1_0::CdmaSmsNumberPlan{addr.numberPlan}, .numberPlan = static_cast<V1_0::CdmaSmsNumberPlan>(addr.numberPlan),
.digits = addr.digits, .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) { static V1_0::CdmaSmsSubaddress toHidl(const aidl::CdmaSmsSubaddress& addr) {
return { return {
.subaddressType = V1_0::CdmaSmsSubaddressType{addr.subaddressType}, .subaddressType = static_cast<V1_0::CdmaSmsSubaddressType>(addr.subaddressType),
.odd = addr.odd, .odd = addr.odd,
.digits = addr.digits, .digits = addr.digits,
}; };
@@ -94,7 +94,7 @@ V1_0::CdmaSmsMessage toHidl(const aidl::CdmaSmsMessage& msg) {
V1_0::ImsSmsMessage toHidl(const aidl::ImsSmsMessage& msg) { V1_0::ImsSmsMessage toHidl(const aidl::ImsSmsMessage& msg) {
return { return {
.tech = V1_0::RadioTechnologyFamily{msg.tech}, .tech = static_cast<V1_0::RadioTechnologyFamily>(msg.tech),
.retry = msg.retry, .retry = msg.retry,
.messageRef = msg.messageRef, .messageRef = msg.messageRef,
.cdmaMessage = toHidl(msg.cdmaMessage), .cdmaMessage = toHidl(msg.cdmaMessage),
@@ -147,14 +147,14 @@ V1_0::GsmBroadcastSmsConfigInfo toHidl(const aidl::GsmBroadcastSmsConfigInfo& in
V1_0::CdmaSmsWriteArgs toHidl(const aidl::CdmaSmsWriteArgs& args) { V1_0::CdmaSmsWriteArgs toHidl(const aidl::CdmaSmsWriteArgs& args) {
return { return {
.status = V1_0::CdmaSmsWriteArgsStatus{args.status}, .status = static_cast<V1_0::CdmaSmsWriteArgsStatus>(args.status),
.message = toHidl(args.message), .message = toHidl(args.message),
}; };
} }
V1_0::SmsWriteArgs toHidl(const aidl::SmsWriteArgs& args) { V1_0::SmsWriteArgs toHidl(const aidl::SmsWriteArgs& args) {
return { return {
.status = V1_0::SmsWriteArgsStatus{args.status}, .status = static_cast<V1_0::SmsWriteArgsStatus>(args.status),
.pdu = args.pdu, .pdu = args.pdu,
.smsc = args.smsc, .smsc = args.smsc,
}; };

View File

@@ -30,7 +30,7 @@ namespace aidl = ::aidl::android::hardware::radio::modem;
V1_0::NvWriteItem toHidl(const aidl::NvWriteItem& item) { V1_0::NvWriteItem toHidl(const aidl::NvWriteItem& item) {
return { return {
.itemId = V1_0::NvItem{item.itemId}, .itemId = static_cast<V1_0::NvItem>(item.itemId),
.value = item.value, .value = item.value,
}; };
} }
@@ -48,10 +48,10 @@ aidl::RadioCapability toAidl(const V1_0::RadioCapability& capa) {
V1_0::RadioCapability toHidl(const aidl::RadioCapability& capa) { V1_0::RadioCapability toHidl(const aidl::RadioCapability& capa) {
return { return {
.session = capa.session, .session = capa.session,
.phase = V1_0::RadioCapabilityPhase{capa.phase}, .phase = static_cast<V1_0::RadioCapabilityPhase>(capa.phase),
.raf = toHidlBitfield<V1_0::RadioAccessFamily>(capa.raf), .raf = toHidlBitfield<V1_0::RadioAccessFamily>(capa.raf),
.logicalModemUuid = capa.logicalModemUuid, .logicalModemUuid = capa.logicalModemUuid,
.status = V1_0::RadioCapabilityStatus{capa.status}, .status = static_cast<V1_0::RadioCapabilityStatus>(capa.status),
}; };
} }

View File

@@ -66,7 +66,7 @@ V1_5::NgranBands toHidl(aidl::NgranBands band) {
V1_5::SignalThresholdInfo toHidl(const aidl::SignalThresholdInfo& info) { V1_5::SignalThresholdInfo toHidl(const aidl::SignalThresholdInfo& info) {
return { return {
.signalMeasurement = V1_5::SignalMeasurementType{info.signalMeasurement}, .signalMeasurement = static_cast<V1_5::SignalMeasurementType>(info.signalMeasurement),
.hysteresisMs = info.hysteresisMs, .hysteresisMs = info.hysteresisMs,
.hysteresisDb = info.hysteresisDb, .hysteresisDb = info.hysteresisDb,
.thresholds = info.thresholds, .thresholds = info.thresholds,
@@ -155,7 +155,7 @@ V1_5::RadioAccessSpecifier toHidl(const aidl::RadioAccessSpecifier& spec) {
V1_5::NetworkScanRequest toHidl(const aidl::NetworkScanRequest& req) { V1_5::NetworkScanRequest toHidl(const aidl::NetworkScanRequest& req) {
return { return {
.type = V1_1::ScanType{req.type}, .type = static_cast<V1_1::ScanType>(req.type),
.interval = req.interval, .interval = req.interval,
.specifiers = toHidl(req.specifiers), .specifiers = toHidl(req.specifiers),
.maxSearchTime = req.maxSearchTime, .maxSearchTime = req.maxSearchTime,

View File

@@ -65,7 +65,7 @@ V1_0::Carrier toHidl(const aidl::Carrier& carrier) {
return { return {
.mcc = carrier.mcc, .mcc = carrier.mcc,
.mnc = carrier.mnc, .mnc = carrier.mnc,
.matchType = V1_0::CarrierMatchType{carrier.matchType}, .matchType = static_cast<V1_0::CarrierMatchType>(carrier.matchType),
.matchData = carrier.matchData, .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) { V1_6::ImsiEncryptionInfo toHidl_1_6(const aidl::ImsiEncryptionInfo& info) {
return { return {
.base = toHidl(info), .base = toHidl(info),
.keyType = V1_6::PublicKeyType{info.keyType}, .keyType = static_cast<V1_6::PublicKeyType>(info.keyType),
}; };
} }

View File

@@ -29,15 +29,15 @@ namespace aidl = ::aidl::android::hardware::radio::voice;
V1_0::Dial toHidl(const aidl::Dial& info) { V1_0::Dial toHidl(const aidl::Dial& info) {
return { return {
.address = info.address, .address = info.address,
.clir = V1_0::Clir{info.clir}, .clir = static_cast<V1_0::Clir>(info.clir),
.uusInfo = toHidl(info.uusInfo), .uusInfo = toHidl(info.uusInfo),
}; };
} }
V1_0::UusInfo toHidl(const aidl::UusInfo& info) { V1_0::UusInfo toHidl(const aidl::UusInfo& info) {
return { return {
.uusType = V1_0::UusType{info.uusType}, .uusType = static_cast<V1_0::UusType>(info.uusType),
.uusDcs = V1_0::UusDcs{info.uusDcs}, .uusDcs = static_cast<V1_0::UusDcs>(info.uusDcs),
.uusData = info.uusData, .uusData = info.uusData,
}; };
} }
@@ -55,7 +55,7 @@ aidl::CallForwardInfo toAidl(const V1_0::CallForwardInfo& info) {
V1_0::CallForwardInfo toHidl(const aidl::CallForwardInfo& info) { V1_0::CallForwardInfo toHidl(const aidl::CallForwardInfo& info) {
return { return {
.status = V1_0::CallForwardInfoStatus{info.status}, .status = static_cast<V1_0::CallForwardInfoStatus>(info.status),
.reason = info.reason, .reason = info.reason,
.serviceClass = info.serviceClass, .serviceClass = info.serviceClass,
.toa = info.toa, .toa = info.toa,