Files
android_packages_modules_Co…/tests/unit/java
Remi NGUYEN VAN f2d064112c Implement proper discovery with subtypes
Apps may want to discover a particular subtype, such as
_color._sub._printer._tcp.local, which may return services like
Printer1._printer._tcp.local. The previous code was trying to discover,
and would return service types named _color._sub._printer._tcp.local,
even though the actual service type is still _printer._tcp.local. This
is a regression compared to S/T.

Fix this by passing the subtype to MdnsDiscoveryManager in its options
instead of the service type, and ensure that MdnsDiscoveryManager only
sends callbacks to callers that have requested the given subtype (a
color that asked for _color._sub._printer._tcp.local should not receive
BlackAndWhite._printer._tcp.local).

Bug: 266167702
Test: atest
Change-Id: I21367c66534078667718a9b54dfc858b12ba7103
2023-05-12 13:29:20 +09:00
..