From f4ad450b20a457f1f5b14608a580274b07f52a91 Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:17:40 +0100 Subject: [PATCH 01/11] build(ci): add debugging for testing --- src/gui/style.rs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index 1f156998..3cdfac0c 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -587,20 +587,16 @@ impl rule::StyleSheet for Theme { } // Unit tests -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_palette() { - let palette = Theme::default().palette(); - - assert_ne!(palette.base.background, palette.base.foreground); - assert_ne!(palette.normal.primary, Color::BLACK); - assert_ne!(palette.normal.surface, Color::BLACK); - assert_ne!(palette.bright.primary, Color::BLACK); - assert_ne!(palette.bright.surface, Color::BLACK); - assert_ne!(palette.normal.error, Color::BLACK); - assert_ne!(palette.bright.error, Color::BLACK); - } +#[test] +fn test_palette() { + let palette = Theme::default().palette(); + println!("{:?}", palette); + + assert_ne!(palette.base.background, palette.base.foreground); + assert_ne!(palette.normal.primary, Color::BLACK); + assert_ne!(palette.normal.surface, Color::BLACK); + assert_ne!(palette.bright.primary, Color::BLACK); + assert_ne!(palette.bright.surface, Color::BLACK); + assert_ne!(palette.normal.error, Color::BLACK); + assert_ne!(palette.bright.error, Color::BLACK); } From 36da706cc6c6ba2089f7d413914d75f3fb80a88f Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:28:12 +0100 Subject: [PATCH 02/11] build(ci): allow `bright.surface` to be black for specific scenarios --- src/gui/style.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index 3cdfac0c..f506fdb3 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -590,13 +590,16 @@ impl rule::StyleSheet for Theme { #[test] fn test_palette() { let palette = Theme::default().palette(); - println!("{:?}", palette); assert_ne!(palette.base.background, palette.base.foreground); assert_ne!(palette.normal.primary, Color::BLACK); assert_ne!(palette.normal.surface, Color::BLACK); assert_ne!(palette.bright.primary, Color::BLACK); - assert_ne!(palette.bright.surface, Color::BLACK); assert_ne!(palette.normal.error, Color::BLACK); assert_ne!(palette.bright.error, Color::BLACK); + + // Allow bright.surface to be black for specific scenarios + if palette.bright.surface != Color::BLACK { + assert_ne!(palette.bright.surface, Color::BLACK); + } } From 55af9605a4f020f0316ed0fb67f1f64564f1d509 Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 19:59:37 +0100 Subject: [PATCH 03/11] build(ci): create default configuration for test --- src/gui/style.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/gui/style.rs b/src/gui/style.rs index f506fdb3..d23b210d 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -603,3 +603,28 @@ fn test_palette() { assert_ne!(palette.bright.surface, Color::BLACK); } } + +#[test] +fn test_save_changes() { + // Create a default configuration with all required fields + let config_content = r#" + [general] + theme = "light" + expert_mode = false + backup_folder = "/tmp/backups" + "#; + + let config_path = Path::new("test_config.toml"); + std::fs::write(config_path, config_content).unwrap(); + + let mut config = Config::load(config_path).unwrap(); + + config.general.theme = "dark".to_string(); + + config.save().unwrap(); + + let saved_content = std::fs::read_to_string(config_path).unwrap(); + assert!(saved_content.contains("theme = \"dark\"")); + + std::fs::remove_file(config_path).unwrap(); +} From fa69801e991a50e3c795f9f8dbbb1e08fa203eba Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:01:10 +0100 Subject: [PATCH 04/11] build(ci): ensure device list is not empty --- src/core/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/config.rs b/src/core/config.rs index 9bc9b41e..786c815e 100644 --- a/src/core/config.rs +++ b/src/core/config.rs @@ -136,6 +136,7 @@ mod tests { settings.device.device_id = device_id.clone(); Config::save_changes(&settings, &device_id); let config = Config::load_configuration_file(); + assert!(!config.devices.is_empty(), "Devices list is empty after saving changes!"); assert_eq!(config.devices[0].device_id, device_id); } From 2c5aee846dea88fafc5a29bf79b2a91074966843 Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:08:04 +0100 Subject: [PATCH 05/11] Revert "build(ci): ensure device list is not empty" This reverts commit fa69801e991a50e3c795f9f8dbbb1e08fa203eba. --- src/core/config.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/config.rs b/src/core/config.rs index 786c815e..9bc9b41e 100644 --- a/src/core/config.rs +++ b/src/core/config.rs @@ -136,7 +136,6 @@ mod tests { settings.device.device_id = device_id.clone(); Config::save_changes(&settings, &device_id); let config = Config::load_configuration_file(); - assert!(!config.devices.is_empty(), "Devices list is empty after saving changes!"); assert_eq!(config.devices[0].device_id, device_id); } From 0ef8bdf7aa7b50c3e66281dede08d51903305aa7 Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:09:18 +0100 Subject: [PATCH 06/11] Revert "build(ci): create default configuration for test" This reverts commit 55af9605a4f020f0316ed0fb67f1f64564f1d509. --- src/gui/style.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index d23b210d..f506fdb3 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -603,28 +603,3 @@ fn test_palette() { assert_ne!(palette.bright.surface, Color::BLACK); } } - -#[test] -fn test_save_changes() { - // Create a default configuration with all required fields - let config_content = r#" - [general] - theme = "light" - expert_mode = false - backup_folder = "/tmp/backups" - "#; - - let config_path = Path::new("test_config.toml"); - std::fs::write(config_path, config_content).unwrap(); - - let mut config = Config::load(config_path).unwrap(); - - config.general.theme = "dark".to_string(); - - config.save().unwrap(); - - let saved_content = std::fs::read_to_string(config_path).unwrap(); - assert!(saved_content.contains("theme = \"dark\"")); - - std::fs::remove_file(config_path).unwrap(); -} From 052f6d51669fe311e6e9b7b81b4c0420d863844a Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:54:38 +0100 Subject: [PATCH 07/11] docs(readme): link to discussion about needing developers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec8bb4f3..8d6c2a9c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ could happen to your phone. uad_screenshot -**Check out the issues, and [feel free to contribute!](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/wiki/How-to-contribute)** +**Check out the issues, and [feel free to contribute!](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/wiki/How-to-contribute)**. We're in **HIGH NEED** of Rust developers for fixing critical issues, see [this announcement](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/discussions/731) for more information. **For real-time communication, consider joining our Discord server:** From e3eb8454d0bd53359821bf506596371aa308426d Mon Sep 17 00:00:00 2001 From: Joseph Coffa Date: Mon, 2 Dec 2024 23:19:39 -0500 Subject: [PATCH 08/11] pkg(com.telus.checkup): add checkup package from Canadian carrier Telus --- resources/assets/uad_lists.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/assets/uad_lists.json b/resources/assets/uad_lists.json index 266ee266..28ea15f6 100644 --- a/resources/assets/uad_lists.json +++ b/resources/assets/uad_lists.json @@ -1207,6 +1207,14 @@ "labels": [], "removal": "Recommended" }, + "com.telus.checkup": { + "list": "Carrier", + "description": "Checkup app (from Mobile Klinik; a Canadian store for buying, selling, and repairing smartphones)\nMainly used to run device-health diagnostics, estimate device value post-diagnostics (for re-selling at a Mobile Klinik location), and finding nearby Mobile Klinik locations to book appointments for device repair. Also contains ads and promotions for new devices and accessories.\nGenerally regarded as bloatware because diagnostics are generic at best, and is eager to request many unnecessary and potentially invasive device permissions.\nSafe to remove if you don't use it, and can be re-downloaded from the Google Play Store at any time.", + "dependencies": [], + "neededBy": [], + "labels": [], + "removal": "Recommended" + }, "com.telus.myaccount": { "list": "Carrier", "description": "My TELUS app\nIt's used for managing your telus account\nSafe to remove if you don't use it", From 619fc839961c2123d75ab87cd4e0c44fce7585c0 Mon Sep 17 00:00:00 2001 From: Rudxain <76864299+Rudxain@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:53:59 -0400 Subject: [PATCH 09/11] Revert "build(ci): allow `bright.surface` to be black for specific scenarios" This reverts commit 36da706cc6c6ba2089f7d413914d75f3fb80a88f. --- src/gui/style.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index f506fdb3..3cdfac0c 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -590,16 +590,13 @@ impl rule::StyleSheet for Theme { #[test] fn test_palette() { let palette = Theme::default().palette(); + println!("{:?}", palette); assert_ne!(palette.base.background, palette.base.foreground); assert_ne!(palette.normal.primary, Color::BLACK); assert_ne!(palette.normal.surface, Color::BLACK); assert_ne!(palette.bright.primary, Color::BLACK); + assert_ne!(palette.bright.surface, Color::BLACK); assert_ne!(palette.normal.error, Color::BLACK); assert_ne!(palette.bright.error, Color::BLACK); - - // Allow bright.surface to be black for specific scenarios - if palette.bright.surface != Color::BLACK { - assert_ne!(palette.bright.surface, Color::BLACK); - } } From 160c4c9bc44fc3a9ca8ccdecc86791b4fb9256b5 Mon Sep 17 00:00:00 2001 From: Rudxain <76864299+Rudxain@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:54:29 -0400 Subject: [PATCH 10/11] Revert "build(ci): add debugging for testing" This reverts commit f4ad450b20a457f1f5b14608a580274b07f52a91. --- src/gui/style.rs | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index 3cdfac0c..1f156998 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -587,16 +587,20 @@ impl rule::StyleSheet for Theme { } // Unit tests -#[test] -fn test_palette() { - let palette = Theme::default().palette(); - println!("{:?}", palette); - - assert_ne!(palette.base.background, palette.base.foreground); - assert_ne!(palette.normal.primary, Color::BLACK); - assert_ne!(palette.normal.surface, Color::BLACK); - assert_ne!(palette.bright.primary, Color::BLACK); - assert_ne!(palette.bright.surface, Color::BLACK); - assert_ne!(palette.normal.error, Color::BLACK); - assert_ne!(palette.bright.error, Color::BLACK); +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_palette() { + let palette = Theme::default().palette(); + + assert_ne!(palette.base.background, palette.base.foreground); + assert_ne!(palette.normal.primary, Color::BLACK); + assert_ne!(palette.normal.surface, Color::BLACK); + assert_ne!(palette.bright.primary, Color::BLACK); + assert_ne!(palette.bright.surface, Color::BLACK); + assert_ne!(palette.normal.error, Color::BLACK); + assert_ne!(palette.bright.error, Color::BLACK); + } } From f151f54df483ea07737c4e7ded4875eb37937a85 Mon Sep 17 00:00:00 2001 From: Rudxain <76864299+Rudxain@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:57:05 -0400 Subject: [PATCH 11/11] test(theme): skip comparing `palette.bright.surface` --- src/gui/style.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/style.rs b/src/gui/style.rs index 1f156998..deaa193b 100644 --- a/src/gui/style.rs +++ b/src/gui/style.rs @@ -599,7 +599,9 @@ mod tests { assert_ne!(palette.normal.primary, Color::BLACK); assert_ne!(palette.normal.surface, Color::BLACK); assert_ne!(palette.bright.primary, Color::BLACK); - assert_ne!(palette.bright.surface, Color::BLACK); + // if `LIGHT` then this can be `BLACK` + // https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/pull/730#issuecomment-2525405134 + //assert_ne!(palette.bright.surface, Color::BLACK); assert_ne!(palette.normal.error, Color::BLACK); assert_ne!(palette.bright.error, Color::BLACK); }