Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d47dc7c3 authored by JP Abgrall's avatar JP Abgrall Committed by Android Git Automerger
Browse files

am 7238585e: am 4f261396: am 4ecd833e: am 7baa7c80: Merge...

am 7238585e: am 4f261396: am 4ecd833e: am 7baa7c80: Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev

* commit '7238585e':
  ConnectivityService: add support to set TCP initial rwnd
parents ff9da494 7238585e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5139,6 +5139,12 @@ public final class Settings {
         */
        public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";

       /**
        * Used to select TCP's default initial receiver window size in segments - defaults to a build config value
        * @hide
        */
       public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd";

       /**
        * Used to disable Tethering on a device - defaults to true
        * @hide
+9 −0
Original line number Diff line number Diff line
@@ -2764,6 +2764,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            }
            setBufferSize(bufferSizes);
        }

        final String defaultRwndKey = "net.tcp.default_init_rwnd";
        int defaultRwndValue = SystemProperties.getInt(defaultRwndKey, 0);
        Integer rwndValue = Settings.Global.getInt(mContext.getContentResolver(),
            Settings.Global.TCP_DEFAULT_INIT_RWND, defaultRwndValue);
        final String sysctlKey = "sys.sysctl.tcp_def_init_rwnd";
        if (rwndValue != 0) {
            SystemProperties.set(sysctlKey, rwndValue.toString());
        }
    }

    /**