PackageManager: Dexopt core-apps during service bringup.

Code from these apps can be loaded by the system_server and so
we need to make sure they're compiled before their package contexts
are requested. Leaving them interpreted will cause performance issues.

On a Nexus 6P with WITH_DEXPREOPT=false, this adds an additional
26 seconds to every upgrade / first-boot and ends up optimizing a total
of 20 apps.

bug: 28639246
Change-Id: Ief3c0048fda4f1b1742fbf3e2476e65fa607a18a
2 files changed