Merge "No html_dir_files if no LOCAL_DROIDDOC_HTML_DIR."
diff --git a/core/base_rules.mk b/core/base_rules.mk
index fcd40a2..e69f73f 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -434,8 +434,7 @@
 ###########################################################
 cleantarget := clean-$(LOCAL_MODULE)
 $(cleantarget) : PRIVATE_MODULE := $(LOCAL_MODULE)
-$(cleantarget) : PRIVATE_CLEAN_FILES := \
-    $(PRIVATE_CLEAN_FILES) \
+$(cleantarget) : PRIVATE_CLEAN_FILES += \
     $(LOCAL_BUILT_MODULE) \
     $(LOCAL_INSTALLED_MODULE) \
     $(intermediates)
diff --git a/core/definitions.mk b/core/definitions.mk
index 48cb0ad..c91220d 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1638,10 +1638,10 @@
 #TODO: update the manifest to point to the dex file
 define add-dex-to-package
 $(if $(filter classes.dex,$(notdir $(PRIVATE_DEX_FILE))),\
-$(hide) $(AAPT) add -k $@ $(PRIVATE_DEX_FILE),\
+$(hide) zip -qj $@ $(PRIVATE_DEX_FILE),\
 $(hide) _adtp_classes_dex=$(dir $(PRIVATE_DEX_FILE))classes.dex; \
 cp $(PRIVATE_DEX_FILE) $$_adtp_classes_dex && \
-$(AAPT) add -k $@ $$_adtp_classes_dex && rm -f $$_adtp_classes_dex)
+zip -qj $@ $$_adtp_classes_dex && rm -f $$_adtp_classes_dex)
 endef
 
 # Add java resources added by the current module.
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 4c51b10..82dd153 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -4,7 +4,7 @@
 ####################################
 
 # TODO: replace it with device's BOOTCLASSPATH
-DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:telephony-common:mms-common:android.policy:services:apache-xml
+DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:telephony-common:voip-common:mms-common:android.policy:services:apache-xml
 DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
 
 DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk
index 0ca1858..6ede57f 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -128,8 +128,7 @@
 endif # LOCAL_STRIP_MODULE
 
 
-$(cleantarget): PRIVATE_CLEAN_FILES := \
-			$(PRIVATE_CLEAN_FILES) \
-			$(linked_module) \
-			$(symbolic_output) \
-			$(compress_output)
+$(cleantarget): PRIVATE_CLEAN_FILES += \
+    $(linked_module) \
+    $(symbolic_output) \
+    $(compress_output)
diff --git a/core/java_library.mk b/core/java_library.mk
index 6392108..62b16c3 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -73,7 +73,7 @@
 else # !LOCAL_IS_STATIC_JAVA_LIBRARY
 
 $(common_javalib.jar): PRIVATE_DEX_FILE := $(built_dex)
-$(common_javalib.jar) : $(built_dex) $(java_resource_sources) | $(AAPT)
+$(common_javalib.jar) : $(built_dex) $(java_resource_sources)
 	@echo "target Jar: $(PRIVATE_MODULE) ($@)"
 	$(create-empty-package)
 	$(add-dex-to-package)
@@ -106,7 +106,7 @@
 	@mkdir -p $(dir $@)
 	$(call dexpreopt-one-file,$<,$@)
 
-$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP) $(AAPT)
+$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP)
 	$(call copy-file-to-target)
 ifneq (nostripping,$(LOCAL_DEX_PREOPT))
 	$(call dexpreopt-remove-classes.dex,$@)
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 4aec521..466dda5 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -97,7 +97,6 @@
 	    wifi \
 	    keystore \
 	    icu4j \
-	    voip \
 	 )
 
 #
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
index 894b626..28c01f3 100644
--- a/core/pdk_config.mk
+++ b/core/pdk_config.mk
@@ -47,6 +47,7 @@
 	target/common/obj/JAVA_LIBRARIES/framework_intermediates \
 	target/common/obj/JAVA_LIBRARIES/android.test.runner_intermediates \
 	target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates \
+	target/common/obj/JAVA_LIBRARIES/voip-common_intermediates \
 	target/common/obj/JAVA_LIBRARIES/mms-common_intermediates
 # not java libraries
 PDK_PLATFORM_JAVA_ZIP_CONTENTS := \
diff --git a/target/product/core.mk b/target/product/core.mk
index a97894a..03ed394 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -129,6 +129,7 @@
     lint \
     uiautomator \
     telephony-common \
+    voip-common \
     mms-common
 
 # SELinux packages
diff --git a/target/product/mini.mk b/target/product/mini.mk
index 3c24876..cb4f6e2 100644
--- a/target/product/mini.mk
+++ b/target/product/mini.mk
@@ -151,6 +151,7 @@
     sensorservice \
     lint \
     telephony-common \
+    voip-common \
     mms-common
 
 PRODUCT_COPY_FILES += \