Lines Matching refs:eventHubId

264 void InputReader::addDeviceLocked(nsecs_t when, int32_t eventHubId) {  in addDeviceLocked()  argument
265 if (mDevices.find(eventHubId) != mDevices.end()) { in addDeviceLocked()
266 ALOGW("Ignoring spurious device added event for eventHubId %d.", eventHubId); in addDeviceLocked()
270 InputDeviceIdentifier identifier = mEventHub->getDeviceIdentifier(eventHubId); in addDeviceLocked()
271 std::shared_ptr<InputDevice> device = createDeviceLocked(when, eventHubId, identifier); in addDeviceLocked()
279 device->getId(), eventHubId, identifier.name.c_str(), identifier.descriptor.c_str()); in addDeviceLocked()
282 device->getId(), eventHubId, identifier.name.c_str(), identifier.descriptor.c_str(), in addDeviceLocked()
286 mDevices.emplace(eventHubId, device); in addDeviceLocked()
290 std::vector<int32_t> ids = {eventHubId}; in addDeviceLocked()
293 mapIt->second.push_back(eventHubId); in addDeviceLocked()
304 if (mEventHub->getDeviceClasses(eventHubId).test(InputDeviceClass::SENSOR)) { in addDeviceLocked()
305 mEventHub->disableDevice(eventHubId); in addDeviceLocked()
309 void InputReader::removeDeviceLocked(nsecs_t when, int32_t eventHubId) { in removeDeviceLocked() argument
310 auto deviceIt = mDevices.find(eventHubId); in removeDeviceLocked()
312 ALOGW("Ignoring spurious device removed event for eventHubId %d.", eventHubId); in removeDeviceLocked()
322 std::erase_if(eventHubIds, [eventHubId](int32_t eId) { return eId == eventHubId; }); in removeDeviceLocked()
332 device->getId(), eventHubId, device->getName().c_str(), in removeDeviceLocked()
336 device->getId(), eventHubId, device->getName().c_str(), in removeDeviceLocked()
341 device->removeEventHubDevice(eventHubId); in removeDeviceLocked()
354 nsecs_t when, int32_t eventHubId, const InputDeviceIdentifier& identifier) { in createDeviceLocked() argument
365 int32_t deviceId = (eventHubId < END_RESERVED_ID) ? eventHubId : nextInputDeviceIdLocked(); in createDeviceLocked()
369 mPendingArgs += device->addEventHubDevice(when, eventHubId, mConfig); in createDeviceLocked()
373 std::list<NotifyArgs> InputReader::processEventsForDeviceLocked(int32_t eventHubId, in processEventsForDeviceLocked() argument
376 auto deviceIt = mDevices.find(eventHubId); in processEventsForDeviceLocked()
378 ALOGW("Discarding event for unknown eventHubId %d.", eventHubId); in processEventsForDeviceLocked()
739 std::optional<int32_t> eventHubId; in getBatteryCapacity() local
749 eventHubId = device->getBatteryEventHubId(); in getBatteryCapacity()
752 if (!eventHubId) return {}; in getBatteryCapacity()
753 const auto batteryIds = mEventHub->getRawBatteryIds(*eventHubId); in getBatteryCapacity()
755 ALOGW("%s: There are no battery ids for EventHub device %d", __func__, *eventHubId); in getBatteryCapacity()
758 return mEventHub->getBatteryCapacity(*eventHubId, batteryIds.front()); in getBatteryCapacity()
762 std::optional<int32_t> eventHubId; in getBatteryStatus() local
772 eventHubId = device->getBatteryEventHubId(); in getBatteryStatus()
775 if (!eventHubId) return {}; in getBatteryStatus()
776 const auto batteryIds = mEventHub->getRawBatteryIds(*eventHubId); in getBatteryStatus()
778 ALOGW("%s: There are no battery ids for EventHub device %d", __func__, *eventHubId); in getBatteryStatus()
781 return mEventHub->getBatteryStatus(*eventHubId, batteryIds.front()); in getBatteryStatus()
790 std::optional<int32_t> eventHubId = device->getBatteryEventHubId(); in getBatteryDevicePath() local
791 if (!eventHubId) return {}; in getBatteryDevicePath()
792 const auto batteryIds = mEventHub->getRawBatteryIds(*eventHubId); in getBatteryDevicePath()
794 ALOGW("%s: There are no battery ids for EventHub device %d", __func__, *eventHubId); in getBatteryDevicePath()
797 const auto batteryInfo = mEventHub->getRawBatteryInfo(*eventHubId, batteryIds.front()); in getBatteryDevicePath()
800 batteryIds.front(), *eventHubId); in getBatteryDevicePath()