2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-09 19:10:42 +00:00

Fixes #4192: Private keyboard in private browsing (#4345)

Sets compliant keyboards to private mode when in private browsing.
This commit is contained in:
Amaan Marfatia 2019-07-29 18:00:48 -04:00 committed by Emily Kager
parent ac359f6970
commit 4c13f45e9e
3 changed files with 11 additions and 2 deletions

View File

@ -76,5 +76,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #3750 - Crash when tapping "Blocked" on Google Maps after disabling location requests
- #2945 - Fixed "Launches to blank screen and hangs on Nexus 10"
- #3869 - Creates a SearchLocalizationProvider that sets the region to get the correct default search engine based on a locale
- #4192 - Sets keyboard to private mode in private browsing
- #2142 - Fixed "When launching Fenix, Enable private browsing button is focused instead of Search or address"
### Removed

View File

@ -89,8 +89,13 @@ class SearchFragment : Fragment(), BackHandler {
searchStore
)
toolbarView = ToolbarView(view.toolbar_component_wrapper, searchInteractor, historyStorageProvider())
awesomeBarView = AwesomeBarView(view.search_layout, searchInteractor)
toolbarView = ToolbarView(
view.toolbar_component_wrapper,
searchInteractor,
historyStorageProvider(),
(activity as HomeActivity).browsingModeManager.isPrivate
)
return view
}

View File

@ -49,7 +49,8 @@ interface ToolbarInteractor {
class ToolbarView(
private val container: ViewGroup,
private val interactor: ToolbarInteractor,
private val historyStorage: HistoryStorage?
private val historyStorage: HistoryStorage?,
private val isPrivate: Boolean
) : LayoutContainer {
override val containerView: View?
@ -87,6 +88,8 @@ class ToolbarView(
R.color.suggestion_highlight_color
)
private = isPrivate
setOnEditListener(object : mozilla.components.concept.toolbar.Toolbar.OnEditListener {
override fun onCancelEditing(): Boolean {
interactor.onEditingCanceled()