Add private browsing logic
Parent: #277
- Add the actual android component for private browsing so switching into the mode actually makes your session private
- Ensure private browsing is persistent if a user force closes the app but it was last left in private mode, we should start up in private mode
┆Issue is synchronized with this Jira Task
There's no component for "private browsing" directly. But when creating a Session you can specify whether it's private or not:
https://github.com/mozilla-mobile/android-components/blob/master/components/browser/session/src/main/java/mozilla/components/browser/session/Session.kt#L26
For situations where you need to pass a "UseCase" to a component you can alternate between AddNewTabUseCase and AddNewPrivateTabUseCase as you see fit.
That's how this looks like in your reference browser: https://github.com/mozilla-mobile/reference-browser/blob/master/app/src/main/java/org/mozilla/reference/browser/tabs/TabsPanel.kt#L42-L48
If there's something missing or something that could be provided by a component then please let us know :)
To confirm: this mode will not do any sort of tracking protection / cookie management, and will only stop users history from being stored once the session is complete?
@bbinto
Note: private mode should trigger gboard private mode
Do we have a specific link we want to use for "common myths about private browsing"?
@jonisavage
@pocmo do we have the ability to set imeOptions on the AwesomeBar component from Fenix? I'd like to dynamically set flagNoPersonalizedLearning on the editText.
@sblatz Not yet. I'll file something for that.
@pocmo Great, thank you!
To confirm: this mode will not do any sort of tracking protection / cookie management, and will only > stop users history from being stored once the session is complete?
@sblatz
We should not divert from the PB mode implementation in our other apps (feature parity): it should be PB with TP on by default.
@sblatz ~here's a link you can use: https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/myths-private-browsing~
Edit: Please ignore the link above. Michelle already posted the link in another issue. It will point to the same article.
I believe tracking protection will land with this ticket: https://github.com/mozilla-mobile/fenix/issues/97, and is not in the scope of this one.