Merge "Update the SDK version to 34 in ConnectivityTestsLatestSdkDefaults"

This commit is contained in:
Yuyang Huang
2023-06-02 06:22:18 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ package {
// (currently, CTS 10, 11, and 12). // (currently, CTS 10, 11, and 12).
java_defaults { java_defaults {
name: "ConnectivityTestsLatestSdkDefaults", name: "ConnectivityTestsLatestSdkDefaults",
target_sdk_version: "33", target_sdk_version: "34",
} }
java_library { java_library {

View File

@@ -548,8 +548,9 @@ class NsdManagerTest {
assertTrue(resolvedService.attributes.containsKey("nullBinaryDataAttr")) assertTrue(resolvedService.attributes.containsKey("nullBinaryDataAttr"))
assertNull(resolvedService.attributes["nullBinaryDataAttr"]) assertNull(resolvedService.attributes["nullBinaryDataAttr"])
assertTrue(resolvedService.attributes.containsKey("emptyBinaryDataAttr")) assertTrue(resolvedService.attributes.containsKey("emptyBinaryDataAttr"))
// TODO: change the check to target SDK U when this is what the code implements if (isAtLeastU() || CompatChanges.isChangeEnabled(
if (isAtLeastU()) { ConnectivityCompatChanges.ENABLE_PLATFORM_MDNS_BACKEND
)) {
assertArrayEquals(byteArrayOf(), resolvedService.attributes["emptyBinaryDataAttr"]) assertArrayEquals(byteArrayOf(), resolvedService.attributes["emptyBinaryDataAttr"])
} else { } else {
assertNull(resolvedService.attributes["emptyBinaryDataAttr"]) assertNull(resolvedService.attributes["emptyBinaryDataAttr"])