Fix Dialer Android.mk for compiling with javac

Fix the Dialer Android.mk file for compiling with javac:
 - Add missing resources from android-support-transition.
 - Add missing transitive dependencies on glide disklrucache and
   gifdecoder.
 - Remove annotation processors from LOCAL_JAVA_STATIC_LIBRARIES,
   they are only needed during compile time not in the final jar.
 - Remove org.apache.http.legacy.boot from LOCAL_JAVA_STATIC_LIBRARIES
   and add org.apache.http.legacy to LOCAL_JAVA_LIBRARIES, it is
   only needed to compile and will already be present in the classpath
   on the device.
 - Remove libraries from LOCAL_JAVA_LIBRARIES that are already in
   LOCAL_JAVA_STATIC_LIBRARIES, there is no need to list them twice.
 - Only list the processor libraries in --processorpath.
 - Pass --processorpath to javac.
 - Fix dailer->dialer typo.

Bug: 35844114
Test: m -j Dialer
Test: m -j ANDROID_COMPILE_WITH_JACK=false Dialer
Change-Id: I9eee5a27a5812898826a1e70b72a2ad1b4f28d31
diff --git a/Android.mk b/Android.mk
index d21a1a5..30caa75 100644
--- a/Android.mk
+++ b/Android.mk
@@ -142,6 +142,7 @@
 LOCAL_RESOURCE_DIR := \
 	$(addprefix $(LOCAL_PATH)/, $(RES_DIRS)) \
 	$(support_library_root_dir)/design/res \
+	$(support_library_root_dir)/transition/res \
 	$(support_library_root_dir)/v7/appcompat/res \
 	$(support_library_root_dir)/v7/cardview/res \
 	$(support_library_root_dir)/v7/recyclerview/res
@@ -213,45 +214,41 @@
 	android-support-v7-cardview \
 	android-support-v7-recyclerview \
 	com.android.vcard \
-	dailer-dagger2-compiler \
 	dialer-dagger2 \
-	dialer-dagger2-producers \
-	dialer-glide  \
+	dialer-disklrucache \
+	dialer-gifdecoder \
+	dialer-glide \
 	dialer-guava \
 	dialer-javax-annotation-api \
-	dialer-javax-inject \
 	dialer-libshortcutbadger \
 	jsr305 \
 	libphonenumber \
 	libprotobuf-java-nano \
-	org.apache.http.legacy.boot \
-	volley \
-	dialer-auto-value
+	volley
 
 LOCAL_JAVA_LIBRARIES := \
-	android-support-annotations \
-	android-support-transition \
-	dailer-dagger2-compiler \
+	org.apache.http.legacy \
+
+# TODO: Jack seems to require these in both LOCAL_JAVA_LIBRARIES and with
+# --processorpath, javac is fine with just --processorpath
+LOCAL_JAVA_LIBRARIES += \
+	dialer-dagger2-compiler \
 	dialer-dagger2 \
 	dialer-dagger2-producers \
-	dialer-glide  \
 	dialer-guava \
 	dialer-javax-annotation-api \
 	dialer-javax-inject \
-	dialer-libshortcutbadger \
-	jsr305 \
-	libprotobuf-java-nano \
-	dialer-auto-value
+	dialer-auto-value \
 
 # Libraries needed by the compiler (JACK) to generate code.
 PROCESSOR_LIBRARIES_TARGET := \
-	dailer-dagger2-compiler \
+	dialer-dagger2-compiler \
 	dialer-dagger2 \
 	dialer-dagger2-producers \
 	dialer-guava \
 	dialer-javax-annotation-api \
 	dialer-javax-inject \
-	dialer-auto-value
+	dialer-auto-value \
 
 # Resolve the jar paths.
 PROCESSOR_JARS := $(call java-lib-deps, $(PROCESSOR_LIBRARIES_TARGET))
@@ -259,6 +256,7 @@
 LOCAL_ADDITIONAL_DEPENDENCIES += $(PROCESSOR_JARS)
 
 LOCAL_JACK_FLAGS += --processorpath $(call normalize-path-list,$(PROCESSOR_JARS))
+LOCAL_JAVAC_FLAGS += --processorpath $(call normalize-path-list,$(PROCESSOR_JARS))
 
 LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(incallui_dir)/proguard.flags
 
@@ -282,11 +280,13 @@
 include $(CLEAR_VARS)
 
 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
-	dailer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.6/dagger-compiler-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
+	dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.6/dagger-compiler-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-auto-common:../../../prebuilts/tools/common/m2/repository/com/google/auto/auto-common/0.6/auto-common-0.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-auto-value:../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.3/auto-value-1.3$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.6/dagger-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.6/dagger-producers-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
+	dialer-disklrucache:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/disklrucache/1.0.0-SNAPSHOT/disklrucache-1.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
+	dialer-gifdecoder:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/gifdecoder/1.0.0-SNAPSHOT/gifdecoder-1.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-glide:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/glide/4.0.0-SNAPSHOT/glide-4.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) \
 	dialer-javax-annotation-api:../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2$(COMMON_JAVA_PACKAGE_SUFFIX) \