diff options
| author | rsudev <rasch@munin-soft.de> | 2013-10-04 08:31:29 +0200 |
|---|---|---|
| committer | rsudev <rasch@munin-soft.de> | 2013-10-14 09:38:02 +0200 |
| commit | dfc984f715b443efca23615ae0dd763037bddc0f (patch) | |
| tree | bd94a4a3ddd38beaee1d2818d2543af8a4ca41fb /main/src/cgeo/geocaching/network/Network.java | |
| parent | 27a6bfe43a395c5e86981c8c76763a6e52e8d3aa (diff) | |
| download | cgeo-dfc984f715b443efca23615ae0dd763037bddc0f.zip cgeo-dfc984f715b443efca23615ae0dd763037bddc0f.tar.gz cgeo-dfc984f715b443efca23615ae0dd763037bddc0f.tar.bz2 | |
Implements part of #3267, Detect and report time-skew that prevents okapi access
Reports back issues on the main screen, but not yet during the authorization process
Diffstat (limited to 'main/src/cgeo/geocaching/network/Network.java')
| -rw-r--r-- | main/src/cgeo/geocaching/network/Network.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java index 1810216..e891d3b 100644 --- a/main/src/cgeo/geocaching/network/Network.java +++ b/main/src/cgeo/geocaching/network/Network.java @@ -34,6 +34,7 @@ import ch.boye.httpclientandroidlib.params.CoreProtocolPNames; import ch.boye.httpclientandroidlib.params.HttpParams; import ch.boye.httpclientandroidlib.protocol.HttpContext; import ch.boye.httpclientandroidlib.util.EntityUtils; + import org.apache.commons.lang3.CharEncoding; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.Nullable; @@ -449,6 +450,11 @@ public abstract class Network { return Network.getResponseData(response, true); } + @Nullable + public static String getResponseDataAlways(@Nullable final HttpResponse response) { + return response != null ? getResponseDataNoError(response, false) : null; + } + /** * Get the body of a HTTP response. * |
