android_packages_modules_Co.../tests/unit/java
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Remi NGUYEN VAN 0a9dbc9d12 Share NetworkInterfaceProvider between MdnsSockets
Instead of creating one NetworkInterfaceProvider for each MdnsSocket,
create one in MdnsSocketClient and use it for each MdnsSocket.

MdnsSocket only calls getMulticastNetworkInterfaces and
getAvailableNetwork on MulticastNetworkInterfaceProvider, which are
thread-safe (the first one is synchronized). There is no need to have
multiple MulticastNetworkInterfaceProvider tracking the same state.

This allows reducing the number of callbacks filed to
ConnectivityManager, which is a resource usage improvement and can be
beneficial for huge apps that have many components which may
collectively reach the MAX_NETWORK_REQUESTS_PER_UID limit in
ConnectivityService (100).

MdnsSocketClient is unused in AOSP so this is a no-op in the platform.
It is only used by users of the unbundled mdns library.

Bug: 322049918
Test: atest
Change-Id: I515459beaee6aacc99c7c0c2a05c3c9c41473b62
2024-03-14 13:21:43 +09:00
..
android add TRANSPORT_SATELLITE to NetworkCapabilities 2024-02-07 16:07:39 +00:00
com/android Share NetworkInterfaceProvider between MdnsSockets 2024-03-14 13:21:43 +09:00