• Derek Cheng's avatar
    [MediaRouter] Remove DIAL sink if the device is Cast-enabled. · 53df5c3a
    Derek Cheng authored
    Certain Cast-enabled devices also advertise via SSDP for the purpose of
    improving discovey reliability. However, they also (incorrectly) claim
    to support DIAL apps, only for the DIAL app launch to fail.
    
    We currently prevent such cases of Cast devices showing up as a
    duplicated (incorrect) DIAL sink by relying on a hardcoded list of
    model names to determine whether a DIAL sink is "discovery only",
    i.e., DIAL sink queries should not be performed on them.
    
    Unfortunately the list is not exhaustive and it would be challenging
    if not impossible to obtain and maintain an acccurate list, as seen
    from the recent regression. This patch takes a different approach, by
    noting that if a Cast sink can be derived from a DIAL sink (or if it
    already exists), then the DIAL sink can be removed from
    DialMediaSinkServiceImpl as it has no further use by the DIAL MRP.
    This ensures that no further DIAL queries will be issued to that sink,
    and that the sink will not show up on a sink query.
    
    Change-Id: Icdd3fc35baf6e3898537d38e1b059fc5c2714007
    Bug: 869112
    Reviewed-on: https://chromium-review.googlesource.com/1155258
    Commit-Queue: Derek Cheng <imcheng@chromium.org>
    Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579256}
    53df5c3a
media_sink.h 3.7 KB