0
0
mirror of https://github.com/ponces/treble_aosp.git synced 2025-06-03 04:56:28 +00:00
Files
treble_aosp/patches/trebledroid/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch
2025-04-12 10:17:26 +00:00

86 lines
5.3 KiB
Diff

From bc5c27431e126a66f93c275e8838590d61dbb1ac Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Thu, 2 Nov 2023 10:23:56 +0000
Subject: [PATCH 4/4] 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 7a565d8480d..2a828e71a0e 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -569,11 +569,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;
}
@@ -610,12 +610,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 347e943f45e..ddd5610fe3e 100644
--- a/src/com/android/settings/wifi/WifiConfigController2.java
+++ b/src/com/android/settings/wifi/WifiConfigController2.java
@@ -568,11 +568,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;
}
@@ -609,12 +609,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.43.0