upd patches

This commit is contained in:
nyyu 2022-12-27 10:16:20 +01:00
parent 7b7ff6d064
commit 6a5f600345
3 changed files with 67 additions and 14 deletions

View File

@ -1,33 +1,45 @@
From 097c997bb711427bb8dd111b63ec8f5fb5cc3382 Mon Sep 17 00:00:00 2001
From 1b45884632a10093d455eb6aa09ebda35a0919f0 Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sun, 18 Sep 2022 11:44:26 +0200
Subject: [PATCH] fix: always enable taskbar toggle
Change-Id: I247db667bec92fabcdbe7bd84946e79bae7e0bb6
---
src/org/lineageos/lineageparts/input/ButtonSettings.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
.../lineageparts/input/ButtonSettings.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index a6fa54f..d73c2e1 100644
index a6fa54f..4e326d3 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -476,7 +476,7 @@ public class ButtonSettings extends SettingsPreferenceFragment
@@ -475,15 +475,11 @@ public class ButtonSettings extends SettingsPreferenceFragment
mEnableTaskbar = findPreference(KEY_ENABLE_TASKBAR);
if (mEnableTaskbar != null) {
if (!isTablet(getContext()) || !hasNavigationBar()) {
- if (!isTablet(getContext()) || !hasNavigationBar()) {
- mNavigationPreferencesCat.removePreference(mEnableTaskbar);
+ //mNavigationPreferencesCat.removePreference(mEnableTaskbar);
} else {
mEnableTaskbar.setOnPreferenceChangeListener(this);
mEnableTaskbar.setChecked(LineageSettings.System.getInt(resolver,
@@ -867,6 +867,7 @@ public class ButtonSettings extends SettingsPreferenceFragment
- } 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
return true;
} else if (preference == mDisableNavigationKeys) {
mDisableNavigationKeys.setEnabled(false);
+ mEnableTaskbar.setChecked(false);
+ LineageSettings.System.putInt(getContentResolver(),
+ LineageSettings.System.ENABLE_TASKBAR, 0);
mNavigationPreferencesCat.setEnabled(false);
if (!mDisableNavigationKeys.isChecked()) {
setButtonNavigationMode(NAV_BAR_MODE_3BUTTON_OVERLAY);
--
2.39.0

View File

@ -0,0 +1,40 @@
From 6fde482e5b5d0dd0adc7617c334f0bb0c0482c7d Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Fri, 23 Dec 2022 19:20:55 +0100
Subject: [PATCH] fix: trebuchet taskbar
Change-Id: I566e6a3cf799cdd8ee5d4f07221b9d6bb80d41cb
---
src/com/android/launcher3/util/SettingsCache.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/com/android/launcher3/util/SettingsCache.java b/src/com/android/launcher3/util/SettingsCache.java
index 0c5b7225d3..0a8a0bdf09 100644
--- a/src/com/android/launcher3/util/SettingsCache.java
+++ b/src/com/android/launcher3/util/SettingsCache.java
@@ -33,6 +33,8 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
+import lineageos.providers.LineageSettings;
+
/**
* ContentObserver over Settings keys that also has a caching layer.
* Consumers can register for callbacks via {@link #register(Uri, OnChangeListener)} and
@@ -61,6 +63,7 @@ public class SettingsCache extends ContentObserver implements SafeCloseable {
Settings.System.getUriFor(ACCELEROMETER_ROTATION);
private static final String SYSTEM_URI_PREFIX = Settings.System.CONTENT_URI.toString();
+ private static final String LINEAGE_URI_PREFIX = LineageSettings.System.CONTENT_URI.toString();
/**
* Caches the last seen value for registered keys.
@@ -139,6 +142,8 @@ public class SettingsCache extends ContentObserver implements SafeCloseable {
boolean newVal;
if (keyUri.toString().startsWith(SYSTEM_URI_PREFIX)) {
newVal = Settings.System.getInt(mResolver, key, defaultValue) == 1;
+ } else if (keyUri.toString().startsWith(LINEAGE_URI_PREFIX)) {
+ newVal = LineageSettings.System.getInt(mResolver, key, defaultValue) == 1;
} else { // SETTING_SECURE
newVal = Settings.Secure.getInt(mResolver, key, defaultValue) == 1;
}

View File

@ -40,6 +40,7 @@ git am $DRONE_WORKSPACE_BASE/fix-always-enable-taskbar-toggle.patch || git am --
cd $TOPDIR
cd packages/apps/Trebuchet
git am $DRONE_WORKSPACE_BASE/fix-enable-more-grids-for-tablet.patch || git am --abort
git am $DRONE_WORKSPACE_BASE/fix-trebuchet-taskbar.patch || git am --abort
cd $TOPDIR
cd packages/apps/Camera2
git am $DRONE_WORKSPACE_BASE/fix-camera2-legacy.patch || git am --abort
@ -51,6 +52,6 @@ repopick -t twelve-colors -i -r
cd frameworks/base
git reset --hard losul/lineage-19.1
cd $TOPDIR
repopick -P frameworks/base -r 336824 336825 336826 336827 336828 336829 336830 336831 336832 336833 336834 336835 336836
repopick -f -P frameworks/base -r 336824 336825 336826 336827 336828 336829 336830 336831 336832 336833 336834 336835 336836
repopick -f 333534 -P system/core
repopick -f 329229 329230 -P frameworks/base