build/fix-always-enable-taskbar-toggle.patch

46 lines
2.3 KiB
Diff
Raw Permalink Normal View History

2022-12-25 20:51:09 +01:00
From 1b45884632a10093d455eb6aa09ebda35a0919f0 Mon Sep 17 00:00:00 2001
2022-09-18 12:17:53 +02:00
From: nyyu <mail@nyyu.dev>
Date: Sun, 18 Sep 2022 11:44:26 +0200
2023-05-28 08:47:33 +02:00
Subject: [PATCH] XXXHIDEXXX fix: always enable taskbar toggle
2022-09-18 12:17:53 +02:00
Change-Id: I247db667bec92fabcdbe7bd84946e79bae7e0bb6
---
2022-12-25 20:51:09 +01:00
.../lineageparts/input/ButtonSettings.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
2022-09-18 12:17:53 +02:00
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
2022-12-25 20:51:09 +01:00
index a6fa54f..4e326d3 100644
2022-09-18 12:17:53 +02:00
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
2022-12-25 20:51:09 +01:00
@@ -475,15 +475,11 @@ public class ButtonSettings extends SettingsPreferenceFragment
2022-09-18 12:17:53 +02:00
mEnableTaskbar = findPreference(KEY_ENABLE_TASKBAR);
if (mEnableTaskbar != null) {
2022-12-25 20:51:09 +01:00
- if (!isTablet(getContext()) || !hasNavigationBar()) {
2022-09-18 12:17:53 +02:00
- mNavigationPreferencesCat.removePreference(mEnableTaskbar);
2022-12-25 20:51:09 +01:00
- } else {
- mEnableTaskbar.setOnPreferenceChangeListener(this);
- mEnableTaskbar.setChecked(LineageSettings.System.getInt(resolver,
- LineageSettings.System.ENABLE_TASKBAR,
- isTablet(getContext()) ? 1 : 0) == 1);
- toggleTaskBarDependencies(mEnableTaskbar.isChecked());
- }
+ mEnableTaskbar.setOnPreferenceChangeListener(this);
+ mEnableTaskbar.setChecked(LineageSettings.System.getInt(resolver,
+ LineageSettings.System.ENABLE_TASKBAR,
+ isTablet(getContext()) ? 1 : 0) == 1);
+ toggleTaskBarDependencies(mEnableTaskbar.isChecked());
}
List<Integer> unsupportedValues = new ArrayList<>();
@@ -867,6 +863,9 @@ public class ButtonSettings extends SettingsPreferenceFragment
2022-12-23 10:41:07 +01:00
return true;
} else if (preference == mDisableNavigationKeys) {
mDisableNavigationKeys.setEnabled(false);
+ mEnableTaskbar.setChecked(false);
2022-12-25 20:51:09 +01:00
+ LineageSettings.System.putInt(getContentResolver(),
+ LineageSettings.System.ENABLE_TASKBAR, 0);
2022-12-23 10:41:07 +01:00
mNavigationPreferencesCat.setEnabled(false);
if (!mDisableNavigationKeys.isChecked()) {
setButtonNavigationMode(NAV_BAR_MODE_3BUTTON_OVERLAY);