Lines Matching refs:handle
228 int handle = mActiveSensors.keyAt(i); in dump() local
230 getSensorName(handle).string(), in dump()
231 handle, in dump()
363 String8 SensorService::getSensorName(int handle) const { in getSensorName()
367 if (sensor.getHandle() == handle) { in getSensorName()
399 int handle = mActiveSensors.keyAt(i); in cleanupConnection() local
400 if (c->hasSensor(handle)) { in cleanupConnection()
401 ALOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle); in cleanupConnection()
402 SensorInterface* sensor = mSensorMap.valueFor( handle ); in cleanupConnection()
403 ALOGE_IF(!sensor, "mSensorMap[handle=0x%08x] is null!", handle); in cleanupConnection()
409 ALOGE_IF(!rec, "mActiveSensors[%d] is null (handle=0x%08x)!", i, handle); in cleanupConnection()
412 c, i, handle); in cleanupConnection()
417 mActiveVirtualSensors.removeItem(handle); in cleanupConnection()
429 int handle) in enable() argument
435 SensorInterface* sensor = mSensorMap.valueFor(handle); in enable()
438 SensorRecord* rec = mActiveSensors.valueFor(handle); in enable()
441 mActiveSensors.add(handle, rec); in enable()
443 mActiveVirtualSensors.add(handle, sensor); in enable()
453 sensors_event_t& event(mLastEventSeen.editValueFor(handle)); in enable()
462 if (connection->addSensor(handle)) { in enable()
463 BatteryService::enableSensor(connection->getUid(), handle); in enable()
471 handle, connection.get()); in enable()
479 int handle) in disable() argument
486 SensorRecord* rec = mActiveSensors.valueFor(handle); in disable()
489 if (connection->removeSensor(handle)) { in disable()
490 BatteryService::disableSensor(connection->getUid(), handle); in disable()
497 mActiveSensors.removeItem(handle); in disable()
498 mActiveVirtualSensors.removeItem(handle); in disable()
501 SensorInterface* sensor = mSensorMap.valueFor(handle); in disable()
508 int handle, nsecs_t ns) in setEventRate() argument
513 SensorInterface* sensor = mSensorMap.valueFor(handle); in setEventRate()
528 return sensor->setDelay(connection.get(), handle, ns); in setEventRate()
577 bool SensorService::SensorEventConnection::addSensor(int32_t handle) { in addSensor() argument
579 if (mSensorInfo.indexOf(handle) < 0) { in addSensor()
580 mSensorInfo.add(handle); in addSensor()
586 bool SensorService::SensorEventConnection::removeSensor(int32_t handle) { in removeSensor() argument
588 if (mSensorInfo.remove(handle) >= 0) { in removeSensor()
594 bool SensorService::SensorEventConnection::hasSensor(int32_t handle) const { in hasSensor()
596 return mSensorInfo.indexOf(handle) >= 0; in hasSensor()
647 int handle, bool enabled) in enableDisable() argument
651 err = mService->enable(this, handle); in enableDisable()
653 err = mService->disable(this, handle); in enableDisable()
659 int handle, nsecs_t ns) in setEventRate() argument
661 return mService->setEventRate(this, handle, ns); in setEventRate()