Merge "Remove framework dummy classes in the output of jack build" into mnc-ub-dev am: 3b49e337bf
am: e3bf28beab

* commit 'e3bf28beabbca165fc6260727e9b57fe4f1575b7':
  Remove framework dummy classes in the output of jack build
diff --git a/v4/Android.mk b/v4/Android.mk
index 87ea80e..4336e40 100644
--- a/v4/Android.mk
+++ b/v4/Android.mk
@@ -195,11 +195,24 @@
 
 # -----------------------------------------------------------------------
 
+# A helper sub-library that allows to use Lollipop internal APIs.
+include $(CLEAR_VARS)
+LOCAL_MODULE := android-support-v4-api21-internal
+LOCAL_SDK_VERSION := 21
+LOCAL_SRC_FILES := \
+    $(call all-java-files-under, api21/android/content/pm) \
+    $(call all-java-files-under, api21/android/service/media)
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_JAVA_LIBRARY)
+
+# -----------------------------------------------------------------------
+
 # A helper sub-library that makes direct use of Lollipop APIs.
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-v4-api21
 LOCAL_SDK_VERSION := 21
-LOCAL_SRC_FILES := $(call all-java-files-under, api21)
+LOCAL_SRC_FILES := $(call all-java-files-under, api21/android/support)
+LOCAL_JAVA_LIBRARIES := android-support-v4-api21-internal
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4-api20
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
@@ -224,6 +237,7 @@
 LOCAL_MODULE := android-support-v4-api23
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := $(call all-java-files-under, api23)
+LOCAL_JAVA_LIBRARIES := android-support-v4-api21-internal
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4-api22
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
@@ -239,7 +253,6 @@
 LOCAL_SRC_FILES := $(call all-java-files-under, java) \
     $(call all-Iaidl-files-under, java)
 LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4-api23
-LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 support_module_src_files += $(LOCAL_SRC_FILES)
diff --git a/v4/jarjar-rules.txt b/v4/jarjar-rules.txt
deleted file mode 100644
index 51761d4..0000000
--- a/v4/jarjar-rules.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Exclude the duplicated classes that are already present
-# in the Android frameworks.
-zap android.content.pm.**
-zap android.service.media.**