Merge "Fix CompatUtil on Q and R" am: b2e6d5baf8 am: fe3d837f96
Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/net/+/1633099
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I6b398ccb036e5db7903328c0156e5ed2cfd19273
diff --git a/staticlibs/devicetests/com/android/testutils/CompatUtil.kt b/staticlibs/devicetests/com/android/testutils/CompatUtil.kt
index 4bb90a8..ff8c668 100644
--- a/staticlibs/devicetests/com/android/testutils/CompatUtil.kt
+++ b/staticlibs/devicetests/com/android/testutils/CompatUtil.kt
@@ -27,7 +27,7 @@
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 @@
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