Update Barring HAL Structures to nest single-use unions/structs

Bug: 148102466
Test: compilation for both cuttlefish and sargo
Change-Id: I8a8e734011909b038c0d735c2bfde7ea773b71e6
This commit is contained in:
Rambo Wang
2020-02-03 13:44:47 -08:00
parent d9939b5878
commit 24c3416b4f
2 changed files with 106 additions and 115 deletions

View File

@@ -679,7 +679,7 @@ a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardwar
def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
62cf050c593c1ec34b49178b5bdde72dd9b80d9bad3eb184e4f0cd564d28678c android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
98592d193a717066facf91428426e5abe211e3bd718bc372e29fb944ddbe6e7c android.hardware.wifi.supplicant@1.3::types
88fb40d98b89cfaafad33b06c95e5dcd51c4470962e8fbe80ed22884407f98a1 android.hardware.radio@1.5::types
e1d34b83188a8ef3c507ec53c0ebcf714863c746da7f4a05460453f7c4c09389 android.hardware.radio@1.5::types
8062d0a1a03594dd8b448adcf6f08856b5720f7e33f9b785a21d3ef74a4f211d android.hardware.radio@1.5::IRadio
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
7f2439b48bda2961c6d629d0415eee66d519142cf9537f05e9d285153c70ca85 android.hardware.radio@1.5::IRadioResponse

View File

