Community:SummerOfCode16/AndroidDownloadableContent
One ongoing goal of the Firefox for Android team is it to reduce the APK size (See meta bug "fatfennec": bug 942609). We just made the first steps to stop shipping everything in the APK and instead download assets the application needs at runtime. We started with fonts but we want to move much more content out of the APK (hyphenation dictionaries, translations, ..).
The goal of this Google Summer of Code project is it to remove hyphenation dictionaries from the APK and download them at runtime. The work previously done to exclude fonts acts as a blueprint and for your guidance.
- Skills needed: Java / Android, JavaScript or C++ helpful but not a requirement
- Mentor: Sebastian Kaspari (:sebastian) <skaspari@mozilla.com>
- IRC: irc.mozilla.org #mobile
Groundwork
- For downloading fonts at runtime we implemented a background service that uses a static catalog of downloadable content. See dependency tree.
- Currently in development is a client that synchronizes the catalog of downloadable content from a Kinto server. See Bug 1201059
Project tasks
Preparation
- Create a build without hyphenation dictionaries (MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
- Verify that the build behaves correctly with the absence of the dictionaries (Are pages still readable? No crashes?)
- Create or find a test page that you can use to easily test if a hyphenation dictionary by a build (For testing later).
Main tasks
- Bug 1175555 - Exclude hyphenation dictionaries from builds via build flag - Already done
- Bug ??? - Package hyphenation dictionaries for ref tests - See similar bug for fonts: Bug 1197716
- Bug ??? - Verify that (or add code so that) Gecko can load hyphenation dictionaries from a profile independent directory - See similar bug for fonts: Bug 1197717
- Bug ??? - Add hyphenation dictionaries to static catalog of downloadable content
- Bug ??? - Modify DownloadAction (of DownloadContentService) to handle new type of content
- Bug ??? - Add a way to let Gecko know that the dictionaries have changed and that it should rebuild its list
- Bug ??? - Add hyphenation dictionaries to online catalog of content in Kinto
Landing
- Bug ??? - Land your changes behind a Nightly flag
- Verify that Nightly behaves correctly and the hyphenation dictionaries are downloaded
- Bug ??? - Let your changes ride the trains
Bonus tasks
- There are various open follow-up bugs to improve the background service for downloading content as well as the sync client (Actual list of bugs TBD).
Code
The existing (Java) code for downloadable content can be found in the org.mozilla.gecko.dlc package.