Show "not configurable" screen in EAP
Bug: 3175016 Change-Id: If67c0cbf41adee205c8b3eec410e39bc29c2f04d
This commit is contained in:
@@ -105,6 +105,18 @@
|
||||
android:entries="@array/wifi_security" />
|
||||
</LinearLayout> <!-- android:id="@+id/type" -->
|
||||
|
||||
<LinearLayout android:id="@+id/eap_not_supported"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dip"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="22sp"
|
||||
android:text="@string/wifi_setup_eap_not_supported" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- All the views below are "gone".
|
||||
We want them as data storage, not as UI components. -->
|
||||
<LinearLayout
|
||||
|
@@ -2993,17 +2993,25 @@ found in the list of installed applications.</string>
|
||||
if needed. Used in Wifi Setup with XL screen. [CHAR LIMIT=35] -->
|
||||
<string name="wifi_setup_status_edit_network">Enter network configuration</string>
|
||||
<!-- The message shown above available networks when a user clicked "Add network"
|
||||
button. Used in Wifi Setup For Setup Wizard with XL screen. -->
|
||||
button. Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
|
||||
<string name="wifi_setup_status_new_network">Connect to new network</string>
|
||||
<!-- The message shown above available networks when a user clicked one of available
|
||||
networks or created another profile and he/she is waiting for the connection
|
||||
is established.
|
||||
Used in Wifi Setup For Setup Wizard with XL screen. -->
|
||||
Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
|
||||
<string name="wifi_setup_status_connecting">Connecting...</string>
|
||||
<!-- The message shown above available networks when connection is established,
|
||||
letting a user to proceed to the next step of the SetupWizard.
|
||||
Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
|
||||
<string name="wifi_setup_status_proceed_to_next">Proceed to the next step</string>
|
||||
<!-- The message shown above available networks when a user clicked a network secured by
|
||||
EAP. We don't allow the user to connect it.
|
||||
Used in Wifi Setup For Setup Wizard with XL screen. [CHAR LIMIT=35] -->
|
||||
<string name="wifi_setup_status_eap_not_supported">EAP not supported</string>
|
||||
<!-- Message shown when users select EAP in WiFi settings for SetupWizard,
|
||||
saying EAP can't be configured in SetupWizard flow.
|
||||
[CHAR LIMIT=NONE] -->
|
||||
<string name="wifi_setup_eap_not_supported">You can\u0027t configure an EAP Wi-Fi connection during setup. After setup, you can do that in Settings, under Wireless & Networks.</string>
|
||||
|
||||
<!-- Do not translate. This is a stub which will be removed soon. -->
|
||||
<string name="time_zone_auto_stub" translatable="false">Select Time Zone</string>
|
||||
|
@@ -121,6 +121,9 @@ public class WifiConfigController implements TextWatcher,
|
||||
private ProxySettings mProxySettings;
|
||||
private LinkProperties mLinkProperties = new LinkProperties();
|
||||
|
||||
// True when this instance is used in SetupWizard XL context.
|
||||
private final boolean mInXlSetupWizard;
|
||||
|
||||
static boolean requireKeyStore(WifiConfiguration config) {
|
||||
if (config == null) {
|
||||
return false;
|
||||
@@ -138,6 +141,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
public WifiConfigController(
|
||||
WifiConfigUiBase parent, View view, AccessPoint accessPoint, boolean edit) {
|
||||
mConfigUi = parent;
|
||||
mInXlSetupWizard = (parent instanceof WifiConfigUiForSetupWizardXL);
|
||||
|
||||
mView = view;
|
||||
mAccessPoint = accessPoint;
|
||||
@@ -474,6 +478,13 @@ public class WifiConfigController implements TextWatcher,
|
||||
if (mAccessPointSecurity == AccessPoint.SECURITY_NONE) {
|
||||
mView.findViewById(R.id.security_fields).setVisibility(View.GONE);
|
||||
return;
|
||||
} else if (mAccessPointSecurity == AccessPoint.SECURITY_EAP && mInXlSetupWizard) {
|
||||
// In SetupWizard for XLarge screen, we don't have enough space for showing
|
||||
// configurations needed for EAP. We instead disable the whole feature there and let
|
||||
// users configure those networks after the setup.
|
||||
mView.findViewById(R.id.eap_not_supported).setVisibility(View.VISIBLE);
|
||||
mView.findViewById(R.id.security_fields).setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
mView.findViewById(R.id.security_fields).setVisibility(View.VISIBLE);
|
||||
|
||||
|
@@ -323,6 +323,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
||||
|
||||
if (selectedAccessPoint.security == AccessPoint.SECURITY_NONE) {
|
||||
mStatusText.setText(R.string.wifi_setup_status_unsecured_network);
|
||||
} else if (selectedAccessPoint.security == AccessPoint.SECURITY_EAP) {
|
||||
mStatusText.setText(R.string.wifi_setup_status_eap_not_supported);
|
||||
} else {
|
||||
mStatusText.setText(R.string.wifi_setup_status_edit_network);
|
||||
}
|
||||
|
Reference in New Issue
Block a user