diff options
Diffstat (limited to 'services/sensorservice/SensorList.cpp')
-rw-r--r-- | services/sensorservice/SensorList.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/sensorservice/SensorList.cpp b/services/sensorservice/SensorList.cpp index 0ce32cc06f..85ce0f0018 100644 --- a/services/sensorservice/SensorList.cpp +++ b/services/sensorservice/SensorList.cpp @@ -57,6 +57,12 @@ String8 SensorList::getName(int handle) const { mNonSensor.getName()); } +String8 SensorList::getStringType(int handle) const { + return getOne<String8>( + handle, [] (const Entry& e) -> String8 {return e.si->getSensor().getStringType();}, + mNonSensor.getStringType()); +} + sp<SensorInterface> SensorList::getInterface(int handle) const { return getOne<sp<SensorInterface>>( handle, [] (const Entry& e) -> sp<SensorInterface> {return e.si;}, nullptr); |