build/fix-trebuchet-taskbar.patch

41 lines
1.9 KiB
Diff
Raw Normal View History

2022-12-25 20:51:09 +01:00
From 6fde482e5b5d0dd0adc7617c334f0bb0c0482c7d Mon Sep 17 00:00:00 2001
2022-12-25 13:59:05 +01:00
From: nyyu <mail@nyyu.dev>
Date: Fri, 23 Dec 2022 19:20:55 +0100
2023-05-28 08:47:33 +02:00
Subject: [PATCH] XXXHIDEXXX fix: trebuchet taskbar
2022-12-25 13:59:05 +01:00
Change-Id: I566e6a3cf799cdd8ee5d4f07221b9d6bb80d41cb
---
2022-12-25 20:51:09 +01:00
src/com/android/launcher3/util/SettingsCache.java | 5 +++++
1 file changed, 5 insertions(+)
2022-12-25 13:59:05 +01:00
2022-12-25 20:51:09 +01:00
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;
2022-12-25 13:59:05 +01:00
2022-12-25 20:51:09 +01:00
+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;
}