From 8ce85fd6ab9c2468ae36fab0a18aa9aa88d685ed Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 7 Jun 2016 11:15:52 -0700 Subject: [PATCH] Program Clear and Exit to clear the cache and the back/forward history. --- .../com/stoutner/privacybrowser/MainWebViewActivity.java | 6 ++++++ build.gradle | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java index c7dddad3..8b60b9d3 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/MainWebViewActivity.java @@ -665,6 +665,12 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation cookieManager.removeAllCookie(); } + // Clear cache. The argument of "true" includes disk files. + mainWebView.clearCache(true); + + // Clear the back/forward history. + mainWebView.clearHistory(); + // Destroy the internal state of the webview. mainWebView.destroy(); diff --git a/build.gradle b/build.gradle index f6e90731..e220f0b8 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files -- 2.43.0