Merge "LE: Add controller based advertising filter API (1/2)"
diff --git a/include/hardware/power.h b/include/hardware/power.h
index 89d57ed..dc33705 100644
--- a/include/hardware/power.h
+++ b/include/hardware/power.h
@@ -44,7 +44,8 @@
      * KLP.
      */
     POWER_HINT_VIDEO_ENCODE = 0x00000003,
-    POWER_HINT_VIDEO_DECODE = 0x00000004
+    POWER_HINT_VIDEO_DECODE = 0x00000004,
+    POWER_HINT_LOW_POWER = 0x00000005
 } power_hint_t;
 
 /**
@@ -112,6 +113,13 @@
      *     and it may be appropriate to raise speeds of CPU, memory bus,
      *     etc.  The data parameter is unused.
      *
+     * POWER_HINT_LOW_POWER
+     *
+     *     Low power mode is activated or deactivated. Low power mode
+     *     is intended to save battery at the cost of performance. The data
+     *     parameter is non-zero when low power mode is activated, and zero
+     *     when deactivated.
+     *
      * A particular platform may choose to ignore any hint.
      *
      * availability: version 0.2
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index d5be0c1..9327c41 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -533,6 +533,27 @@
 #define SENSOR_TYPE_WAKE_UP_TILT_DETECTOR                      (41)
 #define SENSOR_STRING_TYPE_WAKE_UP_TILT_DETECTOR               "android.sensor.wake_up_tilt_detector"
 
+/*
+ * SENSOR_TYPE_WAKE_GESTURE
+ * trigger-mode: one-shot
+ * wake-up sensor: yes (set SENSOR_FLAG_WAKE_UP flag)
+ *
+ * A sensor enabling waking up the device based on a device specific motion.
+ *
+ * When this sensor triggers, the device behaves as if the power button was
+ * pressed, turning the screen on. This behavior (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 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_WAKE_GESTURE                               (42)
+#define SENSOR_STRING_TYPE_WAKE_GESTURE                        "android.sensor.wake_gesture"
+
 /**
  * Values returned by the accelerometer in various locations in the universe.
  * all values are in SI units (m/s^2)
diff --git a/modules/sensors/multihal.cpp b/modules/sensors/multihal.cpp
index f7177a3..135e740 100644
--- a/modules/sensors/multihal.cpp
+++ b/modules/sensors/multihal.cpp
@@ -588,7 +588,7 @@
     common :{
         tag : HARDWARE_MODULE_TAG,
         version_major : 1,
-        version_minor : 0,
+        version_minor : 1,
         id : SENSORS_HARDWARE_MODULE_ID,
         name : "MultiHal Sensor Module",
         author : "Google, Inc",
@@ -609,7 +609,7 @@
     sensors_poll_context_t *dev = new sensors_poll_context_t();
     memset(dev, 0, sizeof(sensors_poll_device_1_t));
     dev->proxy_device.common.tag = HARDWARE_DEVICE_TAG;
-    dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_0;
+    dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_1;
     dev->proxy_device.common.module = const_cast<hw_module_t*>(hw_module);
     dev->proxy_device.common.close = device__close;
     dev->proxy_device.activate = device__activate;