diff options
author | Wink Saville <wink@google.com> | 2013-08-29 16:42:44 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2013-08-29 16:42:44 -0700 |
commit | 9d4204d6257bf69885cf0718aa3adaa17457c318 (patch) | |
tree | 0696d6fea247ce07eaf5614046ff79b8d4ebe07f /core/java | |
parent | 93c84e8242fed75f838b53beea2b3116c4d3276a (diff) | |
download | frameworks_base-9d4204d6257bf69885cf0718aa3adaa17457c318.zip frameworks_base-9d4204d6257bf69885cf0718aa3adaa17457c318.tar.gz frameworks_base-9d4204d6257bf69885cf0718aa3adaa17457c318.tar.bz2 |
Add debug and remove SocketTimeoutException.
Bad merge from jb-mr2 to klp, the SocketTimeoutException
in isCaptivePortal should not be present. Also add debug
for bug 9972012. The SocketTimeoutException is a possible
cause of 9972012 but the logs from post #24 it was not
caused by a timeout, so this is not a fix.
Bug: 9972012
Change-Id: I290518832f8258d4682821815834f5621245b643
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/net/CaptivePortalTracker.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/java/android/net/CaptivePortalTracker.java b/core/java/android/net/CaptivePortalTracker.java index 6b96ad4..01977cd 100644 --- a/core/java/android/net/CaptivePortalTracker.java +++ b/core/java/android/net/CaptivePortalTracker.java @@ -397,17 +397,14 @@ public class CaptivePortalTracker extends StateMachine { long responseTimestamp = SystemClock.elapsedRealtime(); // we got a valid response, but not from the real google - boolean isCaptivePortal = urlConnection.getResponseCode() != 204; + int rspCode = urlConnection.getResponseCode(); + boolean isCaptivePortal = rspCode != 204; sendNetworkConditionsBroadcast(true /* response received */, isCaptivePortal, requestTimestamp, responseTimestamp); + + if (DBG) log("isCaptivePortal: ret=" + isCaptivePortal + " rspCode=" + rspCode); return isCaptivePortal; - } catch (SocketTimeoutException e) { - if (DBG) log("Probably a portal: exception " + e); - if (requestTimestamp != -1) { - sendFailedCaptivePortalCheckBroadcast(requestTimestamp); - } // else something went wrong with setting up the urlConnection - return true; } catch (IOException e) { if (DBG) log("Probably not a portal: exception " + e); if (requestTimestamp != -1) { |