Adds missing AIDL HAL SensorStatus conversion logic am: 6b48d121d9 am: 8f44b69c39 am: e39fd50fde am: 2c4b7216e5

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

Change-Id: Ied765b893216c872a6789c0d812704f28efaa6b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Arthur Ishiguro 2022-06-13 18:49:18 +00:00 committed by Automerger Merge Worker
commit 5d301a1c45

View file

@ -77,6 +77,8 @@ void convertToHidlEvent(const AidlEvent& aidlEvent, V2_1Event* hidlEvent) {
hidlEvent->u.vec3.x = aidlEvent.payload.get<Event::EventPayload::vec3>().x;
hidlEvent->u.vec3.y = aidlEvent.payload.get<Event::EventPayload::vec3>().y;
hidlEvent->u.vec3.z = aidlEvent.payload.get<Event::EventPayload::vec3>().z;
hidlEvent->u.vec3.status =
(V1_0SensorStatus)aidlEvent.payload.get<Event::EventPayload::vec3>().status;
break;
case AidlSensorType::GAME_ROTATION_VECTOR:
hidlEvent->u.vec4.x = aidlEvent.payload.get<Event::EventPayload::vec4>().x;
@ -225,6 +227,7 @@ void convertToAidlEvent(const V2_1Event& hidlEvent, AidlEvent* aidlEvent) {
vec3.x = hidlEvent.u.vec3.x;
vec3.y = hidlEvent.u.vec3.y;
vec3.z = hidlEvent.u.vec3.z;
vec3.status = (SensorStatus)hidlEvent.u.vec3.status;
aidlEvent->payload.set<Event::EventPayload::vec3>(vec3);
break;
}