Skip to content

Commit

Permalink
z2_plus: Doze: Require non-wake up proximity sensor
Browse files Browse the repository at this point in the history
* 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

Conflicts:
	doze/src/com/cyanogenmod/oneplusthree/doze/ProximitySensor.java
  • Loading branch information
luk1337 authored and SubhrajyotiSen committed Jun 11, 2017
1 parent 4272210 commit 3f16de6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ public class ProximitySensor implements SensorEventListener {

public ProximitySensor(Context context) {
mContext = context;
mSensorManager = (SensorManager)
mContext.getSystemService(Context.SENSOR_SERVICE);
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY, false);
}

@Override
Expand Down

0 comments on commit 3f16de6

Please sign in to comment.