Convert hidl_bitfield and bitfield to int

The previous API surface replaced bitfields of enums with the enum,
which only allows one value at a time. Instead of using the enum,
replace with int instead.

Test: build
Bug: 210712359
Change-Id: I2963200311494718ae89af8deade0b1dd41354f8
Merged-In: I2963200311494718ae89af8deade0b1dd41354f8
This commit is contained in:
Sarah Chin
2021-12-23 16:41:58 -08:00
parent bf3f93bbf4
commit c9d3b7b9d6
28 changed files with 75 additions and 69 deletions

View File

@@ -46,8 +46,8 @@ parcelable DataProfileInfo {
int maxConns;
int waitTime;
boolean enabled;
android.hardware.radio.data.ApnTypes supportedApnTypesBitmap;
android.hardware.radio.RadioAccessFamily bearerBitmap;
int supportedApnTypesBitmap;
int bearerBitmap;
int mtuV4;
int mtuV6;
boolean preferred;

View File

@@ -36,7 +36,7 @@ package android.hardware.radio.modem;
parcelable RadioCapability {
int session;
int phase;
android.hardware.radio.RadioAccessFamily raf;
int raf;
String logicalModemUuid;
int status;
const int PHASE_CONFIGURED = 0;

View File

@@ -50,12 +50,12 @@ interface IRadioNetwork {
oneway void getVoiceRegistrationState(in int serial);
oneway void isNrDualConnectivityEnabled(in int serial);
oneway void responseAcknowledgement();
oneway void setAllowedNetworkTypesBitmap(in int serial, in android.hardware.radio.RadioAccessFamily networkTypeBitmap);
oneway void setAllowedNetworkTypesBitmap(in int serial, in int networkTypeBitmap);
oneway void setBandMode(in int serial, in android.hardware.radio.network.RadioBandMode mode);
oneway void setBarringPassword(in int serial, in String facility, in String oldPassword, in String newPassword);
oneway void setCdmaRoamingPreference(in int serial, in android.hardware.radio.network.CdmaRoamingType type);
oneway void setCellInfoListRate(in int serial, in int rate);
oneway void setIndicationFilter(in int serial, in android.hardware.radio.network.IndicationFilter indicationFilter);
oneway void setIndicationFilter(in int serial, in int indicationFilter);
oneway void setLinkCapacityReportingCriteria(in int serial, in int hysteresisMs, in int hysteresisDlKbps, in int hysteresisUlKbps, in int[] thresholdsDownlinkKbps, in int[] thresholdsUplinkKbps, in android.hardware.radio.AccessNetwork accessNetwork);
oneway void setLocationUpdates(in int serial, in boolean enable);
oneway void setNetworkSelectionModeAutomatic(in int serial);

View File

@@ -44,7 +44,7 @@ interface IRadioNetworkIndication {
oneway void networkScanResult(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.NetworkScanResult result);
oneway void networkStateChanged(in android.hardware.radio.RadioIndicationType type);
oneway void nitzTimeReceived(in android.hardware.radio.RadioIndicationType type, in String nitzTime, in long receivedTimeMs, in long ageMs);
oneway void registrationFailed(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.CellIdentity cellIdentity, in String chosenPlmn, in android.hardware.radio.network.Domain domain, in int causeCode, in int additionalCauseCode);
oneway void registrationFailed(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.CellIdentity cellIdentity, in String chosenPlmn, in int domain, in int causeCode, in int additionalCauseCode);
oneway void restrictedStateChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.PhoneRestrictedState state);
oneway void suppSvcNotify(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.network.SuppSvcNotification suppSvc);
oneway void voiceRadioTechChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.RadioTechnology rat);

View File

@@ -35,7 +35,7 @@ package android.hardware.radio.network;
@VintfStability
interface IRadioNetworkResponse {
oneway void acknowledgeRequest(in int serial);
oneway void getAllowedNetworkTypesBitmapResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.RadioAccessFamily networkTypeBitmap);
oneway void getAllowedNetworkTypesBitmapResponse(in android.hardware.radio.RadioResponseInfo info, in int networkTypeBitmap);
oneway void getAvailableBandModesResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RadioBandMode[] bandModes);
oneway void getAvailableNetworksResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.OperatorInfo[] networkInfos);
oneway void getBarringInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.CellIdentity cellIdentity, in android.hardware.radio.network.BarringInfo[] barringInfos);

