diff options
author | Haamed Gheibi <haamed@google.com> | 2022-02-17 15:24:46 -0800 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2022-02-22 09:46:46 -0800 |
commit | 75f1bda1bc422e3882dbbeed4be03b24f863b2ba (patch) | |
tree | ab7c399debcc86a00607387d37dc1cdf48abc500 /modules/sensors/dynamic_sensor/HidRawSensor.h | |
parent | 202706ad45c6b0c0efff99c9f1de34003e80927f (diff) | |
parent | c142f2613ef9982d59dca254d7a625bdf595f70c (diff) |
Merge SP2A.220305.013
Bug: 220074017
Change-Id: Ia2198b401a3a907c785316e0ef4c00bf27fa59b1
Diffstat (limited to 'modules/sensors/dynamic_sensor/HidRawSensor.h')
-rw-r--r-- | modules/sensors/dynamic_sensor/HidRawSensor.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/modules/sensors/dynamic_sensor/HidRawSensor.h b/modules/sensors/dynamic_sensor/HidRawSensor.h index 2dd32b61..0989651f 100644 --- a/modules/sensors/dynamic_sensor/HidRawSensor.h +++ b/modules/sensors/dynamic_sensor/HidRawSensor.h @@ -121,6 +121,14 @@ private: // helper function to find sensor control feature usage from packets bool findSensorControlUsage(const std::vector<HidParser::ReportPacket> &packets); + // try to parse sensor description feature value to see if it matches any + // known sensors + void detectSensorFromDescription(const std::string &description); + + // try to parse sensor description feature value to see if it matches the + // Android header tracker sensor + bool detectAndroidHeadTrackerSensor(const std::string &description); + // try to parse sensor description feature value to see if it matches // android specified custom sensor definition. bool detectAndroidCustomSensor(const std::string &description); @@ -137,14 +145,20 @@ private: // Features for control sensor int mReportingStateId; - unsigned int mReportingStateOffset; + unsigned int mReportingStateBitOffset; + unsigned int mReportingStateBitSize; + int mReportingStateDisableIndex; + int mReportingStateEnableIndex; int mPowerStateId; - unsigned int mPowerStateOffset; + unsigned int mPowerStateBitOffset; + unsigned int mPowerStateBitSize; + int mPowerStateOffIndex; + int mPowerStateOnIndex; int mReportIntervalId; - unsigned int mReportIntervalOffset; - unsigned int mReportIntervalSize; + unsigned int mReportIntervalBitOffset; + unsigned int mReportIntervalBitSize; // Input report translate table std::vector<ReportTranslateRecord> mTranslateTable; |