Clear private data on exit
Why/User Benefit/User Problem
- As a user, I want my browser to always clear certain data chosen by me when close the browser.
Types of data:
-Open Tabs -Browsing history -Search history -Cookies and site data -Cached images and files -Site settings
Requirements
- Behind a Feature Flag so QA can spend extra time testing
Acceptance Criteria
- When I close the browser, the data I chose to clear is cleared by Fenix.
- TBD: UX to determine what Recent Tasks behavior looks like
UX Spec https://mozilla.invisionapp.com/share/4BTIO3EECQU
┆Issue is synchronized with this Jira Task
Hi please can you tie this feature to the app being closed from the app switcher instead please, Firefox Focus style? I dont think selecting quit from the app menu is common usage nor is this in parity with the desktop firefox implementation . I'm aware that you'll probably need a technical work around but I hope it's still possible by some of your capable devs. I refer to the feature more so as "Clear private data between sessions" than "on exit".
Per this comment: https://github.com/mozilla-mobile/fenix/issues/2152#issuecomment-492332285
Android does not provide a way to tell the difference between a user swiping an app closed and the app being killed in the background.
Firefox focus manages to do it on Android? Maybe it would be a separate feature request but taking from that implementation would be great imo.
Focus manages it with a persistent notification AFAIK.
Oh right that makes sense since Bromite incognito also uses a notification.
Should I make a separate issue to request a similar implementation or something?
removing the ux label - this is on our radar already as it's part of Q3 plans.
QA has said they'd like a little extra time to test this, so this should be ideally behind a feature flag.
This is otherwise done UX, just needs strings and @lime124 will help w/ that.
GV 68 already has a clearData API that can selectively delete user data by type (e.g. all cookies, all network cache) but not by individual domain or time period (e.g. clearing all user data from the last 1 hour).
https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/StorageController.html#clearData-long-
https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/StorageController.ClearFlags.html
https://bugzilla.mozilla.org/show_bug.cgi?id=1489669
If Android kills the app, this data will not get cleared.
@grigoryk quick question, when we clear data locally on quit, does that history deletion get synced on next start? (Are there mobile-specific items that do not get synced?)
@AmyYLee As a UX question, what should we do with the Task in Recent Apps after the user presses Quit? We wouldn't want to show the state of the app with private data visible most likely. Do we want to remove the task altogether or merely hide the current screen state within Recent Apps?
@colintheshots We should hide/blank out the current state of the screen within recent apps if the user presses "Quit". If the app is minimized (user doesn't explicitly press "Quit") then we can show the last state of the app in the recent apps tray. If the user is in PBM we should always blank out the screen in the recent apps tray.
This Setting is behind a feature flag for now
This is in the RC 2.0-rc2 milestone but can be verified for now only in Nightly. @ekager Is it correctly included in the 2.0 milestone?
Moved it to the next milestone!
If the user is in PBM we should always blank out the screen in the recent apps tray.
This discussion is out of scope for this ticket and is being discussed here #2768
@AmyYLee @vesta0 The homescreen menu doesn't have the Quit option. In my opinion it would make sense to have it there as well, considering it's something you want at hand when you need to quit the browser. What do you think?
Otherwise this is verified as fixed on Nightly 9/18. Let me know if you want me to create a new issue for the comment above.
Thanks @sv-ohorvath ! I filed https://github.com/mozilla-mobile/fenix/issues/5442 for the follow up