Host precompilation of apks to speed boot.

Change-Id: Iad0fb1243e5736b3fb17e004395a1183d67e4ff3
diff --git a/Android.mk b/Android.mk
index d0d83e6..0eb80a0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -143,6 +143,106 @@
 $(eval $(call build-art-cache-oat,system/framework/am.jar))
 $(eval $(call build-art-cache-oat,system/app/Calculator.apk))
 
+
+# WORKING for zygote-art
+ifeq (1,1)
+$(eval $(call build-art-cache-oat,system/app/ApplicationsProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/BackupRestoreConfirmation.apk))
+$(eval $(call build-art-cache-oat,system/app/Bluetooth.apk))
+$(eval $(call build-art-cache-oat,system/app/BooksTablet.apk))
+$(eval $(call build-art-cache-oat,system/app/Browser.apk))
+$(eval $(call build-art-cache-oat,system/app/CalendarGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/CalendarProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/CarHomeGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/CertInstaller.apk))
+$(eval $(call build-art-cache-oat,system/app/ChromeBookmarksSyncAdapter.apk))
+$(eval $(call build-art-cache-oat,system/app/Contacts.apk))
+$(eval $(call build-art-cache-oat,system/app/ContactsProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/DefaultContainerService.apk))
+$(eval $(call build-art-cache-oat,system/app/DeskClockGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/Development.apk))
+$(eval $(call build-art-cache-oat,system/app/DownloadProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/DownloadProviderUi.apk))
+$(eval $(call build-art-cache-oat,system/app/DrmProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/EmailGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/ExchangeGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/GalleryGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/GenieWidget.apk))
+$(eval $(call build-art-cache-oat,system/app/Gmail.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleBackupTransport.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleContactsSyncAdapter.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleEarth.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleFeedback.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleLoginService.apk))
+$(eval $(call build-art-cache-oat,system/app/GooglePackageVerifier.apk))
+$(eval $(call build-art-cache-oat,system/app/GooglePartnerSetup.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleQuickSearchBox.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleServicesFramework.apk))
+$(eval $(call build-art-cache-oat,system/app/GoogleTTS8k.apk))
+$(eval $(call build-art-cache-oat,system/app/HTMLViewer.apk))
+$(eval $(call build-art-cache-oat,system/app/KeyChain.apk))
+$(eval $(call build-art-cache-oat,system/app/LatinImeDictionaryPack.apk))
+$(eval $(call build-art-cache-oat,system/app/LatinImeGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/Launcher2.apk))
+$(eval $(call build-art-cache-oat,system/app/LiveWallpapers.apk))
+$(eval $(call build-art-cache-oat,system/app/LiveWallpapersPicker.apk))
+$(eval $(call build-art-cache-oat,system/app/MagicSmokeWallpapers.apk))
+$(eval $(call build-art-cache-oat,system/app/Maps.apk))
+$(eval $(call build-art-cache-oat,system/app/MediaProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/MediaUploader.apk))
+$(eval $(call build-art-cache-oat,system/app/Microbes.apk))
+$(eval $(call build-art-cache-oat,system/app/Mms.apk))
+$(eval $(call build-art-cache-oat,system/app/Music2.apk))
+$(eval $(call build-art-cache-oat,system/app/MusicFX.apk))
+$(eval $(call build-art-cache-oat,system/app/NetSpeed.apk))
+$(eval $(call build-art-cache-oat,system/app/NetworkLocation.apk))
+$(eval $(call build-art-cache-oat,system/app/NfcGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/OneTimeInitializer.apk))
+$(eval $(call build-art-cache-oat,system/app/PackageInstaller.apk))
+$(eval $(call build-art-cache-oat,system/app/Phone.apk))
+$(eval $(call build-art-cache-oat,system/app/Phonesky.apk))
+$(eval $(call build-art-cache-oat,system/app/PlusOne.apk)) # requires more memory to avoid OutOfMemoryError
+$(eval $(call build-art-cache-oat,system/app/Settings.apk))
+$(eval $(call build-art-cache-oat,system/app/SettingsProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/SetupWizard.apk))
+$(eval $(call build-art-cache-oat,system/app/SoundRecorder.apk))
+$(eval $(call build-art-cache-oat,system/app/SpeechRecorder.apk))
+$(eval $(call build-art-cache-oat,system/app/StingrayProgramMenu.apk))
+$(eval $(call build-art-cache-oat,system/app/StingrayProgramMenuSystem.apk))
+$(eval $(call build-art-cache-oat,system/app/Street.apk))
+$(eval $(call build-art-cache-oat,system/app/SystemUI.apk))
+$(eval $(call build-art-cache-oat,system/app/TagGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/Talk.apk))
+$(eval $(call build-art-cache-oat,system/app/TelephonyProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/Thinkfree.apk))
+$(eval $(call build-art-cache-oat,system/app/UserDictionaryProvider.apk))
+$(eval $(call build-art-cache-oat,system/app/VideoEditorGoogle.apk))
+$(eval $(call build-art-cache-oat,system/app/Videos.apk))
+$(eval $(call build-art-cache-oat,system/app/VisualizationWallpapers.apk))
+$(eval $(call build-art-cache-oat,system/app/VoiceDialer.apk))
+$(eval $(call build-art-cache-oat,system/app/VoiceSearch.apk))
+$(eval $(call build-art-cache-oat,system/app/VpnDialogs.apk))
+$(eval $(call build-art-cache-oat,system/app/YouTube.apk))
+$(eval $(call build-art-cache-oat,system/app/googlevoice.apk))
+$(eval $(call build-art-cache-oat,system/app/talkback.apk))
+$(eval $(call build-art-cache-oat,system/framework/android.test.runner.jar))
+$(eval $(call build-art-cache-oat,system/framework/bmgr.jar))
+$(eval $(call build-art-cache-oat,system/framework/bu.jar))
+$(eval $(call build-art-cache-oat,system/framework/com.android.future.usb.accessory.jar))
+$(eval $(call build-art-cache-oat,system/framework/com.android.location.provider.jar))
+$(eval $(call build-art-cache-oat,system/framework/com.android.nfc_extras.jar))
+$(eval $(call build-art-cache-oat,system/framework/com.google.android.maps.jar))
+$(eval $(call build-art-cache-oat,system/framework/com.google.android.media.effects.jar))
+$(eval $(call build-art-cache-oat,system/framework/ext.jar))
+$(eval $(call build-art-cache-oat,system/framework/ime.jar))
+$(eval $(call build-art-cache-oat,system/framework/input.jar))
+$(eval $(call build-art-cache-oat,system/framework/javax.obex.jar))
+$(eval $(call build-art-cache-oat,system/framework/monkey.jar))
+$(eval $(call build-art-cache-oat,system/framework/pm.jar))
+$(eval $(call build-art-cache-oat,system/framework/send_bug.jar))
+$(eval $(call build-art-cache-oat,system/framework/svc.jar))
+endif
+
 .PHONY: test-art-target-oat-process-am
 test-art-target-oat-process-am: $(call art-cache-oat,system/framework/am.jar) test-art-target-sync
 	adb remount
diff --git a/build/Android.oattest.mk b/build/Android.oattest.mk
index d9113d0..bb6695e 100644
--- a/build/Android.oattest.mk
+++ b/build/Android.oattest.mk
@@ -40,7 +40,7 @@
 define build-art-oat
 $(2): $(1) $(3) $(DEX2OAT_DEPENDENCY)
 	@echo "target dex2oat: $$@ ($$?)"
-	$(hide) $(DEX2OAT) --runtime-arg -Xms16m --runtime-arg -Xmx16m --boot-image=$(3) $(addprefix --dex-file=,$$<) --oat=$$@ --host-prefix=$(PRODUCT_OUT)
+	$(hide) $(DEX2OAT) --runtime-arg -Xms64m --runtime-arg -Xmx64m --boot-image=$(3) $(addprefix --dex-file=,$$<) --oat=$$@ --host-prefix=$(PRODUCT_OUT)
 endef
 
 ########################################################################