From e111d836f0122e90f7bdf2f9d7d57f6f6ba010c0 Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Fri, 24 Apr 2015 08:55:14 +0200 Subject: [PATCH 1/2] Increase GUI update interval and log get requests (fixes #362) --- .../java/com/nutomic/syncthingandroid/syncthing/GetTask.java | 2 ++ .../nutomic/syncthingandroid/syncthing/SyncthingService.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/GetTask.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/GetTask.java index 8695abd7..97aa4cd5 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/GetTask.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/GetTask.java @@ -62,6 +62,8 @@ public class GetTask extends AsyncTask { get.addHeader(new BasicHeader(RestApi.HEADER_API_KEY, params[2])); try { + Log.w(TAG, "Calling Rest API at " + fullUri); + HttpResponse response = httpclient.execute(get); HttpEntity entity = response.getEntity(); diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java index fe92f3e5..782537f6 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java @@ -52,7 +52,7 @@ public class SyncthingService extends Service { /** * Interval in ms at which the GUI is updated (eg {@link com.nutomic.syncthingandroid.fragments.DrawerFragment}). */ - public static final int GUI_UPDATE_INTERVAL = 1000; + public static final int GUI_UPDATE_INTERVAL = 10000; /** * Name of the public key file in the data directory. From 3f332e8b8b838c07363f33d8759cf1fcb28b8ce0 Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Wed, 29 Apr 2015 19:47:37 +0200 Subject: [PATCH 2/2] Clear webview cache (fixes #374) --- .../com/nutomic/syncthingandroid/activities/WebGuiActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java index 636c72b1..47b58bc3 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java @@ -53,6 +53,7 @@ public class WebGuiActivity extends SyncthingActivity implements SyncthingServic mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setWebViewClient(mWebViewClient); + mWebView.clearCache(true); } @Override