OSDN Git Service

Fallback to Cellular if WiFi fails to validate
authorPaul Jensen <pauljensen@google.com>
Thu, 25 Jun 2015 19:30:08 +0000 (15:30 -0400)
committerPaul Jensen <pauljensen@google.com>
Thu, 9 Jul 2015 14:26:17 +0000 (10:26 -0400)
commite098854c41a72b22f4174bc623e8e93cde8d7331
tree0c4c735e3f35fcdf50114ef726e1cf1eb325663b
parent85cf78edc92b85ec90e91de42b14b84e202260f3
Fallback to Cellular if WiFi fails to validate

Previously, once a network validated, for the purposes of comparing networks
to select the default network, we always considered it validated.
With this change if a network later fails to validate, we'll take this latest
validation result into account.  This means if WiFi and cellular are up
(e.g. if we recently switched from cellular->WiFi, and cellular is now
lingering) and both are validated, but for some reason WiFi fails a validation,
cellular will become the default network connection.

Bug:20896761
Change-Id: I858aa10c1aaec5cd9032067f960963409107bdb1
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
services/core/java/com/android/server/connectivity/NetworkMonitor.java
services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java