diff options
author | Steven Moreland <smoreland@google.com> | 2018-10-10 13:59:36 -0700 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2018-10-11 11:02:25 -0700 |
commit | dec5272582ace2253090f29a5b3c8734d5b19234 (patch) | |
tree | 1a184535c897b48fdea563448926f1d5d035eae8 /tests | |
parent | f59720c6b85f93d2ddc94244eb66e805ea820636 (diff) | |
download | android_hardware_interfaces-dec5272582ace2253090f29a5b3c8734d5b19234.tar.gz android_hardware_interfaces-dec5272582ace2253090f29a5b3c8734d5b19234.tar.bz2 android_hardware_interfaces-dec5272582ace2253090f29a5b3c8734d5b19234.zip |
Add monostate to optional safe unions.
Bug: 116156870
Test: hidl_test, hidl_test_java
Change-Id: Ie17a80dee982775e267a39086016071ac2361fb5
Diffstat (limited to 'tests')
-rw-r--r-- | tests/safeunion/1.0/Android.bp | 1 | ||||
-rw-r--r-- | tests/safeunion/1.0/ISafeUnion.hal | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/safeunion/1.0/Android.bp b/tests/safeunion/1.0/Android.bp index ede840188..87edd537f 100644 --- a/tests/safeunion/1.0/Android.bp +++ b/tests/safeunion/1.0/Android.bp @@ -9,6 +9,7 @@ hidl_interface { ], interfaces: [ "android.hidl.base@1.0", + "android.hidl.safe_union@1.0", ], gen_java: true, } diff --git a/tests/safeunion/1.0/ISafeUnion.hal b/tests/safeunion/1.0/ISafeUnion.hal index f48248b51..58c08c615 100644 --- a/tests/safeunion/1.0/ISafeUnion.hal +++ b/tests/safeunion/1.0/ISafeUnion.hal @@ -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; |