merge from froyo-plus-aosp
Change-Id: I9b0d0e248aff2cc31726f3d3209915b2e26f8bf3
diff --git a/buildspec.mk.default b/buildspec.mk.default
index 6303efc..c568a82 100644
--- a/buildspec.mk.default
+++ b/buildspec.mk.default
@@ -115,4 +115,4 @@
# variable will be changed. After you have modified this file with the new
# changes (see buildspec.mk.default), update this to the new value from
# buildspec.mk.default.
-BUILD_ENV_SEQUENCE_NUMBER := 9
+BUILD_ENV_SEQUENCE_NUMBER := 10
diff --git a/core/Makefile b/core/Makefile
index 852a716..2293593 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1074,6 +1074,17 @@
$(hide) mkdir -p $(dir $@)
$(hide) zip -qj $@ $(TARGET_OUT_APPS)/*
+
+#------------------------------------------------------------------
+# A zip of emma code coverage meta files. Generated for fully emma
+# instrumented build.
+#
+EMMA_META_ZIP := $(PRODUCT_OUT)/emma_meta.zip
+$(EMMA_META_ZIP): $(INSTALLED_SYSTEMIMAGE)
+ @echo "Collecting Emma coverage meta files."
+ $(hide) find $(TARGET_COMMON_OUT_ROOT) -name "coverage.em" | \
+ zip -@ -q $@
+
endif # TARGET_SIMULATOR != true
# -----------------------------------------------------------------
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 0d17c83..8832311 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -507,6 +507,10 @@
$(ALL_MODULES.$(LOCAL_MODULE).REQUIRED) $(LOCAL_REQUIRED_MODULES)
ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \
$(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
+ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
+ $(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+
+INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(LOCAL_MODULE)
###########################################################
## Take care of LOCAL_MODULE_TAGS
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 0fe3c8b..c37b43e 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -51,6 +51,7 @@
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STRIP_COMMENTS:=
LOCAL_INTERMEDIATE_SOURCES:=
+LOCAL_INTERMEDIATE_SOURCE_DIR:=
LOCAL_JAVACFLAGS:=
LOCAL_JAVA_LIBRARIES:=
LOCAL_NO_STANDARD_LIBRARIES:=
@@ -92,6 +93,7 @@
LOCAL_NO_EMMA_COMPILE:=
LOCAL_PROGUARD_ENABLED:= # '',optonly,full,custom
LOCAL_PROGUARD_FLAGS:=
+LOCAL_EMMA_COVERAGE_FILTER:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index f277ea5..306ba1a 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -23,6 +23,7 @@
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
+
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 972b10c..ae3fd59 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -44,7 +44,7 @@
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
TARGET_TOOLS_PREFIX := \
- prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
+ prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -97,12 +97,25 @@
-ffunction-sections \
-funwind-tables \
-fstack-protector \
+ -Wa,--noexecstack \
+ -Werror=format-security \
-fno-short-enums \
$(arch_variant_cflags) \
-include $(android_config_h) \
-I $(arch_include_dir)
+# This is to avoid the dreaded warning compiler message:
+# note: the mangling of 'va_list' has changed in GCC 4.4
+#
+# The fact that the mangling changed does not affect the NDK ABI
+# very fortunately (since none of the exposed APIs used va_list
+# in their exported C++ functions). Also, GCC 4.5 has already
+# removed the warning from the compiler.
+#
+TARGET_GLOBAL_CFLAGS += -Wno-psabi
+
TARGET_GLOBAL_LDFLAGS += \
+ -Wl,-z,noexecstack \
$(arch_variant_ldflags)
# We only need thumb interworking in cases where thumb support
@@ -222,8 +235,8 @@
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
-o $@ \
- $(PRIVATE_LDFLAGS) \
$(TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
$(TARGET_FDO_LIB) \
$(TARGET_LIBGCC)
endef
@@ -240,8 +253,8 @@
$(TARGET_CRTBEGIN_DYNAMIC_O) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
- $(PRIVATE_LDFLAGS) \
$(TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
$(TARGET_FDO_LIB) \
$(TARGET_LIBGCC) \
$(TARGET_CRTEND_O)
@@ -253,8 +266,8 @@
-o $@ \
$(TARGET_GLOBAL_LD_DIRS) \
$(TARGET_CRTBEGIN_STATIC_O) \
- $(PRIVATE_LDFLAGS) \
$(TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(TARGET_FDO_LIB) \
diff --git a/core/config.mk b/core/config.mk
index 2dcd876..0877ebd 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -31,6 +31,7 @@
$(TOPDIR)dalvik/libnativehelper/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/definitions.mk b/core/definitions.mk
index c678f97..8ba8eb4 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -949,7 +949,7 @@
define extract-and-include-target-whole-static-libs
$(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
- @echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
+ $(hide) echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
rm -rf $$ldir; \
mkdir -p $$ldir; \
@@ -969,7 +969,8 @@
@rm -f $@
$(extract-and-include-target-whole-static-libs)
@echo "target StaticLib: $(PRIVATE_MODULE) ($@)"
-$(hide) echo $^ | xargs $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@
+$(hide) echo $(filter %.o, $^) | \
+ xargs $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@
endef
###########################################################
@@ -1325,7 +1326,8 @@
define transform-classes.jar-to-emma
$(hide) java -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
- $(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR)
+ $(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR) \
+ $(addprefix -ix , $(PRIVATE_EMMA_COVERAGE_FILTER))
endef
#TODO: use a smaller -Xmx value for most libraries;
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 03ffa55..ba4857b 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -57,6 +57,13 @@
$(full_target): PRIVATE_CLASSPATH:=$(LOCAL_CLASSPATH)
full_java_lib_deps :=
+$(full_target): PRIVATE_BOOTCLASSPATH :=
+ifeq ($(BUILD_OS),linux)
+# You have to set bootclasspath for javadoc manually on linux since Java 6.
+host_jdk_rt_jar := $(dir $(HOST_JDK_TOOLS_JAR))../jre/lib/rt.jar
+$(full_target): PRIVATE_BOOTCLASSPATH := $(host_jdk_rt_jar)
+endif
+
ifneq ($(LOCAL_IS_HOST_MODULE),true)
ifeq ($(LOCAL_JAVA_LIBRARIES),)
@@ -165,6 +172,7 @@
-templatedir $(PRIVATE_CUSTOM_TEMPLATE_DIR) \
-templatedir $(PRIVATE_TEMPLATE_DIR) \
$(PRIVATE_DROIDDOC_HTML_DIR) \
+ $(addprefix -bootclasspath ,$(PRIVATE_BOOTCLASSPATH)) \
$(addprefix -classpath ,$(PRIVATE_CLASSPATH)) \
-sourcepath $(PRIVATE_SOURCE_PATH)$(addprefix :,$(PRIVATE_CLASSPATH)) \
-d $(PRIVATE_OUT_DIR) \
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 86aa2f3..48a8743 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -16,7 +16,7 @@
# people who haven't re-run those will have to do so before they
# can build. Make sure to also update the corresponding value in
# buildspec.mk.default and envsetup.sh.
-CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 9
+CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10
# ---------------------------------------------------------------
# The product defaults to generic on hardware and sim on sim
@@ -284,7 +284,7 @@
ABP:=$(ABP):$(TARGET_OUT_EXECUTABLES)
else
# this should be copied to HOST_OUT_EXECUTABLES instead
- ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin
+ ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin
endif
ANDROID_BUILD_PATHS := $(ABP)
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
diff --git a/core/java.mk b/core/java.mk
index baa83ee..6c8d3d5 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -63,10 +63,13 @@
# Choose leaf name for the compiled jar file.
ifneq ($(LOCAL_NO_EMMA_COMPILE),true)
full_classes_compiled_jar_leaf := classes-no-debug-var.jar
+built_dex_leaf := classes-no-local.dex
else
full_classes_compiled_jar_leaf := classes-full-debug.jar
+built_dex_leaf := classes-with-local.dex
endif
full_classes_compiled_jar := $(intermediates.COMMON)/$(full_classes_compiled_jar_leaf)
+built_dex_intermediate := $(intermediates.COMMON)/$(built_dex_leaf)
emma_intermediates_dir := $(intermediates.COMMON)/emma_out
# the 'lib/$(full_classes_compiled_jar_leaf)' portion of this path is fixed in
@@ -85,8 +88,10 @@
$(full_classes_full_names_jar) \
$(full_classes_stubs_jar) \
$(full_classes_jarjar_jar) \
- $(built_dex)
+ $(built_dex) \
+ $(built_dex_intermediate)
+LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
# TODO: It looks like the only thing we need from base_rules is
# all_java_sources. See if we can get that by adding a
@@ -104,7 +109,7 @@
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_CLASS_INTERMEDIATES_DIR := $(intermediates.COMMON)/classes
$(LOCAL_INTERMEDIATE_TARGETS): \
- PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates.COMMON)/src
+ PRIVATE_SOURCE_INTERMEDIATES_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)
# Since we're using intermediates.COMMON, make sure that it gets cleaned
# properly.
@@ -154,18 +159,7 @@
# be done after the inclusion of base_rules.mk.
ALL_MODULES.$(LOCAL_MODULE).CHECKED := $(full_classes_compiled_jar)
-ifneq ($(LOCAL_NO_EMMA_COMPILE),true)
-# If you instrument class files that have local variable debug information in
-# them emma does not correctly maintain the local variable table.
-# This will cause an error when you try to convert the class files for Android.
-# The workaround for this to compile the java classes with only
-# line and source debug information, not local information.
-$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g:{lines,source}
-else
-# when emma is off, compile with the default flags, which contain full debug
-# info
$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g
-endif
ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
# Skip adding emma instrumentation to class files if this is a static library,
@@ -176,6 +170,15 @@
ifneq ($(LOCAL_NO_EMMA_INSTRUMENT),true)
$(full_classes_emma_jar): PRIVATE_EMMA_COVERAGE_FILE := $(intermediates.COMMON)/coverage.em
$(full_classes_emma_jar): PRIVATE_EMMA_INTERMEDIATES_DIR := $(emma_intermediates_dir)
+# module level coverage filter can be defined using LOCAL_EMMA_COVERAGE_FILTER
+# in Android.mk
+ifdef LOCAL_EMMA_COVERAGE_FILTER
+$(full_classes_emma_jar): PRIVATE_EMMA_COVERAGE_FILTER := $(LOCAL_EMMA_COVERAGE_FILTER)
+else
+# by default, avoid applying emma instrumentation onto emma classes itself,
+# otherwise there will be exceptions thrown
+$(full_classes_emma_jar): PRIVATE_EMMA_COVERAGE_FILTER := *,-emma,-emmarun,-com.vladium.*
+endif
# this rule will generate both $(PRIVATE_EMMA_COVERAGE_FILE) and
# $(full_classes_emma_jar)
$(full_classes_emma_jar): $(full_classes_compiled_jar) | $(EMMA_JAR)
@@ -252,12 +255,25 @@
ALL_MODULES.$(LOCAL_MODULE).PROGUARD_ENABLED:=$(LOCAL_PROGUARD_ENABLED)
+# If you instrument class files that have local variable debug information in
+# them emma does not correctly maintain the local variable table.
+# This will cause an error when you try to convert the class files for Android.
+# The workaround here is to build different dex file here based on emma switch
+# then later copy into classes.dex. When emma is on, dx is run with --no-locals
+# option to remove local variable information
+
# Override PRIVATE_INTERMEDIATES_DIR so that install-dex-debug
# will work even when intermediates != intermediates.COMMON.
-$(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
-$(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
-$(built_dex): $(full_classes_jar) $(DX)
+$(built_dex_intermediate): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
+$(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
+ifneq ($(LOCAL_NO_EMMA_COMPILE),true)
+$(built_dex_intermediate): PRIVATE_DX_FLAGS += --no-locals
+endif
+$(built_dex_intermediate): $(full_classes_jar) $(DX)
$(transform-classes.jar-to-dex)
+$(built_dex): $(built_dex_intermediate) | $(ACP)
+ @echo Copying: $@
+ $(hide) $(ACP) $< $@
ifneq ($(GENERATE_DEX_DEBUG),)
$(install-dex-debug)
endif
diff --git a/core/main.mk b/core/main.mk
index a045992..2d62b66 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -50,6 +50,10 @@
DEFAULT_GOAL := droid
$(DEFAULT_GOAL):
+# Used to force goals to build. Only use for conditionally defined goals.
+.PHONY: FORCE
+FORCE:
+
# Set up various standard variables based on configuration
# and host information.
include $(BUILD_SYSTEM)/config.mk
@@ -98,18 +102,15 @@
endif
-# The windows build server currently uses 1.6. This will be fixed.
-ifneq ($(HOST_OS),windows)
-
# Check for the correct version of java
-java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
+java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
-$(info The correct version is: 1.5.)
+$(info The correct version is: 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
@@ -118,14 +119,14 @@
endif
# Check for the correct version of javac
-javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
+javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
ifeq ($(strip $(javac_version)),)
$(info ************************************************************)
$(info You are attempting to build with the incorrect version)
$(info of javac.)
$(info $(space))
$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
-$(info The correct version is: 1.5.)
+$(info The correct version is: 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
@@ -133,8 +134,6 @@
$(error stop)
endif
-endif # windows
-
$(shell echo 'VERSIONS_CHECKED := $(VERSION_CHECK_SEQUENCE_NUMBER)' \
> $(OUT_DIR)/versions_checked.mk)
endif
@@ -267,11 +266,6 @@
else # !sdk
endif
-# build the full stagefright library
-ifneq ($(strip BUILD_WITH_FULL_STAGEFRIGHT),)
-BUILD_WITH_FULL_STAGEFRIGHT := true
-endif
-
## precise GC ##
ifneq ($(filter dalvik.gc.type-precise,$(PRODUCT_TAGS)),)
@@ -685,6 +679,10 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_FILES_FILE)
+ifeq ($(EMMA_INSTRUMENT),true)
+ $(call dist-for-goals, droid, $(EMMA_META_ZIP))
+endif
+
ifneq ($(TARGET_BUILD_APPS),)
# If this build is just for apps, only build apps and not the full system by default.
@@ -734,7 +732,7 @@
# Building a full system-- the default is to build droidcore
droid: droidcore
-endif # TARGET_BUILD_APPS
+endif
.PHONY: droid tests
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 25de0ea..70441b7 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -37,7 +37,6 @@
graphics:external/skia/include/core \
libc:bionic/libc/include \
libdrm1:frameworks/base/media/libdrm/mobile1/include \
- libdrm2:frameworks/base/media/libdrm/mobile2/include \
libhardware:hardware/libhardware/include \
libhardware_legacy:hardware/libhardware_legacy/include \
libhost:build/libs/host/include \
diff --git a/core/prelink-linux-arm.map b/core/prelink-linux-arm.map
index 22f5f34..69a605c 100644
--- a/core/prelink-linux-arm.map
+++ b/core/prelink-linux-arm.map
@@ -82,13 +82,15 @@
libskia.so 0xAB100000 # [~7M]
librs_jni.so 0xAB000000 # [~1M]
libRS.so 0xA9E00000 # [~2M]
+libandroid.so 0xA9D80000 # [<64K]
libjnigraphics.so 0xA9D00000 # [<64K]
libskiagl.so 0xA9C00000 # [~1M]
# audio
libFLAC.so 0xA9B00000 # [???]
libaudiopolicy.so 0xA9A00000 # [~1M]
-libaudiopolicygeneric.so 0xA9900000 # [???]
+libeffects.so 0xA9980000 # [<64K]
+libaudioeffect_jni.so 0xA9900000 # [<64K]
libsoundpool.so 0xA9800000 # [~1M]
libaudio.so 0xA9700000 # [~1M]
libspeech.so 0xA9600000 # [~1M]
diff --git a/core/product.mk b/core/product.mk
index 38d1148..7594f6f 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -70,7 +70,6 @@
PRODUCT_PROPERTY_OVERRIDES \
PRODUCT_COPY_FILES \
PRODUCT_OTA_PUBLIC_KEYS \
- PRODUCT_POLICY \
PRODUCT_PACKAGE_OVERLAYS \
DEVICE_PACKAGE_OVERLAYS \
PRODUCT_CONTRIBUTORS_FILE \
diff --git a/core/product_config.mk b/core/product_config.mk
index 04f6ce1..50bc7bc 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -252,9 +252,6 @@
PRODUCT_DEFAULT_WIFI_CHANNELS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_WIFI_CHANNELS))
-# Which policy should this product use
-PRODUCT_POLICY := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_POLICY))
-
# A list of words like <source path>:<destination path>. The file at
# the source path should be copied to the destination path when building
# this product. <destination path> is relative to $(PRODUCT_OUT), so
diff --git a/core/tasks/ide.mk b/core/tasks/ide.mk
new file mode 100644
index 0000000..e557e60
--- /dev/null
+++ b/core/tasks/ide.mk
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+define filter-ide-goals
+$(strip $(filter $(1)-%,$(MAKECMDGOALS)))
+endef
+
+define filter-ide-modules
+$(strip $(subst -,$(space),$(patsubst $(1)-%,%,$(2))))
+endef
+
+# eclipse
+eclipse_project_goals := $(call filter-ide-goals,ECLIPSE)
+ifdef eclipse_project_goals
+ ifneq ($(words $(eclipse_project_goals)),1)
+ $(error Only one ECLIPSE- goal may be specified: $(eclipse_project_goals))
+ endif
+ eclipse_project_modules := $(call filter-ide-modules,ECLIPSE,$(eclipse_project_goals))
+
+ ifneq ($(filter lunch,$(eclipse_project_modules)),)
+ eclipse_project_modules := $(filter-out lunch,$(eclipse_project_modules))
+ installed_modules := $(foreach m,$(ALL_DEFAULT_INSTALLED_MODULES),\
+ $(INSTALLABLE_FILES.$(m).MODULE))
+ java_modules := $(foreach m,$(installed_modules),\
+ $(if $(filter JAVA_LIBRARIES APPS,$(ALL_MODULES.$(m).CLASS)),$(m),))
+ eclipse_project_modules := $(sort $(eclipse_project_modules) $(java_modules))
+ endif
+
+ source_paths := $(foreach m,$(eclipse_project_modules),$(ALL_MODULES.$(m).PATH)) \
+ $(foreach m,$(eclipse_project_modules),$(ALL_MODULES.$(m).INTERMEDIATE_SOURCE_DIR)) \
+ $(INTERNAL_SDK_SOURCE_DIRS)
+ source_paths := $(sort $(source_paths))
+
+.classpath: PRIVATE_MODULES := $(eclipse_project_modules)
+.classpath: PRIVATE_DIRS := $(source_paths)
+
+# the mess below with ./src tries to guess whether the src
+$(eclipse_project_goals): .classpath
+.classpath: FORCE
+ $(hide) echo Generating .classpath for eclipse
+ $(hide) echo '<classpath>' > $@
+ $(hide) for p in $(PRIVATE_DIRS) ; do \
+ echo -n ' <classpathentry kind="src" path="' >> $@ ; \
+ ( if [ -d $$p/src ] ; then echo -n $$p/src ; else echo -n $$p ; fi ) >> $@ ; \
+ echo '"/>' >> $@ ; \
+ done
+ $(hide) echo '</classpath>' >> $@
+endif
+
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index ec5dcd4..c17798e 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 2.2
+ PLATFORM_VERSION := Gingerbread
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -59,7 +59,7 @@
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# This is the current development code-name, if the build is not a final
# release build. If this is a final release build, it is simply "REL".
- PLATFORM_VERSION_CODENAME := REL
+ PLATFORM_VERSION_CODENAME := Gingerbread
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
diff --git a/envsetup.sh b/envsetup.sh
index 21a66c1..d794281 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -99,16 +99,28 @@
if [ -n $ANDROID_BUILD_PATHS ] ; then
export PATH=${PATH/$ANDROID_BUILD_PATHS/}
fi
+ if [ -n $ANDROID_PRE_BUILD_PATHS ] ; then
+ export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS/}
+ fi
# and in with the new
CODE_REVIEWS=
prebuiltdir=$(getprebuilt)
- export ANDROID_EABI_TOOLCHAIN=$prebuiltdir/toolchain/arm-eabi-4.4.0/bin
+ export ANDROID_EABI_TOOLCHAIN=$prebuiltdir/toolchain/arm-eabi-4.4.3/bin
export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN
export ANDROID_QTOOLS=$T/development/emulator/qtools
export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_EABI_TOOLCHAIN$CODE_REVIEWS
export PATH=$PATH$ANDROID_BUILD_PATHS
+ unset ANDROID_JAVA_TOOLCHAIN
+ if [ -n "$JAVA_HOME" ]; then
+ export ANDROID_JAVA_TOOLCHAIN=$JAVA_HOME/bin
+ fi
+ export ANDROID_PRE_BUILD_PATHS=$ANDROID_JAVA_TOOLCHAIN
+ if [ -n "$ANDROID_PRE_BUILD_PATHS" ]; then
+ export PATH=$ANDROID_PRE_BUILD_PATHS:$PATH
+ fi
+
unset ANDROID_PRODUCT_OUT
export ANDROID_PRODUCT_OUT=$(get_abs_build_var PRODUCT_OUT)
export OUT=$ANDROID_PRODUCT_OUT
@@ -134,6 +146,7 @@
function set_stuff_for_environment()
{
settitle
+ set_java_home
setpaths
set_sequence_number
@@ -145,7 +158,7 @@
function set_sequence_number()
{
- export BUILD_ENV_SEQUENCE_NUMBER=9
+ export BUILD_ENV_SEQUENCE_NUMBER=10
}
function settitle()
@@ -1056,19 +1069,19 @@
cd $T/$pathname
}
-# Force JAVA_HOME to point to java 1.5 if it isn't already set
-if [ "$STAY_OFF_MY_LAWN" = "" ]; then
+# Force JAVA_HOME to point to java 1.6 if it isn't already set
+function set_java_home() {
if [ ! "$JAVA_HOME" ]; then
case `uname -s` in
Darwin)
- export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
+ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
;;
*)
- export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
+ export JAVA_HOME=/usr/lib/jvm/java-6-sun
;;
esac
fi
-fi
+}
# determine whether arrays are zero-based (bash) or one-based (zsh)
_xarray=(a b c)
diff --git a/target/board/emulator/BoardConfig.mk b/target/board/emulator/BoardConfig.mk
index 784118a..9ab607a 100644
--- a/target/board/emulator/BoardConfig.mk
+++ b/target/board/emulator/BoardConfig.mk
@@ -7,3 +7,6 @@
TARGET_NO_BOOTLOADER := true
TARGET_NO_KERNEL := true
HAVE_HTC_AUDIO_DRIVER := true
+
+# no hardware camera
+USE_CAMERA_STUB := true
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 2b72d01..9e52d25 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -9,3 +9,6 @@
TARGET_CPU_ABI := armeabi
HAVE_HTC_AUDIO_DRIVER := true
BOARD_USES_GENERIC_AUDIO := true
+
+# no hardware camera
+USE_CAMERA_STUB := true
diff --git a/target/board/sim/BoardConfig.mk b/target/board/sim/BoardConfig.mk
index 491b30f..ba25c18 100644
--- a/target/board/sim/BoardConfig.mk
+++ b/target/board/sim/BoardConfig.mk
@@ -20,6 +20,12 @@
# The simulator does not support native code at all
TARGET_CPU_ABI := none
+# But it is very likely SMP.
+TARGET_CPU_SMP := true
+
#the simulator partially emulates the original HTC /dev/eac audio interface
HAVE_HTC_AUDIO_DRIVER := true
BOARD_USES_GENERIC_AUDIO := true
+
+# no hardware camera
+USE_CAMERA_STUB := true
diff --git a/target/product/core.mk b/target/product/core.mk
index a35df85..f87ee46 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -18,8 +18,6 @@
PRODUCT_DEVICE := generic
PRODUCT_NAME := core
-PRODUCT_POLICY := android.policy_phone
-
PRODUCT_PROPERTY_OVERRIDES := \
ro.config.notification_sound=OnTheHunt.ogg \
ro.config.alarm_alert=Alarm_Classic.ogg
@@ -47,7 +45,4 @@
Bugreport
PRODUCT_PROPERTY_OVERRIDES += \
- media.stagefright.enable-player=true \
- media.stagefright.enable-meta=true \
- media.stagefright.enable-scan=true \
- media.stagefright.enable-http=true
+ media.stagefright.enable-record=true
diff --git a/target/product/generic.mk b/target/product/generic.mk
index f05c441..1f26a75 100644
--- a/target/product/generic.mk
+++ b/target/product/generic.mk
@@ -39,6 +39,7 @@
QuickSearchBox \
Settings \
Sync \
+ SystemUI \
Updater \
CalendarProvider \
SyncProvider
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index be41486..b6700b6 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -18,10 +18,10 @@
PRODUCT_PACKAGES := \
AccountAndSyncSettings \
- AlarmClock \
Camera \
Calculator \
CarHome \
+ DeskClock \
Development \
DrmProvider \
Email \
diff --git a/tools/adbs b/tools/adbs
index 815ae10..8277790 100755
--- a/tools/adbs
+++ b/tools/adbs
@@ -144,13 +144,13 @@
uname = "darwin-ppc"
elif uname == "Linux":
uname = "linux-x86"
- prefix = "./prebuilt/" + uname + "/toolchain/arm-eabi-4.4.0/bin/"
+ prefix = "./prebuilt/" + uname + "/toolchain/arm-eabi-4.4.3/bin/"
addr2line_cmd = prefix + "arm-eabi-addr2line"
if (not os.path.exists(addr2line_cmd)):
try:
prefix = os.environ['ANDROID_BUILD_TOP'] + "/prebuilt/" + uname + \
- "/toolchain/arm-eabi-4.4.0/bin/"
+ "/toolchain/arm-eabi-4.4.3/bin/"
except:
prefix = "";