mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
Relax assertion criteria in HIDL sensors convert code
Because this code may be used to translate from/between subsequent sensor types (e.g. new AIDL sensor types), relax the assertion criteria to allow this generic conversion. Bug: 215702376 Test: Compile Change-Id: I40b67aa91d5e0d35199b561d32b2d7f7d59a4ac4
This commit is contained in:
@@ -190,8 +190,6 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) {
|
||||
}
|
||||
|
||||
default: {
|
||||
CHECK_GE((int32_t)dst->sensorType, (int32_t)SensorType::DEVICE_PRIVATE_BASE);
|
||||
|
||||
memcpy(dst->u.data.data(), src.data, 16 * sizeof(float));
|
||||
break;
|
||||
}
|
||||
@@ -330,9 +328,6 @@ void convertToSensorEvent(const Event &src, sensors_event_t *dst) {
|
||||
}
|
||||
|
||||
default: {
|
||||
CHECK_GE((int32_t)src.sensorType,
|
||||
(int32_t)SensorType::DEVICE_PRIVATE_BASE);
|
||||
|
||||
memcpy(dst->data, src.u.data.data(), 16 * sizeof(float));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user