From 145bafa9a1bf1d75e1434a9b5956850ca6612bc7 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Fri, 3 Oct 2014 16:05:36 -0700 Subject: [PATCH] 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 --- services/core/java/com/android/server/ConnectivityService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 3dab17f917..b29cdf4894 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -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; } }