Android
Android copied to clipboard
Fire Dialog: New clear actions
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1212237611537705?focus=true
Description
This PR adds new data clearing actions that allow removing different data types independently (tabs, data, chats).
The affected interfaces are lower-level layer that responsible for performing individual data deletion.
Steps to test this PR
- [ ] Make sure all units tests pass
[!NOTE] Introduce granular clear actions (tabs only, browser data only, chats only) and refactor Web/Storage managers and IndexedDB to selectively clear browser vs DuckAI data; update DI, callers, and tests.
- Clear actions (Fire/ClearData):
- Add
clearTabsOnly,clearBrowserDataOnly,clearDuckAiChatsOnly; keepclearTabsAndAllDataAsync.AutomaticDataClearer/DataClearingWorkernow useclearTabsOnlyfor tabs-only flows.- Web data management:
WebDataManageradds granularclearData(webView, webStorage, shouldClearBrowserData, shouldClearDuckAiData)and uses legacy full-clear path.- Web storage clearing split into
clearEntireWebStorage(legacy) and granular path; fallback todeleteAllDataon errors; crash logging unchanged.- WebView directory cleanup now parameterized; clears DuckAI-only IndexedDB when requested.
- IndexedDB:
- Replace
clearIndexedDB()withclearIndexedDB(shouldClearDuckAiData)and addclearOnlyDuckAiData().- Remove
SettingsDataStoredependency; refine exclusion logic for allowed/fireproofed domains and DuckAI domains.- Web Local Storage:
- Add overloaded
clearWebLocalStorage(shouldClearBrowserData, shouldClearDuckAiData)while retaining legacy method.- Supports selective deletion of DuckAI chat keys and non-allowed keys.
- Tabs repository:
TabDataRepository.deleteAllnow also clears previews, temp favicons, ad-click data, and WebView sessions.- DI:
- Update
PrivacyModulewiring (removeAdClickManagerfromClearPersonalDataActionprovider).- Tests:
- Extensive updates and new cases for granular clearing paths, IndexedDB and local storage behaviors, and tabs-only flows.
Written by Cursor Bugbot for commit 0b01f1eb952368a1336ae08215d1661b705e73e0. This will update automatically on new commits. Configure here.