aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/network/Network.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-11-19 07:17:23 +0100
committerSamuel Tardieu <sam@rfc1149.net>2012-11-19 13:45:43 +0100
commit9db5eef94ea9f0771bd9f01bf1abf79cb41e3ab6 (patch)
tree709fe313a342a1a0c5ec69d4265f1e24288e9caa /main/src/cgeo/geocaching/network/Network.java
parent095423b24064c35037d4b7d6aea423b1652f7a82 (diff)
downloadcgeo-9db5eef94ea9f0771bd9f01bf1abf79cb41e3ab6.zip
cgeo-9db5eef94ea9f0771bd9f01bf1abf79cb41e3ab6.tar.gz
cgeo-9db5eef94ea9f0771bd9f01bf1abf79cb41e3ab6.tar.bz2
fix #2144: webview on non UI thread exception
Diffstat (limited to 'main/src/cgeo/geocaching/network/Network.java')
-rw-r--r--main/src/cgeo/geocaching/network/Network.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index bd4b6f6..72b325e 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -1,7 +1,6 @@
package cgeo.geocaching.network;
import cgeo.geocaching.Settings;
-import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.utils.BaseUtils;
import cgeo.geocaching.utils.Log;
@@ -40,7 +39,6 @@ import org.json.JSONException;
import org.json.JSONObject;
import android.net.Uri;
-import android.webkit.WebView;
import java.io.File;
import java.io.IOException;
@@ -52,8 +50,8 @@ public abstract class Network {
private static final int NB_DOWNLOAD_RETRIES = 4;
/** User agent id */
private final static String PC_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1";
- /** Native user agent **/
- private final static String NATIVE_USER_AGENT = new WebView(cgeoapplication.getInstance()).getSettings().getUserAgentString();
+ /** Native user agent, taken from a Android 2.2 Nexus **/
+ private final static String NATIVE_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1";
private static final String PATTERN_PASSWORD = "(?<=[\\?&])[Pp]ass(w(or)?d)?=[^&#$]+";