Switch the NetworkInfo.mIsAvailable default

The placeholder for disconnected networks was setting it to false, but
this technically means that we know an attempt to connect to that
network will fail (which we don't really now).  Some applications use
this an decide not to bother trying - an MMS app for example would
never send an MMS because it thinks the network is never available.

This is a L regression.

bug:17669247
Change-Id: Id6041f226da069c267c56418d42c55978c36c66f
This commit is contained in:
Robert Greenwalt
2014-10-03 16:05:36 -07:00
parent 586413f351
commit 145bafa9a1

View File

@@ -4231,6 +4231,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
NetworkInfo result = new NetworkInfo(
networkType, 0, ConnectivityManager.getNetworkTypeName(networkType), "");
result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
result.setIsAvailable(true);
return result;
}
}