Clear webdata when the cookies are cleared
This commit is contained in:
parent
79d32127f4
commit
5c1b765616
@ -16,5 +16,9 @@
|
||||
<item
|
||||
android:id="@+id/action_bookmarks"
|
||||
android:title="@string/action_bookmarks"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_reading_mode"
|
||||
android:title="@string/reading_mode"/>
|
||||
|
||||
</menu>
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user