add TRANSPORT_THREAD to NetworkCapabilities
This commit also updates to use V11 dnsresolver APIs which was V9.
Bug: 262683651
Test: unit tests
Change-Id: Ifbd71157012dc66ec0f377beef9fa59d1c8620b8
diff --git a/framework/api/current.txt b/framework/api/current.txt
index 547b7e2..672e3e2 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -360,6 +360,7 @@
field public static final int TRANSPORT_CELLULAR = 0; // 0x0
field public static final int TRANSPORT_ETHERNET = 3; // 0x3
field public static final int TRANSPORT_LOWPAN = 6; // 0x6
+ field public static final int TRANSPORT_THREAD = 9; // 0x9
field public static final int TRANSPORT_USB = 8; // 0x8
field public static final int TRANSPORT_VPN = 4; // 0x4
field public static final int TRANSPORT_WIFI = 1; // 0x1
diff --git a/framework/src/android/net/NetworkCapabilities.java b/framework/src/android/net/NetworkCapabilities.java
index e07601f..a81da22 100644
--- a/framework/src/android/net/NetworkCapabilities.java
+++ b/framework/src/android/net/NetworkCapabilities.java
@@ -1109,6 +1109,7 @@
TRANSPORT_LOWPAN,
TRANSPORT_TEST,
TRANSPORT_USB,
+ TRANSPORT_THREAD,
})
public @interface Transport { }
@@ -1160,10 +1161,15 @@
*/
public static final int TRANSPORT_USB = 8;
+ /**
+ * Indicates this network uses a Thread transport.
+ */
+ public static final int TRANSPORT_THREAD = 9;
+
/** @hide */
public static final int MIN_TRANSPORT = TRANSPORT_CELLULAR;
/** @hide */
- public static final int MAX_TRANSPORT = TRANSPORT_USB;
+ public static final int MAX_TRANSPORT = TRANSPORT_THREAD;
private static final int ALL_VALID_TRANSPORTS;
static {
@@ -1188,7 +1194,8 @@
"WIFI_AWARE",
"LOWPAN",
"TEST",
- "USB"
+ "USB",
+ "THREAD",
};
/**