Description[CrOS Tether] Sort Tether network lists.
With this change, Tether networks in the networking UI (i.e., settings and quick settings) are sorted in the same order that the Tether component prioritizes them when performing a host scan.
The sorting rules are as follows:
(1) The device which has most recently sent a successful ConnectTetheringResponse is always at the front of the queue.
(2) Devices which have most recently sent a successful TetherAvailabilityResponse are next in the order, as long as they do not violate the first rule.
(3) All other devices are left in the order they are passed.
This CL also updates the GetNetworkListByType() logic in NetworkStateHandler; after this change, all connected/connecting networks are listed before non-active networks, and Wi-Fi networks associated with Tether networks are no longer returned since they are supposed to be obscured behind their associated Tether networks.
BUG=672263, 729796, 729801
Review-Url: https://codereview.chromium.org/2945643002
Cr-Commit-Position: refs/heads/master@{#481621}
Committed: https://chromium.googlesource.com/chromium/src/+/5a0eba4b0089554977fde98d3a30d3ca74a750a0
Patch Set 1 #Patch Set 2 : Add tests, remove mock class. #Patch Set 3 : Cleanup - now ready for review. #
Total comments: 16
Patch Set 4 : hansberry@ comments. #Patch Set 5 : Order active networks before non-active. #
Total comments: 14
Patch Set 6 : stevenjb@ comments. #
Total comments: 20
Patch Set 7 : stevenjb@ comments. #
Total comments: 8
Patch Set 8 : stevenjb@ comments. #Messages
Total messages: 20 (7 generated)
|