From f89a293cd6da062e746452421ca5ea3d463e4fa5 Mon Sep 17 00:00:00 2001 From: Michael Debertol Date: Thu, 27 Aug 2020 16:28:37 +0200 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/13423: Pass isPrivate flag to ToolbarView --- .../org/mozilla/fenix/searchdialog/SearchDialogFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/searchdialog/SearchDialogFragment.kt b/app/src/main/java/org/mozilla/fenix/searchdialog/SearchDialogFragment.kt index a88a5f1490..01327dc52b 100644 --- a/app/src/main/java/org/mozilla/fenix/searchdialog/SearchDialogFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/searchdialog/SearchDialogFragment.kt @@ -117,6 +117,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler { val args by navArgs() val view = inflater.inflate(R.layout.fragment_search_dialog, container, false) val activity = requireActivity() as HomeActivity + val isPrivate = activity.browsingModeManager.mode.isPrivate requireComponents.analytics.metrics.track(Event.InteractWithSearchURLArea) @@ -149,7 +150,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler { requireContext(), interactor, null, - false, + isPrivate, view.toolbar, requireComponents.core.engine ).also(::addSearchButton) @@ -174,7 +175,6 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler { .findViewById(R.id.mozac_browser_toolbar_edit_url_view) urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO - val isPrivate = (requireActivity() as HomeActivity).browsingModeManager.mode.isPrivate requireComponents.core.engine.speculativeCreateSession(isPrivate) return view