From 1a14ee9ef3625ed3bef88e3be230a59ef9db03e1 Mon Sep 17 00:00:00 2001 From: Tavi Date: Thu, 5 Dec 2024 21:25:59 -0500 Subject: [PATCH] 21.0: More work Signed-off-by: Tavi --- .../0014-Automatic_Reboot.patch | 2 +- .../0001-Hosts_Cache.patch | 2 +- .../0001-Hosts_Wildcards.patch | 2 +- .../0003-Reuse-align_ptr-in-hosts_cache.patch | 2 +- .../0007-No_safety_center.patch | 23 +++++++++++++++++++ Scripts/LineageOS-21.0/Patch.sh | 1 + Scripts/Update_Commons.sh | 2 +- 7 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 Patches/LineageOS-21.0/android_packages_modules_Permission/0007-No_safety_center.patch diff --git a/Patches/LineageOS-21.0/android_frameworks_base/0014-Automatic_Reboot.patch b/Patches/LineageOS-21.0/android_frameworks_base/0014-Automatic_Reboot.patch index 32c438b0..0e6f2162 100644 --- a/Patches/LineageOS-21.0/android_frameworks_base/0014-Automatic_Reboot.patch +++ b/Patches/LineageOS-21.0/android_frameworks_base/0014-Automatic_Reboot.patch @@ -57,7 +57,7 @@ index 351cce0929b7..00604a316019 100644 diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java -index 6034e92be873..d00599310c5c 100644 +index 6034e92be873..67dd84e8ae8f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -240,6 +240,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, diff --git a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Cache.patch b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Cache.patch index 4f5bf87b..7a253ee2 100644 --- a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Cache.patch +++ b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Cache.patch @@ -71,7 +71,7 @@ index 8d9ed6d4..048b6c68 100644 cur->ai_next = p; diff --git a/hosts_cache.cpp b/hosts_cache.cpp new file mode 100644 -index 00000000..a40fb403 +index 00000000..3415bed6 --- /dev/null +++ b/hosts_cache.cpp @@ -0,0 +1,523 @@ diff --git a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Wildcards.patch b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Wildcards.patch index 1862a067..458697be 100644 --- a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Wildcards.patch +++ b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0001-Hosts_Wildcards.patch @@ -24,7 +24,7 @@ Change-Id: I4b0bb81699151d5b371850daebf785e35ec9b170 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hosts_cache.cpp b/hosts_cache.cpp -index a40fb403..258eac1b 100644 +index 3415bed6..7f72d37b 100644 --- a/hosts_cache.cpp +++ b/hosts_cache.cpp @@ -126,7 +126,7 @@ static int cmp_hcent_name(const void *a, const void *b) diff --git a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0003-Reuse-align_ptr-in-hosts_cache.patch b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0003-Reuse-align_ptr-in-hosts_cache.patch index 97501128..c179d101 100644 --- a/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0003-Reuse-align_ptr-in-hosts_cache.patch +++ b/Patches/LineageOS-21.0/android_packages_modules_DnsResolver/0003-Reuse-align_ptr-in-hosts_cache.patch @@ -9,7 +9,7 @@ Change-Id: I461718c38ca3c0e372e1cc0e0f0deb74ae5c68bb 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hosts_cache.cpp b/hosts_cache.cpp -index 258eac1b..be8a0ff4 100644 +index 7f72d37b..5a759698 100644 --- a/hosts_cache.cpp +++ b/hosts_cache.cpp @@ -47,10 +47,6 @@ constexpr int MAXADDRS = 35; diff --git a/Patches/LineageOS-21.0/android_packages_modules_Permission/0007-No_safety_center.patch b/Patches/LineageOS-21.0/android_packages_modules_Permission/0007-No_safety_center.patch new file mode 100644 index 00000000..89aabc4c --- /dev/null +++ b/Patches/LineageOS-21.0/android_packages_modules_Permission/0007-No_safety_center.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dmitry Muhomor +Date: Thu, 5 Oct 2023 14:52:04 +0300 +Subject: [PATCH] temp: disable Safety Center + +It will require extensive adjustments to Settings app, and likely elsewhere. +--- + service/java/com/android/safetycenter/SafetyCenterFlags.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/service/java/com/android/safetycenter/SafetyCenterFlags.java b/service/java/com/android/safetycenter/SafetyCenterFlags.java +index e51d3a1cf..6393c92a9 100644 +--- a/service/java/com/android/safetycenter/SafetyCenterFlags.java ++++ b/service/java/com/android/safetycenter/SafetyCenterFlags.java +@@ -229,7 +229,7 @@ public final class SafetyCenterFlags { + + /** Returns whether Safety Center is enabled. */ + public static boolean getSafetyCenterEnabled() { +- return getBoolean(PROPERTY_SAFETY_CENTER_ENABLED, SdkLevel.isAtLeastU()); ++ return getBoolean(PROPERTY_SAFETY_CENTER_ENABLED, false); + } + + /** Returns whether Safety Center notifications are enabled. */ diff --git a/Scripts/LineageOS-21.0/Patch.sh b/Scripts/LineageOS-21.0/Patch.sh index 512c783a..e9870f62 100644 --- a/Scripts/LineageOS-21.0/Patch.sh +++ b/Scripts/LineageOS-21.0/Patch.sh @@ -362,6 +362,7 @@ if enterAndClear "packages/modules/Permission"; then #applyPatch "$DOS_PATCHES/android_packages_modules_Permission/0004-Special_Permissions-2.patch"; #Fix usage UI summary for Network/Sensors (GrapheneOS) #TODO: 21REBASE applyPatch "$DOS_PATCHES/android_packages_modules_Permission/0005-Browser_No_Location.patch"; #Stop auto-granting location to system browsers (GrapheneOS) applyPatch "$DOS_PATCHES/android_packages_modules_Permission/0006-Location_Indicators.patch"; #SystemUI: Use new privacy indicators for location (GrapheneOS) +applyPatch "$DOS_PATCHES/android_packages_modules_Permission/0007-No_safety_center.patch"; #Disable Safety Center (GrapheneOS) fi; if enterAndClear "packages/modules/Wifi"; then diff --git a/Scripts/Update_Commons.sh b/Scripts/Update_Commons.sh index d45dfc9f..def4227f 100644 --- a/Scripts/Update_Commons.sh +++ b/Scripts/Update_Commons.sh @@ -25,7 +25,7 @@ wget "https://github.com/LineageOS/android_vendor_lineage/raw/lineage-21.0/prebu #Visual VoiceMail Config #wget "https://raw.githubusercontent.com/LineageOS/android_vendor_lineage/lineage-21.0/overlay/common/packages/apps/Dialer/java/com/android/voicemail/impl/res/xml/vvm_config.xml" -O ../Patches/./Common/android_vendor_divested/overlay/common/packages/apps/Dialer/java/com/android/voicemail/impl/res/xml/vvm_config.xml; -wget "https://raw.githubusercontent.com/GrapheneOS/platform_packages_apps_Dialer/14/java/com/android/voicemail/impl/res/xml/vvm_config.xml" -O ../Patches/./Common/android_vendor_divested/overlay/common/packages/apps/Dialer/java/com/android/voicemail/impl/res/xml/vvm_config.xml; +wget "https://raw.githubusercontent.com/GrapheneOS/platform_packages_apps_Dialer/15/java/com/android/voicemail/impl/res/xml/vvm_config.xml" -O ../Patches/./Common/android_vendor_divested/overlay/common/packages/apps/Dialer/java/com/android/voicemail/impl/res/xml/vvm_config.xml; #LineageOS Contributors Cloud wget "https://github.com/LineageOS/android_packages_apps_LineageParts/raw/lineage-21.0/assets/contributors.db" -O ../Patches/Common/contributors.db;