[Wi-Fi] Improve UX when there is no user certificate to choose for WPA-Enterprise 192-bit
Show error message when a user does not specify a user certificate for WPA3-Enterprise 192-bit. Bug: 138417816 Test: visual Change-Id: Ifc519d484dbf78dad37ad7047e8b9bb40685d54c
This commit is contained in:
@@ -257,6 +257,18 @@
|
||||
android:prompt="@string/wifi_eap_user_cert" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/no_user_cert_warning"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
style="@style/wifi_item" >
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/wifi_item_warning"
|
||||
android:text="@string/wifi_no_user_cert_warning" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/l_identity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -2260,6 +2260,10 @@
|
||||
<!-- Warning message displayed if user does not specify a domain for the CA certificate.
|
||||
Only displayed if the user also chooses to use system certificates. -->
|
||||
<string name="wifi_no_domain_warning">Must specify a domain.</string>
|
||||
<!-- Warning message displayed if user does not specify a user certification for
|
||||
WPA3-Enterprise 192-bit. Only displayed if the user does not specify user certificate
|
||||
for WPA3-Enterprise 192-bit [CHAR LIMIT=80]-->
|
||||
<string name="wifi_no_user_cert_warning">This option requires a user certificate.</string>
|
||||
<!-- Substring of status line when Wi-Fi Protected Setup (WPS) is available and
|
||||
string is listed first [CHAR LIMIT=20]-->
|
||||
<string name="wifi_wps_available_first_item">WPS available</string>
|
||||
|
@@ -555,6 +555,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
void showWarningMessagesIfAppropriate() {
|
||||
mView.findViewById(R.id.no_ca_cert_warning).setVisibility(View.GONE);
|
||||
mView.findViewById(R.id.no_user_cert_warning).setVisibility(View.GONE);
|
||||
mView.findViewById(R.id.no_domain_warning).setVisibility(View.GONE);
|
||||
mView.findViewById(R.id.ssid_too_long_warning).setVisibility(View.GONE);
|
||||
|
||||
@@ -582,6 +583,14 @@ public class WifiConfigController implements TextWatcher,
|
||||
mView.findViewById(R.id.no_domain_warning).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (mAccessPointSecurity == AccessPoint.SECURITY_EAP_SUITE_B &&
|
||||
mEapMethodSpinner.getSelectedItemPosition() == WIFI_EAP_METHOD_TLS) {
|
||||
String userCertSelection = (String) mEapUserCertSpinner.getSelectedItem();
|
||||
if (userCertSelection.equals(mUnspecifiedCertString)) {
|
||||
mView.findViewById(R.id.no_user_cert_warning).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user