OSDN Git Service

Captive portal detection uses 3rd fallback probe
authorHugo Benichi <hugobenichi@google.com>
Tue, 27 Sep 2016 00:22:35 +0000 (09:22 +0900)
committerHugo Benichi <hugobenichi@google.com>
Wed, 28 Sep 2016 14:12:31 +0000 (23:12 +0900)
commitd953bf853d233026c9064e6a0c962b14cf4658d6
tree3795868cb4785275c7fca4064b7f5d66b4877475
parente83639f66a7f8d57056b34fe317ec1fedd281323
Captive portal detection uses 3rd fallback probe

This patch adds the possitibility to send a 3rd fallback validation
probe in sendParallelHttpProbes when neither the 1st http probe nor the
https probe came back with a conclusive answer.

This 3rd probe is only used for trying again captive portal detection
and does not return success, so that network validation always fails if
the https probe fails.

In addition, the url reveals a captive portal is now sent to the
CaptivePortalLoginActivity so that all three probes can use different
urls.

Bug: 29367974

Change-Id: I7385fde1aa1316d94aac350af0e956cb193aa4ee
core/java/android/net/metrics/ValidationProbeEvent.java
services/core/java/com/android/server/connectivity/NetworkMonitor.java
services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java