diff options
author | Arthur Ishiguro <arthuri@google.com> | 2022-06-10 21:49:15 +0000 |
---|---|---|
committer | Arthur Ishiguro <arthuri@google.com> | 2022-06-13 16:06:34 +0000 |
commit | 6b48d121d9cdea0f3a1ed93e55b1b60056c62b8d (patch) | |
tree | ad5c93c39a2f1051cc7fab94ddc3efbd7273e330 /sensors | |
parent | f828bd264ce333a35dad7a9e0a2eb1558ab88fd8 (diff) |
Adds missing AIDL HAL SensorStatus conversion logic
Bug: 235629868
Test: Compile
Change-Id: Ice2df3935f2bcab9e9612ebd3fdacc57ea6f8dbc
Diffstat (limited to 'sensors')
-rw-r--r-- | sensors/aidl/default/multihal/ConvertUtils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sensors/aidl/default/multihal/ConvertUtils.cpp b/sensors/aidl/default/multihal/ConvertUtils.cpp index 9b2d8fe309..bf56ed52a3 100644 --- a/sensors/aidl/default/multihal/ConvertUtils.cpp +++ b/sensors/aidl/default/multihal/ConvertUtils.cpp @@ -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; } |