Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fe60b21 authored by Hugo Benichi's avatar Hugo Benichi Committed by Android (Google) Code Review
Browse files

Merge "Captive portals: reinspect http result after fallback probe" into oc-dev

parents b114e4ff 483d12e4
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -960,14 +960,18 @@ public class NetworkMonitor extends StateMachine {
                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 {
            httpProbe.join();
            if (httpProbe.result().isPortal()) {
                return httpProbe.result();
            }
            httpsProbe.join();
            return httpsProbe.result();
        } catch (InterruptedException e) {
            validationLog("Error: https probe wait interrupted!");
            validationLog("Error: http or https probe wait interrupted!");
            return CaptivePortalProbeResult.FAILED;
        }
        return httpsProbe.result();
    }

    private URL makeURL(String url) {