Home
last modified time | relevance | path

Searched refs:deviceKey (Results 1 – 6 of 6) sorted by relevance

/hardware/libhardware/modules/sensors/dynamic_sensor/
DBaseDynamicSensorDaemon.cpp24 bool BaseDynamicSensorDaemon::onConnectionChange(const std::string &deviceKey, bool connected) { in onConnectionChange() argument
26 auto i = mDeviceKeySensorMap.find(deviceKey); in onConnectionChange()
29 ALOGV("device %s is connected", deviceKey.c_str()); in onConnectionChange()
31 BaseSensorVector sensors = createSensor(deviceKey); in onConnectionChange()
33 ALOGI("no valid sensor is defined in device %s, ignore", deviceKey.c_str()); in onConnectionChange()
37 auto result = mDeviceKeySensorMap.emplace(deviceKey, std::move(sensors)); in onConnectionChange()
43 ALOGV("device %s is registered", deviceKey.c_str()); in onConnectionChange()
47 ALOGD("device %s already added and is connected again, ignore", deviceKey.c_str()); in onConnectionChange()
50 ALOGV("device %s is disconnected", deviceKey.c_str()); in onConnectionChange()
58 removeSensor(deviceKey); in onConnectionChange()
[all …]
DHidRawSensorDaemon.cpp44 BaseSensorVector HidRawSensorDaemon::createSensor(const std::string &deviceKey) { in createSensor() argument
46 sp<HidRawSensorDevice> device(HidRawSensorDevice::create(deviceKey)); in createSensor()
50 device.get(), deviceKey.c_str(), device->getSensors().size()); in createSensor()
56 mHidRawSensorDevices.emplace(deviceKey, device); in createSensor()
65 void HidRawSensorDaemon::removeSensor(const std::string &deviceKey) { in removeSensor() argument
66 mHidRawSensorDevices.erase(deviceKey); in removeSensor()
DDummyDynamicAccelDaemon.cpp54 BaseSensorVector DummyDynamicAccelDaemon::createSensor(const std::string &deviceKey) { in createSensor() argument
56 if (deviceKey.compare(0, 1, "/") == 0) { in createSensor()
59 if (deviceKey.length() < len) { in createSensor()
60 ALOGE("illegal file device key %s", deviceKey.c_str()); in createSensor()
62 size_t start = deviceKey.length() - len; in createSensor()
63 ret.emplace_back(new DummySensor(deviceKey.substr(start))); in createSensor()
65 } else if (deviceKey.compare(0, ::strlen("socket:"), "socket:") == 0) { in createSensor()
66 ret.emplace_back(new DummySensor(deviceKey)); in createSensor()
69 ALOGE("unknown deviceKey: %s", deviceKey.c_str()); in createSensor()
DBaseDynamicSensorDaemon.h38 virtual bool onConnectionChange(const std::string &deviceKey, bool connected);
40 virtual BaseSensorVector createSensor(const std::string &deviceKey) = 0;
DHidRawSensorDaemon.h49 virtual BaseSensorVector createSensor(const std::string &deviceKey);
50 virtual void removeSensor(const std::string &deviceKey);
DDummyDynamicAccelDaemon.h64 virtual BaseSensorVector createSensor(const std::string &deviceKey) override;