Change the NetworkInfo for disconnected types.
Don't send out NetworkInfos with UNKNOWN state for disconnected networks - use DISCONNECTED. bug:17095670 Change-Id: I863bebadc1f9a666572958b49d5e62809f485e5d
This commit is contained in:
@@ -4759,7 +4759,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
result.setType(networkType);
|
||||
return result;
|
||||
} else {
|
||||
return new NetworkInfo(networkType, 0, "Unknown", "");
|
||||
NetworkInfo result = new NetworkInfo(networkType);
|
||||
result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user