Merge changes from topic "revert-2313818-sensors_shared_convert-WBBPAAQJOV" am: 51b7ac6e12
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2321959
Change-Id: Icc598479a652faf43912c0679238d2d14a011082
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index 3992f82..615a7a8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -56,8 +56,7 @@
cc_library_headers {
name: "libandroid_sensor_headers",
- vendor_available: true,
- host_supported: true,
+ vendor: true,
export_include_dirs: ["include_sensor"],
}
diff --git a/services/sensorservice/aidl/utils.cpp b/services/sensorservice/aidl/utils.cpp
index beb38b9..26bcdc5 100644
--- a/services/sensorservice/aidl/utils.cpp
+++ b/services/sensorservice/aidl/utils.cpp
@@ -58,7 +58,7 @@
::aidl::android::hardware::sensors::Event convertEvent(const ::ASensorEvent& src) {
::aidl::android::hardware::sensors::Event dst;
::android::hardware::sensors::implementation::
- convertFromASensorEvent(src, &dst);
+ convertFromSensorEvent(reinterpret_cast<const sensors_event_t&>(src), &dst);
return dst;
}
diff --git a/services/sensorservice/hidl/utils.cpp b/services/sensorservice/hidl/utils.cpp
index 5fa594d..2f9e922 100644
--- a/services/sensorservice/hidl/utils.cpp
+++ b/services/sensorservice/hidl/utils.cpp
@@ -76,8 +76,8 @@
::android::hardware::sensors::V1_0::Event convertEvent(const ::ASensorEvent& src) {
::android::hardware::sensors::V1_0::Event dst;
- ::android::hardware::sensors::V1_0::implementation::convertFromASensorEvent(
- src, &dst);
+ ::android::hardware::sensors::V1_0::implementation::convertFromSensorEvent(
+ reinterpret_cast<const sensors_event_t&>(src), &dst);
return dst;
}