@@ -692,125 +692,116 @@ safe_union CellIdentity {
CellIdentityNr nr;
};
/**
* Combined list of barring services for UTRAN, EUTRAN, and NGRAN.
*
* Barring information is defined in:
* -UTRAN - 3gpp 25.331 Sec 10.2.48.8.6.
* -EUTRAN - 3gpp 36.331 Sec 6.3.1 SystemInformationBlockType2
* -NGRAN - 3gpp 38.331 Sec 6.3.2 UAC-BarringInfo and 22.261 Sec 6.22.2.[2-3]
*/
enum BarringServiceType : int32_t {
/** Applicable to UTRAN */
/** Barring for all CS services, including registration */
CS_SERVICE,
/** Barring for all PS services, including registration */
PS_SERVICE,
/** Barring for mobile-originated circuit-switched voice calls */
CS_VOICE,
/** Applicable to EUTRAN, NGRAN */
/** Barring for mobile-originated signalling for any purpose */
MO_SIGNALLING,
/** Barring for mobile-originated internet or other interactive data */
MO_DATA,
/** Barring for circuit-switched fallback calling */
CS_FALLBACK,
/** Barring for IMS voice calling */
MMTEL_VOICE,
/** Barring for IMS video calling */
MMTEL_VIDEO,
/** Applicable to UTRAN, EUTRAN, NGRAN */
/** Barring for emergency services, either CS or emergency MMTEL */
EMERGENCY,
/** Barring for short message services */
SMS,
/** Operator-specific barring codes; applicable to NGRAN */
OPERATOR_1 = 1001,
OPERATOR_2 = 1002,
OPERATOR_3 = 1003,
OPERATOR_4 = 1004,
OPERATOR_5 = 1005,
OPERATOR_6 = 1006,
OPERATOR_7 = 1007,
OPERATOR_8 = 1008,
OPERATOR_9 = 1009,
OPERATOR_10 = 1010,
OPERATOR_11 = 1011,
OPERATOR_12 = 1012,
OPERATOR_13 = 1013,
OPERATOR_14 = 1014,
OPERATOR_15 = 1015,
OPERATOR_16 = 1016,
OPERATOR_17 = 1017,
OPERATOR_18 = 1018,
OPERATOR_19 = 1019,
OPERATOR_20 = 1020,
OPERATOR_21 = 1021,
OPERATOR_22 = 1022,
OPERATOR_23 = 1023,
OPERATOR_24 = 1024,
OPERATOR_25 = 1025,
OPERATOR_26 = 1026,
OPERATOR_27 = 1027,
OPERATOR_28 = 1028,
OPERATOR_29 = 1029,
OPERATOR_30 = 1030,
OPERATOR_31 = 1031,
OPERATOR_32 = 1032,
};
enum BarringType : int32_t {
/** Device is not barred for the given service */
NONE,
/** Device may be barred based on time and probability factors */
CONDITIONAL,
/* Device is unconditionally barred */
UNCONDITIONAL,
};
struct ConditionalBarringInfo {
/** The barring factor as a percentage 0-100 */
int32_t barringFactor;
/** The number of seconds between re-evaluations of barring */
int32_t barringTimeSeconds;
/**
* Indicates whether barring is currently being applied.
*
* <p>True if the UE applies barring to a conditionally barred
* service based on the conditional barring parameters.
*
* <p>False if the service is conditionally barred but barring
* is not currently applied, which could be due to either the
* barring criteria not having been evaluated (if the UE has not
* attempted to use the service) or due to the criteria being
* evaluated and the UE being permitted to use the service
* despite conditional barring.
*/
bool isBarred;
};
safe_union BarringTypeSpecificInfo {
/** Barring type is either none or unconditional */
Monostate noinit;
/** Must be included if barring is conditional */
ConditionalBarringInfo conditionalBarringInfo;
};
struct BarringInfo {
/** Barring service */
BarringServiceType service;
/**
* Combined list of barring services for UTRAN, EUTRAN, and NGRAN.
*
* Barring information is defined in:
* -UTRAN - 3gpp 25.331 Sec 10.2.48.8.6.
* -EUTRAN - 3gpp 36.331 Sec 6.3.1 SystemInformationBlockType2
* -NGRAN - 3gpp 38.331 Sec 6.3.2 UAC-BarringInfo and 22.261 Sec 6.22.2.[2-3]
*/
enum ServiceType : int32_t {
/** Applicable to UTRAN */
/** Barring for all CS services, including registration */
CS_SERVICE,
/** Barring for all PS services, including registration */
PS_SERVICE,
/** Barring for mobile-originated circuit-switched voice calls */
CS_VOICE,
/** Applicable to EUTRAN, NGRAN */
/** Barring for mobile-originated signalling for any purpose */
MO_SIGNALLING,
/** Barring for mobile-originated internet or other interactive data */
MO_DATA,
/** Barring for circuit-switched fallback calling */
CS_FALLBACK,
/** Barring for IMS voice calling */
MMTEL_VOICE,
/** Barring for IMS video calling */
MMTEL_VIDEO,
/** Applicable to UTRAN, EUTRAN, NGRAN */
/** Barring for emergency services, either CS or emergency MMTEL */
EMERGENCY,
/** Barring for short message services */
SMS,
/** Operator-specific barring codes; applicable to NGRAN */
OPERATOR_1 = 1001,
OPERATOR_2 = 1002,
OPERATOR_3 = 1003,
OPERATOR_4 = 1004,
OPERATOR_5 = 1005,
OPERATOR_6 = 1006,
OPERATOR_7 = 1007,
OPERATOR_8 = 1008,
OPERATOR_9 = 1009,
OPERATOR_10 = 1010,
OPERATOR_11 = 1011,
OPERATOR_12 = 1012,
OPERATOR_13 = 1013,
OPERATOR_14 = 1014,
OPERATOR_15 = 1015,
OPERATOR_16 = 1016,
OPERATOR_17 = 1017,
OPERATOR_18 = 1018,
OPERATOR_19 = 1019,
OPERATOR_20 = 1020,
OPERATOR_21 = 1021,
OPERATOR_22 = 1022,
OPERATOR_23 = 1023,
OPERATOR_24 = 1024,
OPERATOR_25 = 1025,
OPERATOR_26 = 1026,
OPERATOR_27 = 1027,
OPERATOR_28 = 1028,
OPERATOR_29 = 1029,
OPERATOR_30 = 1030,
OPERATOR_31 = 1031,
OPERATOR_32 = 1032,
} serviceType;
/** The type of barring applied to the service */
BarringType type;
enum BarringType : int32_t {
/** Device is not barred for the given service */
NONE,
/** Device may be barred based on time and probability factors */
CONDITIONAL,
/* Device is unconditionally barred */
UNCONDITIONAL,
} barringType;
/** Type-specific barring info if applicable */
BarringTypeSpecificInfo typeSpecificInfo;
safe_union BarringTypeSpecificInfo {
/** Barring type is either none or unconditional */
Monostate noinit;
/** Must be included if barring is conditional */
struct Conditional {
/** The barring factor as a percentage 0-100 */
int32_t factor;
/** The number of seconds between re-evaluations of barring */
int32_t timeSeconds;
/**
* Indicates whether barring is currently being applied.
*
* <p>True if the UE applies barring to a conditionally barred
* service based on the conditional barring parameters.
*
* <p>False if the service is conditionally barred but barring
* is not currently applied, which could be due to either the
* barring criteria not having been evaluated (if the UE has not
* attempted to use the service) or due to the criteria being
* evaluated and the UE being permitted to use the service
* despite conditional barring.
*/
bool isBarred;
} conditional;
} barringTypeSpecificInfo;
};
enum IndicationFilter : @1.2::IndicationFilter {