Merge "audio configuration file path change because it is relocated"
diff --git a/core/Makefile b/core/Makefile
index 173932c..e005485 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -631,7 +631,7 @@
 # Recovery image
 
 # If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
-ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID) $(BUILD_PDK)))
+ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID) $(TARGET_BUILD_PDK)))
 
 INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
 
diff --git a/core/config.mk b/core/config.mk
index 6383113..7156b46 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -31,9 +31,9 @@
 	$(TOPDIR)dalvik/libnativehelper/include \
 	$(TOPDIR)frameworks/native/include \
 	$(TOPDIR)frameworks/native/opengl/include \
+	$(TOPDIR)frameworks/av/include \
 	$(TOPDIR)frameworks/base/include \
 	$(TOPDIR)frameworks/base/opengl/include \
-	$(TOPDIR)frameworks/base/native/include \
 	$(TOPDIR)external/skia/include
 SRC_HOST_HEADERS:=$(TOPDIR)tools/include
 SRC_LIBRARIES:= $(TOPDIR)libs
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index b801ac2..38982c0 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:android.policy:services:apache-xml:filterfw
+DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:android.policy:services:apache-xml
 DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
 
 DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/java.mk b/core/java.mk
index 38fd6f2..eff2465 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -29,7 +29,7 @@
   endif
 else
   ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
-    LOCAL_JAVA_LIBRARIES := core core-junit ext framework filterfw $(LOCAL_JAVA_LIBRARIES)
+    LOCAL_JAVA_LIBRARIES := core core-junit ext framework $(LOCAL_JAVA_LIBRARIES)
   endif
 endif
 
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
index 103221c..ffa933d 100644
--- a/core/llvm_config.mk
+++ b/core/llvm_config.mk
@@ -22,6 +22,8 @@
 ifeq ($(TARGET_ARCH),arm)
   CLANG_CONFIG_EXTRA_CFLAGS += \
     -target arm-linux-androideabi \
+    -nostdlibinc \
+    -B$(TARGET_TOOLCHAIN_ROOT)/arm-linux-androideabi/bin \
     -mllvm -arm-enable-ehabi
   CLANG_CONFIG_EXTRA_LDFLAGS += \
     -target arm-linux-androideabi \
@@ -35,7 +37,9 @@
 endif
 ifeq ($(TARGET_ARCH),x86)
   CLANG_CONFIG_EXTRA_CFLAGS += \
-    -target i686-android-linux
+    -target i686-android-linux \
+    -nostdlibinc \
+    -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
   CLANG_CONFIG_EXTRA_LDFLAGS += \
     -target i686-android-linux \
     -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
diff --git a/core/main.mk b/core/main.mk
index ab9d52d..ed93a3c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -218,7 +218,8 @@
 endif
 ifneq ($(PDK_BUILD_TYPE),)
   $(info PDK build type $(PDK_BUILD_TYPE))
-  BUILD_PDK:= true
+  BUILD_PDK:=true
+  TARGET_BUILD_PDK:=true
   include pdk/build/pdk.mk
   # force droid target
   MAKECMDGOALS:= $(subst $(PDK_BUILD_TYPE),droid,$(MAKECMDGOALS))
@@ -348,17 +349,6 @@
   ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
 endif
 
-ifneq ($(BUILD_TINY_ANDROID),true)
-# Install an apns-conf.xml file if one's not already being installed.
-ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
-  PRODUCT_COPY_FILES += \
-        development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml
-  ifeq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
-    $(warning implicitly installing apns-conf_sdk.xml)
-  endif
-endif
-endif
-
 ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
 
 # enable vm tracing in files for now to help track
@@ -729,7 +719,7 @@
 ifeq ($(BUILD_TINY_ANDROID), true)
 INSTALLED_RECOVERYIMAGE_TARGET :=
 endif
-ifneq ($(BUILD_PDK),)
+ifneq ($(TARGET_BUILD_PDK),)
 INSTALLED_RECOVERYIMAGE_TARGET :=
 endif
 
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 235f775..71fc638 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -53,8 +53,8 @@
     system-core:system/core/include \
     audio-effects:system/media/audio_effects/include \
     audio-utils:system/media/audio_utils/include \
-    wilhelm:system/media/wilhelm/include \
-    wilhelm-ut:system/media/wilhelm/src/ut \
+    wilhelm:frameworks/wilhelm/include \
+    wilhelm-ut:frameworks/wilhelm/src/ut \
     speex:external/speex/include
 
 #
@@ -89,6 +89,9 @@
 	    graphics \
 	    location \
 	    media \
+	    media/mca/effect \
+	    media/mca/filterfw \
+	    media/mca/filterpacks \
 	    drm \
 	    opengl \
 	    sax \
diff --git a/core/tasks/apicheck.mk b/core/tasks/apicheck.mk
index b3d800b..8d9928e 100644
--- a/core/tasks/apicheck.mk
+++ b/core/tasks/apicheck.mk
@@ -18,7 +18,7 @@
 #
 
 # skip api check for TINY_ANDROID and PDK buid
