Use config resource for tcp buffer size

bug:16549611
Change-Id: I48426f6b746e4bd9729bdd529d81b163ff5112a9
This commit is contained in:
Robert Greenwalt
2014-08-21 16:28:18 -07:00
parent 1affc58cb6
commit eee07beb92

View File

@@ -250,9 +250,6 @@ class EthernetNetworkFactory {
}
}
private static final String TCP_BUFFER_SIZES_ETHERNET =
"524288,1048576,3145728,524288,1048576,2097152";
/* Called by the NetworkFactory on the handler thread. */
public void onRequestNetwork() {
// TODO: Handle DHCP renew.
@@ -290,7 +287,11 @@ class EthernetNetworkFactory {
linkProperties.setHttpProxy(config.getHttpProxy());
}
linkProperties.setTcpBufferSizes(TCP_BUFFER_SIZES_ETHERNET);
String tcpBufferSizes = mContext.getResources().getString(
com.android.internal.R.string.config_ethernet_tcp_buffers);
if (TextUtils.isEmpty(tcpBufferSizes) == false) {
linkProperties.setTcpBufferSizes(tcpBufferSizes);
}
synchronized(EthernetNetworkFactory.this) {
if (mNetworkAgent != null) {