Using Dispatchers.IO allowed the observer to react faster to wallpaper state
updates but caused issues with updating the wallpaper in fragment layout.
Using Dispatchers.Main.immediate gives us a bit slower reaction time but still
faster than Dispatchers.Main and allows us to still execute before the fragment
is visible.
As part of a preventitive measure for home page regression loading, we
fixed the UpdateFirstFrameDrawn call to happen after the first layout in
the main RecyclerView is completed. In addition, we also make pocket
aware of this flag so that it renders itself after the first layout.
This helps prioritize current & future features that are visible first
to render before those that are off screen.
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
By using Store.observeManually in a standalone coroutine we can observe the
store and update the wallpapers even before onStart (in manual tests is right
around onStart, certainly before the other widgets shown on homescreen).
Created a new WallpapersObserver to have the functionality easier to reason
about and be easier to test.
* For #26656 - Use the correct string for onboarding_home_welcome_description
* Update app/src/main/res/values/strings.xml
Co-authored-by: Sarah541 <sarahkhan1107@hotmail.com>
Co-authored-by: Sarah541 <sarahkhan1107@hotmail.com>
If Total Cookie Protection is enabled when first accessing a normal tab
(not a custom tab) a new Contextual Feature Recommendation popup will be shown
informing about the added protection and allowing the user to open a support
page with more data about the new option for privacy protection.
Supported anchorings will now be:
- INDICATOR_CENTERED_IN_ANCHOR - previous functionality - allows to have the
indicator point to exactly the middle of a smaller anchor.
- BODY_TO_ANCHOR_CENTER - new default - allows to align the popup inside a
wider anchor
- BODY_TO_ANCHOR_START - new anchoring - allows to align the popup flushed to
it's anchor's start.
The first patch for this enabled the contile feature by default which based on
the automated tests increased the number of inflations done in HomeActivity.
This patch comes to address that by allowing for up to 6 inflations as seen
reported as the actual count in tests.
This fix will allow the tab that's being shared from a device to open in FireFox browser in the device that receives the tab, even if another browser is set as default in the destination device.
Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
There are three issues here that we have uncovered while investigating
this bug:
1. Settings.kt has a lazy block around `enabledTotalCookieProtection`
which ends up caching the first result it evaluates.
3. The `FeatureHolder` within FxNimbus caches the incorrectly
evaluated value and returns this value hence forth.
4. Nimbus is not ready to return a result for an engine experiment
when we need it early on in the dependency tree initialization.
There are multiple systems that require engine to be initialized for
them to work (e.g. Glean, Profiler, concept-fetch). In our TCP,
experiment, we need to apply these engine settings during the engine
initialization. So when we try and evaluate Nimbus that early on, it
has not had time to initialize itself correctly or even use the
engine's concept-fetch client to return the correct experiment result.
This bug is made worse because of the first two caching bugs where we
are always holding onto a cached value of the wrong result.
Our temporary solution is to:
1. Remove the `lazy` around `Settings.enabledTotalCookieProtection`.
2. Set the `FxNimbus.api` value right after we are done initializing
`FxNimbus` and `NimbusApi` so that all future queries to FxNimbus
will be made against a real instance of `NimbusApi`. This is a
short-term fix for the `FeatureHolder` caching bug.
3. Set a new TrackingProtectionPolicy that will evaluate Nimbus now
that it is in the correct state when receive the
`NimbusInterface.Observer.onUpdatesApplied`.
Co-authored-by: jhugman <jhugman@users.noreply.github.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
* Fix android:lineHeight
Change android:lineHeight to app:lineHeight for incompatibilities at API Level <= 27
* Fix android:lineHeight (Part 2)
Change android:lineHeight to app:lineHeight for fixing incompatibilities in custom_search_engine
* Change android:lineHeight (Part 3)
Change android:lineHeight to app:lineHeight in settings_https_only for incompatibilities at API Level <= 27
* cleanup lint-baseline.xml
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This will allow Fenix to use the refactored method name 'exitImmersiveMode' in Activity from Android Components library
Co-Authored-By: Mugurell <Mugurell@users.noreply.github.com>
This will allow for pinpoint accuracy when anchoring and resolve any color
disparities between the popup body and the indicator arrow by having everything
drawn programmatically as one shape.
Because of the async nature of the values for insets and screen rotation
immediately after an orientation change the popup will automatically get
dismissed to prevent any anchoring issues.
While not ideal the effect of this is better than accepting layout issues after
orientation changes and is the same approach used for other of our popups.