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

Commit 2097bb66 authored by Bruno Martins's avatar Bruno Martins
Browse files

SystemUI: Respect status bar DT2S gesture defaults

Feature can be disabled by default, but if additionally the preference
is hidden in Settings, it doesn't allow TunerService to set the proper
default.

Change-Id: I12b37335fba12cf4d5564f1aa19c5e4cf19f8775
parent a28ea8c1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4521,7 +4521,9 @@ public final class NotificationPanelViewController implements Dumpable {
        @Override
        public void onTuningChanged(String key, String newValue) {
            if (DOUBLE_TAP_SLEEP_GESTURE.equals(key)) {
                mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue, true);
                mDoubleTapToSleepEnabled = TunerService.parseIntegerSwitch(newValue,
                        mResources.getBoolean(org.lineageos.platform.internal.R.bool.
                                config_dt2sGestureEnabledByDefault));
            }
        }
    }
+3 −1
Original line number Diff line number Diff line
@@ -51,7 +51,9 @@ class QQSGestureListener @Inject constructor(
        val tunable = Tunable { key: String?, value: String? ->
            when (key) {
                DOUBLE_TAP_SLEEP_GESTURE ->
                    doubleTapToSleepEnabled = TunerService.parseIntegerSwitch(value, true)
                    doubleTapToSleepEnabled = TunerService.parseIntegerSwitch(value,
                            resources.getBoolean(org.lineageos.platform.internal.R.bool.
                                    config_dt2sGestureEnabledByDefault))
            }
        }
        tunerService.addTunable(tunable, DOUBLE_TAP_SLEEP_GESTURE)