change 'time' string. remove additional

move sensor state verification
This commit is contained in:
Nazar 2019-07-04 11:30:16 +03:00
parent 8d9e9e8434
commit 2dd1f801ae
3 changed files with 4 additions and 5 deletions

View file

@ -11,7 +11,6 @@
Thx - Hardy
-->
<string name="wake_on_voice_time">Time</string>
<string name="wake_on_voice_time_descr">Set the time for which the screen will turn on.</string>
<string name="wake_on_voice_sensor">Use proximity sensor</string>
<string name="wake_on_voice_sensor_descr">Wave your hand over the top of the screen to turn on the screen while navigating.</string>

View file

@ -81,7 +81,7 @@
<ListPreference
android:key="wake_on_voice_time_int"
android:summary="@string/wake_on_voice_time_descr"
android:title="@string/wake_on_voice_time"/>
android:title="@string/shared_string_time"/>
<CheckBoxPreference
android:key="wake_on_voice_sensor"
android:summary="@string/wake_on_voice_sensor_descr"

View file

@ -113,9 +113,9 @@ public class LockHelper implements SensorEventListener {
@Override
public void onSensorChanged(SensorEvent event) {
if (isSensorEnabled()) {
if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) {
if (event.values[0] >= -SENSOR_SENSITIVITY && event.values[0] <= SENSOR_SENSITIVITY) {
if (isSensorEnabled()) {
unlockEvent();
}
}