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
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