Compile org.apache.legacy.boot using speed-profile

Ran the following command before making the change and it reported a
compiler-filter of "quicken".
    adb shell oatdump --header-only \
        --oat-file=/system/framework/oat/arm64/org.apache.http.legacy.boot.odex

Updated the build, rebuilt, flashed to device, booted it up.

Ran the following command after making the change and it reported a
compiler-filter of "speed-profile".
    adb shell oatdump --header-only \
        --boot-image=/system/framework/boot.art \
        --instruction-set=arm64 \
        --oat-file=/system/framework/oat/arm64/org.apache.http.legacy.boot.odex

Test: See above
Bug: 65552462
Bug: 18027885
Change-Id: If7d44ac2f6ee5b65ad3f3bdc68237c5b496f95a5
diff --git a/Android.mk b/Android.mk
index f9b9846..8583718 100644
--- a/Android.mk
+++ b/Android.mk
@@ -69,6 +69,13 @@
 LOCAL_SRC_FILES := $(apache_http_src_files)
 LOCAL_SDK_VERSION := 21
 LOCAL_MODULE_TAGS := optional
+# Previously, this JAR was included on the bootclasspath so was compiled using
+# the speed-profile. ensures that it continues to be compiled using the
+# speed-profile in order to avoid regressing the performance, particularly of
+# app launch times. Without this it would be compiled using quicken (which is
+# interpreter + JIT) and so would be slower.
+LOCAL_DEX_PREOPT_GENERATE_PROFILE := true
+LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := $(LOCAL_PATH)/art-profile/$(LOCAL_MODULE).prof.txt
 include $(BUILD_JAVA_LIBRARY)
 
 ##############################################