diff options
| author | Wink Saville <wink@google.com> | 2013-08-30 03:30:51 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-30 03:30:51 +0000 |
| commit | e8fcfd53f60229f7f920992145bacb45a0a55675 (patch) | |
| tree | 017ad30c78504f6205d7737f681cef847d6f7ed0 | |
| parent | 0d72b3e052e6289936286af6506bfd9fa8f7646b (diff) | |
| parent | 9d4204d6257bf69885cf0718aa3adaa17457c318 (diff) | |
| download | frameworks_base-e8fcfd53f60229f7f920992145bacb45a0a55675.zip frameworks_base-e8fcfd53f60229f7f920992145bacb45a0a55675.tar.gz frameworks_base-e8fcfd53f60229f7f920992145bacb45a0a55675.tar.bz2 | |
Merge "Add debug and remove SocketTimeoutException." into klp-dev
| -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) { |
