Migrate reigster service callback backend

registerServiceInfoCallback currently only sends updates for
addresses added, but does not handle removes (expiration) and
TXT/SRV record updates. Thus, migrate its backend to
MdnsDiscoveryManager which can support the expiration update.

Bug: 266030646
Test: atest FrameworksNetTests CteNetTestCases
Change-Id: I72add213935dc1beacb6277007868ad30bd89c00
This commit is contained in:
Paul Hu
2023-02-07 13:20:56 +00:00
parent 6477d7b697
commit 30bd70d168
4 changed files with 180 additions and 188 deletions

View File

@@ -1312,7 +1312,7 @@ public final class NsdManager {
* before registering other callbacks. Upon failure to register a callback for example if
* it's a duplicated registration, the application is notified through
* {@link ServiceInfoCallback#onServiceInfoCallbackRegistrationFailed} with
* {@link #FAILURE_BAD_PARAMETERS} or {@link #FAILURE_ALREADY_ACTIVE}.
* {@link #FAILURE_BAD_PARAMETERS}.
*
* @param serviceInfo the service to receive updates for
* @param executor Executor to run callbacks with