Final platform settings UX for ephemeral networks.

Show "Connected via Wi-Fi assistant" instead of just "Connected" when
a Wi-Fi connection is ephemeral. Otherwise, treat ephemeral
connections just like saved ones - show (read-only) connection stats
when you click the network, and offer the ability to "forget" the
network, which prevents further ephemeral connections.

Bug: 18525241
Change-Id: I0d2146ab47b82d32c50b2ef883f176a6b6066713
This commit is contained in:
Jeff Davidson
2014-11-26 15:29:36 -08:00
parent 45893e65b6
commit 5ead6b92fd
6 changed files with 52 additions and 34 deletions

View File

@@ -242,7 +242,8 @@ public class WifiConfigController implements TextWatcher,
}
}
if (mAccessPoint.networkId == INVALID_NETWORK_ID || mEdit) {
if ((mAccessPoint.networkId == INVALID_NETWORK_ID && !mAccessPoint.isActive())
|| mEdit) {
showSecurityFields();
showIpConfigFields();
showProxyFields();
@@ -266,7 +267,8 @@ public class WifiConfigController implements TextWatcher,
} else {
if (state != null) {
addRow(group, R.string.wifi_status, Summary.get(mConfigUi.getContext(),
state));
state, mAccessPoint.networkId ==
WifiConfiguration.INVALID_NETWORK_ID));
}
if (signalLevel != null) {
@@ -300,7 +302,7 @@ public class WifiConfigController implements TextWatcher,
addRow(group, R.string.wifi_security, mAccessPoint.getSecurityString(false));
mView.findViewById(R.id.ip_fields).setVisibility(View.GONE);
}
if (mAccessPoint.networkId != INVALID_NETWORK_ID
if ((mAccessPoint.networkId != INVALID_NETWORK_ID || mAccessPoint.isActive())
&& ActivityManager.getCurrentUser() == UserHandle.USER_OWNER) {
mConfigUi.setForgetButton(res.getString(R.string.wifi_forget));
}