Make NetworkMonitor less aggressive on broken networks.
1. Retry validation 3 times instead of 10. Reducing the number of retries speeds up dead network detection and saves battery on networks that are don't have Internet access (or block our connectivity checks). Retrying 10 times is overkill. Each attempt sends 5-10 DNS requests, waits 10 seconds to transfer only 3 or 4 packets, and can last up to tens of seconds. Also, in MR1 we now retry every 10 minutes. 2. Make periodic revalidation only try once. When validating periodically to see if a non-working connection is working again, only make one attempt every 10 minutes, not three. 3. Rename "retries" to "attempts" to make things a bit clearer. Bug: 18922569 Bug: 18869302 Change-Id: I5f70b420c4f1bac0c33bb9ab6afb322902cdac4b
Loading
Please register or sign in to comment