OSDN Git Service

Sensors: Add WRIST_TILT_GESTURE as wake sensor
authorNick Vaccaro <nvaccaro@google.com>
Mon, 17 Oct 2016 22:40:51 +0000 (15:40 -0700)
committerNick Vaccaro <nvaccaro@google.com>
Mon, 17 Oct 2016 22:40:51 +0000 (15:40 -0700)
Include WRIST_TILT_GESTURE sensor type when determining if
a sensor is a wake sensor or not in getDefaultSensor().

Change-Id: Ib9ae3990e063848163edd34be2ec021ed518e346

libs/gui/SensorManager.cpp

index 225bfa8..9fcf9ab 100644 (file)
@@ -194,7 +194,8 @@ Sensor const* SensorManager::getDefaultSensor(int type)
         // a non_wake-up version.
         if (type == SENSOR_TYPE_PROXIMITY || type == SENSOR_TYPE_SIGNIFICANT_MOTION ||
             type == SENSOR_TYPE_TILT_DETECTOR || type == SENSOR_TYPE_WAKE_GESTURE ||
-            type == SENSOR_TYPE_GLANCE_GESTURE || type == SENSOR_TYPE_PICK_UP_GESTURE) {
+            type == SENSOR_TYPE_GLANCE_GESTURE || type == SENSOR_TYPE_PICK_UP_GESTURE ||
+            type == SENSOR_TYPE_WRIST_TILT_GESTURE) {
             wakeUpSensor = true;
         }
         // For now we just return the first sensor of that type we find.