Add monostate to optional safe unions.
Bug: 116156870 Test: hidl_test, hidl_test_java Change-Id: Ie17a80dee982775e267a39086016071ac2361fb5
This commit is contained in:
parent
f59720c6b8
commit
dec5272582
4 changed files with 16 additions and 3 deletions
|
@ -17,6 +17,7 @@ hidl_interface {
|
|||
"android.hardware.radio@1.1",
|
||||
"android.hardware.radio@1.2",
|
||||
"android.hidl.base@1.0",
|
||||
"android.hidl.safe_union@1.0",
|
||||
],
|
||||
types: [
|
||||
"AccessNetwork",
|
||||
|
|
|
@ -26,6 +26,8 @@ import @1.2::AccessNetwork;
|
|||
import @1.2::CellIdentity;
|
||||
import @1.2::DataRegStateResult;
|
||||
|
||||
import android.hidl.safe_union@1.0::Monostate;
|
||||
|
||||
enum AccessNetwork : @1.2::AccessNetwork {
|
||||
/**
|
||||
* Unknown access network
|
||||
|
@ -162,6 +164,8 @@ struct DataRegStateResult {
|
|||
* will be empty when device is camped only on 2G/3G .
|
||||
*/
|
||||
safe_union VopsInfo {
|
||||
Monostate noinit;
|
||||
|
||||
LteVopsInfo lteVopsInfo; // LTE network capability
|
||||
} vopsInfo;
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@ hidl_interface {
|
|||
],
|
||||
interfaces: [
|
||||
"android.hidl.base@1.0",
|
||||
"android.hidl.safe_union@1.0",
|
||||
],
|
||||
gen_java: true,
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ package android.hardware.tests.safeunion@1.0;
|
|||
|
||||
import IOtherInterface;
|
||||
|
||||
import android.hidl.safe_union@1.0::Monostate;
|
||||
|
||||
interface ISafeUnion {
|
||||
|
||||
enum BitField : uint8_t {
|
||||
|
@ -33,14 +35,15 @@ interface ISafeUnion {
|
|||
string j3;
|
||||
};
|
||||
|
||||
safe_union EmptySafeUnion {
|
||||
};
|
||||
|
||||
safe_union SmallSafeUnion {
|
||||
Monostate noinit;
|
||||
|
||||
uint8_t a;
|
||||
};
|
||||
|
||||
safe_union LargeSafeUnion {
|
||||
Monostate noinit;
|
||||
|
||||
int8_t a;
|
||||
uint16_t b;
|
||||
int32_t c;
|
||||
|
@ -66,6 +69,8 @@ interface ISafeUnion {
|
|||
};
|
||||
|
||||
safe_union InterfaceTypeSafeUnion {
|
||||
Monostate noinit;
|
||||
|
||||
uint32_t a;
|
||||
int8_t[7] b;
|
||||
IOtherInterface c;
|
||||
|
@ -76,6 +81,8 @@ interface ISafeUnion {
|
|||
};
|
||||
|
||||
safe_union HandleTypeSafeUnion {
|
||||
Monostate noinit;
|
||||
|
||||
handle a;
|
||||
handle[5] b;
|
||||
vec<handle> c;
|
||||
|
|
Loading…
Reference in a new issue