Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dd1c0ac authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Jan Altensen
Browse files

SystemUI: doze: add config for long press sensors that need a proximity check

Change-Id: I34d5a8313304e3ac8bd53282de66ab1d3d1653a8
parent a4b357c9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -39,4 +39,7 @@

    <!-- Doze: does the double tap sensor need a proximity check? -->
    <bool name="doze_double_tap_proximity_check">false</bool>

    <!-- Doze: does the long press sensor need a proximity check? -->
    <bool name="doze_long_press_proximity_check">false</bool>
</resources>
+4 −2
Original line number Diff line number Diff line
@@ -222,7 +222,8 @@ public class DozeSensors {
                        true /* reports touch coordinates */,
                        true /* touchscreen */,
                        false /* ignoresSetting */,
                        dozeParameters.longPressUsesProx() /* requiresProx */),
                        dozeParameters.longPressUsesProx() /* requiresProx */,
                        !dozeParameters.longPressNeedsProximityCheck() /* performsProxCheck */),
                new TriggerSensor(
                        findSensor(config.udfpsLongPressSensorType()),
                        "doze_pulse_on_auth",
@@ -232,7 +233,8 @@ public class DozeSensors {
                        true /* reports touch coordinates */,
                        true /* touchscreen */,
                        false /* ignoresSetting */,
                        dozeParameters.longPressUsesProx()),
                        dozeParameters.longPressUsesProx(),
                        !dozeParameters.longPressNeedsProximityCheck() /* performsProxCheck */),
                new PluginSensor(
                        new SensorManagerPlugin.Sensor(TYPE_WAKE_DISPLAY),
                        Settings.Secure.DOZE_WAKE_DISPLAY_GESTURE,
+4 −0
Original line number Diff line number Diff line
@@ -324,6 +324,10 @@ public class DozeParameters implements
        return mResources.getBoolean(R.bool.doze_single_tap_uses_prox);
    }

    public boolean longPressNeedsProximityCheck() {
        return mResources.getBoolean(R.bool.doze_long_press_proximity_check);
    }

    /**
     * Whether the long press sensor uses the proximity sensor.
     */