Merge "Captive portals: reinspect http result after fallback probe"
am: 3a7c4f3337
Change-Id: Ia9dfbb764909aeb8586066121ddc8106fa14bb7e
This commit is contained in:
@@ -967,14 +967,18 @@ public class NetworkMonitor extends StateMachine {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Otherwise wait until https probe completes and use its result.
|
// Otherwise wait until http and https probes completes and use their results.
|
||||||
try {
|
try {
|
||||||
|
httpProbe.join();
|
||||||
|
if (httpProbe.result().isPortal()) {
|
||||||
|
return httpProbe.result();
|
||||||
|
}
|
||||||
httpsProbe.join();
|
httpsProbe.join();
|
||||||
|
return httpsProbe.result();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
validationLog("Error: https probe wait interrupted!");
|
validationLog("Error: http or https probe wait interrupted!");
|
||||||
return CaptivePortalProbeResult.FAILED;
|
return CaptivePortalProbeResult.FAILED;
|
||||||
}
|
}
|
||||||
return httpsProbe.result();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private URL makeURL(String url) {
|
private URL makeURL(String url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user