Lines Matching refs:bl
256 sp<BubbleLevelImpl> bl = sp<BubbleLevelImpl>((BubbleLevelImpl *)data);
258 bl->lockState();
259 if (((bl->state() != BubbleLevelImpl::BL_STATE_POLLING) &&
260 (bl->state() != BubbleLevelImpl::BL_STATE_POLLING_ONCE)) ||
261 (bl->pollCount() >= BL_SENSOR_POLL_COUNT)) {
262 bl->unlockState();
265 bl->unlockState();
267 sp<SensorEventQueue> sensorEventQueue = bl->sensorEventQueue();
268 size_t numSensors = bl->numSensors();
292 bl->lockState();
293 bl->incPollCount();
295 bl->incLevelCount();
297 bl->unlockState();
309 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
310 return bl->bubble_level->setCallback(callback, userData);
315 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
316 return bl->bubble_level->setPollInterval(seconds);
321 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
322 return bl->bubble_level->startPolling();
327 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
328 return bl->bubble_level->stopPolling();
333 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
334 return bl->bubble_level->pollOnce();
340 bubble_level_C_impl *bl = new bubble_level_C_impl();
341 bl->bubble_level = new android::BubbleLevelImpl();
342 if (bl->bubble_level->initStatus() != 0) {
343 bubble_level_release((struct bubble_level *)bl);
346 bl->interface.set_callback = bl_set_callback;
347 bl->interface.set_poll_interval = bl_set_poll_interval;
348 bl->interface.start_polling = bl_start_polling;
349 bl->interface.stop_polling = bl_stop_polling;
350 bl->interface.poll_once = bl_poll_once;
352 return (struct bubble_level *)bl;
357 bubble_level_C_impl *bl = (bubble_level_C_impl *)bubble_level;
359 if (bl == NULL)
362 bl->bubble_level.clear();