Support products on Android without the dynamic toolbar

RESOLVED FIXED in Firefox 64

Status

()

enhancement
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
mozilla64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(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 browser.chrome.dynamictoolbar, 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 browser.chrome.dynamictoolbar 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
condition.

Depends on D8658
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dcd095eb8910
Move the LAYERS_UPDATED notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
https://hg.mozilla.org/integration/autoland/rev/da505775320b
Move the FIRST_PAINT notification from AndroidDynamicToolbarAnimator to UiCompositorControllerParent. r=jnicol
https://hg.mozilla.org/integration/autoland/rev/8866a66f7659
Only create the AndroidDynamicToolbarAnimator for Fennec. r=jnicol
You need to log in before you can comment on or make changes to this bug.