[ST02.1] Add TYPE_CNAME constant to DnsResolver
This would be needed for subsequent patches that synthesizing DNS
packets for testing purpose.
Bug: 139774492
Test: atest DnsPacketTest DnsResolverTest
Change-Id: I5e58f99b09b693f167178e56f008be8b42d9417a
diff --git a/framework/api/current.txt b/framework/api/current.txt
index 547b7e2..09b4538 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -188,6 +188,7 @@
field public static final int FLAG_NO_RETRY = 1; // 0x1
field public static final int TYPE_A = 1; // 0x1
field public static final int TYPE_AAAA = 28; // 0x1c
+ field public static final int TYPE_CNAME = 5; // 0x5
}
public static interface DnsResolver.Callback<T> {
diff --git a/framework/src/android/net/DnsResolver.java b/framework/src/android/net/DnsResolver.java
index 5e637f9..382a9de 100644
--- a/framework/src/android/net/DnsResolver.java
+++ b/framework/src/android/net/DnsResolver.java
@@ -71,12 +71,14 @@
@IntDef(prefix = { "TYPE_" }, value = {
TYPE_A,
- TYPE_AAAA
+ TYPE_AAAA,
+ TYPE_CNAME
})
@Retention(RetentionPolicy.SOURCE)
@interface QueryType {}
public static final int TYPE_A = 1;
public static final int TYPE_AAAA = 28;
+ public static final int TYPE_CNAME = 5;
@IntDef(prefix = { "FLAG_" }, value = {
FLAG_EMPTY,