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:
@@ -595,7 +595,7 @@ class AccessPoint extends Preference {
|
||||
* For ephemeral connections (networkId is invalid), this returns false if the network is
|
||||
* disconnected.
|
||||
*/
|
||||
private boolean isActive() {
|
||||
boolean isActive() {
|
||||
return mNetworkInfo != null &&
|
||||
(networkId != WifiConfiguration.INVALID_NETWORK_ID ||
|
||||
mNetworkInfo.getState() != State.DISCONNECTED);
|
||||
@@ -617,7 +617,8 @@ class AccessPoint extends Preference {
|
||||
StringBuilder summary = new StringBuilder();
|
||||
|
||||
if (isActive()) { // This is the active connection
|
||||
summary.append(Summary.get(context, getState()));
|
||||
summary.append(Summary.get(context, getState(),
|
||||
networkId == WifiConfiguration.INVALID_NETWORK_ID));
|
||||
} else if (mConfig != null
|
||||
&& mConfig.hasNoInternetAccess()) {
|
||||
summary.append(context.getString(R.string.wifi_no_internet));
|
||||
|
||||
Reference in New Issue
Block a user