diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java index e69047c2..9ca1dce0 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/WebGuiActivity.java @@ -162,10 +162,32 @@ public class WebGuiActivity extends StateDialogActivity if (mWebView.canGoBack()) { mWebView.goBack(); } else { + finish(); super.onBackPressed(); } } + @Override + public void onPause() { + mWebView.onPause(); + mWebView.pauseTimers(); + super.onPause(); + } + + @Override + public void onResume() { + super.onResume(); + mWebView.resumeTimers(); + mWebView.onResume(); + } + + @Override + protected void onDestroy() { + mWebView.destroy(); + mWebView = null; + super.onDestroy(); + } + /** * Reads the SyncthingService.HTTPS_CERT_FILE Ca Cert key and loads it in memory */