dubai: sensors: Implement UDFPS sensor
Change-Id: I8b65e3196a7d6f158f4ff589b9755cf7c7e51c92
This commit is contained in:
parent
7216cf8505
commit
ec3f93036c
4 changed files with 18 additions and 0 deletions
|
|
@ -134,6 +134,18 @@ class DoubleTapSensor : public SysfsPollingOneShotSensor {
|
|||
static_cast<SensorType>(static_cast<int32_t>(SensorType::DEVICE_PRIVATE_BASE) + 1)) {}
|
||||
};
|
||||
|
||||
const std::string kTsUdfpsPressedPath = kTsPath + "udfps_pressed";
|
||||
const std::string kTsUdfpsEnabledPath = kTsPath + "udfps_enabled";
|
||||
|
||||
class UdfpsSensor : public SysfsPollingOneShotSensor {
|
||||
public:
|
||||
UdfpsSensor(int32_t sensorHandle, ISensorsEventCallback* callback)
|
||||
: SysfsPollingOneShotSensor(
|
||||
sensorHandle, callback, kTsUdfpsPressedPath, kTsUdfpsEnabledPath,
|
||||
"UDFPS Sensor", "org.lineageos.sensor.udfps",
|
||||
static_cast<SensorType>(static_cast<int32_t>(SensorType::DEVICE_PRIVATE_BASE) + 2)) {}
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace subhal
|
||||
} // namespace V2_1
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ using ::android::hardware::sensors::V2_0::implementation::ScopedWakelock;
|
|||
|
||||
SensorsSubHal::SensorsSubHal() : mCallback(nullptr), mNextHandle(1) {
|
||||
AddSensor<DoubleTapSensor>();
|
||||
AddSensor<UdfpsSensor>();
|
||||
}
|
||||
|
||||
Return<void> SensorsSubHal::getSensorsList_2_1(ISensors::getSensorsList_2_1_cb _hidl_cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue