Lines Matching refs:sensorHandle

57 int32_t setSubHalIndex(int32_t sensorHandle, size_t subHalIndex) {  in setSubHalIndex()  argument
58 return sensorHandle | (static_cast<int32_t>(subHalIndex) << kBitsAfterSubHalIndex); in setSubHalIndex()
68 size_t extractSubHalIndex(int32_t sensorHandle) { in extractSubHalIndex() argument
69 return static_cast<size_t>(sensorHandle >> kBitsAfterSubHalIndex); in extractSubHalIndex()
130 Return<Result> HalProxy::activate(int32_t sensorHandle, bool enabled) { in activate() argument
131 if (!isSubHalIndexValid(sensorHandle)) { in activate()
134 return getSubHalForSensorHandle(sensorHandle) in activate()
135 ->activate(clearSubHalIndex(sensorHandle), enabled); in activate()
206 Return<Result> HalProxy::batch(int32_t sensorHandle, int64_t samplingPeriodNs, in batch() argument
208 if (!isSubHalIndexValid(sensorHandle)) { in batch()
211 return getSubHalForSensorHandle(sensorHandle) in batch()
212 ->batch(clearSubHalIndex(sensorHandle), samplingPeriodNs, maxReportLatencyNs); in batch()
215 Return<Result> HalProxy::flush(int32_t sensorHandle) { in flush() argument
216 if (!isSubHalIndexValid(sensorHandle)) { in flush()
219 return getSubHalForSensorHandle(sensorHandle)->flush(clearSubHalIndex(sensorHandle)); in flush()
232 if (!isSubHalIndexValid(event.sensorHandle)) { in injectSensorData()
235 subHalEvent.sensorHandle = clearSubHalIndex(event.sensorHandle); in injectSensorData()
236 result = getSubHalForSensorHandle(event.sensorHandle)->injectSensorData(subHalEvent); in injectSensorData()
261 Return<void> HalProxy::configDirectReport(int32_t sensorHandle, int32_t channelHandle, in configDirectReport() argument
266 mDirectChannelSubHal->configDirectReport(clearSubHalIndex(sensorHandle), channelHandle, in configDirectReport()
320 if (!subHalIndexIsClear(sensor.sensorHandle)) { in onDynamicSensorsConnected()
324 sensor.sensorHandle = setSubHalIndex(sensor.sensorHandle, subHalIndex); in onDynamicSensorsConnected()
325 mDynamicSensors[sensor.sensorHandle] = sensor; in onDynamicSensorsConnected()
340 for (int32_t sensorHandle : dynamicSensorHandlesRemoved) { in onDynamicSensorsDisconnected() local
341 if (!subHalIndexIsClear(sensorHandle)) { in onDynamicSensorsDisconnected()
344 sensorHandle = setSubHalIndex(sensorHandle, subHalIndex); in onDynamicSensorsDisconnected()
345 if (mDynamicSensors.find(sensorHandle) != mDynamicSensors.end()) { in onDynamicSensorsDisconnected()
346 mDynamicSensors.erase(sensorHandle); in onDynamicSensorsDisconnected()
347 sensorHandles.push_back(sensorHandle); in onDynamicSensorsDisconnected()
402 if (!subHalIndexIsClear(sensor.sensorHandle)) { in initializeSensorList()
406 sensor.sensorHandle = setSubHalIndex(sensor.sensorHandle, subHalIndex); in initializeSensorList()
408 mSensors[sensor.sensorHandle] = sensor; in initializeSensorList()
467 int32_t sensorHandle = sensorEntry.first; in disableAllSensors() local
468 activate(sensorHandle, false /* enabled */); in disableAllSensors()
472 int32_t sensorHandle = sensorEntry.first; in disableAllSensors() local
473 activate(sensorHandle, false /* enabled */); in disableAllSensors()
643 ISensorsSubHal* HalProxy::getSubHalForSensorHandle(int32_t sensorHandle) { in getSubHalForSensorHandle() argument
644 return mSubHalList[extractSubHalIndex(sensorHandle)]; in getSubHalForSensorHandle()
647 bool HalProxy::isSubHalIndexValid(int32_t sensorHandle) { in isSubHalIndexValid() argument
648 return extractSubHalIndex(sensorHandle) < mSubHalList.size(); in isSubHalIndexValid()
654 int32_t sensorHandle = events[i].sensorHandle; in countNumWakeupEvents() local
655 if (mSensors[sensorHandle].flags & static_cast<uint32_t>(V1_0::SensorFlagBits::WAKE_UP)) { in countNumWakeupEvents()
662 int32_t HalProxy::clearSubHalIndex(int32_t sensorHandle) { in clearSubHalIndex() argument
663 return sensorHandle & (~kSensorHandleSubHalIndexMask); in clearSubHalIndex()
666 bool HalProxy::subHalIndexIsClear(int32_t sensorHandle) { in subHalIndexIsClear() argument
667 return (sensorHandle & kSensorHandleSubHalIndexMask) == 0; in subHalIndexIsClear()
698 event.sensorHandle = setSubHalIndex(event.sensorHandle, mSubHalIndex); in processEvents()
700 const SensorInfo& sensor = mHalProxy->getSensorInfo(event.sensorHandle); in processEvents()