Merge "Provide LOCAL_RENDERSCRIPT_TARGET_API override."
diff --git a/core/Makefile b/core/Makefile
index 14de987..debe691 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -590,6 +590,14 @@
INTERNAL_USERIMAGES_DEPS := $(MKEXTUSERIMG) $(MAKE_EXT4FS)
INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS)))
+# Calculate size of all files for device image and report on filesizes
+# $(1): src directory
+define calculate-userimage-ext-size
+ @echo Calculating image size...
+ @find $(1) -type f | xargs du -k | sort -gr > $(PRODUCT_OUT)/imagesize-report.txt
+ @du -s -h -k $(1)
+endef
+
# $(1): src directory
# $(2): output file
# $(3): mount point
@@ -738,6 +746,7 @@
# $(1): output file
define build-systemimage-target
@echo "Target system fs image: $(1)"
+ $(call calculate-userimage-ext-size,$(TARGET_OUT))
$(call build-userimage-ext-target,$(TARGET_OUT),$(1),system,$(INTERNAL_USERIMAGES_EXT_VARIANT),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
endef
@@ -1078,9 +1087,11 @@
endif
@# Zip everything up, preserving symlinks
$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
- @# Run fs_config on all the system files in the zip, and save the output
- $(hide) zipinfo -1 $@ | awk -F/ 'BEGIN { OFS="/" } /^SYSTEM\// {$$1 = "system"; print}' | $(HOST_OUT_EXECUTABLES)/fs_config > $(zip_root)/META/filesystem_config.txt
- $(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/filesystem_config.txt)
+ @# Run fs_config on all the system, boot ramdisk, and recovery ramdisk files in the zip, and save the output
+ $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="SYSTEM/" } /^SYSTEM\// {print "system/" $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config > $(zip_root)/META/filesystem_config.txt
+ $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="BOOT/RAMDISK/" } /^BOOT\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config > $(zip_root)/META/boot_filesystem_config.txt
+ $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config > $(zip_root)/META/recovery_filesystem_config.txt
+ $(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt)
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
@@ -1416,6 +1427,7 @@
-v "OUT_DIR=$(OUT_DIR)" \
-v "TARGET_ARCH=$(TARGET_ARCH)" \
-v "TARGET_CPU_ABI=$(TARGET_CPU_ABI)" \
+ -v "DLL_EXTENSION=$(HOST_SHLIB_SUFFIX)" \
-o $(PRIVATE_DIR) && \
cp -f $(target_notice_file_txt) \
$(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/$(TARGET_CPU_ABI)/NOTICE.txt && \
diff --git a/core/binary.mk b/core/binary.mk
index dadfd5e..1a5af5f 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -56,7 +56,8 @@
endif
else
# LOCAL_NDK_STL_VARIANT is gnustl_static
- my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/include
+ my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/libs/$(TARGET_CPU_ABI)/include \
+ $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/include
my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/libs/$(TARGET_CPU_ABI)/libstdc++.a
endif
endif
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 0d05dd2..0fb6edc 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -92,10 +92,6 @@
#TARGET_GLOBAL_CFLAGS += \
# -DNDEBUG
-
-# Fix this after ssp.c is fixed for x86
-# TARGET_GLOBAL_CFLAGS += -fstack-protector
-
TARGET_GLOBAL_CPPFLAGS += \
-fno-use-cxa-atexit
diff --git a/core/definitions.mk b/core/definitions.mk
index 466a482..1afc0f4 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -312,7 +312,7 @@
define find-subdir-assets
$(if $(1),$(patsubst ./%,%, \
- $(shell if [ -d $(1) ] ; then cd $(1) ; find ./ -type f -and -not -type l ; fi)), \
+ $(shell if [ -d $(1) ] ; then cd $(1) ; find ./ -not -name '.*' -and -type f -and -not -type l ; fi)), \
$(warning Empty argument supplied to find-subdir-assets) \
)
endef
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 9f44c32..b801ac2 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:apache-xml:bouncycastle:ext:framework:android.policy:services:core-junit
+DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:android.policy:services:apache-xml:filterfw
DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/java.mk b/core/java.mk
index 65a883e..1cde62b 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 $(LOCAL_JAVA_LIBRARIES)
+ LOCAL_JAVA_LIBRARIES := core core-junit ext framework filterfw $(LOCAL_JAVA_LIBRARIES)
endif
endif
diff --git a/core/main.mk b/core/main.mk
index ef6c684..1f03355 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -404,6 +404,7 @@
development/host \
development/tools/etc1tool \
development/tools/line_endings \
+ development/tools/emulator/opengl \
external/clang \
external/easymock \
external/expat \
@@ -445,6 +446,7 @@
sdk/sdkstats \
sdk/sdkmanager \
sdk/swtmenubar \
+ sdk/traceview \
development/apps \
development/tools/mkstubs \
packages
diff --git a/core/multi_prebuilt.mk b/core/multi_prebuilt.mk
index 7602673..50a4a38 100644
--- a/core/multi_prebuilt.mk
+++ b/core/multi_prebuilt.mk
@@ -22,6 +22,7 @@
prebuilt_static_java_libraries := $(LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES)
prebuilt_is_host := $(LOCAL_IS_HOST_MODULE)
prebuilt_module_tags := $(LOCAL_MODULE_TAGS)
+prebuilt_strip_module := $(LOCAL_STRIP_MODULE)
ifndef multi_prebuilt_once
@@ -34,6 +35,7 @@
# $(5): OVERRIDE_BUILT_MODULE_PATH
# $(6): UNINSTALLABLE_MODULE
# $(7): BUILT_MODULE_STEM
+# $(8): LOCAL_STRIP_MODULE
#
# Elements in the file list may be bare filenames,
# or of the form "<modulename>:<filename>".
@@ -65,6 +67,8 @@
$(eval LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))) \
) \
$(eval LOCAL_MODULE_SUFFIX := $(suffix $(LOCAL_SRC_FILES))) \
+ $(if $(filter user,$(TARGET_BUILD_VARIANT)), \
+ $(eval LOCAL_STRIP_MODULE := $(8))) \
$(eval include $(BUILD_PREBUILT)) \
)
endef
@@ -85,7 +89,10 @@
$(prebuilt_is_host), \
SHARED_LIBRARIES, \
$(prebuilt_module_tags), \
- $($(if $(prebuilt_is_host),HOST,TARGET)_OUT_INTERMEDIATE_LIBRARIES))
+ $($(if $(prebuilt_is_host),HOST,TARGET)_OUT_INTERMEDIATE_LIBRARIES), \
+ , \
+ , \
+ $(prebuilt_strip_module))
$(call auto-prebuilt-boilerplate, \
$(prebuilt_executables), \
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 07ecf64..bd4d91f 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -16,16 +16,6 @@
$(error dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore LOCAL_PATH=$(LOCAL_PATH))
endif
-ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
-ifeq (true,$(WITH_DEXPREOPT))
-ifeq (,$(TARGET_BUILD_APPS))
-ifndef LOCAL_DEX_PREOPT
-LOCAL_DEX_PREOPT := true
-endif
-endif
-endif
-endif
-
ifeq ($(LOCAL_STRIP_MODULE),true)
ifdef LOCAL_IS_HOST_MODULE
$(error Cannot strip host module LOCAL_PATH=$(LOCAL_PATH))
@@ -55,20 +45,8 @@
# Ensure that prebuilt .apks have been aligned.
ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
-ifeq ($(LOCAL_DEX_PREOPT),true)
-# Make sure the boot jars get dexpreopt-ed first
-$(built_module): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT) $(AAPT)
-endif
$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ZIPALIGN)
$(transform-prebuilt-to-target-with-zipalign)
-ifeq ($(LOCAL_DEX_PREOPT),true)
- $(hide) rm -f $(patsubst %.apk,%.odex,$@)
- $(call dexpreopt-one-file,$@,$(patsubst %.apk,%.odex,$@))
- $(call dexpreopt-remove-classes.dex,$@)
-
-built_odex := $(basename $(built_module)).odex
-$(built_odex): $(built_module)
-endif
else
ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index af20da8..975c4f4 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -201,7 +201,7 @@
define copy-testcase-apk
-$(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk \
+$(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk.unaligned \
$(PRIVATE_DIR)/repository/testcases/$(1).apk
endef
diff --git a/core/user_tags.mk b/core/user_tags.mk
index c1c8ccf..d09a2cd 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -69,7 +69,6 @@
check_stack \
check_trace \
cmu2nuance \
- com.android.inputmethod.pinyin.lib \
com.android.phone.common \
com.android.vcard \
commons-compress-1.0 \
@@ -254,7 +253,6 @@
libiptc \
libjnigraphics \
libjni_latinime \
- libjni_pinyinime \
libjpeg \
libjs \
liblinenoise \
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index d02205b..f247bca 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -30,3 +30,6 @@
# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
TARGET_SHELL := ash
+
+# Build OpenGLES emulation guest and host libraries
+BUILD_EMULATOR_OPENGL := true
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 7277908..84b28ca 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -20,3 +20,6 @@
# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
TARGET_SHELL := ash
+
+# Build OpenGLES emulation host and guest libraries
+BUILD_EMULATOR_OPENGL := true
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index c31e5f7..6e052fd 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -30,7 +30,7 @@
DrmProvider \
Email \
Exchange \
- GalleryNew3D \
+ Gallery2 \
LatinIME \
Launcher2 \
Music \
diff --git a/target/product/large_emu_hw.mk b/target/product/large_emu_hw.mk
index f38ef61..9224130 100644
--- a/target/product/large_emu_hw.mk
+++ b/target/product/large_emu_hw.mk
@@ -32,7 +32,7 @@
DrmProvider \
Email \
Exchange \
- GalleryNew3D \
+ Gallery2 \
LatinIME \
Launcher2 \
Music \