View File

@@ -37,7 +37,7 @@ parcelable EmergencyNumber {
String number;
String mcc;
String mnc;
android.hardware.radio.voice.EmergencyServiceCategory categories;
int categories;
String[] urns;
int sources;
const int SOURCE_NETWORK_SIGNALING = 1;

View File

@@ -37,7 +37,7 @@ interface IRadioVoice {
oneway void acceptCall(in int serial);
oneway void conference(in int serial);
oneway void dial(in int serial, in android.hardware.radio.voice.Dial dialInfo);
oneway void emergencyDial(in int serial, in android.hardware.radio.voice.Dial dialInfo, in android.hardware.radio.voice.EmergencyServiceCategory categories, in String[] urns, in android.hardware.radio.voice.EmergencyCallRouting routing, in boolean hasKnownUserIntentEmergency, in boolean isTesting);
oneway void emergencyDial(in int serial, in android.hardware.radio.voice.Dial dialInfo, in int categories, in String[] urns, in android.hardware.radio.voice.EmergencyCallRouting routing, in boolean hasKnownUserIntentEmergency, in boolean isTesting);
oneway void exitEmergencyCallbackMode(in int serial);
oneway void explicitCallTransfer(in int serial);
oneway void getCallForwardStatus(in int serial, in android.hardware.radio.voice.CallForwardInfo callInfo);

View File

@@ -93,11 +93,11 @@ parcelable DataProfileInfo {
/**
* Supported APN types bitmap. See ApnTypes for the value of each bit.
*/
ApnTypes supportedApnTypesBitmap;
int supportedApnTypesBitmap;
/**
* The bearer bitmap. See RadioAccessFamily for the value of each bit.
*/
RadioAccessFamily bearerBitmap;
int bearerBitmap;
/**
* Maximum transmission unit (MTU) size in bytes for IPv4.
*/

View File

@@ -71,7 +71,7 @@ parcelable RadioCapability {
/**
* 32-bit bitmap of RadioAccessFamily.
*/
RadioAccessFamily raf;
int raf;
/**
* A UUID typically "com.xxxx.lmX" where X is the logical modem.
* RadioConst:MAX_UUID_LENGTH is the max length.

View File

@@ -195,7 +195,7 @@ oneway interface IRadioNetwork {
*
* Response function is IRadioNetworkResponse.setAllowedNetworkTypesBitmapResponse()
*/
void setAllowedNetworkTypesBitmap(in int serial, in RadioAccessFamily networkTypeBitmap);
void setAllowedNetworkTypesBitmap(in int serial, in int networkTypeBitmap);
/**
* Assign a specified band for RF configuration.
@@ -253,7 +253,7 @@ oneway interface IRadioNetwork {
*
* Response function is IRadioNetworkResponse.setIndicationFilterResponse()
*/
void setIndicationFilter(in int serial, in IndicationFilter indicationFilter);
void setIndicationFilter(in int serial, in int indicationFilter);
/**
* Sets the link capacity reporting criteria. The resulting reporting criteria are the AND of

View File

@@ -136,8 +136,8 @@ oneway interface IRadioNetworkIndication {
* include the time spend in sleep / low power states. If it can not be guaranteed,
* there must not be any caching done at the modem and should fill in 0 for ageMs
*/
void nitzTimeReceived(in RadioIndicationType type, in String nitzTime,
in long receivedTimeMs, in long ageMs);
void nitzTimeReceived(
in RadioIndicationType type, in String nitzTime, in long receivedTimeMs, in long ageMs);
/**
* Report that Registration or a Location/Routing/Tracking Area update has failed.
@@ -165,7 +165,7 @@ oneway interface IRadioNetworkIndication {
* MAX_INT if this value is unused.
*/
void registrationFailed(in RadioIndicationType type, in CellIdentity cellIdentity,
in String chosenPlmn, in Domain domain, in int causeCode, in int additionalCauseCode);
in String chosenPlmn, in int domain, in int causeCode, in int additionalCauseCode);
/**
* Indicates a restricted state change (eg, for Domain Specific Access Control).

View File

@@ -62,8 +62,7 @@ oneway interface IRadioNetworkResponse {
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:NO_RESOURCES
*/
void getAllowedNetworkTypesBitmapResponse(
in RadioResponseInfo info, in RadioAccessFamily networkTypeBitmap);
void getAllowedNetworkTypesBitmapResponse(in RadioResponseInfo info, in int networkTypeBitmap);
/**
* @param info Response info struct containing response type, serial no. and error

View File

@@ -78,7 +78,7 @@ parcelable EmergencyNumber {
* The bitfield of EmergencyServiceCategory(s). See EmergencyServiceCategory for the value of
* each bit.
*/
EmergencyServiceCategory categories;
int categories;
/**
* The list of emergency Uniform Resource Names (URN).
*/

View File

@@ -117,9 +117,9 @@ oneway interface IRadioVoice {
*
* Response function is IRadioVoiceResponse.emergencyDialResponse()
*/
void emergencyDial(in int serial, in Dial dialInfo, in EmergencyServiceCategory categories,
in String[] urns, in EmergencyCallRouting routing,
in boolean hasKnownUserIntentEmergency, in boolean isTesting);
void emergencyDial(in int serial, in Dial dialInfo, in int categories, in String[] urns,
in EmergencyCallRouting routing, in boolean hasKnownUserIntentEmergency,
in boolean isTesting);
/**
* Request the radio's system selection module to exit emergency callback mode. Radio must not

View File

@@ -41,9 +41,8 @@ class RadioNetwork : public RadioCompatBase,
::ndk::ScopedAStatus getVoiceRegistrationState(int32_t serial) override;
::ndk::ScopedAStatus isNrDualConnectivityEnabled(int32_t serial) override;
::ndk::ScopedAStatus responseAcknowledgement() override;
::ndk::ScopedAStatus setAllowedNetworkTypesBitmap(
int32_t serial,
::aidl::android::hardware::radio::RadioAccessFamily networkTypeBitmap) override;
::ndk::ScopedAStatus setAllowedNetworkTypesBitmap(int32_t serial,
int32_t networkTypeBitmap) override;
::ndk::ScopedAStatus setBandMode(
int32_t serial, ::aidl::android::hardware::radio::network::RadioBandMode mode) override;
::ndk::ScopedAStatus setBarringPassword(int32_t serial, const std::string& facility,
@@ -53,9 +52,7 @@ class RadioNetwork : public RadioCompatBase,
int32_t serial,
::aidl::android::hardware::radio::network::CdmaRoamingType type) override;
::ndk::ScopedAStatus setCellInfoListRate(int32_t serial, int32_t rate) override;
::ndk::ScopedAStatus setIndicationFilter(
int32_t serial,
::aidl::android::hardware::radio::network::IndicationFilter indicationFilter) override;
::ndk::ScopedAStatus setIndicationFilter(int32_t serial, int32_t indicationFilter) override;
::ndk::ScopedAStatus setLinkCapacityReportingCriteria(
int32_t serial, int32_t hysteresisMs, int32_t hysteresisDlKbps,
int32_t hysteresisUlKbps, const std::vector<int32_t>& thresholdsDownlinkKbps,

View File

@@ -31,8 +31,7 @@ class RadioVoice : public RadioCompatBase,
int32_t serial, const ::aidl::android::hardware::radio::voice::Dial& dialInfo) override;
::ndk::ScopedAStatus emergencyDial(
int32_t serial, const ::aidl::android::hardware::radio::voice::Dial& dialInfo,
::aidl::android::hardware::radio::voice::EmergencyServiceCategory categories,
const std::vector<std::string>& urns,
int32_t categories, const std::vector<std::string>& urns,
::aidl::android::hardware::radio::voice::EmergencyCallRouting routing,
bool hasKnownUserIntentEmergency, bool isTesting) override;
::ndk::ScopedAStatus exitEmergencyCallbackMode(int32_t serial) override;

View File

@@ -25,7 +25,6 @@
namespace android::hardware::radio::compat {
using ::aidl::android::hardware::radio::AccessNetwork;
using ::aidl::android::hardware::radio::RadioAccessFamily;
using ::aidl::android::hardware::radio::RadioTechnology;
namespace aidl = ::aidl::android::hardware::radio::modem;
@@ -40,7 +39,7 @@ aidl::RadioCapability toAidl(const V1_0::RadioCapability& capa) {
return {
.session = capa.session,
.phase = static_cast<int32_t>(capa.phase),
.raf = RadioAccessFamily(capa.raf),
.raf = static_cast<int32_t>(capa.raf),
.logicalModemUuid = capa.logicalModemUuid,
.status = static_cast<int32_t>(capa.status),
};

View File

@@ -208,8 +208,8 @@ Return<void> RadioIndication::registrationFailed( //
const hidl_string& chosenPlmn, hidl_bitfield<V1_5::Domain> domain, int32_t causeCode,
int32_t additionalCauseCode) {
LOG_CALL << type;
networkCb()->registrationFailed(toAidl(type), toAidl(cellIdentity), chosenPlmn,
aidl::Domain(domain), causeCode, additionalCauseCode);
networkCb()->registrationFailed(toAidl(type), toAidl(cellIdentity), chosenPlmn, domain,
causeCode, additionalCauseCode);
return {};
}

View File

@@ -28,7 +28,6 @@
namespace android::hardware::radio::compat {
using ::aidl::android::hardware::radio::AccessNetwork;
using ::aidl::android::hardware::radio::RadioAccessFamily;
using ::ndk::ScopedAStatus;
namespace aidl = ::aidl::android::hardware::radio::network;
constexpr auto ok = &ScopedAStatus::ok;
@@ -161,7 +160,7 @@ ScopedAStatus RadioNetwork::responseAcknowledgement() {
return ok();
}
ScopedAStatus RadioNetwork::setAllowedNetworkTypesBitmap(int32_t serial, RadioAccessFamily ntype) {
ScopedAStatus RadioNetwork::setAllowedNetworkTypesBitmap(int32_t serial, int32_t ntype) {
LOG_CALL << serial;
const auto raf = toHidlBitfield<V1_4::RadioAccessFamily>(ntype);
if (mHal1_6) {
@@ -197,7 +196,7 @@ ScopedAStatus RadioNetwork::setCellInfoListRate(int32_t serial, int32_t rate) {
return ok();
}
ScopedAStatus RadioNetwork::setIndicationFilter(int32_t serial, aidl::IndicationFilter indFilter) {
ScopedAStatus RadioNetwork::setIndicationFilter(int32_t serial, int32_t indFilter) {
LOG_CALL << serial;
mHal1_5->setIndicationFilter_1_5(serial, toHidlBitfield<V1_5::IndicationFilter>(indFilter));
return ok();

View File

@@ -27,7 +27,6 @@
namespace android::hardware::radio::compat {
using ::aidl::android::hardware::radio::RadioAccessFamily;
using ::aidl::android::hardware::radio::RadioTechnology;
using ::aidl::android::hardware::radio::RadioTechnologyFamily;
namespace aidl = ::aidl::android::hardware::radio::network;
@@ -44,16 +43,14 @@ Return<void> RadioResponse::getAllowedNetworkTypesBitmapResponse(
const V1_6::RadioResponseInfo& info,
hidl_bitfield<V1_4::RadioAccessFamily> networkTypeBitmap) {
LOG_CALL << info.serial;
networkCb()->getAllowedNetworkTypesBitmapResponse(toAidl(info),
RadioAccessFamily(networkTypeBitmap));
networkCb()->getAllowedNetworkTypesBitmapResponse(toAidl(info), networkTypeBitmap);
return {};
}
Return<void> RadioResponse::getPreferredNetworkTypeResponse(const V1_0::RadioResponseInfo& info,
V1_0::PreferredNetworkType nwType) {
LOG_CALL << info.serial;
networkCb()->getAllowedNetworkTypesBitmapResponse( //
toAidl(info), RadioAccessFamily(getRafFromNetworkType(nwType)));
networkCb()->getAllowedNetworkTypesBitmapResponse(toAidl(info), getRafFromNetworkType(nwType));
return {};
}

View File

@@ -53,7 +53,7 @@ ScopedAStatus RadioVoice::dial(int32_t serial, const aidl::Dial& dialInfo) {
}
ScopedAStatus RadioVoice::emergencyDial( //
int32_t serial, const aidl::Dial& info, aidl::EmergencyServiceCategory categories,
int32_t serial, const aidl::Dial& info, int32_t categories,
const std::vector<std::string>& urns, aidl::EmergencyCallRouting routing,
bool knownUserIntentEmerg, bool isTesting) {
LOG_CALL << serial;

View File

@@ -147,7 +147,7 @@ aidl::EmergencyNumber toAidl(const V1_4::EmergencyNumber& num) {
.number = num.number,
.mcc = num.mcc,
.mnc = num.mnc,
.categories = aidl::EmergencyServiceCategory(num.categories),
.categories = num.categories,
.urns = toAidl(num.urns),
.sources = num.sources,
};

View File

@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <aidl/android/hardware/radio/RadioAccessFamily.h>
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <aidl/android/hardware/radio/data/ApnTypes.h>
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <algorithm>
#include "radio_data_utils.h"
@@ -82,10 +83,18 @@ TEST_P(RadioDataTest, setupDataCall) {
dataProfileInfo.maxConns = 20;
dataProfileInfo.waitTime = 0;
dataProfileInfo.enabled = true;
// TODO(b/210712359): 320 was the previous value; need to support bitmaps
dataProfileInfo.supportedApnTypesBitmap = ApnTypes::DEFAULT;
// TODO(b/210712359): 161543 was the previous value; need to support bitmaps
dataProfileInfo.bearerBitmap = RadioAccessFamily::LTE;
dataProfileInfo.supportedApnTypesBitmap =
static_cast<int32_t>(ApnTypes::IMS) | static_cast<int32_t>(ApnTypes::IA);
dataProfileInfo.bearerBitmap = static_cast<int32_t>(RadioAccessFamily::GPRS) |
static_cast<int32_t>(RadioAccessFamily::EDGE) |
static_cast<int32_t>(RadioAccessFamily::UMTS) |
static_cast<int32_t>(RadioAccessFamily::HSDPA) |
static_cast<int32_t>(RadioAccessFamily::HSUPA) |
static_cast<int32_t>(RadioAccessFamily::HSPA) |
static_cast<int32_t>(RadioAccessFamily::EHRPD) |
static_cast<int32_t>(RadioAccessFamily::LTE) |
static_cast<int32_t>(RadioAccessFamily::HSPAP) |
static_cast<int32_t>(RadioAccessFamily::IWLAN);
dataProfileInfo.mtuV4 = 0;
dataProfileInfo.mtuV6 = 0;
dataProfileInfo.preferred = true;
@@ -130,11 +139,8 @@ TEST_P(RadioDataTest, setupDataCall_osAppId) {
TrafficDescriptor trafficDescriptor;
OsAppId osAppId;
std::string osAppIdString("osAppId");
// TODO(b/210712359): there should be a cleaner way to convert this
std::vector<unsigned char> output(osAppIdString.length());
std::transform(osAppIdString.begin(), osAppIdString.end(), output.begin(),
[](char c) { return static_cast<unsigned char>(c); });
osAppId.osAppId = output;
std::vector<unsigned char> osAppIdVec(osAppIdString.begin(), osAppIdString.end());
osAppId.osAppId = osAppIdVec;
trafficDescriptor.osAppId = osAppId;
DataProfileInfo dataProfileInfo;
@@ -151,10 +157,18 @@ TEST_P(RadioDataTest, setupDataCall_osAppId) {
dataProfileInfo.maxConns = 20;
dataProfileInfo.waitTime = 0;
dataProfileInfo.enabled = true;
// TODO(b/210712359): 320 was the previous value; need to support bitmaps
dataProfileInfo.supportedApnTypesBitmap = ApnTypes::DEFAULT;
// TODO(b/210712359): 161543 was the previous value; need to support bitmaps
dataProfileInfo.bearerBitmap = RadioAccessFamily::LTE;
dataProfileInfo.supportedApnTypesBitmap =
static_cast<int32_t>(ApnTypes::IMS) | static_cast<int32_t>(ApnTypes::IA);
dataProfileInfo.bearerBitmap = static_cast<int32_t>(RadioAccessFamily::GPRS) |
static_cast<int32_t>(RadioAccessFamily::EDGE) |
static_cast<int32_t>(RadioAccessFamily::UMTS) |
static_cast<int32_t>(RadioAccessFamily::HSDPA) |
static_cast<int32_t>(RadioAccessFamily::HSUPA) |
static_cast<int32_t>(RadioAccessFamily::HSPA) |
static_cast<int32_t>(RadioAccessFamily::EHRPD) |
static_cast<int32_t>(RadioAccessFamily::LTE) |
static_cast<int32_t>(RadioAccessFamily::HSPAP) |
static_cast<int32_t>(RadioAccessFamily::IWLAN);
dataProfileInfo.mtuV4 = 0;
dataProfileInfo.mtuV6 = 0;
dataProfileInfo.preferred = true;

View File

@@ -72,7 +72,7 @@ ndk::ScopedAStatus RadioNetworkIndication::nitzTimeReceived(RadioIndicationType
ndk::ScopedAStatus RadioNetworkIndication::registrationFailed(RadioIndicationType /*type*/,
const CellIdentity& /*cellIdentity*/,
const std::string& /*chosenPlmn*/,
Domain /*domain*/,
int32_t /*domain*/,
int32_t /*causeCode*/,
int32_t /*additionalCauseCode*/) {
return ndk::ScopedAStatus::ok();

View File

@@ -23,7 +23,7 @@ ndk::ScopedAStatus RadioNetworkResponse::acknowledgeRequest(int32_t /*serial*/)
}
ndk::ScopedAStatus RadioNetworkResponse::getAllowedNetworkTypesBitmapResponse(
const RadioResponseInfo& info, const RadioAccessFamily networkTypeBitmap) {
const RadioResponseInfo& info, const int32_t networkTypeBitmap) {
rspInfo = info;
networkTypeBitmapResponse = networkTypeBitmap;
parent_network.notify(info.serial);

View File

@@ -14,6 +14,7 @@
* limitations under the License.
*/
#include <aidl/android/hardware/radio/RadioAccessFamily.h>
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <android-base/logging.h>
#include <android/binder_manager.h>
@@ -57,7 +58,7 @@ void RadioNetworkTest::SetUp() {
*/
TEST_P(RadioNetworkTest, setAllowedNetworkTypesBitmap) {
serial = GetRandomSerialNumber();
RadioAccessFamily allowedNetworkTypesBitmap = RadioAccessFamily::LTE;
int32_t allowedNetworkTypesBitmap = static_cast<int32_t>(RadioAccessFamily::LTE);
radio_network->setAllowedNetworkTypesBitmap(serial, allowedNetworkTypesBitmap);
@@ -77,7 +78,7 @@ TEST_P(RadioNetworkTest, setAllowedNetworkTypesBitmap) {
*/
TEST_P(RadioNetworkTest, getAllowedNetworkTypesBitmap) {
serial = GetRandomSerialNumber();
RadioAccessFamily allowedNetworkTypesBitmap = RadioAccessFamily::LTE;
int32_t allowedNetworkTypesBitmap = static_cast<int32_t>(RadioAccessFamily::LTE);
radio_network->setAllowedNetworkTypesBitmap(serial, allowedNetworkTypesBitmap);

View File

@@ -39,7 +39,7 @@ class RadioNetworkResponse : public BnRadioNetworkResponse {
std::vector<RadioBandMode> radioBandModes;
std::vector<OperatorInfo> networkInfos;
bool isNrDualConnectivityEnabled;
RadioAccessFamily networkTypeBitmapResponse;
int networkTypeBitmapResponse;
RegStateResult regStateResp;
CellIdentity barringCellIdentity;
std::vector<BarringInfo> barringInfos;
@@ -47,7 +47,7 @@ class RadioNetworkResponse : public BnRadioNetworkResponse {
virtual ndk::ScopedAStatus acknowledgeRequest(int32_t serial) override;
virtual ndk::ScopedAStatus getAllowedNetworkTypesBitmapResponse(
const RadioResponseInfo& info, const RadioAccessFamily networkTypeBitmap) override;
const RadioResponseInfo& info, const int32_t networkTypeBitmap) override;
virtual ndk::ScopedAStatus getAvailableBandModesResponse(
const RadioResponseInfo& info, const std::vector<RadioBandMode>& bandModes) override;
@@ -186,7 +186,7 @@ class RadioNetworkIndication : public BnRadioNetworkIndication {
virtual ndk::ScopedAStatus registrationFailed(RadioIndicationType type,
const CellIdentity& cellIdentity,
const std::string& chosenPlmn, Domain domain,
const std::string& chosenPlmn, int32_t domain,
int32_t causeCode,
int32_t additionalCauseCode) override;

View File

@@ -15,6 +15,7 @@
*/
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <aidl/android/hardware/radio/voice/EmergencyServiceCategory.h>
#include <android-base/logging.h>
#include <android/binder_manager.h>
@@ -95,7 +96,7 @@ TEST_P(RadioVoiceTest, emergencyDial) {
Dial dialInfo;
dialInfo.address = std::string("911");
EmergencyServiceCategory categories = EmergencyServiceCategory::UNSPECIFIED;
int32_t categories = static_cast<int32_t>(EmergencyServiceCategory::UNSPECIFIED);
std::vector<std::string> urns = {""};
EmergencyCallRouting routing = EmergencyCallRouting::UNKNOWN;
@@ -152,7 +153,7 @@ TEST_P(RadioVoiceTest, emergencyDial_withServices) {
Dial dialInfo;
dialInfo.address = std::string("911");
EmergencyServiceCategory categories = EmergencyServiceCategory::AMBULANCE;
int32_t categories = static_cast<int32_t>(EmergencyServiceCategory::AMBULANCE);
std::vector<std::string> urns = {"urn:service:sos.ambulance"};
EmergencyCallRouting routing = EmergencyCallRouting::UNKNOWN;
@@ -209,7 +210,7 @@ TEST_P(RadioVoiceTest, emergencyDial_withEmergencyRouting) {
Dial dialInfo;
dialInfo.address = std::string("911");
EmergencyServiceCategory categories = EmergencyServiceCategory::UNSPECIFIED;
int32_t categories = static_cast<int32_t>(EmergencyServiceCategory::UNSPECIFIED);
std::vector<std::string> urns = {""};
EmergencyCallRouting routing = EmergencyCallRouting::EMERGENCY;