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

Commit c0de2838 authored by Aaron Huang's avatar Aaron Huang
Browse files

Correct value of supported keepalive count for cellular

Cellular only supports 1 keepalive connection so correct the default
supported value to 1.

Bug: 134037217
Test: - atest FrameworksNetTests
      - atest android.net.cts.ConnectivityManagerTest \
        #testSocketKeepaliveLimitTelephony

Change-Id: Ia3761f2e78d54866bb2e156d58004396bbc8adc3
parent 2bba8e7b
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -44,9 +44,11 @@ import java.util.concurrent.Executor;
 * {@link SocketKeepalive.Callback#onStopped} if the operation was successful or
 * {@link SocketKeepalive.Callback#onStopped} if the operation was successful or
 * {@link SocketKeepalive.Callback#onError} if an error occurred.
 * {@link SocketKeepalive.Callback#onError} if an error occurred.
 *
 *
 * The device SHOULD support keepalive offload. If it does not, it MUST reply with
 * For cellular, the device MUST support at least 1 keepalive slot.
 *
 * For WiFi, the device SHOULD support keepalive offload. If it does not, it MUST reply with
 * {@link SocketKeepalive.Callback#onError} with {@code ERROR_UNSUPPORTED} to any keepalive offload
 * {@link SocketKeepalive.Callback#onError} with {@code ERROR_UNSUPPORTED} to any keepalive offload
 * request. If it does, it MUST support at least 3 concurrent keepalive slots per transport.
 * request. If it does, it MUST support at least 3 concurrent keepalive slots.
 */
 */
public abstract class SocketKeepalive implements AutoCloseable {
public abstract class SocketKeepalive implements AutoCloseable {
    static final String TAG = "SocketKeepalive";
    static final String TAG = "SocketKeepalive";
+1 −1
Original line number Original line Diff line number Diff line
@@ -353,7 +353,7 @@
         overridden by the device to present the capability of creating socket keepalives. -->
         overridden by the device to present the capability of creating socket keepalives. -->
    <!-- An Array of "[NetworkCapabilities.TRANSPORT_*],[supported keepalives] -->
    <!-- An Array of "[NetworkCapabilities.TRANSPORT_*],[supported keepalives] -->
    <string-array translatable="false" name="config_networkSupportedKeepaliveCount">
    <string-array translatable="false" name="config_networkSupportedKeepaliveCount">
        <item>0,3</item>
        <item>0,1</item>
        <item>1,3</item>
        <item>1,3</item>
    </string-array>
    </string-array>