diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2021-03-12 01:25:34 +0000 |
---|---|---|
committer | Remi NGUYEN VAN <reminv@google.com> | 2021-03-12 01:25:40 +0000 |
commit | 15cefb6ae56d962fe19f89be8335a76b25fdbbcd (patch) | |
tree | 691a27579bbe6fb0da6ff363b7793a9b5be0d794 /common | |
parent | 1c22944c5e57d12375d1b025ae5d990c7fe92c01 (diff) | |
download | net-15cefb6ae56d962fe19f89be8335a76b25fdbbcd.tar.gz |
Fix CompatUtil on Q and R
CompatUtil was missing return statements and falled back to S
behavior even on Q and R.
Bug: 179329291
Change-Id: I8efb8e56948383c29d476e0b090619bac156d372
Test: atest CtsNetTestCasesLatestSdk
Diffstat (limited to 'common')
-rw-r--r-- | common/devicetests/com/android/testutils/CompatUtil.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/devicetests/com/android/testutils/CompatUtil.kt b/common/devicetests/com/android/testutils/CompatUtil.kt index 4bb90a80..ff8c6689 100644 --- a/common/devicetests/com/android/testutils/CompatUtil.kt +++ b/common/devicetests/com/android/testutils/CompatUtil.kt @@ -27,7 +27,7 @@ object CompatUtil { fun makeTestNetworkSpecifier(ifName: String): NetworkSpecifier { // Until R, there was no TestNetworkSpecifier, StringNetworkSpecifier was used instead if (isDevSdkInRange(minExclusive = null, maxInclusive = Build.VERSION_CODES.R)) { - makeNetworkSpecifierInternal("android.net.StringNetworkSpecifier", ifName) + return makeNetworkSpecifierInternal("android.net.StringNetworkSpecifier", ifName) } // TestNetworkSpecifier is not part of the SDK in some branches using this utility // TODO: replace with a direct call to the constructor @@ -38,7 +38,7 @@ object CompatUtil { fun makeEthernetNetworkSpecifier(ifName: String): NetworkSpecifier { // Until R, there was no EthernetNetworkSpecifier, StringNetworkSpecifier was used instead if (isDevSdkInRange(minExclusive = null, maxInclusive = Build.VERSION_CODES.R)) { - makeNetworkSpecifierInternal("android.net.StringNetworkSpecifier", ifName) + return makeNetworkSpecifierInternal("android.net.StringNetworkSpecifier", ifName) } // EthernetNetworkSpecifier is not part of the SDK in some branches using this utility // TODO: replace with a direct call to the constructor |