Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fa97eca authored by Arc Wang's avatar Arc Wang Committed by Android (Google) Code Review
Browse files

Merge "[Wi-Fi] Improve UX when there is no user certificate to choose for WPA-Enterprise 192-bit"

parents 14772ca9 44fa9d57
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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"
+4 −0
Original line number Diff line number Diff line
@@ -2272,6 +2272,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>
+9 −0
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }

    /**