diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch index 8fc6a90a..56d3810d 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch @@ -1,4 +1,4 @@ -From f5e94f458e2496c4b5bb6d4a1b239ce24b84d898 Mon Sep 17 00:00:00 2001 +From 234ea9eca07c828e2e34f462d10acb876bc59e09 Mon Sep 17 00:00:00 2001 From: MSe1969 Date: Mon, 10 Sep 2018 12:05:40 +0200 Subject: [PATCH] Network & Internet Settings: Add option to switch off Captive @@ -10,30 +10,28 @@ Subject: [PATCH] Network & Internet Settings: Add option to switch off Captive * Warning dialog is shown, when captive portal check is switched off * Hidden under 'advanced' -Cherry-picked from lin16-microG repo and adapted to Q (e.g. androidx pref.) +Cherry-picked from lin17-microG repo Change-Id: Ibbffdb5f3930df74ca8b4ba93d451f7fad086989 --- res/values-de/cm_strings.xml | 3 + res/values/cm_strings.xml | 5 ++ - res/xml/network_and_internet.xml | 6 ++ - .../android/settings/ResetNetworkConfirm.java | 1 + - .../settings/ResetNetworkConfirm.java.rej | 11 +++ + res/xml/network_and_internet.xml | 7 ++ + .../android/settings/ResetNetworkConfirm.java | 4 + ...CaptivePortalModePreferenceController.java | 82 +++++++++++++++++++ .../network/CaptivePortalWarningDialog.java | 74 +++++++++++++++++ .../CaptivePortalWarningDialogHost.java | 32 ++++++++ .../network/NetworkDashboardFragment.java | 17 +++- - 9 files changed, 230 insertions(+), 1 deletion(-) - create mode 100644 src/com/android/settings/ResetNetworkConfirm.java.rej + 8 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/network/CaptivePortalModePreferenceController.java create mode 100644 src/com/android/settings/network/CaptivePortalWarningDialog.java create mode 100644 src/com/android/settings/network/CaptivePortalWarningDialogHost.java diff --git a/res/values-de/cm_strings.xml b/res/values-de/cm_strings.xml -index b21028ad93..f74eccd3d8 100644 +index d981289421..3a66089d03 100644 --- a/res/values-de/cm_strings.xml +++ b/res/values-de/cm_strings.xml -@@ -92,4 +92,7 @@ +@@ -91,4 +91,7 @@ Gespeicherte Kopfhörer Schnelles Laden Deaktivieren, um die vom Gerät beim Laden erzeugte Wärme zu reduzieren oder die Lebensdauer des Akkus zu verlängern @@ -42,13 +40,13 @@ index b21028ad93..f74eccd3d8 100644 + Nach dem Ausschalten der Captive-Portal-Erkennung empfangen Sie keine Verbindungs-Rückmeldung mehr. Wirklich fortfahren? diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml -index c93c6e9959..cb46aff0ce 100644 +index 099fb9eb07..8bbdef11f6 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml -@@ -159,4 +159,9 @@ - - Fast charging - Disable to reduce the heat produced by the device while charging or to extend the lifespan of the battery +@@ -162,4 +162,9 @@ + + + Select Wi\u2011Fi network + + + Captive portal mode @@ -56,22 +54,23 @@ index c93c6e9959..cb46aff0ce 100644 + If you switch off the captive portal, you will not receive connectivity informations any longer. Really switch off? diff --git a/res/xml/network_and_internet.xml b/res/xml/network_and_internet.xml -index 6bf6dbaccf..5773f6d2da 100644 +index 6bf6dbaccf..38535bb4ba 100644 --- a/res/xml/network_and_internet.xml +++ b/res/xml/network_and_internet.xml -@@ -118,6 +118,12 @@ - android:positiveButtonText="@string/save" - android:negativeButtonText="@android:string/cancel" /> - +@@ -125,4 +125,11 @@ + android:summary="@string/summary_placeholder" + android:order="25" + settings:controller="com.android.settings.network.AdaptiveConnectivityPreferenceController"/> ++ + ++ android:order="30" /> + - +diff --git a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java +index 784ffa7719..b503298ad6 100644 --- a/src/com/android/settings/ResetNetworkConfirm.java +++ b/src/com/android/settings/ResetNetworkConfirm.java @@ -35,6 +35,7 @@ import android.os.Bundle; @@ -82,22 +81,19 @@ index 6bf6dbaccf..5773f6d2da 100644 import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.view.LayoutInflater; -diff --git a/src/com/android/settings/ResetNetworkConfirm.java.rej b/src/com/android/settings/ResetNetworkConfirm.java.rej ---- /dev/null -+++ b/src/com/android/settings/ResetNetworkConfirm.java.rej -@@ -0,0 +1,11 @@ -+diff a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java (rejected hunks) -+@@ -125,6 +126,9 @@ public class ResetNetworkConfirm extends InstrumentedFragment { -+ } -+ } -+ -++ Settings.Global.putInt(mContext.getContentResolver(), -++ Settings.Global.CAPTIVE_PORTAL_MODE, 1); -++ -+ ImsManager.getInstance(mContext, -+ SubscriptionManager.getPhoneId(mSubId)).factoryReset(); -+ restoreDefaultApn(mContext); +@@ -129,6 +130,9 @@ public class ResetNetworkConfirm extends InstrumentedFragment { + } + } + ++ Settings.Global.putInt(mContext.getContentResolver(), ++ Settings.Global.CAPTIVE_PORTAL_MODE, 1); ++ + restoreDefaultApn(mContext); + return isResetSucceed; + } diff --git a/src/com/android/settings/network/CaptivePortalModePreferenceController.java b/src/com/android/settings/network/CaptivePortalModePreferenceController.java +new file mode 100644 +index 0000000000..ae21b29292 --- /dev/null +++ b/src/com/android/settings/network/CaptivePortalModePreferenceController.java @@ -0,0 +1,82 @@ @@ -184,6 +180,8 @@ diff --git a/src/com/android/settings/network/CaptivePortalModePreferenceControl + } +} diff --git a/src/com/android/settings/network/CaptivePortalWarningDialog.java b/src/com/android/settings/network/CaptivePortalWarningDialog.java +new file mode 100644 +index 0000000000..d27bd7d2f0 --- /dev/null +++ b/src/com/android/settings/network/CaptivePortalWarningDialog.java @@ -0,0 +1,74 @@ @@ -262,6 +260,8 @@ diff --git a/src/com/android/settings/network/CaptivePortalWarningDialog.java b/ + } +} diff --git a/src/com/android/settings/network/CaptivePortalWarningDialogHost.java b/src/com/android/settings/network/CaptivePortalWarningDialogHost.java +new file mode 100644 +index 0000000000..7a04d1f831 --- /dev/null +++ b/src/com/android/settings/network/CaptivePortalWarningDialogHost.java @@ -0,0 +1,32 @@ @@ -297,6 +297,8 @@ diff --git a/src/com/android/settings/network/CaptivePortalWarningDialogHost.jav + */ + void onCaptivePortalSwitchOffDialogDismissed(); +} +diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java +index db704ae850..f4c5363d80 100644 --- a/src/com/android/settings/network/NetworkDashboardFragment.java +++ b/src/com/android/settings/network/NetworkDashboardFragment.java @@ -41,7 +41,7 @@ import java.util.List; diff --git a/Patches/LineageOS-18.1/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch b/Patches/LineageOS-18.1/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch index 69103345..3717591d 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch @@ -1,68 +1,61 @@ -From 1326644f0e695266010461ba80543eba403c64e5 Mon Sep 17 00:00:00 2001 +From 91cdd8cfebafcbfd226800cfdef80ec9a943e38b Mon Sep 17 00:00:00 2001 From: Tad -Date: Wed, 28 Feb 2018 08:12:03 -0500 +Date: Fri, 3 Sep 2021 08:52:48 -0400 Subject: [PATCH] Remove analytics -Change-Id: I189e9362c828569512e819cf655b03bfa3436830 +Change-Id: I3f42646ba278ef6d0d4aa7565f8374047d599938 --- - res/layout/setup_lineage_settings.xml | 36 ------------------- - .../lineageos/setupwizard/FinishActivity.java | 12 ------- - .../setupwizard/LineageSettingsActivity.java | 31 ---------------- + res/layout/setup_lineage_settings.xml | 29 ----------------- + .../lineageos/setupwizard/FinishActivity.java | 13 -------- + .../setupwizard/LineageSettingsActivity.java | 31 ------------------- .../lineageos/setupwizard/SetupWizardApp.java | 1 - - 4 files changed, 80 deletions(-) + 4 files changed, 74 deletions(-) diff --git a/res/layout/setup_lineage_settings.xml b/res/layout/setup_lineage_settings.xml -index b75af3c..15c2755 100644 +index a222d5b..9645f95 100644 --- a/res/layout/setup_lineage_settings.xml +++ b/res/layout/setup_lineage_settings.xml -@@ -51,42 +51,6 @@ - android:text="@string/services_explanation" - android:clickable="true"/> +@@ -53,35 +53,6 @@ + android:text="@string/services_explanation" + android:clickable="true" /> -- -- -- -- -- +- +- android:paddingLeft="@dimen/location_margin_left" +- android:paddingRight="@dimen/content_margin_right" +- android:background="?android:attr/selectableItemBackground" +- android:clickable="true"> - -- - -- +- - - - +- +- +- + + { +- private final View.OnClickListener mMetricsClickListener = view -> { - boolean checked = !mMetrics.isChecked(); - mMetrics.setChecked(checked); - mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, checked); - }; - - private View.OnClickListener mNavKeysClickListener = view -> { + private final View.OnClickListener mNavKeysClickListener = view -> { boolean checked = !mNavKeys.isChecked(); mNavKeys.setChecked(checked); -@@ -101,19 +93,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { +@@ -97,19 +89,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance()); privacyPolicy.setText(ss); @@ -145,7 +139,7 @@ index 4041f4b..0aaf96e 100644 View navKeysRow = findViewById(R.id.nav_keys); navKeysRow.setOnClickListener(mNavKeysClickListener); mNavKeys = (CheckBox) findViewById(R.id.nav_keys_checkbox); -@@ -130,7 +109,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { +@@ -126,7 +105,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { public void onResume() { super.onResume(); updateDisableNavkeysOption(); @@ -153,7 +147,7 @@ index 4041f4b..0aaf96e 100644 } @Override -@@ -154,15 +132,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { +@@ -150,15 +128,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { return R.drawable.ic_features; } @@ -170,11 +164,11 @@ index 4041f4b..0aaf96e 100644 if (mSupportsKeyDisabler) { final Bundle myPageBundle = mSetupWizardApp.getSettingsBundle(); diff --git a/src/org/lineageos/setupwizard/SetupWizardApp.java b/src/org/lineageos/setupwizard/SetupWizardApp.java -index 88581cf..757e0b1 100644 +index b1755c7..c299457 100644 --- a/src/org/lineageos/setupwizard/SetupWizardApp.java +++ b/src/org/lineageos/setupwizard/SetupWizardApp.java -@@ -63,7 +63,6 @@ public class SetupWizardApp extends Application { - public static final String EXTRA_IS_SETUP_FLOW = "isSetupFlow"; +@@ -59,7 +59,6 @@ public class SetupWizardApp extends Application { + public static final String EXTRA_ENABLE_NEXT_ON_CONNECT = "wifi_enable_next_on_connect"; public static final String KEY_DETECT_CAPTIVE_PORTAL = "captive_portal_detection_enabled"; - public static final String KEY_SEND_METRICS = "send_metrics"; @@ -182,5 +176,5 @@ index 88581cf..757e0b1 100644 public static final String ENABLE_RECOVERY_UPDATE = "enable_recovery_update"; public static final String UPDATE_RECOVERY_PROP = "persist.vendor.recovery_update"; -- -2.30.2 +2.31.1