OSDN Git Service

Sensors: Add WRIST_TILT_GESTURE as wake sensor
authorNick Vaccaro <nvaccaro@google.com>
Tue, 18 Oct 2016 17:16:00 +0000 (17:16 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 18 Oct 2016 17:16:00 +0000 (17:16 +0000)
am: 5e7f79bf29

Change-Id: Iffcd4b96d1156d314b42e89f8114b9b1de48d258

1  2 
libs/gui/SensorManager.cpp

@@@ -139,7 -139,7 +139,7 @@@ status_t SensorManager::assertStateLock
                  mSensorManager.sensorManagerDied();
              }
          public:
 -            DeathObserver(SensorManager& mgr) : mSensorManager(mgr) { }
 +            explicit DeathObserver(SensorManager& mgr) : mSensorManager(mgr) { }
          };
  
          LOG_ALWAYS_FATAL_IF(mSensorServer.get() == NULL, "getService(SensorService) NULL");
@@@ -194,7 -194,8 +194,8 @@@ Sensor const* SensorManager::getDefault
          // 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.