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

Commit 04612d23 authored by kaiyiz's avatar kaiyiz
Browse files

Settings: Modify the dialog for carrier AP

The authentication method of carrier AP is PEAP.User need
to type identity and password.

When connect to carrier AP,just show identity and password
edittext. And hide other config item.

CRs-Fixed: 788996

Change-Id: I179a78b79bd95d8db50a10ee2dcb62613fae142e
parent 41e5d544
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -64,6 +64,9 @@

    <bool name="disable_data_sub2">false</bool>

    <!-- Whether to show abridged dialog connecting carrier AP -->
    <bool name="show_abridged_connecting_wifi_dialog">false</bool>

    <!-- Whether enable CABL service -->
    <bool name="cabl_enabled">false</bool>

+18 −0
Original line number Diff line number Diff line
@@ -293,6 +293,13 @@ public class WifiConfigController implements TextWatcher,
                }
            }

            if (AccessPoint.CARRIER_SSID.equals(mAccessPoint.ssid)
                    && res.getBoolean(R.bool.show_abridged_connecting_wifi_dialog)) {
                if (mAccessPoint.security == AccessPoint.SECURITY_EAP) {
                    mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(View.GONE);
                }
            }

            if (mEdit) {
                mConfigUi.setSubmitButton(res.getString(R.string.wifi_save));
            } else {
@@ -756,6 +763,17 @@ public class WifiConfigController implements TextWatcher,
        } else {
            showEapFieldsByMethod(mEapMethodSpinner.getSelectedItemPosition());
        }
        if (mAccessPoint != null && AccessPoint.CARRIER_SSID.equals(mAccessPoint.ssid)
                && mContext.getResources().getBoolean(
                R.bool.show_abridged_connecting_wifi_dialog)) {
            if (mAccessPoint.security == AccessPoint.SECURITY_EAP) {
                mView.findViewById(R.id.l_method).setVisibility(View.GONE);
                setPhase2Invisible();
                setCaCertInvisible();
                setAnonymousIdentInvisible();
                setUserCertInvisible();
            }
        }
    }

    private void checkEapSimInfo() {