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
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 @@
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 @@
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);
};