From b2f116b1579c95108885309a302ac270a4d0fab2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 5 Nov 2016 19:24:58 +1300 Subject: Remove web app local version --- app/src/main/java/org/traccar/manager/MainFragment.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'app/src/main/java/org/traccar/manager/MainFragment.java') 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); -- cgit v1.2.3