diff --git a/res/menu/incognito.xml b/res/menu/incognito.xml index 44e8079..f836164 100644 --- a/res/menu/incognito.xml +++ b/res/menu/incognito.xml @@ -16,5 +16,9 @@ + + \ No newline at end of file diff --git a/src/acr/browser/lightning/BrowserActivity.java b/src/acr/browser/lightning/BrowserActivity.java index 83ae1e2..df0d04a 100644 --- a/src/acr/browser/lightning/BrowserActivity.java +++ b/src/acr/browser/lightning/BrowserActivity.java @@ -1295,6 +1295,10 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll @SuppressLint("NewApi") @SuppressWarnings("deprecation") public void clearCookies() { + // TODO Break out web storage deletion into its own option/action + // TODO clear web storage for all sites that are visited in Incognito mode + WebStorage storage = WebStorage.getInstance(); + storage.deleteAllData(); CookieManager c = CookieManager.getInstance(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { c.removeAllCookies(null); diff --git a/src/acr/browser/lightning/PrivacySettingsActivity.java b/src/acr/browser/lightning/PrivacySettingsActivity.java index 5a8fe3d..6b9f489 100644 --- a/src/acr/browser/lightning/PrivacySettingsActivity.java +++ b/src/acr/browser/lightning/PrivacySettingsActivity.java @@ -44,8 +44,6 @@ public class PrivacySettingsActivity extends ThemableSettingsActivity { getSupportActionBar().setDisplayHomeAsUpEnabled(true); - // TODO WARNING: SharedPreferences.edit() without a corresponding - // commit() or apply() call mPreferences = PreferenceManager.getInstance(); mSystemBrowser = mPreferences.getSystemBrowserPresent(); @@ -429,6 +427,10 @@ public class PrivacySettingsActivity extends ThemableSettingsActivity { @SuppressWarnings("deprecation") public void clearCookies() { + // TODO Break out web storage deletion into its own option/action + // TODO clear web storage for all sites that are visited in Incognito mode + WebStorage storage = WebStorage.getInstance(); + storage.deleteAllData(); CookieManager c = CookieManager.getInstance(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {