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

Unverified Commit dc62e653 authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Michael Bestas
Browse files

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

Change-Id: I34d5a8313304e3ac8bd53282de66ab1d3d1653a8
parent 19823b22
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,4 +17,7 @@
<resources>
    <!-- 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>
+2 −0
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ public class DozeSensors {
                        true /* touchscreen */,
                        false /* ignoresSetting */,
                        dozeParameters.longPressUsesProx() /* requiresProx */,
                        !dozeParameters.longPressNeedsProximityCheck() /* performsProxCheck */,
                        true /* immediatelyReRegister */,
                        false /* requiresAod */
                ),
@@ -251,6 +252,7 @@ public class DozeSensors {
                        true /* touchscreen */,
                        false /* ignoresSetting */,
                        dozeParameters.longPressUsesProx(),
                        !dozeParameters.longPressNeedsProximityCheck() /* performsProxCheck */,
                        screenOffUnlockUdfps() /* immediatelyReRegister */,
                        !screenOffUnlockUdfps() /* requiresAod */
                ),
+4 −0
Original line number Diff line number Diff line
@@ -408,6 +408,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.
     */