Add support for prebuilt AARs.

- You can give a .aar as source file to a prebuilt static Java library
  module. The build system will set up dependencies and rules to extract
  classes.jar and other resource files.
- To build against a prebuilt AAR module, use:
  LOCAL_STATIC_JAVA_AAR_LIBRARIES := <module names of aar prebuilt AARs>
  The build system will set up rules to merge the library's
  AndroidManifest.xml with the main AndroidManifest.xml, add the AAR's
  resource dirs and link/merge the AAR's classes.jar.

Bug: 18168693
Change-Id: Ic2c1d20572a93bd98dbc72f8a39e26b459e442c2
diff --git a/core/java.mk b/core/java.mk
index debdf53..a969254 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -52,6 +52,9 @@
 endif
 endif
 
+# LOCAL_STATIC_JAVA_AAR_LIBRARIES are special LOCAL_STATIC_JAVA_LIBRARIES
+LOCAL_STATIC_JAVA_LIBRARIES := $(strip $(LOCAL_STATIC_JAVA_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES))
+
 LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
 
 LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM))