fix a typo causing sensor event to be sorted in reverse chronological order
Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index 16ddd91..d3b667f 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -316,7 +316,7 @@
static int cmp(void const* lhs, void const* rhs) {
sensors_event_t const* l = static_cast<sensors_event_t const*>(lhs);
sensors_event_t const* r = static_cast<sensors_event_t const*>(rhs);
- return r->timestamp - l->timestamp;
+ return l->timestamp - r->timestamp;
}
};
qsort(buffer, count, sizeof(sensors_event_t), compar::cmp);