Loading core/java/android/net/CaptivePortalTracker.java +5 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import java.io.IOException; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.Inet4Address; import java.net.SocketTimeoutException; import java.net.URL; import java.net.UnknownHostException; Loading @@ -52,7 +53,7 @@ import com.android.internal.R; * @hide */ public class CaptivePortalTracker extends StateMachine { private static final boolean DBG = false; private static final boolean DBG = true; private static final String TAG = "CaptivePortalTracker"; private static final String DEFAULT_SERVER = "clients3.google.com"; Loading Loading @@ -337,6 +338,9 @@ public class CaptivePortalTracker extends StateMachine { urlConnection.getInputStream(); // we got a valid response, but not from the real google return urlConnection.getResponseCode() != 204; } catch (SocketTimeoutException e) { if (DBG) log("Probably a portal: exception " + e); return true; } catch (IOException e) { if (DBG) log("Probably not a portal: exception " + e); return false; Loading Loading
core/java/android/net/CaptivePortalTracker.java +5 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import java.io.IOException; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.Inet4Address; import java.net.SocketTimeoutException; import java.net.URL; import java.net.UnknownHostException; Loading @@ -52,7 +53,7 @@ import com.android.internal.R; * @hide */ public class CaptivePortalTracker extends StateMachine { private static final boolean DBG = false; private static final boolean DBG = true; private static final String TAG = "CaptivePortalTracker"; private static final String DEFAULT_SERVER = "clients3.google.com"; Loading Loading @@ -337,6 +338,9 @@ public class CaptivePortalTracker extends StateMachine { urlConnection.getInputStream(); // we got a valid response, but not from the real google return urlConnection.getResponseCode() != 204; } catch (SocketTimeoutException e) { if (DBG) log("Probably a portal: exception " + e); return true; } catch (IOException e) { if (DBG) log("Probably not a portal: exception " + e); return false; Loading