Support products on Android without the dynamic toolbar

RESOLVED FIXED in Firefox 64



9 months ago
9 months ago


(Reporter: kats, Assigned: kats)


Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)



(3 attachments)

The dynamic toolbar is specific to Fennec. GeckoView-based products won't be using it (at least for now). So we should only instantiate AndroidDynamicToolbarAnimator and the run the related code if we're on Fennec, rather than unconditionally inside MOZ_WIDGET_ANDROID blocks.
I thought we were already doing this with the pref, but you're right that the AndroidDynamicToolbarAnimator is still created if the pref is set to false. (I guess it just doesn't get the necessary messages from Java to actually do anything?)
Yeah, we create the AndroidDynamicToolbarAnimator but most of the code is no-op unless it's enabled. However there are a couple of codepaths (the NotifyLayersUpdated and FirstPaint messages, in particular) which are used even if is false. The patches I have this bug involve moving that code out of AndroidDynamicToolbarAnimator and then allowing the instantiation to be skipped.
This extracts code that is conceptually unrelated to the dynamic toolbar
from the dynamic toolbar codebase. It is a stepping stone to being able
to not instantiate the AndroidDynamicToolbarAnimator at all for
non-Fennec android products.
The bulk of this is adjusting the code that tries to use the toolbar to
have appropriate null checks instead of asserting it will exist. The
creation of the animator instance is now guarded by a IsFennec

Depends on D8658
Pushed by
Move the LAYERS_UPDATED notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
Move the FIRST_PAINT notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
Only create the AndroidDynamicToolbarAnimator for Fennec. r=jnicol
You need to log in before you can comment on or make changes to this bug.