Merge "Cast to the underlying type for union tags" am: 6cd0d474b2 am: 5eb895c047

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

Change-Id: I9023258edf659c7994e1f7762b170b232962994e