diff options
author | Aravind Akella <aakella@google.com> | 2014-02-11 18:58:52 -0800 |
---|---|---|
committer | Aravind Akella <aakella@google.com> | 2014-04-23 14:38:56 -0700 |
commit | 9a844cf78f09953145200b4074d47589257a408c (patch) | |
tree | 8168fc7ede93ec3e6c7567f8d24215ae1820e858 /include/gui/Sensor.h | |
parent | 4cbf3c53447215a31f69d3ac615ba0daa902f717 (diff) | |
download | frameworks_native-9a844cf78f09953145200b4074d47589257a408c.zip frameworks_native-9a844cf78f09953145200b4074d47589257a408c.tar.gz frameworks_native-9a844cf78f09953145200b4074d47589257a408c.tar.bz2 |
Enable wakeup sensors.
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.
Bug: 9774884
Change-Id: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
Diffstat (limited to 'include/gui/Sensor.h')
-rw-r--r-- | include/gui/Sensor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/gui/Sensor.h b/include/gui/Sensor.h index 033b262..41a6cc6 100644 --- a/include/gui/Sensor.h +++ b/include/gui/Sensor.h @@ -71,6 +71,7 @@ public: int32_t getFifoMaxEventCount() const; const String8& getStringType() const; const String8& getRequiredPermission() const; + bool isWakeUpSensor() const; // LightFlattenable protocol inline bool isFixedSize() const { return false; } @@ -93,6 +94,8 @@ private: int32_t mFifoMaxEventCount; String8 mStringType; String8 mRequiredPermission; + // Todo: Surface this in java SDK. + bool mWakeUpSensor; static void flattenString8(void*& buffer, size_t& size, const String8& string8); static bool unflattenString8(void const*& buffer, size_t& size, String8& outputString8); }; |