[Nearby] Resolve duplicate share targets in contact-based sharing
Currently, the discovery page might show multiple share targets corresponding to the same physical device. This can happen if the receiving device goes in and out of high-visibility mode, locks/unlocks the screen, etc. The endpoint ID and share target ID change after these events, and the stale share target records are not reported as "lost" until a timeout occurs after ~30s. For contact-based sharing, a share target has an immutable device ID corresponding to a physical device. In this CL, we remove stale, previously discovered share target records that have the same device ID as the most recently discovered share target. Note: If the receiving device is not using contact-based sharing or is not a contact of the sending device, there is no device ID available in the share target to dedup on. A different solution, if one exists, will need to be considered for that scenario. Fixed: 1146075 Change-Id: Ife49eb677fa0e973be845f2b715ce0db3f580cfe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2589040Reviewed-by:James Vecore <vecore@google.com> Commit-Queue: Josh Nohle <nohle@chromium.org> Cr-Commit-Position: refs/heads/master@{#836894}
Showing
Please register or sign in to comment