Lines Matching refs:count

79         ssize_t count = dev.getSensorList(&list);
80 if (count > 0) {
88 mLastEventSeen.setCapacity(count);
89 for (ssize_t i=0 ; i<count ; i++) {
118 registerVirtualSensor( new GravitySensor(list, count) );
119 registerVirtualSensor( new LinearAccelerationSensor(list, count) );
123 registerVirtualSensor( new CorrectedGyroSensor(list, count) );
244 sensors_event_t const* buffer, const int count) {
247 for (int i=0 ; i<count ; i++) {
272 ssize_t count;
276 count = device.poll(buffer, numEventMax);
277 if (count<0) {
278 ALOGE("sensor poll failed (%s)", strerror(-count));
285 for (int i = 0; i < count; i++) {
293 recordLastValue(buffer, count);
296 if (count && vcount) {
305 for (size_t i=0 ; i<size_t(count) ; i++) {
309 for (size_t i=0 ; i<size_t(count) && k<minBufferSize ; i++) {
311 if (count + k >= minBufferSize) {
313 "count=%u, k=%u, size=%u",
314 count, k, minBufferSize);
320 buffer[count + k] = out;
327 recordLastValue(&buffer[count], k);
328 count += k;
330 sortEventBuffer(buffer, count);
337 for (int i = 0; i < count; i++) {
354 connection->sendEvents(buffer, count, scratch);
356 cleanupAutoDisabledSensor(connection, buffer, count);
363 } while (count >= 0 || Thread::exitPending());
371 sensors_event_t const * buffer, size_t count)
377 for (size_t i=1 ; i<count ; i++) {
385 mLastEventSeen.editValueFor(prev) = buffer[count-1];
388 void SensorService::sortEventBuffer(sensors_event_t* buffer, size_t count)
397 qsort(buffer, count, sizeof(sensors_event_t), compar::cmp);
415 size_t count = mUserSensorList.size();
416 for (size_t i=0 ; i<count ; i++) {
427 size_t count = mUserSensorList.size();
428 for (size_t i=0 ; i<count ; i++) {
692 size_t count = 0;
700 scratch[count++] = buffer[i++];
708 count = numEvents;
713 reinterpret_cast<ASensorEvent const*>(scratch), count);
717 //ALOGW("dropping %d events on the floor", count);