Do not use hidden SystemProperties.set
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Thus, use
alternative new sysprop as API to control the tcp init rwnd
value.
Bug: 170917042
Test: adb shell getprop net.tcp_def_init_rwnd and check if
value is set correctly
Test: atest FrameworksNetTests
Change-Id: If9e99c88de50b6829721b0dfacc430a3b53c7728
This commit is contained in:
@@ -2471,12 +2471,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
loge("Can't set TCP buffer sizes:" + e);
|
||||
}
|
||||
|
||||
Integer rwndValue = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.TCP_DEFAULT_INIT_RWND,
|
||||
final Integer rwndValue = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.TCP_DEFAULT_INIT_RWND,
|
||||
mSystemProperties.getInt("net.tcp.default_init_rwnd", 0));
|
||||
final String sysctlKey = "sys.sysctl.tcp_def_init_rwnd";
|
||||
if (rwndValue != 0) {
|
||||
mSystemProperties.set(sysctlKey, rwndValue.toString());
|
||||
mSystemProperties.setTcpInitRwnd(rwndValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user