change 'time' string. remove additional
move sensor state verification
This commit is contained in:
parent
8d9e9e8434
commit
2dd1f801ae
3 changed files with 4 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -113,9 +113,9 @@ public class LockHelper implements SensorEventListener {
|
|||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) {
|
||||
if (event.values[0] >= -SENSOR_SENSITIVITY && event.values[0] <= SENSOR_SENSITIVITY) {
|
||||
if (isSensorEnabled()) {
|
||||
if (isSensorEnabled()) {
|
||||
if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) {
|
||||
if (event.values[0] >= -SENSOR_SENSITIVITY && event.values[0] <= SENSOR_SENSITIVITY) {
|
||||
unlockEvent();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue