1
0
mirror of https://github.com/yurisieucuti/treble_evolution.git synced 2024-11-28 03:34:31 +00:00
treble_evolution/patches/platform_packages_apps_Settings/0004-Revert-Wi-Fi-Check-if-domain-field-is-not-empty-when.patch
2024-04-24 15:13:17 +00:00

86 lines
5.3 KiB
Diff

From a21bd9df74b600e1bbe6fc04d6aa89e35e4f08a5 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 4a191fc3497..8efc9275a31 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 a7e71d6d28d..56b166e7931 100644
--- a/src/com/android/settings/wifi/WifiConfigController2.java
+++ b/src/com/android/settings/wifi/WifiConfigController2.java
@@ -547,11 +547,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;
}
@@ -588,12 +588,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