startActivity(settingsIntent);
break;
+ /*
+ case R.id.domains:
+ // Launch `DomainsList`.
+ Intent domainsIntent = new Intent(this, DomainsList.class);
+ startActivity(domainsIntent);
+ break;
+ */
+
case R.id.guide:
// Launch `Guide`.
Intent guideIntent = new Intent(this, Guide.class);
// Destroy the internal state of `mainWebView`.
mainWebView.destroy();
+ // Manually delete the `app_webview` folder, which contains an additional `WebView` cache. See `https://code.google.com/p/android/issues/detail?id=233826&thanks=233826&ts=1486670530`.
+ Runtime runtime = Runtime.getRuntime();
+ String dataDirString = getApplicationInfo().dataDir; // `dataDir` will vary, but will be something like `/data/user/0/com.stoutner.privacybrowser.standard`, which links to `/data/data/com.stoutner.privacybrowser.standard`.
+ try {
+ runtime.exec("rm -rf " + dataDirString + "/app_webview");
+ } catch (IOException e) {
+ // Do nothing if the files do not exist.
+ }
+
// Close Privacy Browser. `finishAndRemoveTask` also removes Privacy Browser from the recent app list.
if (Build.VERSION.SDK_INT >= 21) {
finishAndRemoveTask();