aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 19:24:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 19:24:58 +1300
commitb2f116b1579c95108885309a302ac270a4d0fab2 (patch)
treef15f5bc319554a16fb99f6627c4a41de79ae3ede /app
parenta723029b89df295405632d3735c26c12bb173583 (diff)
downloadetbsa-traccar-manager-android-b2f116b1579c95108885309a302ac270a4d0fab2.tar.gz
etbsa-traccar-manager-android-b2f116b1579c95108885309a302ac270a4d0fab2.tar.bz2
etbsa-traccar-manager-android-b2f116b1579c95108885309a302ac270a4d0fab2.zip
Remove web app local version
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/org/traccar/manager/MainFragment.java17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/src/main/java/org/traccar/manager/MainFragment.java b/app/src/main/java/org/traccar/manager/MainFragment.java
index ea1e345..0fd79d1 100644
--- a/app/src/main/java/org/traccar/manager/MainFragment.java
+++ b/app/src/main/java/org/traccar/manager/MainFragment.java
@@ -37,8 +37,6 @@ import java.util.Map;
public class MainFragment extends WebViewFragment {
- private String version = "3.7";
- private Uri serverUri;
private AssetManager assetManager;
@Override
@@ -65,7 +63,6 @@ public class MainFragment extends WebViewFragment {
if (url.endsWith("/")) {
url = url.substring(0, url.length() - 1);
}
- serverUri = Uri.parse(url);
getWebView().loadUrl(url);
}
@@ -115,19 +112,7 @@ public class MainFragment extends WebViewFragment {
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
Uri uri = Uri.parse(url);
- if (uri.getHost().equals(serverUri.getHost())) {
- String path = uri.getPath();
- if (!path.startsWith("/api")) {
- if (path.equals("/")) {
- path = "/release.html";
- }
- try {
- return loadFileFromAssets(url, "app/" + version + path);
- } catch (IOException e) {
- return null;
- }
- }
- } else if (uri.getHost().equals("cdnjs.cloudflare.com")) {
+ if (uri.getHost().equals("cdnjs.cloudflare.com")) {
String path = uri.getPath().substring("/ajax/libs".length());
try {
return loadFileFromAssets(url, "cdnjs" + path);