OSDN Git Service

Add glance gesture for doze mode.
authorJeff Brown <jeffbrown@google.com>
Thu, 17 Jul 2014 22:11:51 +0000 (15:11 -0700)
committerJeff Brown <jeffbrown@google.com>
Fri, 18 Jul 2014 01:20:12 +0000 (18:20 -0700)
Change-Id: I2daa13e74d2183247c314c15ee283b7a6c20bc22

include/hardware/sensors.h

index 5312b34..ec68b2b 100644 (file)
@@ -577,6 +577,31 @@ enum {
 #define SENSOR_TYPE_WAKE_GESTURE                               (42)
 #define SENSOR_STRING_TYPE_WAKE_GESTURE                        "android.sensor.wake_gesture"
 
+/*
+ * SENSOR_TYPE_GLANCE_GESTURE
+ * reporting-mode: one-shot
+ * wake-up sensor: yes (set SENSOR_FLAG_WAKE_UP flag)
+ *
+ * A sensor enabling briefly turning the screen on to enable the user to
+ * glance content on screen based on a specific motion.  The device should
+ * turn the screen off after a few moments.
+ *
+ * When this sensor triggers, the device turns the screen on momentarily
+ * to allow the user to glance notifications or other content while the
+ * device remains locked in a non-interactive state (dozing). This behavior
+ * (briefly turning on the screen when this sensor triggers) might be deactivated
+ * by the user in the device settings. Changes in settings do not impact the
+ * behavior of the sensor: only whether the framework briefly turns the screen on
+ * when it triggers.
+ *
+ * The actual gesture to be detected is not specified, and can be chosen by
+ * the manufacturer of the device.
+ * This sensor must be low power, as it is likely to be activated 24/7.
+ * The only allowed value to return is 1.0.
+ */
+#define SENSOR_TYPE_GLANCE_GESTURE                             (43)
+#define SENSOR_STRING_TYPE_GLANCE_GESTURE                      "android.sensor.glance_gesture"
+
 /**
  * SENSOR_TYPE_PICK_UP_GESTURE
  * reporting-mode: one-shot