This commit integrates the Firefox Suggest Android component added in
bug 1850296 into Fenix, and adds:
* A Nimbus feature for Firefox Suggest.
* A secret setting to enable the Firefox Suggest feature, only visible
on the debug channel.
* Search settings for toggling sponsored and non-sponsored suggestions,
only visible when the Firefox Suggest feature is enabled.
When the feature is enabled, Fenix will ingest new suggestions in
the background, show the new Search settings, and show matching
suggestions in the awesomebar depending on those Search settings.
Previously, the way we registered if the user has installed the
search widget was keeping a count that increments every time
the widget was added and decrements everytime it was removed. The
main problem here was the wrong usage of onEnabled and onDeleted.
This patch aims to move towards a boolean based preference and use
the provided onDisabled method together with onEnabled. The logic
here is as follows: When the first instance of the widget has been
added, onEnabled will be called and the preference set to true and
no matter how many widgets are present on the homescreen, it will
stay true. When the last widget is removed, onDisabled will
be called and the pref will be set to false.
Because we are migrating Top Sites to Compose, we want to ensure we
are still recording when top sites are loaded, therefore the call
for StartupTimeline is now called after creating the top sites
compose elements. Calling it here will ensure it will be called
even after we replace the home page recycler with a Compose view.
We added a regression alert for APK size regressions greater than 100 KB (in bug 1838717). This 100 KB threshold is too sensitive, so instead of disabling it entirely, I'd like to increase the threshold to 1 MB, so we will at least catch big surprises like -O2 bug 1838709 (+3 MB) and ICUX bug 1848025 (+2 MB).