[mdns] add API for setting/getting TTL value
To support Thread Border Router use case, an Android device needs to act
as a mDNS service discovery (RFC 8766) & advertising proxy (
https://datatracker.ietf.org/doc/draft-ietf-dnssd-advertising-proxy).
This means it needs to advertise and discover DNS-SD services of custom
TTL value on behalf of other devices.
This commit fulfills this requirement by adding TTL getter/setter to
NsdServiceInfo. When registering a service, the specified TTL will be
used for corresponding resource records.
Bug: 284903641
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I23837834847dc3a0fb452c5929a1b36e3fc1fb3f
5 files changed