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:
Arthur Ishiguro
2022-01-21 16:12:04 +00:00
parent 7171ff4026
commit d97a3c3cd8

View File

@@ -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;
}