System tray network icon showing wifi image when wifi is connected but cellular network is default |
|||
Issue descriptionSystem tray network icon should indicate current default network. This is not the case when shill selects cellular network as default over a connected wifi network (which could happen if the wifi network is not in online state, e.g. due poor connectivity). Network icon seems to always detect a connected/connecting wifi network as the default one over a cellular network, which could lead to users not having any indication that they're using cellular data in such cases.
,
Dec 19
For posterity (we should add this documentation to network_state_handler.h): The Shill prioritization code is here in Service::Compare: https://cs.corp.google.com/chromeos_public/src/platform2/shill/service.cc?q=Service::Compare+file:%5Esrc/platform2/shill/+package:%5Echromeos_public$&l=1016 Interpreting that, I believe the order is determined by the following, in order: (+hendrich@ to verify my interpretation) Connection State: Online Connected Portal (I am assuming all Portal networks are connected) Connecting (Other states, i.e. not connected) Failed Connectable (i.e. configured) Dependency (I think that VPN depends on the underlying network?) Technology (vpn, ethernet, wifi, wimax, cellular) Priority Managed AutoConnect Security Profile User profile Device profile Has Ever Connected SignalStrength Serial Number (I'm not actually sure what that is). i.e. SignalStrength determines order for networks where everything above that is the same. In NetworkStateHandler, we make the following adjustments to the order in NetworkStateHandler::SortNetworkList: * All Cellular network are listed between "Active" (Online/Connected/Portal) networks and other networks. I believe this is incorrect and the root of this issue; we just want to list any inactive Cellular networks before WiFi networks and rely on Shill to order the active networks correctly. i.e. we can remove this entirely and rely on the next order change. * Non WiFi (i.e. WiMAX) networks are listed before WiFi networks (since there is generally only 1, maybe 2, Cellular or WiMAX network). * Hidden (shill::kVisibleProperty = false) networks are listed last (and generally not shown in the UI). I'm not sure that we need to include them at all.
,
Dec 20
Yes, that network sorting order is correct. Serial Number is basically the last criteria, where we don't actually care anymore (we might as well use rand() here, but that would give different orderings on consecutive rankings).
,
Jan 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd3bdcc78039cf25f3fccadb5b4bfdf4a5ec2f37 commit bd3bdcc78039cf25f3fccadb5b4bfdf4a5ec2f37 Author: Toni Barzic <tbarzic@chromium.org> Date: Wed Jan 02 21:37:01 2019 Add tests for network_icon::GetDefaultNetworkImageAndLabel BUG= 916669 Change-Id: I53239fc461494bb7af6a35edeecdc2083bde27c3 Reviewed-on: https://chromium-review.googlesource.com/c/1383492 Commit-Queue: Toni Baržić <tbarzic@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#619502} [modify] https://crrev.com/bd3bdcc78039cf25f3fccadb5b4bfdf4a5ec2f37/ash/system/network/network_icon_unittest.cc [modify] https://crrev.com/bd3bdcc78039cf25f3fccadb5b4bfdf4a5ec2f37/chromeos/network/network_state_test.cc [modify] https://crrev.com/bd3bdcc78039cf25f3fccadb5b4bfdf4a5ec2f37/chromeos/network/network_state_test.h
,
Jan 2
Note that fix for this landed as: https://chromium-review.googlesource.com/c/chromium/src/+/1388922 |
|||
►
Sign in to add a comment |
|||
Comment 1 by tbarzic@chromium.org
, Dec 19