-ifeq (,$(filter true, $(BUILD_TINY_ANDROID) $(BUILD_PDK)))
+ifeq (,$(filter true, $(BUILD_TINY_ANDROID) $(TARGET_BUILD_PDK)))
 
 .PHONY: checkapi
 
diff --git a/core/tasks/factory_ramdisk.mk b/core/tasks/factory_ramdisk.mk
index 6757194..2cbea87 100644
--- a/core/tasks/factory_ramdisk.mk
+++ b/core/tasks/factory_ramdisk.mk
@@ -60,6 +60,10 @@
 
 ifneq (,$(INTERNAL_FACTORY_RAMDISK_EXTRA_MODULES_FILES)$(INTERNAL_FACTORY_RAMDISK_FILES))
 
+# These files are made by magic in build/core/Makefile so we need to explicitly include them
+$(eval $(call copy-one-file,$(TARGET_OUT)/build.prop,$(TARGET_FACTORY_RAMDISK_OUT)/system/build.prop))
+INTERNAL_FACTORY_RAMDISK_FILES += $(TARGET_FACTORY_RAMDISK_OUT)/system/build.prop
+
 BUILT_FACTORY_RAMDISK_FS := $(PRODUCT_OUT)/factory_ramdisk.gz
 BUILT_FACTORY_RAMDISK_TARGET := $(PRODUCT_OUT)/factory_ramdisk.img
 
diff --git a/core/tasks/vendor_module_check.mk b/core/tasks/vendor_module_check.mk
index c2d6c78..ca0ad8d 100644
--- a/core/tasks/vendor_module_check.mk
+++ b/core/tasks/vendor_module_check.mk
@@ -22,6 +22,7 @@
 	invensense \
 	nxp \
 	samsung \
+	samsung_arm \
 	ti
 
 
diff --git a/core/user_tags.mk b/core/user_tags.mk
index 53f0ee2..325c600 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -164,7 +164,6 @@
 	jsr305lib \
 	junit \
 	jython \
-	keystore \
 	kxml2-2.3.0 \
 	launch-wrapper \
 	layoutlib \
diff --git a/envsetup.sh b/envsetup.sh
index f11763a..b7ca7d2 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -757,7 +757,7 @@
        fi
 
        echo >|"$OUT_ROOT/gdbclient.cmds" "set solib-absolute-prefix $OUT_SYMBOLS"
-       echo >>"$OUT_ROOT/gdbclient.cmds" "set solib-search-path $OUT_SO_SYMBOLS"
+       echo >>"$OUT_ROOT/gdbclient.cmds" "set solib-search-path $OUT_SO_SYMBOLS:$OUT_SO_SYMBOLS/hw:$OUT_SO_SYMBOLS/ssl/engines"
        echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT"
        echo >>"$OUT_ROOT/gdbclient.cmds" ""
 
diff --git a/target/product/core.mk b/target/product/core.mk
index f655904..38a5a6c 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -58,7 +58,6 @@
     dmtracedump \
     dx \
     ext \
-    filterfw \
     framework-res \
     hprof-conv \
     icu.dat \
@@ -67,6 +66,8 @@
     ip-up-vpn \
     ip6tables \
     iptables \
+    keystore \
+    keystore.default \
     libandroidfw \
     libOpenMAXAL \
     libOpenSLES \
@@ -80,6 +81,7 @@
     libgabi++ \
     libicui18n \
     libicuuc \
+    libkeystore \
     libnativehelper \
     libnfc_ndef \
     libpowermanager \
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index 7287664..5059950 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -139,9 +139,11 @@
 	system/core/rootdir/etc/vold.fstab:system/etc/vold.fstab \
 	frameworks/base/data/sounds/effects/camera_click.ogg:system/media/audio/ui/camera_click.ogg \
 	frameworks/base/data/sounds/effects/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg \
-	frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
-	frameworks/base/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
-	frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml
+	frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
+	development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
+	development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \
+	frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+	frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml
 
 $(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
 $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
diff --git a/tools/droiddoc/templates-sdk/assets/android-developer-docs.css b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
index 6cc4a97..d346e31 100644
--- a/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
@@ -579,7 +579,7 @@
 
 #jd-content li img,
 #jd-content dd img {
-  margin:.5em 0 0 1em;
+  margin:.5em 0 .5em 1em;
 }
 
 .nolist {
@@ -713,7 +713,7 @@
   border-bottom:1px solid #33B5E5;
   padding:5px 10px 10px 55px;
   margin:2em 0;
-  background:url('../design/static/ico_styleguide.png') 5px 13px no-repeat;
+  background:url('images/icon_design.png') 5px 13px no-repeat;
 }
 
 div.design-announce p {
diff --git a/tools/droiddoc/templates-sdk/assets/images/icon_design.png b/tools/droiddoc/templates-sdk/assets/images/icon_design.png
new file mode 100644
index 0000000..c12907c
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/icon_design.png
Binary files differ