From 6b48d121d9cdea0f3a1ed93e55b1b60056c62b8d Mon Sep 17 00:00:00 2001 From: Arthur Ishiguro Date: Fri, 10 Jun 2022 21:49:15 +0000 Subject: [PATCH] Adds missing AIDL HAL SensorStatus conversion logic Bug: 235629868 Test: Compile Change-Id: Ice2df3935f2bcab9e9612ebd3fdacc57ea6f8dbc --- sensors/aidl/default/multihal/ConvertUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) 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().x; hidlEvent->u.vec3.y = aidlEvent.payload.get().y; hidlEvent->u.vec3.z = aidlEvent.payload.get().z; + hidlEvent->u.vec3.status = + (V1_0SensorStatus)aidlEvent.payload.get().status; break; case AidlSensorType::GAME_ROTATION_VECTOR: hidlEvent->u.vec4.x = aidlEvent.payload.get().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(vec3); break; }