Implement loading services from isolated splits
Due to b/169196314 the OS does not use the split's class loader to load services even when the service is in the split's manifest. To work around this, all services need to be defined in the base module's dex. This uses a similar approach to what was done for the Application class in http://crrev.com/c/2425404. Since there are multiple Service base classes which chrome services inherit from, I ended up using jinja templates to reduce duplication of common service methods since I couldn't find a good way to do this in pure Java. Alternatively I could also copy the base Service methods for the split compat version of each Service subclass. I converted an example Service, JobService, and IntentService to show usage. A follow up will convert the rest of the services used in chrome. Note that gerrit is not doing a good job of detecting renamed files here, so Patchset 1 contains strictly the moved service files, and future patchsets have the diffs from that. I would recommend reviewing with the base set to Patchset 1. Bug: 1126301 Change-Id: I8ccda76ee410e20d847791700b2987349e05959a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441250Reviewed-by:Andrew Grieve <agrieve@chromium.org> Commit-Queue: Clark DuVall <cduvall@chromium.org> Cr-Commit-Position: refs/heads/master@{#813766}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment