gecko-dev/mobile
Jan Henning 6ae3b86617 Bug 1460874 - Part 12: Enforce sensible API usage for manual font size settings. r=snorp
Modifying the manual font size settings while the GeckoFontScaleListener is
active is theoretically possible, but probably not the most sensible way of
using that API. Therefore, we prohibit it and throw an exception in that case.

There is one complication, though: The very same API is used by the font scale
listener itself in order to modify the font size settings according to the
system font scale. Therefore, we have to move the GeckoFontScaleListener into
the GeckoView package itself, so that we can provide a package-private internal
API that bypasses the above usage checks.

This means that going forward, Fennec needs to use the official GeckoView API
to communicate with the font scale listener, too. As we've moved out the Shared-
Preferences watching  in part 5, this doesn't pose any insurmountable
difficulties.

Because for a short while I encountered some strange crashes where getRuntime()
in GeckoApplication apparently returned null while trying to initialise the
listener, I'm tying its initialisation to creation of the runtime, just to be on
the safe side.

Differential Revision: https://phabricator.services.mozilla.com/D18507

--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoFontScaleListener.java => mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoFontScaleListener.java
extra : moz-landing-system : lando
2019-02-14 20:43:25 +00:00
..
android Bug 1460874 - Part 12: Enforce sensible API usage for manual font size settings. r=snorp 2019-02-14 20:43:25 +00:00
locales Bug 1252831 - remove 30boxes webcal handler as both possible and default handler, r=paolo,Dolske 2019-02-10 21:28:20 +00:00