Doze: Require non-wake up proximity sensor

* getDefaultSensor(type) returns the first sensor
  and in case of capricorn it's wake-up one thus our
  doze package wouldn't work. Passing `false` as a second
  argument makes it work properly.

Change-Id: If73bc43bc166945d27b95513c4255ae5a5590849
This commit is contained in:
LuK1337 2017-05-23 21:29:58 +02:00 committed by Mister Oyster
parent 5f480054b3
commit d60a4bdfd3
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ public class ProximitySensor implements SensorEventListener {
public ProximitySensor(Context context) {
mContext = context;
mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY, false);
}
@Override