Expose NsdServiceInfo#getHostname
This allows obtaining the hostname that is pointing to the address
records, which were already available though #getHostAddresses.
This is covered by existing CTS tests, for example the
servicesWithCustomHost_customHostAddressesFound test in NsdManagerTest.
Test: atest CtsNetTestCases:NsdManagerTest
API-Coverage-Bug: 384841047
Change-Id: Ib939c1977a76d8d98c9b4f79da6a1a6b0acf6a87
diff --git a/framework-t/api/current.txt b/framework-t/api/current.txt
index 9ae0cf7..75578aa 100644
--- a/framework-t/api/current.txt
+++ b/framework-t/api/current.txt
@@ -288,6 +288,7 @@
method public java.util.Map<java.lang.String,byte[]> getAttributes();
method @Deprecated public java.net.InetAddress getHost();
method @NonNull public java.util.List<java.net.InetAddress> getHostAddresses();
+ method @FlaggedApi("com.android.net.flags.ipv6_over_ble") @Nullable public String getHostname();
method @Nullable public android.net.Network getNetwork();
method public int getPort();
method public String getServiceName();