This commit adds the following measurements:
* A new value for the `fx_suggest.ping_type` metric,
`fxsuggest-impression`.
* An `fx_suggest.position` metric to capture the position of the
Firefox Suggest search suggestion in the awesomebar, for impressions
and clicks.
* An `fx_suggest.is_clicked` metric, to capture whether an
`fxsuggest-impression` ping is for a clicked suggestion.
This commit also:
* Mounts `FxSuggestFactsMiddleware` to collect facts for impressions
and clicks.
* Dispatches `AwesomeBarAction`s from the `SearchDialogController` in
response to user interactions with the awesomebar and toolbar.
In order for talkback to correctly dictate the hint for a newly
selected search engine in the search toolbar, it required setting
it when updating the content description of the toolbar.
Previously, when updating the content description, it was using
the previous search engine hint.
Everywhere the toolbar which needs to show autocomplete suggestions is used we
show a `ToolbarView`. So instead of having this configurable in 2 or more
places as it happened before the autocomplete functionality is configured only
from the `ToolbarView` class.
It will contain a `ToolbarAutocompleteFeature` that will be immediately updated
with the appropriate autocomplete providers or remove all such providers to
immediately update the current autocomplete or remove it entirely depending on
the new search engine selected.
Previously the check for the "Search -> Show search suggestions" user setting
was only used in the default SearchFragmentState but not again if users change
the current search engine as part of the unified search feature.
This comes to ensure that that check is always made when needing to configure
new search engine results.
The engine icon was set after the screen was visible leading to a delay.
With this solution, the icon will be set before the screen is visible
eliminating any visible artefacts.
If permissions are changed the app process is restarted with the same
happening for the previously running app components.
SearchDialogFragment used for searches will check if qr scanning was in
progress and resume if needed.
PairFragment used for signing-in will start scanning on itself.
Android-Components will avoid resuming the scan functionality if the camera
permission is missing and so allow to request the permission again without the
camera permission related system calls causing issues.
If the app is opened from the search widget and the MR onboarding is shown then
the backstack will have the following structure:
- root, homeFragment, searchDialogFragment, onboardingFragment
as opposed to otherwise
- root, homeFragment, searchDialogFragment.
This patch allows to avoid the MR onboarding fragment causing the
SearchDialogFragment to not know that below it is the HomeFragment and
consequently not applying transparency or propagate user touches to the parent
Activity.