Use the ServiceTypeClient network for queries
Instead of the network specified in the MdnsSearchOptions, which is often null to request searching on all networks, use the MdnsServiceTypeClient Network to build the queries. When MdnsSearchOptions.network is null, one MdnsServiceTypeClient is created for each mDNS-compatible Network. Each MdnsServiceTypeClient schedules queries with a Network selector. If the Network selector is null, each MdnsServiceTypeClient will post its queries to all networks. Instead, it should be the Network of the MdnsServiceTypeClient. There is one remaining problem when a tethered interface is up: in that case, there will be one MdnsServiceTypeClient for tethered interfaces with a null network, which will still broadcast its queries to all networks. This should be addressed in a follow-up by having MdnsMultinetworkSocketClient only send queries to interfaces that have a null network, when the network selector is null (and not all interfaces). Bug: 283708537 Test: atest Change-Id: If571d7a59c5e55d809eeb1f3d1c4b58684612cdd
Loading
Please register or sign in to comment