From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tavi Date: Sat, 18 May 2024 11:21:24 -0400 Subject: [PATCH] Add server choices Change-Id: I43524f0567eabff163ce81c4a93cf145542a3d5d Signed-off-by: Tavi --- app/src/main/AndroidManifest.xml | 3 ++- .../lineageos/updater/UpdatesActivity.java | 4 +++ .../org/lineageos/updater/misc/Constants.java | 11 ++++++++ .../org/lineageos/updater/misc/Utils.java | 27 ++++++++++++++++--- .../main/res/layout/preferences_dialog.xml | 22 +++++++++++++++ app/src/main/res/values/arrays.xml | 7 +++++ app/src/main/res/values/strings.xml | 5 ++++ .../main/res/xml/network_security_config.xml | 8 ++++++ 8 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/xml/network_security_config.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 02d2b53..2e5eb22 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,7 +25,8 @@ android:requestLegacyExternalStorage="true" android:supportsRtl="true" android:theme="@style/AppTheme" - android:usesCleartextTraffic="false"> + android:usesCleartextTraffic="false" + android:networkSecurityConfig="@xml/network_security_config"> + + + + + + + @string/menu_auto_updates_check_interval_weekly @string/menu_auto_updates_check_interval_monthly + + + @string/menu_server_choice_primary + @string/menu_server_choice_secondary + @string/menu_server_choice_onion_primary + @string/menu_server_choice_onion_secondary + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eb80934..cd892b2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -79,6 +79,11 @@ Once a week Once a month Never + Server Choice + Primary + 0OTA_SERVER_CLEARNET_SECONDARY_NAME0 + Onion #1 + Onion #2 Perform requests over Tor Delete updates when installed Delete diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..09b655b --- /dev/null +++ b/app/src/main/res/xml/network_security_config.xml @@ -0,0 +1,8 @@ + + + + 0OTA_SERVER_ONION_DOMAIN_PRIMARY0 + 0OTA_SERVER_ONION_DOMAIN_SECONDARY0 + + +