1
0
mirror of https://github.com/yurisieucuti/treble_evolution.git synced 2024-11-28 05:54:30 +00:00
treble_evolution/patches/trebledroid/platform_packages_apps_Settings/0005-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch
2024-03-10 06:48:11 +00:00

86 lines
5.3 KiB
Diff

From 070e7c811d354f411cb4bc507d797f6aa995cd1c Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Thu, 2 Nov 2023 10:23:56 +0000
Subject: [PATCH 5/5] Revert "[Wi-Fi] Check if domain field is not empty when
users choose a ca certificate"
Change-Id: I52ede9eb6b5164e147578e2dc2756cc722fe36ef
---
.../android/settings/wifi/WifiConfigController.java | 11 ++++++-----
.../android/settings/wifi/WifiConfigController2.java | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index 6ca97c329c..d2f3afd6ba 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -547,11 +547,11 @@ public class WifiConfigController implements TextWatcher,
// Disallow submit if the user has not selected a CA certificate for an EAP network
// configuration.
enabled = false;
- } else if (!caCertSelection.equals(mDoNotValidateEapServerString)
+ } else if (caCertSelection.equals(mUseSystemCertsString)
&& mEapDomainView != null
&& mView.findViewById(R.id.l_domain).getVisibility() != View.GONE
&& TextUtils.isEmpty(mEapDomainView.getText().toString())) {
- // Disallow submit if the user chooses to use a certificate for EAP server
+ // Disallow submit if the user chooses to use a system certificate for EAP server
// validation, but does not provide a domain.
enabled = false;
}
@@ -588,12 +588,13 @@ public class WifiConfigController implements TextWatcher,
// Display warning if user chooses not to validate the EAP server with a
// user-supplied CA certificate in an EAP network configuration.
mView.findViewById(R.id.no_ca_cert_warning).setVisibility(View.VISIBLE);
- } else if (!caCertSelection.equals(mUnspecifiedCertString)
+ } else if (caCertSelection.equals(mUseSystemCertsString)
&& mEapDomainView != null
&& mView.findViewById(R.id.l_domain).getVisibility() != View.GONE
&& TextUtils.isEmpty(mEapDomainView.getText().toString())) {
- // Display warning if user chooses to use a certificate without restricting the
- // server domain that these certificates can be used to validate.
+ // Display warning if user chooses to use pre-installed public CA certificates
+ // without restricting the server domain that these certificates can be used to
+ // validate.
mView.findViewById(R.id.no_domain_warning).setVisibility(View.VISIBLE);
}
}
diff --git a/src/com/android/settings/wifi/WifiConfigController2.java b/src/com/android/settings/wifi/WifiConfigController2.java
index 6074202a97..90f518122a 100644
--- a/src/com/android/settings/wifi/WifiConfigController2.java
+++ b/src/com/android/settings/wifi/WifiConfigController2.java
@@ -535,11 +535,11 @@ public class WifiConfigController2 implements TextWatcher,
// Disallow submit if the user has not selected a CA certificate for an EAP network
// configuration.
enabled = false;
- } else if (!caCertSelection.equals(mDoNotValidateEapServerString)
+ } else if (caCertSelection.equals(mUseSystemCertsString)
&& mEapDomainView != null
&& mView.findViewById(R.id.l_domain).getVisibility() != View.GONE
&& TextUtils.isEmpty(mEapDomainView.getText().toString())) {
- // Disallow submit if the user chooses to use a certificate for EAP server
+ // Disallow submit if the user chooses to use a system certificate for EAP server
// validation, but does not provide a domain.
enabled = false;
}
@@ -576,12 +576,13 @@ public class WifiConfigController2 implements TextWatcher,
// Display warning if user chooses not to validate the EAP server with a
// user-supplied CA certificate in an EAP network configuration.
mView.findViewById(R.id.no_ca_cert_warning).setVisibility(View.VISIBLE);
- } else if (!caCertSelection.equals(mUnspecifiedCertString)
+ } else if (caCertSelection.equals(mUseSystemCertsString)
&& mEapDomainView != null
&& mView.findViewById(R.id.l_domain).getVisibility() != View.GONE
&& TextUtils.isEmpty(mEapDomainView.getText().toString())) {
- // Display warning if user chooses to use a certificate without restricting the
- // server domain that these certificates can be used to validate.
+ // Display warning if user chooses to use pre-installed public CA certificates
+ // without restricting the server domain that these certificates can be used to
+ // validate.
mView.findViewById(R.id.no_domain_warning).setVisibility(View.VISIBLE);
}
}
--
2.25.1