Add mDNS service instance name parser.
This will be used for parsing user-provided names to 'adb connect' and
'adb pair' in order to check for matches in the mdns service registry.
Bug: 152886765
Test: $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test
--gtest_filter=mdns_utils*
Change-Id: Ifd74b4394212853c1c193a2ea64937f6a6a0ff24
diff --git a/Android.bp b/Android.bp
index 432770c..9db151d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -218,6 +218,7 @@
"client/usb_dispatch.cpp",
"client/transport_local.cpp",
"client/transport_mdns.cpp",
+ "client/mdns_utils.cpp",
"client/transport_usb.cpp",
"client/pairing/pairing_client.cpp",
],
@@ -264,7 +265,10 @@
cc_test_host {
name: "adb_test",
defaults: ["adb_defaults"],
- srcs: libadb_test_srcs,
+ srcs: libadb_test_srcs + [
+ "client/mdns_utils_test.cpp",
+ ],
+
static_libs: [
"libadb_crypto_static",
"libadb_host",