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

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

SystemUI: doze: add config for double tap sensors that need a proximity check

Change-Id: Id7df987f0e9db4e5e2328534764ded397b6ac48d
parent 926d2a9f
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018-2022 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <!-- Doze: does the double tap sensor need a proximity check? -->
    <bool name="doze_double_tap_proximity_check">false</bool>
</resources>
+2 −1
Original line number Diff line number Diff line
@@ -211,7 +211,8 @@ public class DozeSensors {
                        true /* configured */,
                        DozeLog.REASON_SENSOR_DOUBLE_TAP,
                        dozeParameters.doubleTapReportsTouchCoordinates(),
                        true /* touchscreen */
                        true /* touchscreen */,
                        !dozeParameters.doubleTapNeedsProximityCheck() /* performsProxCheck */
                ),
                new TriggerSensor(
                        findSensors(config.tapSensorTypeMapping()),
+4 −0
Original line number Diff line number Diff line
@@ -382,6 +382,10 @@ public class DozeParameters implements
        return 2 * getPulseVisibleDuration();
    }

    public boolean doubleTapNeedsProximityCheck() {
        return mResources.getBoolean(R.bool.doze_double_tap_proximity_check);
    }

    public boolean doubleTapReportsTouchCoordinates() {
        return mResources.getBoolean(R.bool.doze_double_tap_reports_touch_coordinates);
    }