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).
java_defaults {
name: "ConnectivityTestsLatestSdkDefaults",
target_sdk_version: "33",
target_sdk_version: "34",
}
java_library {

View File

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