List of usage examples for android.app Activity deleteDatabase
@Override public boolean deleteDatabase(String name)
From source file:de.baumann.browser.helper.helper_webView.java
public static void closeWebView(Activity from, WebView webView) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(from); if (sharedPref.getBoolean("clearCookies", false)) { CookieManager cookieManager = CookieManager.getInstance(); cookieManager.removeAllCookies(null); cookieManager.flush();/*from w ww .ja v a 2 s . c o m*/ } if (sharedPref.getBoolean("clearCache", false)) { webView.clearCache(true); } if (sharedPref.getBoolean("clearForm", false)) { webView.clearFormData(); } if (sharedPref.getBoolean("history", false)) { from.deleteDatabase("history.db"); webView.clearHistory(); } helper_main.isClosed(from); sharedPref.edit().putString("started", "").apply(); from.finishAffinity(); }