diff options
| author | Junyu Lai <junyulai@google.com> | 2019-06-19 22:55:07 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-06-19 22:55:07 -0700 |
| commit | 8ffb2b010604e53c04c81b83b60b13d363338ddc (patch) | |
| tree | a6216adbd03ba953f4331ab212fa7634875ceec1 /core/java | |
| parent | 1459e84fd6adebdc8e567d9ad545a7e6fcac3809 (diff) | |
| parent | 544e00d382455c3c0460ee8321f8fda6e8712079 (diff) | |
Merge "Move the test of minimum supported keepalive slots to CTS" into qt-dev
am: 544e00d382
Change-Id: I5a8e52154f777064df66e943a3def4cbbc762856
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/net/util/KeepaliveUtils.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/net/util/KeepaliveUtils.java b/core/java/android/net/util/KeepaliveUtils.java index 569fed1fc994..bfc4563fbf8f 100644 --- a/core/java/android/net/util/KeepaliveUtils.java +++ b/core/java/android/net/util/KeepaliveUtils.java @@ -34,9 +34,6 @@ public final class KeepaliveUtils { public static final String TAG = "KeepaliveUtils"; - // Minimum supported keepalive count per transport if the network supports keepalive. - public static final int MIN_SUPPORTED_KEEPALIVE_COUNT = 3; - public static class KeepaliveDeviceConfigurationException extends AndroidRuntimeException { public KeepaliveDeviceConfigurationException(final String msg) { super(msg); @@ -84,10 +81,7 @@ public final class KeepaliveUtils { throw new KeepaliveDeviceConfigurationException("Invalid transport " + transport); } - // Customized values should be either 0 to indicate the network doesn't support - // keepalive offload, or a positive value that is at least - // MIN_SUPPORTED_KEEPALIVE_COUNT if supported. - if (supported != 0 && supported < MIN_SUPPORTED_KEEPALIVE_COUNT) { + if (supported < 0) { throw new KeepaliveDeviceConfigurationException( "Invalid supported count " + supported + " for " + NetworkCapabilities.transportNameOf(transport)); |
