summaryrefslogtreecommitdiff
path: root/tests/common/java/android/net/NetworkCapabilitiesTest.java
diff options
context:
space:
mode:
authorChalard Jean <jchalard@google.com>2021-08-18 01:35:19 +0900
committerChalard Jean <jchalard@google.com>2021-08-19 22:53:41 +0900
commitbb902a5fee0e3d4230239fdb46348141d35d6c16 (patch)
tree4e3c7da8f47128a169d11e9a13300c108837a1de /tests/common/java/android/net/NetworkCapabilitiesTest.java
parent7262180c077c311b6a127e9f3957d5647425afc8 (diff)
Fix an infinite loop with network offers
When the avoidBadWifi configuration is false and not overridden, a WiFi network that was validated in the past but becomes unvalidated needs to outscore a cell network that is validated. This is happening correctly when the stack compares two networks. However, when the stack compares an existing network to an offer for a cellular network, the offer was automatically considered not to yield. This would mean the stack would be requesting cell out of the telephony factory, only for that network to lose to WiFi and be discarded immediately, then recreated again etc. When there is some other reason cell should be up (such as the "mobile always on" setting being active), this would not be visible because the cell network would have another reason not to be torn down. Have offers correctly account for the current value of the configuration and setting. This has the ranking of the offer lose against WiFi like the actual network loses, meaning the offer is not needed. This also requires updating the offers whenever the value of the setting changes. Test: new test for this, also ConnectivityServiceTest Bug: 195441367 Change-Id: I4fe5de98bc15bcf9bbbe25c6c7c8a7ba382f8db7
Diffstat (limited to 'tests/common/java/android/net/NetworkCapabilitiesTest.java')
0 files changed, 0 insertions, 0 deletions