From: Soren Stoutner Date: Tue, 7 Jun 2016 18:15:52 +0000 (-0700) Subject: Program Clear and Exit to clear the cache and the back/forward history. X-Git-Tag: v1.7~8 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=8ce85fd6ab9c2468ae36fab0a18aa9aa88d685ed;p=PrivacyBrowserAndroid.git Program Clear and Exit to clear the cache and the back/forward history. --- 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