commit | 9d9ae4d2a167e673087007f3b03307b2380a600c | [log] [tgz] |
---|---|---|
author | Paul Hu <[email protected]> | Wed Apr 19 17:26:27 2023 +0800 |
committer | Cherrypicker Worker <[email protected]> | Thu Apr 27 08:14:17 2023 +0000 |
tree | 78f4114df99921a54eb1ca8887dd7240cf8076b2 | |
parent | d0507db40dc9f7b67ca662fb9903626c7178da8b [diff] |
Add MdnsServiceCache Currently, the mDns discovery services will clear if no listener registers to that MdnsServiceTypeClient. If an app does discover, stop discover, resolve, at this point the listener was unregistered, so the MdnsServiceTypeClient was deleted, and the service is gone from cache. So this will actually restart discovery without returning previous results from cache. Thus, add MdnsServiceCache to store all services and reduce the duplicated queries. Bug: 265787401 Test: atest FrameworksNetTests (cherry picked from https://android-review.googlesource.com/q/commit:ade3f459561f7dd2e1e66f82111c4e0e33fd3a4a) Merged-In: If3d4eb4e3dc5455f6f97cb782aa1b99b2a00f6e0 Change-Id: If3d4eb4e3dc5455f6f97cb782aa1b99b2a00f6e0