Lines Matching refs:identifier

194                          const InputDeviceIdentifier& identifier)  in Device()  argument
199 identifier(identifier), in Device()
337 return device->identifier; in getDeviceIdentifier()
376 device->identifier.name.c_str(), device->fd, errno); in getAbsoluteAxisInfo()
485 device->identifier.name.c_str(), device->fd, errno); in getAbsoluteAxisValue()
666 static std::string generateDescriptor(InputDeviceIdentifier& identifier) { in generateDescriptor() argument
668 rawDescriptor += StringPrintf(":%04x:%04x:", identifier.vendor, identifier.product); in generateDescriptor()
670 if (!identifier.uniqueId.empty()) { in generateDescriptor()
672 rawDescriptor += identifier.uniqueId; in generateDescriptor()
673 } else if (identifier.nonce != 0) { in generateDescriptor()
674 rawDescriptor += StringPrintf("nonce:%04x", identifier.nonce); in generateDescriptor()
677 if (identifier.vendor == 0 && identifier.product == 0) { in generateDescriptor()
682 if (!identifier.name.empty()) { in generateDescriptor()
684 rawDescriptor += identifier.name; in generateDescriptor()
685 } else if (!identifier.location.empty()) { in generateDescriptor()
687 rawDescriptor += identifier.location; in generateDescriptor()
690 identifier.descriptor = sha1(rawDescriptor); in generateDescriptor()
694 void EventHub::assignDescriptorLocked(InputDeviceIdentifier& identifier) { in assignDescriptorLocked() argument
702 identifier.nonce = 0; in assignDescriptorLocked()
703 std::string rawDescriptor = generateDescriptor(identifier); in assignDescriptorLocked()
704 if (identifier.uniqueId.empty()) { in assignDescriptorLocked()
707 while (getDeviceByDescriptorLocked(identifier.descriptor) != nullptr) { in assignDescriptorLocked()
708 identifier.nonce++; in assignDescriptorLocked()
709 rawDescriptor = generateDescriptor(identifier); in assignDescriptorLocked()
713 identifier.descriptor.c_str()); in assignDescriptorLocked()
730 device->identifier.name.c_str(), errno); in vibrate()
743 device->identifier.name.c_str(), errno); in vibrate()
765 device->identifier.name.c_str(), errno); in cancelVibrate()
776 if (descriptor == device->identifier.descriptor) { in getDeviceByDescriptorLocked()
993 device->identifier.name.c_str()); in getEvents()
998 device->identifier.name.c_str()); in getEvents()
1209 InputDeviceIdentifier identifier; in openDeviceLocked() local
1216 identifier.name = buffer; in openDeviceLocked()
1222 if (identifier.name == item) { in openDeviceLocked()
1244 identifier.bus = inputId.bustype; in openDeviceLocked()
1245 identifier.product = inputId.product; in openDeviceLocked()
1246 identifier.vendor = inputId.vendor; in openDeviceLocked()
1247 identifier.version = inputId.version; in openDeviceLocked()
1254 identifier.location = buffer; in openDeviceLocked()
1262 identifier.uniqueId = buffer; in openDeviceLocked()
1266 assignDescriptorLocked(identifier); in openDeviceLocked()
1270 Device* device = new Device(fd, deviceId, devicePath, identifier); in openDeviceLocked()
1277 identifier.bus, identifier.vendor, identifier.product, identifier.version); in openDeviceLocked()
1278 ALOGV(" name: \"%s\"\n", identifier.name.c_str()); in openDeviceLocked()
1279 ALOGV(" location: \"%s\"\n", identifier.location.c_str()); in openDeviceLocked()
1280 ALOGV(" unique id: \"%s\"\n", identifier.uniqueId.c_str()); in openDeviceLocked()
1281 ALOGV(" descriptor: \"%s\"\n", identifier.descriptor.c_str()); in openDeviceLocked()
1400 isEligibleBuiltInKeyboard(device->identifier, device->configuration, &device->keyMap)) { in openDeviceLocked()
1430 device->identifier.name.c_str()); in openDeviceLocked()
1454 if (device->identifier.name == videoDevice->getName()) { in openDeviceLocked()
1475 deviceId, fd, devicePath, device->identifier.name.c_str(), device->classes, in openDeviceLocked()
1526 if (videoDevice->getName() == device->identifier.name) { in openVideoDeviceLocked()
1590 InputDeviceIdentifier identifier; in createVirtualKeyboardLocked() local
1591 identifier.name = "Virtual"; in createVirtualKeyboardLocked()
1592 identifier.uniqueId = "<virtual>"; in createVirtualKeyboardLocked()
1593 assignDescriptorLocked(identifier); in createVirtualKeyboardLocked()
1596 new Device(-1, ReservedInputDeviceId::VIRTUAL_KEYBOARD_ID, "<virtual>", identifier); in createVirtualKeyboardLocked()
1611 device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION); in loadConfigurationLocked()
1614 device->identifier.name.c_str()); in loadConfigurationLocked()
1621 device->identifier.name.c_str()); in loadConfigurationLocked()
1630 path += device->identifier.getCanonicalName(); in loadVirtualKeyMapLocked()
1639 return device->keyMap.load(device->identifier, device->configuration); in loadKeyMapLocked()
1649 return device->identifier.bus == BUS_USB || device->identifier.bus == BUS_BLUETOOTH; in isExternalDeviceLocked()
1665 device->identifier.name.c_str()); in getNextControllerNumberLocked()
1764 device->identifier.name.c_str(), device->id, device->fd, device->classes); in closeDeviceLocked()
1925 device->id, device->identifier.name.c_str()); in dump()
1928 device->identifier.name.c_str()); in dump()
1933 dump += StringPrintf(INDENT3 "Descriptor: %s\n", device->identifier.descriptor.c_str()); in dump()
1934 dump += StringPrintf(INDENT3 "Location: %s\n", device->identifier.location.c_str()); in dump()
1936 dump += StringPrintf(INDENT3 "UniqueId: %s\n", device->identifier.uniqueId.c_str()); in dump()
1939 device->identifier.bus, device->identifier.vendor, in dump()
1940 device->identifier.product, device->identifier.version); in dump()