am 20d93db1: am cdb621bf: retry patch using cache if in-place write fails
Merge commit '20d93db18de9001dcb5af46e4d1d2bac10aa2eca'
* commit '20d93db18de9001dcb5af46e4d1d2bac10aa2eca':
retry patch using cache if in-place write fails
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/cleanspec.mk b/cleanspec.mk
index 4b88868..0951f8f 100644
--- a/cleanspec.mk
+++ b/cleanspec.mk
@@ -79,6 +79,8 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/bugreport)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/obj/target/common/obj/APPS/VoiceSearch_intermediates)
@@ -97,16 +99,50 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/openssl_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libv8_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libjs_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libv8_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/os/IDropBoxService.java)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/GoogleSubscribedFeedsProvider.apk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmediaplayerservice_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/GoogleServicesFramework_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/VoiceSearchWithKeyboard.apk)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/vendor/google_voiceime)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/QuickSearchBox.apk)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/core/Makefile b/core/Makefile
index 2f316ca..dfba6ce 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -208,8 +208,11 @@
@mkdir -p $(dir $@)
@rm -f $@
$(hide) $(foreach p,$(PACKAGES),\
- echo 'name="$(p).apk" certificate="$(PACKAGES.$(p).CERTIFICATE)" \
- private_key="$(PACKAGES.$(p).PRIVATE_KEY)"' >> $@;)
+ $(if $(PACKAGES.$(p).EXTERNAL_KEY),\
+ echo 'name="$(p).apk" certificate="EXTERNAL" \
+ private_key=""' >> $@;,\
+ echo 'name="$(p).apk" certificate="$(PACKAGES.$(p).CERTIFICATE)" \
+ private_key="$(PACKAGES.$(p).PRIVATE_KEY)"' >> $@;))
.PHONY: apkcerts-list
apkcerts-list: $(APKCERTS_FILE)
@@ -472,6 +475,29 @@
# -----------------------------------------------------------------
+
+.PHONY: event-log-tags
+
+event_log_tags_file := $(TARGET_OUT)/etc/event-log-tags
+ALL_PREBUILT += $(event_log_tag_file)
+
+# Include tags from all packages included in this product.
+event_log_tags_src := \
+ $(sort $(foreach m,\
+ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) \
+ $(call module-names-for-tag-list,user), \
+ $(ALL_MODULES.$(m).EVENT_LOG_TAGS)))
+
+$(event_log_tags_file): PRIVATE_SRC_FILES := $(event_log_tags_src)
+$(event_log_tags_file): $(event_log_tags_src)
+ $(hide) mkdir -p $(dir $@)
+ $(hide) build/tools/merge-event-log-tags.py -o $@ $(PRIVATE_SRC_FILES)
+
+event-log-tags: $(event_log_tags_file)
+
+ALL_DEFAULT_INSTALLED_MODULES += $(event_log_tags_file)
+
+# -----------------------------------------------------------------
# Build a keystore with the authorized keys in it, used to verify the
# authenticity of downloaded OTA packages.
#
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 64b74e7..f9a1fac 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -62,6 +62,13 @@
#$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST))))
endif
+# Only the tags mentioned in this test are expected to be set by module
+# makefiles. Anything else is either a typo or a source of unexpected
+# behaviors.
+ifneq ($(filter-out user debug eng tests optional samples,$(LOCAL_MODULE_TAGS)),)
+$(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH))
+endif
+
# Add implicit tags.
#
# If the local directory or one of its parents contains a MODULE_LICENSE_GPL
@@ -94,9 +101,13 @@
$(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)")
endif
-# Add a tag like "_class@APPS" to this module so that we can filter
-# based on the class.
-LOCAL_MODULE_TAGS += _class@$(LOCAL_MODULE_CLASS)
+# Those used to be implicitly ignored, but aren't any more.
+# As of 20100110 there are no apps with the user tag.
+ifeq ($(LOCAL_MODULE_CLASS),APPS)
+ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
+ $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead)
+ endif
+endif
LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH))
ifeq ($(LOCAL_MODULE_PATH),)
@@ -186,11 +197,38 @@
endif
###########################################################
+## logtags: Add .logtags files to global list, emit java source
+###########################################################
+
+logtags_sources := $(filter %.logtags,$(LOCAL_SRC_FILES))
+
+ifneq ($(strip $(logtags_sources)),)
+
+event_log_tags := $(addprefix $(LOCAL_PATH)/,$(logtags_sources))
+
+# Emit a java source file with constants for the tags, if
+# LOCAL_MODULE_CLASS is "APPS" or "JAVA_LIBRARIES".
+ifneq ($(strip $(filter $(LOCAL_MODULE_CLASS),APPS JAVA_LIBRARIES)),)
+
+logtags_java_sources := $(patsubst %.logtags,%.java,$(addprefix $(intermediates.COMMON)/src/, $(logtags_sources)))
+logtags_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(logtags_sources))
+
+$(logtags_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.logtags
+ $(transform-logtags-to-java)
+
+endif
+
+else
+logtags_java_sources :=
+event_log_tags :=
+endif
+
+###########################################################
## Java: Compile .java files to .class
###########################################################
#TODO: pull this into java.make once host and target are combined
-java_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(filter %.java,$(LOCAL_SRC_FILES))) $(aidl_java_sources)
+java_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(filter %.java,$(LOCAL_SRC_FILES))) $(aidl_java_sources) $(logtags_java_sources)
all_java_sources := $(java_sources) $(addprefix $($(my_prefix)OUT_COMMON_INTERMEDIATES)/, $(filter %.java,$(LOCAL_INTERMEDIATE_SOURCES)))
## Java resources #########################################
@@ -402,7 +440,9 @@
# checked modules, use LOCAL_BUILT_MODULE. This was old
# behavior, so it should be a safe default.
ifndef LOCAL_CHECKED_MODULE
- LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)
+ ifndef LOCAL_SDK_VERSION
+ LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)
+ endif
endif
# If they request that this module not be checked, then don't.
@@ -432,6 +472,8 @@
$(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LOCAL_INSTALLED_MODULE)
ALL_MODULES.$(LOCAL_MODULE).REQUIRED := \
$(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)
###########################################################
## Take care of LOCAL_MODULE_TAGS
diff --git a/core/binary.mk b/core/binary.mk
index 4413d47..d5528b1 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -9,6 +9,15 @@
include $(BUILD_SYSTEM)/base_rules.mk
#######################################
+####################################################
+## Add FDO flags if FDO is turned on and supported
+####################################################
+ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),)
+ LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
+ LOCAL_CPPFLAGS += $(TARGET_FDO_CFLAGS)
+ LOCAL_LDFLAGS += $(TARGET_FDO_CFLAGS)
+endif
+
###########################################################
## Define PRIVATE_ variables used by multiple module types
###########################################################
diff --git a/core/build_id.mk b/core/build_id.mk
index 4661aea..40bb35d 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -23,7 +23,7 @@
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
-BUILD_ID := ECLAIR
+BUILD_ID := MASTER
# DISPLAY_BUILD_NUMBER should only be set for development branches,
# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index a7eba3f..99d7eb0 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -33,6 +33,7 @@
LOCAL_CXX:=
LOCAL_CPP_EXTENSION:=
LOCAL_NO_DEFAULT_COMPILER_FLAGS:=
+LOCAL_NO_FDO_SUPPORT :=
LOCAL_ARM_MODE:=
LOCAL_YACCFLAGS:=
LOCAL_ASFLAGS:=
diff --git a/core/combo/darwin-x86.mk b/core/combo/darwin-x86.mk
index 2150960..8fc48a1 100644
--- a/core/combo/darwin-x86.mk
+++ b/core/combo/darwin-x86.mk
@@ -14,6 +14,7 @@
$(combo_target)GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
$(combo_target)RUN_RANLIB_AFTER_COPYING := true
+$(combo_target)GLOBAL_ARFLAGS := cqs
ifeq ($(combo_target),TARGET_)
$(combo_target)CUSTOM_LD_COMMAND := true
@@ -29,6 +30,7 @@
-o $@ \
$(PRIVATE_LDFLAGS) \
$(if $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES),-all_load) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC)
endef
@@ -42,6 +44,7 @@
$(PRIVATE_LDLIBS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC)
endef
@@ -55,6 +58,7 @@
$(PRIVATE_LDLIBS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC)
endef
@@ -82,9 +86,10 @@
$(HOST_GLOBAL_LD_DIRS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(PRIVATE_ALL_OBJECTS) \
- $(PRIVATE_LDLIBS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(PRIVATE_LDFLAGS) \
+ $(PRIVATE_LDLIBS) \
$(HOST_LIBGCC)
endef
@@ -94,4 +99,3 @@
endef
endif
-
diff --git a/core/combo/linux-arm.mk b/core/combo/linux-arm.mk
index 6011351..8bf5f88 100644
--- a/core/combo/linux-arm.mk
+++ b/core/combo/linux-arm.mk
@@ -112,7 +112,7 @@
$(combo_target)GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden
$(combo_target)RELEASE_CFLAGS := \
- -DSK_RELEASE -DNDEBUG \
+ -DNDEBUG \
-g \
-Wstrict-aliasing=2 \
-finline-functions \
@@ -135,6 +135,37 @@
$(combo_target)LIBGCC := $(shell $($(combo_target)CC) $($(combo_target)GLOBAL_CFLAGS) -print-libgcc-file-name)
endif
+# Define FDO (Feedback Directed Optimization) options.
+
+TARGET_FDO_CFLAGS:=
+TARGET_FDO_LIB:=
+
+target_libgcov := $(shell $($(combo_target)CC) $($(combo_target)GLOBAL_CFLAGS) \
+ --print-file-name=libgcov.a)
+ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
+ # Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
+ # The profile will be generated on /data/local/tmp/profile on the device.
+ TARGET_FDO_CFLAGS := -fprofile-generate=/data/local/tmp/profile -DANDROID_FDO
+ TARGET_FDO_LIB := $(target_libgcov)
+else
+ # If BUILD_FDO_INSTRUMENT is turned off, then consider doing the FDO optimizations.
+ # Set TARGET_FDO_PROFILE_PATH to set a custom profile directory for your build.
+ ifeq ($(strip $(TARGET_FDO_PROFILE_PATH)),)
+ TARGET_FDO_PROFILE_PATH := fdo/profiles/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT)
+ else
+ ifeq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),)
+ $(warning Custom TARGET_FDO_PROFILE_PATH supplied, but directory does not exist. Turn off FDO.)
+ endif
+ endif
+
+ # If the FDO profile directory can't be found, then FDO is off.
+ ifneq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),)
+ TARGET_FDO_CFLAGS := -fprofile-use=$(TARGET_FDO_PROFILE_PATH) -DANDROID_FDO
+ TARGET_FDO_LIB := $(target_libgcov)
+ endif
+endif
+
+
# unless CUSTOM_KERNEL_HEADERS is defined, we're going to use
# symlinks located in out/ to point to the appropriate kernel
# headers. see 'config/kernel_headers.make' for more details
@@ -166,6 +197,12 @@
$(combo_target)DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libstdc++ libm
$(combo_target)CUSTOM_LD_COMMAND := true
+
+# Enable the Dalvik JIT compiler if not already specified.
+ifeq ($(strip $(WITH_JIT)),)
+ WITH_JIT := true
+endif
+
define transform-o-to-shared-lib-inner
$(TARGET_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) -Wl,-T,$(BUILD_SYSTEM)/armelf.xsc \
@@ -181,6 +218,7 @@
-o $@ \
$(PRIVATE_LDFLAGS) \
$(TARGET_GLOBAL_LDFLAGS) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC)
endef
@@ -198,6 +236,7 @@
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(PRIVATE_LDFLAGS) \
$(TARGET_GLOBAL_LDFLAGS) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC) \
$(TARGET_CRTEND_O)
endef
@@ -212,6 +251,7 @@
$(TARGET_GLOBAL_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(TARGET_FDO_LIB) \
$(TARGET_LIBGCC) \
$(TARGET_CRTEND_O)
endef
diff --git a/core/combo/select.mk b/core/combo/select.mk
index 793b0a9..ccdf1fb 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -40,7 +40,7 @@
$(combo_target)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar
$(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
$(combo_target)GLOBAL_LDFLAGS :=
-$(combo_target)GLOBAL_ARFLAGS := crs
+$(combo_target)GLOBAL_ARFLAGS := crsP
$(combo_target)EXECUTABLE_SUFFIX :=
$(combo_target)SHLIB_SUFFIX := .so
diff --git a/core/config.mk b/core/config.mk
index e574124..f35b44e 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -8,6 +8,10 @@
# directly.
SHELL := /bin/bash
+# Tell python not to spam the source tree with .pyc files. This
+# only has an effect on python 2.6 and above.
+export PYTHONDONTWRITEBYTECODE := 1
+
# Standard source directories.
SRC_DOCS:= $(TOPDIR)docs
# TODO: Enforce some kind of layering; only add include paths
@@ -201,6 +205,7 @@
E2FSCK := e2fsck
JARJAR := java -jar $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar
PROGUARD := external/proguard/bin/proguard.sh
+JAVATAGS := build/tools/java-event-log-tags.py
# dx is java behind a shell script; no .exe necessary.
DX := $(HOST_OUT_EXECUTABLES)/dx
@@ -295,7 +300,6 @@
PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
-
# ###############################################################
# Collect a list of the SDK versions that we could compile against
# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE)
diff --git a/core/definitions.mk b/core/definitions.mk
index 3221525..46bc3d1 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -223,12 +223,25 @@
endef
###########################################################
+## Find all of the html files under the named directories.
+## Meant to be used like:
+## SRC_FILES := $(call all-html-files-under,src tests)
+###########################################################
+
+define all-html-files-under
+$(patsubst ./%,%, \
+ $(shell cd $(LOCAL_PATH) ; \
+ find $(1) -name "*.html" -and -not -name ".*") \
+ )
+endef
+
+###########################################################
## Find all of the html files from here. Meant to be used like:
## SRC_FILES := $(call all-subdir-html-files)
###########################################################
define all-subdir-html-files
-$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) ; find . -name "*.html"))
+$(call all-html-files-under,.)
endef
###########################################################
@@ -559,6 +572,7 @@
# $(1): list of tags to accept
# $(2): list of tags to reject
#TODO(dbort): do $(if $(strip $(1)),$(1),$(ALL_MODULE_TAGS))
+#TODO(jbq): as of 20100106 nobody uses the second parameter
define get-tagged-modules
$(filter-out \
$(call modules-for-tag-list,$(2)), \
@@ -717,6 +731,16 @@
#$(AIDL) $(PRIVATE_AIDL_FLAGS) $< - | indent -nut -br -npcs -l1000 > $@
+###########################################################
+## Commands for running java-event-log-tags.py
+###########################################################
+
+define transform-logtags-to-java
+@mkdir -p $(dir $@)
+@echo "logtags: $@ <= $<"
+$(hide) $(JAVATAGS) -o $@ $<
+endef
+
###########################################################
## Commands for running gcc to compile a C++ file
@@ -909,7 +933,7 @@
## Commands for running ar
###########################################################
-define extract-and-include-whole-static-libs
+define extract-and-include-target-whole-static-libs
$(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
@@ -929,22 +953,39 @@
define transform-o-to-static-lib
@mkdir -p $(dir $@)
@rm -f $@
-$(extract-and-include-whole-static-libs)
+$(extract-and-include-target-whole-static-libs)
@echo "target StaticLib: $(PRIVATE_MODULE) ($@)"
-$(hide) $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $^
+$(hide) echo $^ | xargs $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@
endef
###########################################################
## Commands for running host ar
###########################################################
+define extract-and-include-host-whole-static-libs
+$(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
+ @echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
+ ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
+ rm -rf $$ldir; \
+ mkdir -p $$ldir; \
+ filelist=; \
+ for f in `$(HOST_AR) t $(lib) | grep '\.o$$'`; do \
+ $(HOST_AR) p $(lib) $$f > $$ldir/$$f; \
+ filelist="$$filelist $$ldir/$$f"; \
+ done ; \
+ $(HOST_AR) $(HOST_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist;\
+)
+endef
+
# Explicitly delete the archive first so that ar doesn't
# try to add to an existing archive.
define transform-host-o-to-static-lib
@mkdir -p $(dir $@)
-@echo "host StaticLib: $(PRIVATE_MODULE) ($@)"
@rm -f $@
-$(HOST_AR) $(HOST_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $^
+$(extract-and-include-host-whole-static-libs)
+@echo "host StaticLib: $(PRIVATE_MODULE) ($@)"
+echo $(filter %.o, $^) | \
+ xargs $(HOST_AR) $(HOST_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@
endef
diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk
index f07cf2a..0818d87 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -91,6 +91,13 @@
# around, so we have to use this version.
prelink_output := $(LOCAL_UNSTRIPPED_PATH)/$(LOCAL_MODULE_SUBDIR)$(LOCAL_BUILT_MODULE_STEM)
+# Skip prelinker if it is FDO instrumentation build.
+ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
+ifneq ($(LOCAL_NO_FDO_SUPPORT),true)
+LOCAL_PRELINK_MODULE := false
+endif
+endif
+
ifeq ($(LOCAL_PRELINK_MODULE),true)
$(prelink_output): $(prelink_input) $(TARGET_PRELINKER_MAP) $(APRIORI)
$(transform-to-prelinked)
diff --git a/core/host_static_library.mk b/core/host_static_library.mk
index 237981f..39c99ee 100644
--- a/core/host_static_library.mk
+++ b/core/host_static_library.mk
@@ -1,5 +1,5 @@
###########################################################
-## Standard rules for building a static library.
+## Standard rules for building a static library for the host.
##
## Additional inputs from base_rules.make:
## None.
@@ -7,8 +7,6 @@
## LOCAL_MODULE_SUFFIX will be set for you.
###########################################################
-LOCAL_IS_HOST_MODULE := true
-
ifeq ($(strip $(LOCAL_MODULE_CLASS)),)
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
endif
@@ -17,7 +15,10 @@
endif
LOCAL_UNINSTALLABLE_MODULE := true
+LOCAL_IS_HOST_MODULE := true
+
include $(BUILD_SYSTEM)/binary.mk
+$(LOCAL_BUILT_MODULE): $(built_whole_libraries)
$(LOCAL_BUILT_MODULE): $(all_objects)
$(transform-host-o-to-static-lib)
diff --git a/core/main.mk b/core/main.mk
index 386c0c9..f0ef602 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -254,6 +254,11 @@
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)),)
@@ -292,7 +297,6 @@
# the cause of ANRs in the content process
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt
-
# ------------------------------------------------------------
# Define a function that, given a list of module tags, returns
# non-empty if that module should be installed in /system.
@@ -400,7 +404,6 @@
development/apps \
development/tools/mkstubs \
frameworks/base/tools/layoutlib \
- external/googleclient \
packages
else
$(warning sdk-only: javac not available.)
@@ -452,7 +455,7 @@
# modules as a side-effect. Do this after including ONE_SHOT_MAKEFILE
# so that the modules will be installed in the same place they
# would have been with a normal make.
-CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),))
+CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
FULL_BUILD :=
# Stub out the notice targets, which probably aren't defined
# when using ONE_SHOT_MAKEFILE.
@@ -526,9 +529,6 @@
# Of the modules defined by the component makefiles,
# determine what we actually want to build.
-# If a module has the "restricted" tag on it, it
-# poisons the rest of the tags and shouldn't appear
-# on any list.
Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \
$(CUSTOM_MODULES))
# TODO: Remove the 3 places in the tree that use
@@ -554,12 +554,12 @@
endif
# Use tags to get the non-APPS user modules. Use the product
# definition files to get the APPS user modules.
-user_MODULES := $(sort $(call get-tagged-modules,user,_class@APPS restricted))
+user_MODULES := $(sort $(call get-tagged-modules,user))
user_MODULES := $(user_MODULES) $(user_PACKAGES)
-eng_MODULES := $(sort $(call get-tagged-modules,eng,restricted))
-debug_MODULES := $(sort $(call get-tagged-modules,debug,restricted))
-tests_MODULES := $(sort $(call get-tagged-modules,tests,restricted))
+eng_MODULES := $(sort $(call get-tagged-modules,eng))
+debug_MODULES := $(sort $(call get-tagged-modules,debug))
+tests_MODULES := $(sort $(call get-tagged-modules,tests))
ifeq ($(strip $(tags_to_install)),)
$(error ASSERTION FAILED: tags_to_install should not be empty)
@@ -744,4 +744,3 @@
.PHONY: showcommands
showcommands:
@echo >/dev/null
-
diff --git a/core/node_fns.mk b/core/node_fns.mk
index 5d2a669..31b8543 100644
--- a/core/node_fns.mk
+++ b/core/node_fns.mk
@@ -187,7 +187,10 @@
$(eval _include_stack := $(2) $$(_include_stack))
$(call clear-var-list, $(3))
$(eval LOCAL_PATH := $(patsubst %/,%,$(dir $(2))))
+ $(eval MAKEFILE_LIST :=)
$(eval include $(2))
+ $(eval _included := $(filter-out $(2),$(MAKEFILE_LIST)))
+ $(eval MAKEFILE_LIST :=)
$(eval LOCAL_PATH :=)
$(call copy-var-list, $(1).$(2), $(3))
$(call clear-var-list, $(3))
@@ -203,6 +206,13 @@
endef
#
+# This will generate a warning for _included above
+# $(if $(_included), \
+# $(eval $(warning product spec file: $(2)))\
+# $(foreach _inc,$(_included),$(eval $(warning $(space)$(space)$(space)includes: $(_inc)))),)
+#
+
+#
# $(1): context prefix
# $(2): list of makefiles representing nodes to import
# $(3): list of node variable names
diff --git a/core/package.mk b/core/package.mk
index d92a8b8..2ee3996 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -69,8 +69,10 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
endif
LOCAL_RESOURCE_DIR := \
- $(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(PRODUCT_PACKAGE_OVERLAYS))) \
- $(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(DEVICE_PACKAGE_OVERLAYS))) \
+ $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
+ $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
+ $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
+ $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
$(LOCAL_RESOURCE_DIR)
# this is an app, so add the system libraries to the search path
@@ -244,6 +246,15 @@
ifeq ($(LOCAL_CERTIFICATE),)
LOCAL_CERTIFICATE := testkey
endif
+
+ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
+ # The special value "EXTERNAL" means that we will sign it with the
+ # default testkey, apply predexopt, but then expect the final .apk
+ # (after dexopting) to be signed by an outside tool.
+ LOCAL_CERTIFICATE := testkey
+ PACKAGES.$(LOCAL_PACKAGE_NAME).EXTERNAL_KEY := 1
+endif
+
# If this is not an absolute certificate, assign it to a generic one.
ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
LOCAL_CERTIFICATE := $(SRC_TARGET_DIR)/product/security/$(LOCAL_CERTIFICATE)
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 1ae663d..bc2fcb4 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -72,6 +72,11 @@
# A list of all source roots under frameworks/base, which will be
# built into the android.jar.
#
+# Note - "common" is included here, even though it is also built
+# into a static library (android-common) for unbundled use. This
+# is so common and the other framework libraries can have mutual
+# interdependencies.
+#
FRAMEWORKS_BASE_SUBDIRS := \
$(addsuffix /java, \
core \
@@ -84,6 +89,7 @@
wifi \
vpn \
keystore \
+ common \
)
#
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index b2bb07c..b03f2af 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -42,19 +42,40 @@
endif
endif
-ifeq ($(LOCAL_CERTIFICATE),)
- # can't re-sign this package, so predexopt is not available.
-else
-
-# If this is not an absolute certificate, assign it to a generic one.
-ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
- LOCAL_CERTIFICATE := $(SRC_TARGET_DIR)/product/security/$(LOCAL_CERTIFICATE)
+ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
+ # The magic string "EXTERNAL" means this package will be signed with
+ # the test key throughout the build process, but we expect the final
+ # package to be signed with a different key.
+ #
+ # This can be used for packages where we don't have access to the
+ # keys, but want the package to be predexopt'ed.
+ LOCAL_CERTIFICATE := testkey
+ PACKAGES.$(LOCAL_MODULE).EXTERNAL_KEY := 1
endif
+ifeq ($(LOCAL_CERTIFICATE),)
+ ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
+ # It is now a build error to add a prebuilt .apk without
+ # specifying a key for it.
+ $(error No LOCAL_CERTIFICATE specified for prebuilt "$(LOCAL_SRC_FILES)")
+ endif
+else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
+ # The magic string "PRESIGNED" means this package is already checked
+ # signed with its release key.
+ #
+ # By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be
+ # mentioned in apkcerts.txt (with certificate set to "PRESIGNED")
+ # but the dexpreopt process will not try to re-sign the app.
+ PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED
+ PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
+else
+ # If this is not an absolute certificate, assign it to a generic one.
+ ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
+ LOCAL_CERTIFICATE := $(SRC_TARGET_DIR)/product/security/$(LOCAL_CERTIFICATE)
+ endif
-PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
-PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
-PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
-
+ PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
+ PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
+ PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
endif
ifneq ($(prebuilt_module_is_a_library),)
diff --git a/core/prelink-linux-arm.map b/core/prelink-linux-arm.map
index 64149bc..1aecf71 100644
--- a/core/prelink-linux-arm.map
+++ b/core/prelink-linux-arm.map
@@ -61,6 +61,7 @@
libOpenVG_CM.so 0xAC900000
libOpenVGU_CM.so 0xAC800000
libEGL.so 0xAC700000
+libETC1.so 0xAC680000
libacc.so 0xAC600000
@@ -163,4 +164,4 @@
libtrace_test.so 0x9A300000
libsrec_jni.so 0x9A200000
libcerttool_jni.so 0x9A100000
-
+libjpeg.so 0x9A000000
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 9cc49c4..244371e 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.1-update1
+ PLATFORM_VERSION := Froyo
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 := Froyo
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
diff --git a/envsetup.sh b/envsetup.sh
index 4eede33..bb346de 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -985,9 +985,10 @@
echo "Usage: godir <regex>"
return
fi
+ T=$(gettop)
if [[ ! -f $T/filelist ]]; then
echo -n "Creating index..."
- (cd $T; find . -wholename ./out -prune -o -type f > filelist)
+ (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist)
echo " Done"
echo ""
fi
diff --git a/history/cupcake.txt b/history/cupcake.txt
deleted file mode 100644
index 7947f93..0000000
--- a/history/cupcake.txt
+++ /dev/null
@@ -1,1103 +0,0 @@
-Cupcake auto-import at change 127436, Jan 22 2009.
-
-(cd bionic && git checkout c2f23bb1cdea20fc5e8e5b8101d9d0bd6d14b74b)
-(cd bootable/bootloader/legacy && git checkout d08c9e9444e2fb688ca4d3c4d807ba69c680fb3c)
-(cd bootable/diskinstaller && git checkout a2bb8bf00fbd01859e2475fc36fc6fa070e6eaa9)
-(cd bootable/recovery && git checkout 6d12e0d6f8fe05ebd6b0210fed00e0ff874a3d70)
-(cd build && git checkout b33e7b0cb085a1937c1a2e5b81eb78d6059bf6bc)
-(cd dalvik && git checkout cd18d5743d1957b1c1f57c0abe7ea28187c63a9f)
-(cd development && git checkout 2f3ec0146063b7bed40ff4f41c73407cebdc71fc)
-(cd external/aes && git checkout 17e798f9d2c0a804b5dcac6ee4b2bc1eee66e3b2)
-(cd external/apache-http && git checkout 4e30c8f9f80e5bd40fd8f018760b01a80b16b8c3)
-(cd external/bison && git checkout b7f2b4d529ee03ee0e4172cc06e7cd973bd9bef5)
-(cd external/bluez && git checkout dbbd69e74e390449430a6c357a098fd345fde2ed)
-(cd external/bsdiff && git checkout 03874566c6f74e11d030fa2c534b3dd5a06721af)
-(cd external/bzip2 && git checkout d78fa13a44d08622d61d0df71e731de77021dcf1)
-(cd external/clearsilver && git checkout b651aeec8a719c9f639ef710423e29463123d4f6)
-(cd external/dbus && git checkout ed0821c6a30852d02d05ce85d4ad4a567ff8a3da)
-(cd external/dhcpcd && git checkout 4c5a5fb53bccceff331bae70f748bf9b4609fe0a)
-(cd external/dosfstools && git checkout c936fe75ee33b6cbc46e6124679d9a1d5d471663)
-(cd external/dropbear && git checkout 1abbfe5d373a44e7e0525fb7971ef0e00955f2e4)
-(cd external/e2fsprogs && git checkout 0bc54db4f9a9aab8225f5107a712c4bbbe34f79c)
-(cd external/elfcopy && git checkout 8d6d7ea32d2e40489fa8be26618167fb6e2dfb40)
-(cd external/elfutils && git checkout ee6008996aa701ad2a50d5d6b1529c9e2c2724c1)
-(cd external/embunit && git checkout 225a86217dd274aea51b1e442568e7aec43a74e9)
-(cd external/emma && git checkout 725ce5e17f431acc3b549f87464a7883f98adf66)
-(cd external/esd && git checkout 7ef614b2e0ad463c3454cd9ba1052c2964e14596)
-(cd external/expat && git checkout da44bf784a2b6acb5df7f40b32c0d4b563fba3ed)
-(cd external/fdlibm && git checkout 74aa530c6ca9c2f10a0e3635b4211f1438b972b2)
-(cd external/freetype && git checkout b36db06baca4c030538565e01b8264971c9b69f8)
-(cd external/gdata && git checkout e784ba4a104f64d1f57dad38ff76764b5718bea0)
-(cd external/genext2fs && git checkout f4a0b4d282a1718ac6e3fff10d02aa877e294324)
-(cd external/giflib && git checkout ff6a75e423d8333c6657e4a66494e0bc9ed34385)
-(cd external/googleclient && git checkout d3974b69b023cb38541d1870ad5c35e4b2ea2c35)
-(cd external/grub && git checkout 1650e5296608be8925d9831310c9ad3595fd6869)
-(cd external/icu4c && git checkout 80865003e90c51ddd5f1e5e1be5ebc1add6af188)
-(cd external/iptables && git checkout 10a1e8d1003257d408c77662fc5ce6470a19b245)
-(cd external/jdiff && git checkout 0e7cb56de28fb496d69a1dd1907388b2076224d6)
-(cd external/jhead && git checkout 9705c3e3c1b19598026449c303d54cdc485f35a9)
-(cd external/jpeg && git checkout 9175dba76b0c31e0870fe074d476650cf258071c)
-(cd external/libffi && git checkout 8c63892438fbb7ef754e55c60220dd02e7c8fd70)
-(cd external/libpcap && git checkout 23295e59cff9c04be154ede6afad16bc9fe385cf)
-(cd external/libpng && git checkout 78ac9384d6ca0067d77b843b70bbdd828bb738df)
-(cd external/libxml2 && git checkout 2c905f99793b8da7f02349aa69fc01cba533f935)
-(cd external/netcat && git checkout 6fc2e7182a81d3665e5233a6555fc6c1960b6b8a)
-(cd external/netperf && git checkout acbeb739a2260972afbd58233fc8939fe5014e3c)
-(cd external/neven && git checkout dfddd36f99a6e11ca3b0107b49f35c623203c8f2)
-(cd external/opencore && git checkout 7a7c607909568a2a1b561023be821919bdb9d578)
-(cd external/openssl && git checkout 499ee9f31d10290f510c2f3785b6abe1314993ec)
-(cd external/oprofile && git checkout b0a81c270584f10323634816b6e5e19711690233)
-(cd external/ping && git checkout 8a5b42ad26815061053bc553b2d04fcbbce5f9d0)
-(cd external/ppp && git checkout 9d869087afe63b8506a367aaeb2008459c823ecf)
-(cd external/protobuf && git checkout 2f1917b2d9754d6288e8de2739469bf719438388)
-(cd external/qemu && git checkout 7a5cb2bf2725afddd4ff9ede151063d23b849d94)
-(cd external/safe-iop && git checkout a625f2f303bd1e1eb8287d82075fa9a240296167)
-(cd external/skia && git checkout 07051704de661e1c4e0fffc4f486afb60110f7e6)
-(cd external/sonivox && git checkout 372b906dec9f897dc04ba3bbd00c908bb2304e95)
-(cd external/sqlite && git checkout 60a965a2f8a63d7704130d867458495a324801e1)
-(cd external/srec && git checkout 00743dcf9e86961f3867b81ef81022040c821f18)
-(cd external/strace && git checkout 67670f6420d064f0b0f54ab2cf2f07752dcc35c7)
-(cd external/tagsoup && git checkout 4bb395b502d0c2495f7a5d226ccf7f06f53dea38)
-(cd external/tcpdump && git checkout f3ccc4ec63431539743f1155a60192a40f6bec24)
-(cd external/tinyxml && git checkout 600ebb441039bcb8a0340df016c6685a688b7647)
-(cd external/tremor && git checkout 0ad0141e864cfbb130db4f22e279d421832e7336)
-(cd external/webkit && git checkout 3607268bbf57cd3af1bb2d67e956821fb8e3c9ec)
-(cd external/wpa_supplicant && git checkout 17800c6dac7ac53c2b348151274071a4cc6e4318)
-(cd external/xdelta3 && git checkout 65fb2b2df617551c42d9bdf7b5bc88168ce6f1ff)
-(cd external/yaffs2 && git checkout d333fc232d7e5ae3370080d5d6f7d88ea9c6b3a1)
-(cd external/zlib && git checkout e860c69e014c1dfed34cf4ee808d200648205f2a)
-(cd frameworks/base && git checkout 94cbba0933e50d593c1c462cff698dd3387ba95b)
-(cd frameworks/opt/com.google.android && git checkout 95252a12ffcf47582ab8b68a35a996ef50cdb523)
-(cd frameworks/opt/com.google.android.googlelogin && git checkout 8f1d2acbab346be5c40d06d24a07bc169ad9c60e)
-(cd frameworks/policies/base && git checkout 880754ac4766e622367a6d65304c0b4176260e0d)
-(cd hardware/libhardware && git checkout 37156b8db0bee9a0e77160a40483d0fad0409bd4)
-(cd hardware/libhardware_legacy && git checkout 5af6317f266c0f7792f6a2fa1c2061f61529aab7)
-(cd hardware/ril && git checkout 154a2efc9b75de255cf9c3916d9d778c445df2ae)
-(cd kernel && git checkout 3c625cce51fadd88b75db8b6766de38f4ce7deaf)
-(cd packages/apps/AlarmClock && git checkout c8208f9f6ff76479da3b1eb0cedbd5500b8be1f4)
-(cd packages/apps/Browser && git checkout c3996145a81b44e27b7fad251e460ccf9c4a5d61)
-(cd packages/apps/Calculator && git checkout d3f7cb4de21253fbeeec0cf4b680bd79e6e62e8a)
-(cd packages/apps/Calendar && git checkout 1c94a74857db16dec676dc16e1ff58f9a4d0385c)
-(cd packages/apps/Camera && git checkout bf1c107ea0bbe8d80769b70d8e9b50dbf8cfcc09)
-(cd packages/apps/Contacts && git checkout cbe59e173d0baf73e98b12ac889ca17172677121)
-(cd packages/apps/Email && git checkout 6f463987544260a770b9203bd412fb665c59d0f9)
-(cd packages/apps/GoogleSearch && git checkout 2134a0d22132a8e68b6914ce466aa2acf28c244a)
-(cd packages/apps/HTMLViewer && git checkout ae36e6ba1ad74a7eb844a41c6c0fc1ecd3c66467)
-(cd packages/apps/IM && git checkout ad1551cc24ebeffda11932c1d2cae0cf1b69a854)
-(cd packages/apps/Launcher && git checkout a3673051acdee1f88b68ffc3a39f0db8529009ff)
-(cd packages/apps/Mms && git checkout 2d9959fea0cfea5fca09d139b66b1fa2cd45bf49)
-(cd packages/apps/Music && git checkout fa0935a617742fe1545bb65202d2b93af8985b6a)
-(cd packages/apps/PackageInstaller && git checkout 3a1faab9685bd0fc39ea7bf5bdc7237805d09c58)
-(cd packages/apps/Phone && git checkout 4974565b48789d5b12c302a846fc090e67039647)
-(cd packages/apps/Settings && git checkout c0a8abbb4f423c0aaa66a1e09bafd4b845837537)
-(cd packages/apps/SoundRecorder && git checkout eb2e5e6a43c0756e9d3e149f46f6a504747175f2)
-(cd packages/apps/Stk && git checkout 4e63a901fb044d270868b4f3abc8abb20d011230)
-(cd packages/apps/Sync && git checkout d8aa470c7fea6a43e269da78e1a2b8c14fb40c70)
-(cd packages/apps/Updater && git checkout 9e0cd9b717f546609ec155f6be3764554ede6408)
-(cd packages/apps/VoiceDialer && git checkout 1ab735e15b6855beabd22f5b87d497f83b3b5b6a)
-(cd packages/providers/CalendarProvider && git checkout 3690a0259f2c62501a47c9a4ecd007f1c1cc599a)
-(cd packages/providers/ContactsProvider && git checkout ef7f8057050027ce57424b69dc697d4127ffc37d)
-(cd packages/providers/DownloadProvider && git checkout b7f50f86e1f424ab05dc8154c3fabbfb3ecd4c47)
-(cd packages/providers/DrmProvider && git checkout 7f08c3d1582a2195fd7b28a3157dedd975230d8b)
-(cd packages/providers/GoogleContactsProvider && git checkout 1a6c0f279fe754b041290768bfa753e5f58e43ad)
-(cd packages/providers/GoogleSubscribedFeedsProvider && git checkout 88f4be5460c130c048e5017999a80275d71a88d6)
-(cd packages/providers/ImProvider && git checkout 8d4eb986192e7682c770449e0695d23d954a5691)
-(cd packages/providers/MediaProvider && git checkout ef92b4dc14a5f8093cb1b58888c213a867504afa)
-(cd packages/providers/TelephonyProvider && git checkout 62f78e4e0ae991f0df285488a1af382bd5105483)
-(cd prebuilt && git checkout 4ef7c54fb1bdfbd5e93d631c7f76ea216ab2d375)
-(cd system/bluetooth && git checkout 36658369459e22152cce54bd1c0660d71a270947)
-(cd system/core && git checkout 4a4c9f6f98055918f1ebff06b3cc1ed622c058fe)
-(cd system/extras && git checkout 1d68e595e72f955a8cd12f59825943ea71daf7d5)
-(cd system/wlan/ti && git checkout 6ff408df1efe9981f20ab8ce6ec36d6ff6f034dc)
-
-Change 127102
-
- Allow different "Settings > About phone > Contributors" for different products. The product-specific contributors.{html,css} are copied to /system/etc, and the Contributors activity loads it from there.
-
-
-Affected files ...
-
-... //branches/cupcake/android/build/core/product.mk#4 edit
-... //branches/cupcake/android/build/core/product_config.mk#9 edit
-
---------
-
-Change 127106
-
- This removes the patch intended to fix this webkit bug
- http://bugs.webkit.org/show_bug.cgi?id=16512
- (orginally reported by this bug: http://b/issue?id=954816)
-
- The original bug can no longer be reproduced in webkit.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLAppletElement.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLEmbedElement.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLFormElement.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLFormElement.h#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLImageElement.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLImageElement.h#2 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLObjectElement.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLPlugInElement.cpp#2 edit
-... //branches/cupcake/android/external/webkit/WebCore/html/HTMLPlugInElement.h#2 edit
-
---------
-
-Change 127112
-
- Added RemoteViews.setOnClickPendingIntent() that connects onClick events to launch PendingIntents. Also exposed un-@hide RemoteViews.setImageViewBitmap(). Also added @RemoteView annotation to Button and ImageButton to allow them across the RemoteView boundary, and added tests to verify this happens.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/api/current.xml#105 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/widget/Button.java#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/widget/ImageButton.java#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/widget/RemoteViews.java#2 edit
-... //branches/cupcake/android/frameworks/base/tests/FrameworkTest/res/layout/remote_view_test_good.xml#2 edit
-... //branches/cupcake/android/frameworks/base/tests/FrameworkTest/tests/src/com/android/frameworktest/view/RemoteViewsActivityTest.java#2 edit
-
---------
-
-Change 127115
-
- Fix bug where UMS wouldn't enable properly
-
-
-Affected files ...
-
-... //branches/cupcake/android/system/core/vold/volmgr.c#8 edit
-
---------
-
-Change 127120
-
- Automated rollback of changelist 127102.
-
-
-Affected files ...
-
-... //branches/cupcake/android/build/core/product.mk#5 edit
-... //branches/cupcake/android/build/core/product_config.mk#10 edit
-
---------
-
-Change 127126
-
- Add back auto space on candidate selection.
- Delay key feedback display.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/inputmethodservice/KeyboardView.java#9 edit
-
---------
-
-Change 127129
-
- Remove the call to is.reset(). This allows callers to embedded data after the encoded bitmap and be able to retrieve it.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/graphics/java/android/graphics/BitmapFactory.java#2 edit
-
---------
-
-Change 127134
-
- add copyPixelsFromBuffer, to allow developers to write pixels values with no format or alpha transformations that accompany using setPixels.
-
-
-Affected files ...
-
-... //branches/cupcake/android/development/samples/ApiDemos/AndroidManifest.xml#7 edit
-... //branches/cupcake/android/development/samples/ApiDemos/src/com/example/android/apis/graphics/BitmapPixels.java#1 add
-... //branches/cupcake/android/frameworks/base/api/current.xml#106 edit
-... //branches/cupcake/android/frameworks/base/core/jni/android/graphics/Bitmap.cpp#4 edit
-... //branches/cupcake/android/frameworks/base/graphics/java/android/graphics/Bitmap.java#2 edit
-
---------
-
-Change 127136
-
- Fix power consumption notification when driver is removed
-
-
-Affected files ...
-
-... //branches/cupcake/android/system/wlan/ti/sta_dk_4_0_4_32/pform/linux/src/esta_drv.c#10 edit
-
---------
-
-Change 127138
-
- Enable building dosfstools for all non simulator builds
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/dosfstools/src/Android.mk#2 edit
-
---------
-
-Change 127142
-
- Use a single button for both the mode indicator and the recording indicator.
- This makes for a smoother user experience when using the trackball, as the
- focus highlight stays on the button when you start recording.
-
- (Bonus: the code's shorter too. We just switch the button's drawable rather than
- hiding one button and showing another.)
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Camera/res/layout/video_camera.xml#8 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/VideoCamera.java#25 edit
-
---------
-
-Change 127144
-
- Fix problem that would leave the "now playing" list empty when removing the currently playing song from it.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Music/src/com/android/music/TrackBrowserActivity.java#13 edit
-
---------
-
-Change 127146
-
- Handle NPE when search is invoked but no suggestions are
- provided. Also, add a field
- that was missing in the parceling of SearchableInfo.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/app/SearchDialog.java#20 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/server/search/SearchableInfo.java#6 edit
-
---------
-
-Change 127147
-
- Bug fix - SET UP CALL - sending confirmation result twice. TERMINAL RESPONSE is not needed.
-
- When the user's confirmation result is handled by Telephony->StkService, returns immediately after calling CommandInterface.handleCallSetupRequestFromSim(). This will insure that the no termainl response is going to be send.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/telephony/java/com/android/internal/telephony/gsm/stk/StkService.java#2 edit
-
---------
-
-Change 127155
-
- Don't switch back to video preview mode when bringing up the menu, except if
- we're recording.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/VideoCamera.java#26 edit
-
---------
-
-Change 127159
-
- Change back button behavior when ping-ponging between the still-image camera and
- the single-image gallery view. Now going from the gallery back to the still-image
- camera acts like a "back" as far as the activity stack is concerned.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/MenuHelper.java#19 edit
-
---------
-
-Change 127165
-
- Added a test that attempts to access a nonexistent static field.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/tests/064-field-access/expected.txt#2 edit
-... //branches/cupcake/android/dalvik/tests/064-field-access/src/GetNonexistent.java#1 add
-... //branches/cupcake/android/dalvik/tests/064-field-access/src/Holder.java#1 add
-... //branches/cupcake/android/dalvik/tests/064-field-access/src/Main.java#2 edit
-... //branches/cupcake/android/dalvik/tests/064-field-access/src2/Holder.java#1 add
-
---------
-
-Change 127170
-
- Setup a place to put IMF/IME sample activities. The idea is to try to
- create situations that we want to test the IMF/IME against, that aren't
- necessarily represented well by the existing applications. Include an
- input type test for starters.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/Android.mk#1 add
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/AndroidManifest.xml#1 add
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/res/layout/sample_edit_text.xml#1 add
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/res/values/strings.xml#1 add
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/src/com/android/imftest/samples/InputTypeActivity.java#1 add
-
---------
-
-Change 127176
-
- Expose API in SDK to remove cache files
-
- Add a new public api to free cache in PackageManager. The call back is via a pending intent.
- Rename the api to freeStorage and change usage in other places.
- Add a new unit test.
- Remove DeviceMemoryMonitor from code base.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/cmds/installd/commands.c#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/ApplicationContext.java#5 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/content/pm/IPackageManager.aidl#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/content/pm/PackageManager.java#4 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/DeviceMemoryMonitor.java#2 delete
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/DeviceStorageMonitorService.java#2 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/PackageManagerService.java#6 edit
-... //branches/cupcake/android/frameworks/base/test-runner/android/test/mock/MockPackageManager.java#3 edit
-... //branches/cupcake/android/frameworks/base/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java#3 edit
-... //branches/cupcake/android/packages/apps/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java#5 edit
-
---------
-
-Change 127180
-
- Fix TextAppearanceSpan parceling to write in the same
- order as it reads.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/text/TextUtils.java#7 edit
-
---------
-
-Change 127182
-
- * General cleanup
- * Switch to supporting split file (one for platform, one for product
- specific entries).
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Email/res/xml/providers.xml#7 edit
-... //branches/cupcake/android/packages/apps/Email/res/xml/providers_product.xml#1 branch
-... //branches/cupcake/android/packages/apps/Email/src/com/android/email/activity/setup/AccountSetupBasics.java#7 integrate
-
---------
-
-Change 127194
-
- Fix bug (The camera preview is not in full screen after using the trackball to select the "capture" button). Also clean up the transitions between fullscreen and non-fullscreen a bit by animating the status bar.
- Still not perfect, of course. :(
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/view/WindowManagerPolicy.java#2 edit
-... //branches/cupcake/android/frameworks/base/core/res/res/anim/status_bar_enter.xml#1 add
-... //branches/cupcake/android/frameworks/base/core/res/res/anim/status_bar_exit.xml#1 add
-... //branches/cupcake/android/frameworks/base/core/res/res/values/styles.xml#9 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/WindowManagerService.java#14 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/status/StatusBarService.java#7 edit
-... //branches/cupcake/android/frameworks/policies/base/mid/com/android/internal/policy/impl/MidWindowManager.java#2 edit
-... //branches/cupcake/android/frameworks/policies/base/phone/com/android/internal/policy/impl/PhoneWindowManager.java#12 edit
-
---------
-
-Change 127197
-
- Add broadcast intents for the following new external media events:
- - Volume is being disk checked
- - Volume is blank (no partition table or no supported filesystems)
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/content/Intent.java#11 edit
-
---------
-
-Change 127200
-
- Camera work:
- + Define a standard, albeit currently @hidden, intent-extra for specifying that
- videos and/or pictures should be written to a given content URI.
- (This had been the hard-coded string "output". We kept the value the same so
- that any in-the-wild applications that use this extra will continue to work.)
-
- + Add the ability to specify that a video is recorded to a given content URI.
- (Because we can't actually do this at the video camera level yet, we cheat
- and implement this feature using a copy-and-delete-the-original-video-file.)
-
- + Add a test to the MarkTest scratch app to test out this new ability.
-
- + Remove mention of the "pick" intent from the camera and video camera activities.
- (This was a copy-and-paste error from when the code was originally copied from
- the image gallery activities.)
-
- + Wrap use of MediaMetadataRetriever in try / catch clauses because the
- media metadata retriever was observed to throw a runtime exception if it was
- given a garbage video file.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/provider/MediaStore.java#16 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/Camera.java#30 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/CropImage.java#4 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/ImageManager.java#13 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/MenuHelper.java#20 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/VideoCamera.java#27 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/Wallpaper.java#4 edit
-
---------
-
-Change 127225
-
- Ensure that the fingerprint doesn't contain spaces.
-
- Strip the BoardConfig-defined variable.
-
- Fail if the fingerprint doesn't contain exactly one word.
-
- Remove an old check that is no longer necessary.
-
-
-Affected files ...
-
-... //branches/cupcake/android/build/core/Makefile#14 edit
-... //branches/cupcake/android/build/core/main.mk#18 edit
-
---------
-
-Change 127245
-
- Temporarily disable A2DP and force audio hardware when any audio streams are ringtones, alarms or notifications.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/libs/audioflinger/AudioFlinger.cpp#18 edit
-... //branches/cupcake/android/frameworks/base/libs/audioflinger/AudioFlinger.h#10 edit
-
---------
-
-Change 127247
-
- When the dom changes, preserve the focus unless the frame structure has
- changed. The old test was too conservative, and required that the old and
- new pointers match. With this change, only require that frame's position
- in the parent hierarchy match.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/webkit/WebKit/android/nav/CachedFrame.cpp#3 edit
-... //branches/cupcake/android/external/webkit/WebKit/android/nav/CachedFrame.h#3 edit
-... //branches/cupcake/android/external/webkit/WebKit/android/nav/WebView.cpp#21 edit
-
---------
-
-Change 127249
-
- Log a better message when rejecting a class because we're not able
- to resolve a static field.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/vm/analysis/CodeVerify.c#12 edit
-
---------
-
-Change 127250
-
- Added a unique serial number to class objects. This allows classes
- to be uniquely identified in a world where the GC can move objects
- around.
-
- This replaces the hprofSerialNumber that was included when
- WITH_HPROF_STACK was defined.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/vm/Globals.h#4 edit
-... //branches/cupcake/android/dalvik/vm/hprof/HprofClass.c#2 edit
-... //branches/cupcake/android/dalvik/vm/hprof/HprofStackFrame.c#2 edit
-... //branches/cupcake/android/dalvik/vm/mterp/common/asm-constants.h#3 edit
-... //branches/cupcake/android/dalvik/vm/oo/Array.c#3 edit
-... //branches/cupcake/android/dalvik/vm/oo/Class.c#5 edit
-... //branches/cupcake/android/dalvik/vm/oo/Class.h#2 edit
-... //branches/cupcake/android/dalvik/vm/oo/Object.h#3 edit
-... //branches/cupcake/android/dalvik/vm/reflect/Proxy.c#3 edit
-
---------
-
-Change 127253
-
- Convert microseconds to milliseconds before formatting
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/os/BatteryStats.java#4 edit
-
---------
-
-Change 127254
-
- Print a log message rather than a stack trace when the shared prefs file is unreadable
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/app/ApplicationContext.java#6 edit
-
---------
-
-Change 127259
-
- Integration of the latest EAS and JET engine updates from Sonivox.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/sonivox/arm-wt-22k/host_src/jet.h#3 edit
-... //branches/cupcake/android/external/sonivox/arm-wt-22k/lib_src/eas_midi.c#2 edit
-... //branches/cupcake/android/external/sonivox/arm-wt-22k/lib_src/jet.c#3 edit
-... //branches/cupcake/android/external/sonivox/arm-wt-22k/lib_src/jet_data.h#2 edit
-
---------
-
-Change 127263
-
- Adds the User dictionary settings, available via Settings > Locale and text > User dictionary, allowing you to see or add words to the user dictionary.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Settings/AndroidManifest.xml#14 edit
-... //branches/cupcake/android/packages/apps/Settings/res/drawable/ic_menu_add.png#1 add
-... //branches/cupcake/android/packages/apps/Settings/res/layout/dialog_edittext.xml#1 add
-... //branches/cupcake/android/packages/apps/Settings/res/layout/list_content_with_empty_view.xml#1 add
-... //branches/cupcake/android/packages/apps/Settings/res/values/strings.xml#26 edit
-... //branches/cupcake/android/packages/apps/Settings/res/xml/language_settings.xml#3 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/UserDictionarySettings.java#1 add
-
---------
-
-Change 127270
-
- Buffer the response data even for redirects. If the redirect turns out
- to be null, use the buffered data in webcore.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/webkit/LoadListener.java#5 edit
-
---------
-
-Change 127272
-
- This removes the quarter second delay when passing a set focus message from
- WebView to WebCore.
-
- The delay was originally added in March of 2008 to help reduce the burden
- on WebCore when moving across several items with the trackball in quick secession.
- By delaying the event, it is easier to detect if there are subsequent events
- before the first is executed, allowing intermediate JavaScript, layout, and
- display list builds to be deferred until the user is finished navigating.
-
- Since March, JavaScript and display list building are substantially faster.
- The old design makes it difficult to keep items in order since not all events
- (e.g. resizing the window) are delayed the same.
-
- This change preserves the code that discards navigation events as WebCore
- falls behind -- the change causes only the first trackball movement to make
- it to WebCore, where with the delay, the first movement may be ignored.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/webkit/WebView.java#29 edit
-
---------
-
-Change 127273
-
- Pass the mouse click through to webkit, even if the node hit isn't valid.
-
- The node and frame are captured when the nav cache is built. They may not
- still be around when a later mouse click is processed. If either are not
- valid, skip special code that deals with image maps and menu lists, but
- still pass the mouse click to the main frame.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/webkit/WebKit/android/jni/WebViewCore.cpp#16 edit
-
---------
-
-Change 127274
-
- Overhaul bonding API.
-
- - listBondings() is now listBonds() and uses cached values in the system
- server
- - hasBonding() is now getBondState() and uses cached values in the system
- server. It also returns an integer state code now to include the
- in-progress state (BOND_BONDING)
- - createBonding() is now createBond() and no longer has an async callback.
- Use intents instead.
- - BONDING_CREATED_ACTION / BONDING_REMOVED_ACTION are now
- BOND_STATE_CHANGED_ACTION with state codes, and result codes.
- - Introduced BluetoothDevice.BOND_RESULT_* result codes so the UI can pick
- a nicer error message. TODO(jasonparekh): update the UI to use these result codes.
- - Removed Setttings App PAIRING_STATUS in favor of BluetoothDevice.BOND_*
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/bluetooth/BluetoothDevice.java#4 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/bluetooth/BluetoothIntent.java#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/bluetooth/IBluetoothDevice.aidl#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/bluetooth/IBluetoothDeviceCallback.aidl#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/server/BluetoothA2dpService.java#9 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/server/BluetoothDeviceService.java#6 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/server/BluetoothEventLoop.java#4 edit
-... //branches/cupcake/android/frameworks/base/core/jni/android_server_BluetoothDeviceService.cpp#2 edit
-... //branches/cupcake/android/frameworks/base/core/jni/android_server_BluetoothEventLoop.cpp#6 edit
-... //branches/cupcake/android/packages/apps/Phone/src/com/android/phone/BluetoothHeadsetService.java#6 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/bluetooth/BluetoothEventRedirector.java#3 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/bluetooth/LocalBluetoothDevice.java#8 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/bluetooth/LocalBluetoothDeviceManager.java#6 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/bluetooth/LocalBluetoothManager.java#5 edit
-... //branches/cupcake/android/packages/apps/Settings/src/com/android/settings/bluetooth/SettingsBtStatus.java#2 edit
-
---------
-
-Change 127275
-
- Added class name to "pure-abstract" warning. Added a test case that
- exercises "conversion" of the superclass declaration from concrete to
- abstract.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/expected.txt#2 edit
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/info.txt#2 edit
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/src/AbstractBase.java#2 edit
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/src/ConcreteSub.java#2 edit
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/src/ConcreteSub2.java#1 add
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/src/Main.java#2 edit
-... //branches/cupcake/android/dalvik/tests/032-concrete-sub/src2/AbstractBase.java#2 edit
-... //branches/cupcake/android/dalvik/vm/analysis/DexOptimize.c#5 edit
-
---------
-
-Change 127278
-
- Bug 1555561: Make the EditTexts in the "Add Bookmark" dialog
- single-line so they don't stretch and mess up the layout.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Browser/res/layout/browser_add_bookmark.xml#2 edit
-
---------
-
-Change 127282
-
- Fix build.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/tests/AndroidTests/src/com/android/unit_tests/BluetoothTest.java#3 edit
-
---------
-
-Change 127283
-
- Clean up some old cruft.
-
-
-Affected files ...
-
-... //branches/cupcake/android/system/core/init/devices.c#7 edit
-
---------
-
-Change 127285
-
- sync with demetrius r75
- allow to build with scalar==fixed again
- remove some unneeded SK_BUILD_FOR_MAC tests
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/skia/include/core/SkBitmap.h#2 edit
-... //branches/cupcake/android/external/skia/src/core/SkFloatBits.cpp#2 edit
-... //branches/cupcake/android/external/skia/src/core/SkGraphics.cpp#4 edit
-... //branches/cupcake/android/external/skia/src/core/SkMath.cpp#3 edit
-... //branches/cupcake/android/external/skia/src/ports/SkFontHost_mac.cpp#3 edit
-
---------
-
-Change 127289
-
- Increase MMS size to 1MB.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/core/java/android/provider/Settings.java#28 edit
-... //branches/cupcake/android/packages/apps/Mms/src/com/android/mms/model/CarrierContentRestriction.java#2 edit
-... //branches/cupcake/android/packages/apps/Mms/src/com/android/mms/model/ContentRestriction.java#2 edit
-... //branches/cupcake/android/packages/apps/Mms/src/com/android/mms/model/SlideshowModel.java#2 edit
-
---------
-
-Change 127297
-
- Fixing Socket Spec
- Fixing a Bug where SecurityManager.checkConnect is called with the
- host name instead of the host address as it is specified and
- implemented by the RI.
- Reenabling comented out code in InetAddress.getLocalHost()
- Fixed an error in InetAddress.equals() where we were not adhering to the spec.
- Applied some fixes copied from harmony to not have to deal with dem later.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/libcore/luni/src/main/java/java/net/InetAddress.java#5 edit
-... //branches/cupcake/android/dalvik/libcore/luni/src/main/java/java/net/NegCacheElement.java#3 edit
-... //branches/cupcake/android/dalvik/libcore/luni/src/main/java/java/net/NegativeCache.java#3 edit
-... //branches/cupcake/android/dalvik/libcore/luni/src/main/java/java/net/Socket.java#3 edit
-
---------
-
-Change 127310
-
- Fix ToggleButton. A previous change I made was based on a false assumption about how LayerDrawable works. A LayerDrawable *adds* the padding of all of its layers, each layer being translated by the padding of the layer below it. Surprising, but necessary to make widgets like ToggleButton work.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/graphics/java/android/graphics/drawable/LayerDrawable.java#4 edit
-
---------
-
-Change 127315
-
- Implement "IME: Add transactions to InputConnection". Also change the background dim amount, which I forgot to include with my previous check-in. :)
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/api/current.xml#107 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/view/inputmethod/InputConnection.java#11 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/view/inputmethod/InputConnectionWrapper.java#9 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java#22 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/widget/TextView.java#23 edit
-... //branches/cupcake/android/frameworks/base/core/java/com/android/internal/view/IInputConnectionWrapper.java#11 edit
-... //branches/cupcake/android/frameworks/base/core/java/com/android/internal/view/IInputContext.aidl#10 edit
-... //branches/cupcake/android/frameworks/base/core/java/com/android/internal/view/InputConnectionWrapper.java#10 edit
-... //branches/cupcake/android/frameworks/base/core/java/com/android/internal/widget/EditableInputConnection.java#11 edit
-... //branches/cupcake/android/frameworks/base/core/res/res/values/themes.xml#6 edit
-
---------
-
-Change 127338
-
- Reset variables in bluetooth_start() to fix intermittent glitches resuming A2DP after standby.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/bluez/utils/audio/liba2dp.c#12 edit
-
---------
-
-Change 127341
-
- ButtonActivity - test to see if softkeyboard responds correctly to button activity.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/AndroidManifest.xml#2 edit
-... //branches/cupcake/android/frameworks/base/tests/ImfTest/src/com/android/imftest/samples/ButtonActivity.java#1 add
-
---------
-
-Change 127342
-
- Make GadgetService get the list of gadgets by querying the package
- manager, and having a configuration xml file instead of hard coding
- it.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/api/current.xml#108 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/gadget/GadgetManager.java#2 edit
-... //branches/cupcake/android/frameworks/base/core/java/com/android/internal/gadget/IGadgetService.aidl#2 edit
-... //branches/cupcake/android/frameworks/base/core/res/res/values/attrs.xml#32 edit
-... //branches/cupcake/android/frameworks/base/core/res/res/values/public.xml#32 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/GadgetService.java#2 edit
-... //branches/cupcake/android/frameworks/base/tests/GadgetHost/AndroidManifest.xml#2 edit
-... //branches/cupcake/android/frameworks/base/tests/GadgetHost/src/com/android/gadgethost/GadgetHostActivity.java#2 edit
-... //branches/cupcake/android/frameworks/base/tests/GadgetHost/src/com/android/gadgethost/GadgetPickActivity.java#2 edit
-
---------
-
-Change 127344
-
- Make sure the music service also stops itself if it got killed and restarted by the system.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Music/src/com/android/music/MediaPlaybackService.java#10 edit
-
---------
-
-Change 127347
-
- add the gadget_info xml file
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/tests/GadgetHost/res/xml/gadget_info.xml#1 add
-
---------
-
-Change 127356
-
- Submit rightly signed 64-bit driver
-
-
-Affected files ...
-
-... //branches/cupcake/android/development/host/windows/prebuilt/usb/driver_amd_64/androidusb.sys#3 edit
-... //branches/cupcake/android/development/host/windows/prebuilt/usb/driver_amd_64/androidusba64.cat#3 edit
-
---------
-
-Change 127362
-
- Use mmap to load speech model files. Use const.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/srec/srec/clib/log_add.h#2 edit
-... //branches/cupcake/android/external/srec/srec/clib/swimodel.c#2 edit
-... //branches/cupcake/android/external/srec/srec/clib/voc_read.c#2 edit
-... //branches/cupcake/android/external/srec/srec/crec/c47mulsp.c#2 edit
-... //branches/cupcake/android/external/srec/srec/crec/get_fram.c#2 edit
-... //branches/cupcake/android/external/srec/srec/crec/srec.c#2 edit
-... //branches/cupcake/android/external/srec/srec/include/c42mul.h#2 edit
-... //branches/cupcake/android/external/srec/srec/include/hmmlib.h#2 edit
-... //branches/cupcake/android/external/srec/srec/include/simapi.h#2 edit
-... //branches/cupcake/android/external/srec/srec/include/srec.h#2 edit
-... //branches/cupcake/android/external/srec/srec/include/swimodel.h#2 edit
-... //branches/cupcake/android/external/srec/tools/grxmlcompile/grph.h#2 edit
-
---------
-
-Change 127363
-
- Bug 1547138: Add copyright headers to translated strings files.
- Don't generate files that don't actually contain any translations.
- Check in code for generating translation console flat-file format.
-
-
-Affected files ...
-
-[list deleted]
-
---------
-
-Change 127371
-
- Clean up termination of the GPS network thread.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/location/java/com/android/internal/location/GpsLocationProvider.java#6 edit
-
---------
-
-Change 127377
-
- Introduce a new Activity callback, onUserLeaving(), that is invoked whenever the user initiates an action that causes the activity to be moved away from being frontmost.
-
- Any code that starts activities "silently," without the user having prompted the action, should supply the new Intent.FLAG_ACTIVITY_NO_USER_ACTION flag when calling startActivity(). This instructs the Activity Manager that this focus change is not due to user activity, suppressing the onUserLeaving() callback. This is important to preserve the reliability of the onUserLeaving() callback indicating a specific user choice to navigate to the new activity.
-
- The two known apps in the tree that forcibly start activities without user activity have also been updated to use this new Intent flag: Phone and AlarmClock.
-
-
-Affected files ...
-
-... //branches/cupcake/android/frameworks/base/api/current.xml#109 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/Activity.java#9 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/ActivityThread.java#6 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/ApplicationThreadNative.java#3 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/IApplicationThread.java#3 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/app/Instrumentation.java#3 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/content/Intent.java#12 edit
-... //branches/cupcake/android/frameworks/base/services/java/com/android/server/am/ActivityManagerService.java#11 edit
-... //branches/cupcake/android/packages/apps/AlarmClock/src/com/android/alarmclock/AlarmReceiver.java#4 edit
-... //branches/cupcake/android/packages/apps/Phone/src/com/android/phone/PhoneApp.java#6 edit
-
---------
-
-Change 127385
-
- marking bookmarks as untranslatable
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Browser/res/values/strings.xml#15 integrate
-
---------
-
-Change 127387
-
- Test case to make sure we don't reuse the "this" register in
- instance methods.
-
-
-Affected files ...
-
-... //branches/cupcake/android/dalvik/dx/tests/110-dex-preserve-this/Blort.java#1 add
-... //branches/cupcake/android/dalvik/dx/tests/110-dex-preserve-this/expected.txt#1 add
-... //branches/cupcake/android/dalvik/dx/tests/110-dex-preserve-this/info.txt#1 add
-... //branches/cupcake/android/dalvik/dx/tests/110-dex-preserve-this/run#1 add
-
---------
-
-Change 127392
-
- update the 'update-audio.sh' script that is used to upload a new prebuilt version
- of the QEMU audio sub-system for Linux.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/qemu/Makefile.android#10 integrate
-... //branches/cupcake/android/external/qemu/distrib/update-audio.sh#2 edit
-... //branches/cupcake/android/prebuilt/linux-x86/emulator/libqemu-audio.a#2 edit
-
---------
-
-Change 127400
-
- Fix the problem where the build would break looking for "@".
-
- built_ota_tools should have been a list of files, not a list
- of commands to build those files.
-
-
-Affected files ...
-
-... //branches/cupcake/android/build/core/Makefile#15 edit
-
---------
-
-Change 127406
-
- Fix bug (Bottom/Menu portion of the screen is appearing black). There were a bunch of issues with deciding when to show the IME window, and a big issue in the sample keyboard IME with when it was handing starting of input (it would only work if the keyboard view had been created).
-
-
-Affected files ...
-
-... //branches/cupcake/android/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/SoftKeyboard.java#6 edit
-... //branches/cupcake/android/frameworks/base/core/java/android/inputmethodservice/InputMethodService.java#21 edit
-
---------
-
-Change 127412
-
- Fix timer subtraction when there is > 1 second difference.
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/bluez/utils/audio/liba2dp.c#13 edit
-
---------
-
-Change 127433
-
- Fix Mac build of the emulator
-
-
-Affected files ...
-
-... //branches/cupcake/android/external/qemu/Makefile.android#11 edit
-
---------
-
-Change 127436
-
- Camera: Create a subclass of ImageView that can be used as a camera button.
- + Clients can register for notification when the button is pressed, optionally clicked,
- and released.
- - note that you can press a button, then move your finger off of it before releasing,
- in which case ther would be a pressed and a released notification, but no clicked
- notification.
- - The reason we want to do this is so we can emulate the physical camera button, which
- has focus down, optional camera down-and-up, and focus up events.
- + The pressed, clicked, and released notifications are delivered in that order, both for
- touch presses and for trackball/dpad presses. (This was tricky because the UI
- framework delivers the underlying notifications in a different order for the two
- types of input.)
- + Use the new shutter button in the still-image camera. We don't yet need it in the
- video camera, but it could be used there as well.
-
-
-Affected files ...
-
-... //branches/cupcake/android/packages/apps/Camera/res/layout/camera.xml#16 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/Camera.java#31 edit
-... //branches/cupcake/android/packages/apps/Camera/src/com/android/camera/ShutterButton.java#1 add
-
---------
-
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index 1bf3c3f..c435177 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -27,7 +27,5 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/generic.mk \
- $(LOCAL_DIR)/min_dev.mk \
$(LOCAL_DIR)/sdk.mk \
- $(LOCAL_DIR)/sim.mk \
- $(LOCAL_DIR)/generic_with_google.mk
+ $(LOCAL_DIR)/sim.mk
diff --git a/target/product/core.mk b/target/product/core.mk
index a93ba7c..a6a70df 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -16,7 +16,6 @@
ApplicationsProvider \
ContactsProvider \
DownloadProvider \
- GoogleSearch \
MediaProvider \
PicoTts \
SettingsProvider \
@@ -25,4 +24,11 @@
VpnServices \
UserDictionaryProvider \
PackageInstaller \
+ DefaultContainerService \
Bugreport
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ media.stagefright.enable-player=true \
+ media.stagefright.enable-meta=true \
+ media.stagefright.enable-scan=true \
+ media.stagefright.enable-http=true
diff --git a/target/product/generic.mk b/target/product/generic.mk
index b4b1b09..e312b1f 100644
--- a/target/product/generic.mk
+++ b/target/product/generic.mk
@@ -1,6 +1,5 @@
# This is a generic product that isn't specialized for a specific device.
-# It includes the base Android platform. If you need Google-specific features,
-# you should derive from generic_with_google.mk
+# It includes the base Android platform.
PRODUCT_PACKAGES := \
AccountAndSyncSettings \
@@ -13,10 +12,11 @@
CertInstaller \
DrmProvider \
Email \
- Gallery \
LatinIME \
Mms \
Music \
+ Provision \
+ QuickSearchBox \
Settings \
Sync \
Updater \
diff --git a/target/product/generic_with_google.mk b/target/product/generic_with_google.mk
deleted file mode 100644
index ba30f15..0000000
--- a/target/product/generic_with_google.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# This is a generic product that isn't specialized for a specific device.
-# It includes the base Android platform including some Google-specific features.
-# If you do not want to include Google specific features, you should derive
-# from generic.mk
-
-PRODUCT_PACKAGES := \
- ContactsProvider \
- GoogleContactsSyncAdapter \
- GoogleSubscribedFeedsProvider \
- com.google.android.gtalkservice \
- com.google.android.datamessaging \
- com.google.android.maps
-
-PRODUCT_COPY_FILES := \
- vendor/google/frameworks/maps/com.google.android.maps.xml:system/etc/permissions/com.google.android.maps.xml \
- vendor/google/frameworks/datamessaging/com.google.android.datamessaging.xml:system/etc/permissions/com.google.android.datamessaging.xml \
- vendor/google/apps/GTalkService/com.google.android.gtalkservice.xml:system/etc/permissions/com.google.android.gtalkservice.xml
-
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
-
-# Overrides
-PRODUCT_NAME := generic_with_google
diff --git a/target/product/min_dev.mk b/target/product/min_dev.mk
deleted file mode 100644
index 92ba973..0000000
--- a/target/product/min_dev.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-
-PRODUCT_POLICY := android.policy_phone
-PRODUCT_PROPERTY_OVERRIDES := \
- ro.config.notification_sound=OnTheHunt.ogg \
- ro.config.alarm_alert=Alarm_Classic.ogg
-PRODUCT_BRAND := generic
-PRODUCT_NAME := min_dev
-PRODUCT_DEVICE := generic
-
-PRODUCT_PACKAGES := \
- DownloadProvider \
- GoogleSearch \
- MediaProvider \
- SettingsProvider \
- PackageInstaller \
- Bugreport \
- Launcher \
- Settings \
- sqlite3
-
diff --git a/target/product/security/README b/target/product/security/README
index b92693d..24f984c 100644
--- a/target/product/security/README
+++ b/target/product/security/README
@@ -1,13 +1,9 @@
-The following commands were used to generate the test key pair:
+The following commands were used to generate the test key pairs:
- openssl genrsa -3 -out testkey.pem 2048
-
- openssl req -new -x509 -key testkey.pem -out testkey.x509.pem -days 10000 \
- -subj '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
-
- openssl pkcs8 -in testkey.pem -topk8 -outform DER -out testkey.pk8 -nocrypt
-
-Alternatively you can use the "mkkey.sh" command included in this directory.
+ development/tools/make_key testkey '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
+ development/tools/make_key platform '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
+ development/tools/make_key shared '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
+ development/tools/make_key media '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
The following standard test keys are currently included:
@@ -28,11 +24,11 @@
% openssl pkcs8 -inform DER -nocrypt -in testkey.pk8 -out testkey.pem
2. create a signature using the pem format key
- % openssl dgst -binary -sha1 -sign testkey.pem FILE > FILE.sig
+ % openssl dgst -binary -sha1 -sign testkey.pem FILE > FILE.sig
extracting public keys for embedding
------------------------------------
it's a Java tool
but it generates C code
take a look at commands/recovery/Android.mk
-you'll see it running $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
\ No newline at end of file
+you'll see it running $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
diff --git a/target/product/security/mkkey.sh b/target/product/security/mkkey.sh
deleted file mode 100644
index 86744f6..0000000
--- a/target/product/security/mkkey.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-if ["$1" == ""]; then
- echo "Create a test certificate key."
- echo "Usage: $0 NAME"
- echo "Will generate NAME.pk8 and NAME.x509.pem"
- echo " /C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com"
- return
-fi
-
-openssl genrsa -3 -out $1.pem 2048
-
-openssl req -new -x509 -key $1.pem -out $1.x509.pem -days 10000 \
- -subj '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
-
-openssl pkcs8 -in $1.pem -topk8 -outform DER -out $1.pk8 -nocrypt
-
diff --git a/target/product/sim.mk b/target/product/sim.mk
index 4403e46..51b3676 100644
--- a/target/product/sim.mk
+++ b/target/product/sim.mk
@@ -1,6 +1,3 @@
-PRODUCT_PACKAGES := \
- IM
-
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
# Overrides
diff --git a/tools/adbs b/tools/adbs
index 8b1fac6..815ae10 100755
--- a/tools/adbs
+++ b/tools/adbs
@@ -217,6 +217,7 @@
SymbolTranslation(groups)
else:
print line
+ sys.stdout.flush()
# adb itself aborts
stream.close()
diff --git a/tools/apicheck/src/com/android/apicheck/ApiInfo.java b/tools/apicheck/src/com/android/apicheck/ApiInfo.java
index 01d8f9e..c237814 100644
--- a/tools/apicheck/src/com/android/apicheck/ApiInfo.java
+++ b/tools/apicheck/src/com/android/apicheck/ApiInfo.java
@@ -26,8 +26,19 @@
mPackages = new HashMap<String, PackageInfo>();
mAllClasses = new HashMap<String, ClassInfo>();
}
+
+ public ClassInfo findClass(String name) {
+ return mAllClasses.get(name);
+ }
+
+ private void resolveInterfaces() {
+ for (ClassInfo c : mAllClasses.values()) {
+ c.resolveInterfaces(this);
+ }
+ }
public boolean isConsistent(ApiInfo otherApi) {
+ resolveInterfaces();
boolean consistent = true;
for (PackageInfo pInfo : mPackages.values()) {
if (otherApi.getPackages().containsKey(pInfo.name())) {
diff --git a/tools/apicheck/src/com/android/apicheck/ClassInfo.java b/tools/apicheck/src/com/android/apicheck/ClassInfo.java
index 5405ad2..e62a3d0 100644
--- a/tools/apicheck/src/com/android/apicheck/ClassInfo.java
+++ b/tools/apicheck/src/com/android/apicheck/ClassInfo.java
@@ -26,7 +26,8 @@
private boolean mIsFinal;
private String mDeprecated;
private String mScope;
- private List<String> mInterfaces;
+ private List<String> mInterfaceNames;
+ private List<ClassInfo> mInterfaces;
private HashMap<String, MethodInfo> mMethods;
private HashMap<String, FieldInfo> mFields;
private HashMap<String, ConstructorInfo> mConstructors;
@@ -48,7 +49,8 @@
mIsFinal = isFinal;
mDeprecated = deprecated;
mScope = visibility;
- mInterfaces = new ArrayList<String>();
+ mInterfaceNames = new ArrayList<String>();
+ mInterfaces = new ArrayList<ClassInfo>();
mMethods = new HashMap<String, MethodInfo>();
mFields = new HashMap<String, FieldInfo>();
mConstructors = new HashMap<String, ConstructorInfo>();
@@ -109,6 +111,18 @@
return null;
}
+ // Find a superinterface declaration of the given method.
+ public MethodInfo interfaceMethod(MethodInfo candidate) {
+ for (ClassInfo interfaceInfo : mInterfaces) {
+ for (MethodInfo mi : interfaceInfo.mMethods.values()) {
+ if (mi.matches(candidate)) {
+ return mi;
+ }
+ }
+ }
+ return (mSuperClass != null) ? mSuperClass.interfaceMethod(candidate) : null;
+ }
+
public boolean isConsistent(ClassInfo cl) {
cl.mExistsInBoth = true;
mExistsInBoth = true;
@@ -120,14 +134,18 @@
+ " changed class/interface declaration");
consistent = false;
}
- for (String iface : mInterfaces) {
- if (!cl.mInterfaces.contains(iface)) {
+ for (String iface : mInterfaceNames) {
+ boolean found = false;
+ for (ClassInfo c = cl; c != null && !found; c = c.mSuperClass) {
+ found = c.mInterfaceNames.contains(iface);
+ }
+ if (!found) {
Errors.error(Errors.REMOVED_INTERFACE, cl.position(),
"Class " + qualifiedName() + " no longer implements " + iface);
}
}
- for (String iface : cl.mInterfaces) {
- if (!mInterfaces.contains(iface)) {
+ for (String iface : cl.mInterfaceNames) {
+ if (!mInterfaceNames.contains(iface)) {
Errors.error(Errors.ADDED_INTERFACE, cl.position(),
"Added interface " + iface + " to class "
+ qualifiedName());
@@ -147,6 +165,9 @@
*/
MethodInfo mi = mInfo.containingClass().overriddenMethod(mInfo);
if (mi == null) {
+ mi = mInfo.containingClass().interfaceMethod(mInfo);
+ }
+ if (mi == null) {
Errors.error(Errors.REMOVED_METHOD, mInfo.position(),
"Removed public method " + mInfo.qualifiedName());
consistent = false;
@@ -252,9 +273,15 @@
return consistent;
}
+
+ public void resolveInterfaces(ApiInfo apiInfo) {
+ for (String interfaceName : mInterfaceNames) {
+ mInterfaces.add(apiInfo.findClass(interfaceName));
+ }
+ }
public void addInterface(String name) {
- mInterfaces.add(name);
+ mInterfaceNames.add(name);
}
public void addMethod(MethodInfo mInfo) {
diff --git a/tools/droiddoc/src/Errors.java b/tools/droiddoc/src/Errors.java
index 77852f8..7ba5623 100644
--- a/tools/droiddoc/src/Errors.java
+++ b/tools/droiddoc/src/Errors.java
@@ -115,7 +115,7 @@
public static Error DEPRECATION_MISMATCH = new Error(13, WARNING);
public static Error MISSING_COMMENT = new Error(14, WARNING);
public static Error IO_ERROR = new Error(15, HIDDEN);
- public static Error NO_SINCE_DATA = new Error(16, WARNING);
+ public static Error NO_SINCE_DATA = new Error(16, HIDDEN);
public static Error[] ERRORS = {
UNRESOLVED_LINK,
diff --git a/tools/droiddoc/src/MethodInfo.java b/tools/droiddoc/src/MethodInfo.java
index 3211038..7f96b80 100644
--- a/tools/droiddoc/src/MethodInfo.java
+++ b/tools/droiddoc/src/MethodInfo.java
@@ -363,8 +363,17 @@
public String getHashableName() {
StringBuilder result = new StringBuilder();
result.append(name());
- for (ParameterInfo pInfo : mParameters) {
- result.append(":").append(pInfo.type().fullName());
+ for (int p = 0; p < mParameters.length; p++) {
+ result.append(":");
+ if (p == mParameters.length - 1 && isVarArgs()) {
+ // TODO: note that this does not attempt to handle hypothetical
+ // vararg methods whose last parameter is a list of arrays, e.g.
+ // "Object[]...".
+ result.append(mParameters[p].type().fullNameNoDimension(typeVariables()))
+ .append("...");
+ } else {
+ result.append(mParameters[p].type().fullName(typeVariables()));
+ }
}
return result.toString();
}
diff --git a/tools/droiddoc/src/SinceTagger.java b/tools/droiddoc/src/SinceTagger.java
index fb69c04..a1bce55 100644
--- a/tools/droiddoc/src/SinceTagger.java
+++ b/tools/droiddoc/src/SinceTagger.java
@@ -1,8 +1,13 @@
// Copyright 2009 Google Inc. All Rights Reserved.
-import com.android.apicheck.*;
+import com.android.apicheck.ApiCheck;
+import com.android.apicheck.ApiInfo;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
import org.clearsilver.HDF;
@@ -165,31 +170,68 @@
*/
private void warnForMissingVersions(ClassInfo[] classDocs) {
for (ClassInfo claz : classDocs) {
+ if (!checkLevelRecursive(claz)) {
+ continue;
+ }
+
if (claz.getSince() == null) {
Errors.error(Errors.NO_SINCE_DATA, claz.position(),
"XML missing class " + claz.qualifiedName());
}
- for (FieldInfo field : claz.fields()) {
- if (field.getSince() == null) {
- Errors.error(Errors.NO_SINCE_DATA, field.position(),
- "XML missing field "
- + claz.qualifiedName() + "#" + field .name());
- }
+
+ for (FieldInfo field : missingVersions(claz.fields())) {
+ Errors.error(Errors.NO_SINCE_DATA, field.position(),
+ "XML missing field " + claz.qualifiedName()
+ + "#" + field.name());
}
- for (MethodInfo constructor : claz.constructors()) {
- if (constructor.getSince() == null) {
- Errors.error(Errors.NO_SINCE_DATA, constructor.position(),
- "XML missing constructor "
- + claz.qualifiedName() + "#" + constructor.getHashableName());
- }
+
+ for (MethodInfo constructor : missingVersions(claz.constructors())) {
+ Errors.error(Errors.NO_SINCE_DATA, constructor.position(),
+ "XML missing constructor " + claz.qualifiedName()
+ + "#" + constructor.getHashableName());
}
- for (MethodInfo method : claz.methods()) {
- if (method.getSince() == null) {
- Errors.error(Errors.NO_SINCE_DATA, method.position(),
- "XML missing method "
- + claz.qualifiedName() + "#" + method .getHashableName());
- }
+
+ for (MethodInfo method : missingVersions(claz.methods())) {
+ Errors.error(Errors.NO_SINCE_DATA, method.position(),
+ "XML missing method " + claz.qualifiedName()
+ + "#" + method.getHashableName());
}
}
}
+
+ /**
+ * Returns the DocInfos in {@code all} that are documented but do not have
+ * since tags.
+ */
+ private <T extends MemberInfo> Iterable<T> missingVersions(T[] all) {
+ List<T> result = Collections.emptyList();
+ for (T t : all) {
+ // if this member has version info or isn't documented, skip it
+ if (t.getSince() != null
+ || t.isHidden()
+ || !checkLevelRecursive(t.realContainingClass())) {
+ continue;
+ }
+
+ if (result.isEmpty()) {
+ result = new ArrayList<T>(); // lazily construct a mutable list
+ }
+ result.add(t);
+ }
+ return result;
+ }
+
+ /**
+ * Returns true if {@code claz} and all containing classes are documented.
+ * The result may be used to filter out members that exist in the API
+ * data structure but aren't a part of the API.
+ */
+ private boolean checkLevelRecursive(ClassInfo claz) {
+ for (ClassInfo c = claz; c != null; c = c.containingClass()) {
+ if (!c.checkLevel()) {
+ return false;
+ }
+ }
+ return true;
+ }
}
diff --git a/tools/droiddoc/templates-pdk/assets/android-developer-core.css b/tools/droiddoc/templates-pdk/assets/android-developer-core.css
new file mode 100644
index 0000000..bb4f806
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/android-developer-core.css
@@ -0,0 +1,1297 @@
+/* file: android-developer-core.css
+ author: smain
+ date: september 2008
+ info: core developer styles (developer.android.com)
+*/
+
+
+/* RESET STYLES */
+
+html,body,div,h1,h2,h3,h4,h5,h6,p,img,
+dl,dt,dd,ol,ul,li,table,caption,tbody,
+tfoot,thead,tr,th,td,form,fieldset,
+embed,object,applet {
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+.rebox {
+ background:#daf3fc;
+ margin-bottom:1.5em;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+}
+.rebox.lil p img {
+ display:block;
+ margin-bottom:2em;
+}
+
+.rebox .p {
+ padding:1.5em;
+ line-height:1.25em;
+}
+
+.p-r {
+ padding-right:1.5em;
+}
+
+.rebox h2, .rebox h3 {
+ font-size:16px;
+ color:#fff;
+ display:block;
+ background:url('/assets/images/rebox-gradient.gif') no-repeat center bottom #95c0d0;
+ padding:.5em .5em .5em .75em;
+ -moz-border-radius-topright:5px;
+ -moz-border-radius-topleft:5px;
+ -webkit-border-top-right-radius:5px;
+ -webkit-border-top-left-radius:5px;
+}
+
+.rebox.lil {
+}
+.rebox.lil img {
+ float:left;
+ margin:0 1em 0 0;
+ padding:0 0 3em 0;
+}
+
+.rebox.green {
+ background:#d4e9a9;
+}
+
+.rebox.green h2, .rebox.green h3 {
+ background:url('images/rebox-gradient-green.gif') no-repeat center bottom #aaca46;
+ font-weight:bold;
+}
+
+.rebox.green a:link, .rebox.green a:visited {
+ color:#360;
+}
+
+/* BASICS */
+
+html, body {
+ overflow:hidden; /* keeps scrollbar off IE */
+ background-color:#fff;
+}
+
+body {
+ font-family:arial,sans-serif;
+ color:#000;
+ font-size:13px;
+ color:#333;
+ background-image:url(images/bg_fade.jpg);
+ background-repeat:repeat-x;
+}
+
+a, a code {
+ color:#006699;
+}
+
+
+a:active,
+a:active code {
+ color:#f00;
+}
+
+a:visited,
+a:visited code {
+ color:#006699;
+}
+
+input, select,
+textarea, option {
+ font-family:inherit;
+ font-size:inherit;
+ padding:0;
+ margin:0;
+}
+
+option {
+ padding:0 4px;
+}
+
+p {
+ padding:0;
+ margin:0 0 1em;
+}
+
+code, pre {
+ color:#007000;
+ font-family:monospace;
+ line-height:1em;
+}
+
+var {
+ color:#007000;
+ font-style:italic;
+}
+
+pre {
+ border:1px solid #ccc;
+ background-color:#fafafa;
+ padding:10px;
+ margin:0 0 1em 1em;
+ overflow:auto;
+ line-height:inherit; /* fixes vertical scrolling in webkit */
+}
+
+h1,h2,h3,h4,h5 {
+ margin:1em 0;
+ padding:0;
+}
+
+p,ul,ol,dl,dd,dt,li {
+ line-height:1.3em;
+}
+
+ul,ol {
+ margin:0 0 .8em;
+ padding:0 0 0 2em;
+}
+
+li {
+ padding:0 0 .5em;
+}
+
+dl {
+ margin:0 0 1em 0;
+ padding:0;
+}
+
+dt {
+ margin:0;
+ padding:0;
+}
+
+dd {
+ margin:0 0 1em;
+ padding:0 0 0 2em;
+}
+
+li p {
+ margin:.5em 0 0;
+}
+
+dd p {
+ margin:1em 0 0;
+}
+
+li pre, li table, li img {
+ margin:.5em 0 0 1em;
+}
+
+dd pre, dd table, dd img {
+ margin:1em 0 0 1em;
+}
+
+li ul,
+li ol,
+dd ul,
+dd ol {
+ margin:0;
+ padding: 0 0 0 2em;
+}
+
+li li,
+dd li {
+ margin:0;
+ padding:.5em 0 0;
+}
+
+dl dl,
+ol dl,
+ul dl {
+ margin:0 0 1em;
+ padding:0;
+}
+
+table {
+ font-size:1em;
+ margin:0 0 1em;
+ padding:0;
+ border-collapse:collapse;
+ border-width:0;
+ empty-cells:show;
+}
+
+td,th {
+ border:1px solid #ccc;
+ padding:6px 12px;
+ text-align:left;
+ vertical-align:top;
+ background-color:inherit;
+}
+
+th {
+ background-color:#dee8f1;
+}
+
+hr.blue {
+ background-color:#DDF0F2;
+ border:none;
+ height:5px;
+ margin:20px 0 10px;
+}
+
+/* LAYOUT */
+#body-content {
+ /* "Preliminary" watermark for preview releases and interim builds.
+ background:transparent url(images/preliminary.png) repeat scroll 0 0; */
+ margin:0;
+ position:relative;
+ width:100%;
+}
+
+#header {
+ height: 114px;
+ position:relative;
+ z-index:100;
+ min-width:576px;
+ padding:0 10px;
+ border-bottom:3px solid #94b922;
+}
+
+#headerLeft{
+ padding: 25px 0 0;
+}
+
+#headerLeft img{
+ height:50px;
+ width:349px;
+}
+
+#headerRight {
+ position:absolute;
+ right:0;
+ top:0;
+ text-align:right;
+}
+
+/* Tabs in the header */
+#header ul {
+ list-style: none;
+ margin: 7px 0 0;
+ padding: 0;
+ height: 29px;
+}
+
+#header li {
+ float: left;
+ margin: 0px 2px 0px 0px;
+ padding:0;
+}
+
+#header li a {
+ text-decoration: none;
+ display: block;
+ background-image: url(images/bg_images_sprite.png);
+ background-position: 0 -58px;
+ background-repeat: no-repeat;
+ color: #666;
+ font-size: 13px;
+ font-weight: bold;
+ width: 94px;
+ height: 29px;
+ text-align: center;
+ margin: 0px;
+}
+
+#header li a:hover {
+ background-image: url(images/bg_images_sprite.png);
+ background-position: 0 -29px;
+ background-repeat: no-repeat;
+}
+
+#header li a span {
+ position:relative;
+ top:7px;
+}
+
+#header li a span+span {
+ display:none;
+}
+
+/* TAB HIGHLIGHTING */
+.home #home-link a,
+.community #community-link a,
+.porting #porting-link a,
+.source #source-link a,
+.about #about-link a,
+.downloads #downloads-link a,
+.compatibility #compatibility-link a,
+.videos #videos-link a {
+ background-image: url(images/bg_images_sprite.png);
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ color: #fff;
+ font-weight: bold;
+ cursor:default;
+}
+
+.home #home-link a:hover,
+.community #community-link a:hover,
+.home #home-link a:hover,
+.community #community-link a:hover,
+.porting #porting-link a:hover,
+.source #source-link a:hover,
+.about #about-link a:hover,
+.downloads #downloads-link a:hover,
+.compatibility #compatibility-link a:hover,
+.videos #videos-link a:hover {
+ background-image: url(images/bg_images_sprite.png);
+ background-position: 0 0;
+}
+
+#headerLinks {
+ margin:10px 10px 0 0;
+ height:13px;
+ font-size: 11px;
+ vertical-align: top;
+}
+
+#headerLinks a {
+ color: #7FA9B5;
+}
+
+#headerLinks img {
+ vertical-align:middle;
+}
+
+#language {
+ margin:0 10px 0 4px;
+}
+
+#search {
+ height:45px;
+ margin:15px 10px 0 0;
+}
+
+/* main */
+
+#mainBodyFluid {
+ margin: 20px 10px;
+ color:#333;
+}
+
+#mainBodyFixed {
+ margin: 20px 10px;
+ color: #333;
+ width:930px;
+ position:relative;
+}
+
+#mainBodyFixed h3,
+#mainBodyFluid h3 {
+ color:#336666;
+ font-size:1.25em;
+ margin: 0em 0em 0em 0em;
+ padding-bottom:.5em;
+}
+
+#mainBodyFixed h2,
+#mainBodyFluid h2 {
+ color:#336666;
+ font-size:1.25em;
+ margin: 0;
+ padding-bottom:.5em;
+}
+
+#mainBodyFixed h1,
+#mainBodyFluid h1 {
+ color:#435A6E;
+ font-size:1.7em;
+ margin: 1em 0;
+}
+
+#mainBodyFixed .green,
+#mainBodyFluid .green,
+#jd-content .green {
+ color:#7BB026;
+ background-color:none;
+}
+
+#mainBodyLeft {
+ float: left;
+ width: 600px;
+ margin-right: 20px;
+ color: #333;
+ position:relative;
+}
+
+div.indent {
+ margin-left: 40px;
+ margin-right: 70px;
+}
+
+#mainBodyLeft p {
+ color: #333;
+ font-size: 13px;
+}
+
+#mainBodyLeft p.blue {
+ color: #669999;
+}
+
+#mainBodyLeft #communityDiv {
+ float: left;
+ background-image:url(images/bg_community_leftDiv.jpg);
+ background-repeat: no-repeat;
+ width: 581px;
+ height: 347px;
+ padding: 20px 0px 0px 20px;
+}
+
+#mainBodyRight {
+ float: left;
+ width: 300px;
+ color: #333;
+}
+
+#mainBodyRight p {
+ padding-right: 50px;
+ color: #333;
+}
+
+#mainBodyRight table {
+ width: 100%;
+}
+
+#mainBodyRight td {
+ border:0px solid #666;
+ padding:0px 5px;
+ text-align:left;
+}
+
+#mainBodyRight .blueBorderBox {
+ border:5px solid #ddf0f2;
+ padding:18px 18px 18px 18px;
+ text-align:left;
+}
+
+#mainBodyFixed .seperator {
+ background-image:url(images/hr_gray_side.jpg);
+ background-repeat:no-repeat;
+ width: 100%;
+ float: left;
+ clear: both;
+}
+
+#mainBodyBottom {
+ float: left;
+ width: 100%;
+ clear:both;
+ color: #333;
+}
+
+#mainBodyBottom .seperator {
+ background-image:url(images/hr_gray_main.jpg);
+ background-repeat:no-repeat;
+ width: 100%;
+ float: left;
+ clear: both;
+}
+
+/* Footer */
+#footer {
+ float: left;
+ width:90%;
+ margin: 20px;
+ color: #aaa;
+ font-size: 11px;
+}
+
+#footer a {
+ color: #aaa;
+ font-size: 11px;
+}
+
+#footer a:hover {
+ text-decoration: underline;
+ color:#aaa;
+}
+
+#footerlinks {
+ margin-top:2px;
+}
+
+#footerlinks a,
+#footerlinks a:visited {
+ color:#006699;
+}
+
+#homeBottom td {
+ border:0px solid #666;
+ padding: 8px 18px 8px 18px;
+}
+
+#homeBottom table {
+ width: 100%;
+}
+
+
+#homeBottom {
+ padding: 0px 0px 0px 0px;
+ float: left;
+ width: 585px;
+ height: 165px;
+ background-image:url(images/home/bg_home_bottom.jpg);
+ background-repeat: no-repeat;
+}
+
+.groupTable {
+ width: 100%;
+}
+
+.groupTable th {
+ padding: 10px;
+ color: #ffffff;
+ background-color: #6D8293;
+ border: 2px solid #fff;
+}
+
+.groupTable td {
+ padding: 10px;
+ color: #333333;
+ background-color: #d9d9d9;
+ border: 2px solid #fff;
+}
+
+.groupTable .evenRow td {
+ background-color: #ededed;
+}
+
+span.BigBlue {
+ color:#336666;
+ font-size:1.25em;
+ margin: 0em 0em 0em 0em;
+ padding-bottom:.5em;
+ font-weight: bold;
+}
+
+span.emBlue {
+ color: #336666;
+ font-style:italic;
+}
+
+.pageTable {
+ width: 95%;
+ border: none;
+}
+
+.pageTable img {
+vertical-align: bottom;
+}
+
+.pageTable td {
+ border: none;
+}
+
+.pageTable td.leftNav {
+ width: 100px;
+}
+
+.greenBox {
+ margin: 10px 30px 10px 30px;
+ padding: 10px 20px 10px 20px;
+ background-color: #EBF3DB;
+ width: 75%;
+}
+
+.blueBox {
+ margin: 10px 30px 10px 30px;
+ padding: 10px 20px 10px 20px;
+ background-color: #DDF0F2;
+ width: 75%;
+}
+
+.blueHR {
+ margin: 10px 30px 10px 30px;
+ height: 5px;
+ background-color: #DDF0F2;
+ width: 75%;
+}
+
+/* SEARCH FILTER */
+#search_autocomplete {
+ color:#aaa;
+}
+
+#search-button {
+ display:inline;
+}
+
+#search_filtered_div {
+ position:absolute;
+ margin-top:-1px;
+ z-index:101;
+ border:1px solid #BCCDF0;
+ background-color:#fff;
+}
+
+#search_filtered {
+ min-width:100%;
+}
+#search_filtered td{
+ background-color:#fff;
+ border-bottom: 1px solid #669999;
+ line-height:1.5em;
+}
+
+#search_filtered .jd-selected {
+ background-color: #94b922;
+ cursor:pointer;
+}
+#search_filtered .jd-selected,
+#search_filtered .jd-selected a {
+ color:#fff;
+}
+
+.no-display {
+ display: none;
+}
+
+.jd-autocomplete {
+ font-family: Arial, sans-serif;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-size: .8em;
+ border: none;
+ margin: 0;
+ line-height: 1.05em;
+}
+
+.show-row {
+ display: table-row;
+}
+.hide-row {
+ display: hidden;
+}
+
+/* SEARCH */
+
+/* restrict global search form width */
+#searchForm {
+ width:350px;
+}
+
+#searchTxt {
+ width:200px;
+}
+
+/* disable twiddle and size selectors for left column */
+#leftSearchControl div {
+ width: 100%;
+}
+
+#leftSearchControl .gsc-twiddle {
+ background-image : none;
+}
+
+#leftSearchControl td, #searchForm td {
+ border: 0px solid #000;
+}
+
+#leftSearchControl .gsc-resultsHeader .gsc-title {
+ padding-left : 0px;
+ font-weight : bold;
+ font-size : 13px;
+ color:#006699;
+ display : none;
+}
+
+#leftSearchControl .gsc-resultsHeader div.gsc-results-selector {
+ display : none;
+}
+
+#leftSearchControl .gsc-resultsRoot {
+ padding-top : 6px;
+}
+
+#leftSearchControl div.gs-visibleUrl-long {
+ display : block;
+ color:#006699;
+}
+
+.gsc-webResult div.gs-visibleUrl-short,
+table.gsc-branding,
+.gsc-clear-button {
+ display : none;
+}
+
+.gsc-cursor-box .gsc-cursor div.gsc-cursor-page,
+.gsc-cursor-box .gsc-trailing-more-results a.gsc-trailing-more-results,
+#leftSearchControl a,
+#leftSearchControl a b {
+ color:#006699;
+}
+
+.gsc-resultsHeader {
+ display: none;
+}
+
+/* Disable built in search forms */
+.gsc-control form.gsc-search-box {
+ display : none;
+}
+table.gsc-search-box {
+ margin:6px 0 0 0;
+ border-collapse:collapse;
+}
+
+td.gsc-input {
+ padding:0 2px;
+ width:100%;
+ vertical-align:middle;
+}
+
+input.gsc-input {
+ border:1px solid #BCCDF0;
+ width:99%;
+ padding-left:2px;
+ font-size:.95em;
+}
+
+td.gsc-search-button {
+ text-align: right;
+ padding:0;
+ vertical-align:top;
+}
+
+#search-button {
+ margin:0 0 0 2px;
+ font-size:11px;
+}
+
+/* search result tabs */
+
+#doc-content .gsc-control {
+ position:relative;
+}
+
+#doc-content .gsc-tabsArea {
+ position:relative;
+ white-space:nowrap;
+}
+
+#doc-content .gsc-tabHeader {
+ padding: 3px 6px;
+ position:relative;
+}
+
+#doc-content .gsc-tabHeader.gsc-tabhActive {
+ border-top: 2px solid #94B922;
+}
+
+#doc-content h2#searchTitle {
+ padding:0;
+}
+
+#doc-content .gsc-resultsbox-visible {
+ padding:1em 0 0 6px;
+}
+
+/* CAROUSEL */
+
+#homeMiddle {
+ padding: 0px 0px 0px 0px;
+ float: left;
+ width: 584px;
+ height: 580px;
+ position:relative;
+}
+
+#topAnnouncement {
+ background:url(images/home/bg_home_announcement.png) no-repeat 0 0;
+}
+
+#homeTitle {
+ padding:15px 15px 0;
+ height:30px;
+}
+
+#homeTitle h2 {
+ padding:0;
+}
+
+#announcement-block {
+ padding:0 15px 0;
+ overflow:hidden;
+ background: url(images/hr_gray_side.jpg) no-repeat 15px 0;
+ zoom:1;
+}
+
+#announcement-block>* {
+ padding:15px 0 0;
+}
+
+#announcement-block img {
+ float:left;
+ margin:0 30px 0 0;
+}
+
+#announcement {
+ float:left;
+ margin:0;
+}
+
+#carousel {
+ background:url(images/home/bg_home_carousel.png) no-repeat 0 0;
+ position:relative;
+ height:400px;
+}
+
+#carouselMain {
+ background: url(images/home/bg_home_carousel_board.png) 0 0 no-repeat;
+ height:auto;
+ padding: 25px 21px 0;
+ overflow:hidden;
+ position:relative;
+ zoom:1; /*IE6*/
+}
+
+#carouselMain img {
+ margin:0;
+}
+
+#carouselMain .bulletinDesc h3 {
+ margin:0;
+ padding:0;
+}
+
+#carouselMain .bulletinDesc p {
+ margin:0;
+ padding:0.7em 0 0;
+}
+
+#carouselWheel {
+ background: url(images/home/bg_home_carousel_wheel.png) 0 0 no-repeat;
+ padding-top:40px;
+ height:150px;
+}
+
+.clearer { clear:both; }
+
+a#arrow-left, a#arrow-right {
+ float:left;
+ width:42px;
+ height:42px;
+ background-image:url(images/home/carousel_buttons_sprite.png);
+ background-repeat:no-repeat;
+}
+a#arrow-left {
+ margin:35px 3px 0 10px;
+}
+a#arrow-right {
+ margin:35px 10px 0 0;
+}
+a.arrow-left-off,
+a#arrow-left.arrow-left-off:hover {
+ background-position:0 0;
+}
+a.arrow-right-off,
+a#arrow-right.arrow-right-off:hover {
+ background-position:-42px 0;
+}
+a#arrow-left:hover {
+ background-position:0 -42px;
+}
+a#arrow-right:hover {
+ background-position:-42px -42px;
+}
+a.arrow-left-on {
+ background-position:0 0;
+}
+a.arrow-right-on {
+ background-position:-42px 0;
+}
+a.arrow-right-off,
+a.arrow-left-off {
+ cursor:default;
+}
+
+.app-list-container {
+ margin:0 20px;
+ position:relative;
+ width:100%;
+}
+
+div#list-clip {
+ height:110px;
+ width:438px;
+ overflow:hidden;
+ position:relative;
+ float:left;
+}
+
+div#app-list {
+ left:0;
+ z-index:1;
+ position:absolute;
+ margin:11px 0 0;
+ _margin-top:13px;
+ width:1000%;
+}
+
+#app-list a {
+ display:block;
+ float:left;
+ height:90px;
+ width:90px;
+ margin:0 24px 0;
+ padding:3px;
+ background:#99cccc;
+ -webkit-border-radius:7px;
+ -moz-border-radius:7px;
+ border-radius:7px;
+ text-decoration:none;
+ text-align:center;
+ font-size:11px;
+ line-height:11px;
+}
+
+#app-list a span {
+ position:relative;
+ top:-4px;
+}
+
+#app-list img {
+ width:90px;
+ height:70px;
+ margin:0;
+}
+
+#app-list a.selected,
+#app-list a:active.selected,
+#app-list a:hover.selected {
+ background:#A4C639;
+ color:#fff;
+ cursor:default;
+ text-decoration:none;
+}
+
+#app-list a:hover,
+#app-list a:active {
+ background:#ff9900;
+}
+
+#app-list a:hover span,
+#app-list a:active span {
+ text-decoration:underline;
+}
+
+#droid-name {
+ padding-top:.5em;
+ color:#666;
+ padding-bottom:.25em;
+}
+
+/*IE6*/
+* html #app-list a { zoom: 1; margin:0 24px 0 15px;}
+
+* html #list-clip {
+ width:430px !important;
+}
+
+/*carousel bulletin layouts*/
+/*460px width*/
+/*185px height*/
+.img-left {
+ float:left;
+ width:230px;
+ overflow:hidden;
+ padding:8px 0 8px 8px;
+}
+.desc-right {
+ float:left;
+ width:270px;
+ padding:10px;
+}
+.img-right {
+ float:right;
+ width:220px;
+ overflow:hidden;
+ padding:8px 8px 8px 0;
+}
+.desc-left {
+ float:right;
+ width:280px;
+ padding:10px;
+ text-align:right;
+}
+.img-top {
+ padding:20px 20px 0;
+}
+.desc-bottom {
+ padding:10px;
+}
+
+
+/* VIDEO PAGE */
+
+#mainBodyLeft.videoPlayer {
+ width:570px;
+}
+
+#mainBodyRight.videoPlayer {
+ width:330px;
+}
+
+/* player */
+
+#videoPlayerBox {
+ background-color: #DAF3FC;
+ border-radius:7px;
+ -moz-border-radius:7px;
+ -webkit-border-radius:7px;
+ width:530px;
+ padding:20px;
+ border:1px solid #d3ecf5;
+ box-shadow:2px 3px 1px #eee;
+ -moz-box-shadow:2px 3px 1px #eee;
+ -webkit-box-shadow:2px 3px 1px #eee;
+}
+
+#videoBorder {
+ background-color: #FFF;
+ min-height:399px;
+ height:auto !important;
+ border:1px solid #ccdada;
+ border-radius:7px 7px 0 0;
+ -moz-border-radius:7px 7px 0 0;
+ -webkit-border-top-left-radius:7px;
+ -webkit-border-top-right-radius:7px;
+}
+
+#videoPlayerTitle {
+ width:500px;
+ padding:15px 15px 0;
+}
+
+#videoPlayerTitle h2 {
+ font-weight:bold;
+ font-size:1.2em;
+ color:#336666;
+ margin:0;
+ padding:0;
+}
+
+#objectWrapper {
+ padding:15px 15px;
+ height:334px;
+ width:500px;
+}
+
+/* playlist tabs */
+
+ul#videoTabs {
+ list-style-type:none;
+ padding:0;
+ clear:both;
+ margin:0;
+ padding: 20px 0 0 15px;
+ zoom:1; /* IE7/8, otherwise top-padding is double */
+}
+
+ul#videoTabs li {
+ display:inline;
+ padding:0;
+ margin:0 3px 0 0;
+ line-height:2em;
+}
+
+ul#videoTabs li a {
+ border-radius:7px 7px 0 0;
+ -moz-border-radius:7px 7px 0 0;
+ -webkit-border-top-left-radius:7px;
+ -webkit-border-top-right-radius:7px;
+ background:#95c0d0;
+ color:#fff;
+ text-decoration:none;
+ padding:.45em 1.5em;
+ font-weight:bold;
+}
+
+ul#videoTabs li.selected a {
+ font-weight:bold;
+ text-decoration:none;
+ color:#555;
+ background:#daf3fc;
+ border-bottom:1px solid #daf3fc;
+}
+
+ul#videoTabs li:hover a {
+ background:#85acba;
+}
+
+ul#videoTabs li.selected:hover a {
+ background:#daf3fc;
+}
+
+/* playlists */
+
+#videos {
+ background:#daf3fc;
+ margin-bottom:1.5em;
+ padding:15px;
+ border-radius:5px;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ box-shadow:2px 3px 1px #eee;
+ -moz-box-shadow:2px 3px 1px #eee;
+ -webkit-box-shadow:2px 3px 1px #eee;
+}
+
+#videos div {
+ display:none;
+}
+
+#videos div.selected {
+ display:block;
+}
+
+ul.videoPreviews {
+ list-style:none;
+ padding:0;
+ margin:0;
+ zoom:1; /* IE, otherwise, layout doesn't update when showing 'more' */
+}
+
+ul.videoPreviews li {
+ margin:0 0 5px;
+ padding:0;
+ overflow:hidden;
+ position:relative;
+}
+
+#mainBodyFixed ul.videoPreviews h3 {
+ font-size: 12px;
+ margin:0 0 1em 130px;
+ padding:0;
+ font-weight:bold;
+ color:inherit;
+}
+
+ul.videoPreviews a {
+ margin:1px;
+ padding:10px;
+ text-decoration:none;
+ height:90px;
+ display:block;
+ border-radius:5px;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ background-color:transparent;
+}
+
+ul.videoPreviews a:hover {
+ background-color:#FFF;
+ border:none; /* IE8, otherwise, bg doesn't work */
+}
+
+ul.videoPreviews a.selected {
+ background-color: #FF9900;
+}
+
+ul.videoPreviews img {
+ float:left;
+ clear:left;
+ margin:0;
+}
+
+ul.videoPreviews h3 {
+ font-size:12px;
+ font-weight:bold;
+ text-decoration:none;
+ margin:0 0 1em 130px;
+ padding:0;
+}
+
+ul.videoPreviews p {
+ font-size: 12px;
+ text-decoration:none;
+ margin:0 0 1.2em 130px;
+}
+
+ul.videoPreviews p.full {
+ display:none;
+}
+
+ul.videoPreviews span.more {
+ padding:0 0 0 12px;
+ background:url(images/arrow_bluelink_down.png) 0 2px no-repeat;
+}
+
+ul.videoPreviews span.less {
+ padding:0 0 0 12px;
+ background:url(images/arrow_bluelink_up.png) 0 2px no-repeat;
+ display:none;
+}
+
+ul.videoPreviews p.toggle {
+ position:absolute;
+ margin:0;
+ margin-top:-23px; /* instead of bottom:23px, because IE won't do it correctly */
+ left:140px;
+}
+
+ul.videoPreviews p.toggle a {
+ height:auto;
+ margin:0;
+ padding:0;
+ zoom:1; /* IE6, otherwise the margin considers the img on redraws */
+}
+
+ul.videoPreviews p.toggle a:hover {
+ text-decoration:underline;
+ background:transparent; /* IE6, otherwise it inherits white */
+}
+
+/* featured videos */
+
+#mainBodyRight h2 {
+ padding:0 0 5px;
+}
+
+#mainBodyRight ul.videoPreviews {
+ margin:10px 0 0;
+}
+
+#mainBodyRight ul.videoPreviews li {
+ font-size:11px;
+ line-height:13px;
+ margin:0 0 5px;
+ padding:0;
+}
+
+#mainBodyRight ul.videoPreviews h3 {
+ padding:0;
+ margin:0;
+}
+
+#mainBodyRight ul.videoPreviews a {
+ text-decoration:none;
+ height:108px;
+ border:1px solid #FFF;
+}
+
+#mainBodyRight ul.videoPreviews a:hover {
+ border:1px solid #CCDADA;
+}
+
+#mainBodyRight ul.videoPreviews a.selected {
+ border:1px solid #FFF;
+}
+
+#mainBodyRight ul.videoPreviews p {
+ line-height:1.2em;
+ padding:0;
+ margin:4px 0 0 130px;
+}
+
+#mainBodyRight ul.videoPreviews img {
+ margin-top:5px;
+}
diff --git a/tools/droiddoc/templates-pdk/assets/android-developer-docs.js b/tools/droiddoc/templates-pdk/assets/android-developer-docs.js
new file mode 100644
index 0000000..59c4192
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/android-developer-docs.js
@@ -0,0 +1,464 @@
+var resizePackagesNav;
+var classesNav;
+var devdocNav;
+var sidenav;
+var content;
+var HEADER_HEIGHT = 117;
+var cookie_namespace = 'android_developer';
+var NAV_PREF_TREE = "tree";
+var NAV_PREF_PANELS = "panels";
+var nav_pref;
+var toRoot;
+var isMobile = false; // true if mobile, so we can adjust some layout
+
+function addLoadEvent(newfun) {
+ var current = window.onload;
+ if (typeof window.onload != 'function') {
+ window.onload = newfun;
+ } else {
+ window.onload = function() {
+ current();
+ newfun();
+ }
+ }
+}
+
+var agent = navigator['userAgent'];
+if ((agent.indexOf("Mobile") != -1) ||
+ (agent.indexOf("BlackBerry") != -1) ||
+ (agent.indexOf("Mini") != -1)) {
+ isMobile = true;
+ addLoadEvent(mobileSetup);
+}
+
+addLoadEvent(function() {
+window.onresize = resizeAll;
+});
+
+function mobileSetup() {
+ $("body").css({'overflow':'auto'});
+ $("html").css({'overflow':'auto'});
+ $("#body-content").css({'position':'relative', 'top':'0'});
+ $("#doc-content").css({'overflow':'visible', 'border-left':'3px solid #DDD'});
+ $("#side-nav").css({'padding':'0'});
+ $("#nav-tree").css({'overflow-y': 'auto'});
+}
+
+/* loads the lists.js file to the page.
+Loading this in the head was slowing page load time */
+addLoadEvent( function() {
+ var lists = document.createElement("script");
+ lists.setAttribute("type","text/javascript");
+ lists.setAttribute("src", toRoot+"reference/lists.js");
+ document.getElementsByTagName("head")[0].appendChild(lists);
+} );
+
+function setToRoot(root) {
+ toRoot = root;
+ // note: toRoot also used by carousel.js
+}
+
+function restoreWidth(navWidth) {
+ var windowWidth = $(window).width() + "px";
+ content.css({marginLeft:parseInt(navWidth) + 6 + "px", //account for 6px-wide handle-bar
+ width:parseInt(windowWidth) - parseInt(navWidth) - 6 + "px"});
+ sidenav.css({width:navWidth});
+ resizePackagesNav.css({width:navWidth});
+ classesNav.css({width:navWidth});
+ $("#packages-nav").css({width:navWidth});
+}
+
+function restoreHeight(packageHeight) {
+ var windowHeight = ($(window).height() - HEADER_HEIGHT);
+ var swapperHeight = windowHeight - 13;
+ $("#swapper").css({height:swapperHeight + "px"});
+ sidenav.css({height:windowHeight + "px"});
+ content.css({height:windowHeight + "px"});
+ resizePackagesNav.css({maxHeight:swapperHeight + "px", height:packageHeight});
+ classesNav.css({height:swapperHeight - parseInt(packageHeight) + "px"});
+ $("#packages-nav").css({height:parseInt(packageHeight) - 6 + "px"}); //move 6px to give space for the resize handle
+ devdocNav.css({height:sidenav.css("height")});
+ $("#nav-tree").css({height:swapperHeight + "px"});
+}
+
+function readCookie(cookie) {
+ var myCookie = cookie_namespace+"_"+cookie+"=";
+ if (document.cookie) {
+ var index = document.cookie.indexOf(myCookie);
+ if (index != -1) {
+ var valStart = index + myCookie.length;
+ var valEnd = document.cookie.indexOf(";", valStart);
+ if (valEnd == -1) {
+ valEnd = document.cookie.length;
+ }
+ var val = document.cookie.substring(valStart, valEnd);
+ return val;
+ }
+ }
+ return 0;
+}
+
+function writeCookie(cookie, val, section, expiration) {
+ if (!val) return;
+ section = section == null ? "_" : "_"+section+"_";
+ if (expiration == null) {
+ var date = new Date();
+ date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
+ expiration = date.toGMTString();
+ }
+ document.cookie = cookie_namespace+section+cookie+"="+val+"; expires="+expiration+"; path=/";
+}
+
+function init() {
+ $("#side-nav").css({position:"absolute",left:0});
+ content = $("#doc-content");
+ resizePackagesNav = $("#resize-packages-nav");
+ classesNav = $("#classes-nav");
+ sidenav = $("#side-nav");
+ devdocNav = $("#devdoc-nav");
+
+ if (location.href.indexOf("/reference/") != -1) {
+ var cookiePath = "reference_";
+ } else if (location.href.indexOf("/guide/") != -1) {
+ var cookiePath = "guide_";
+ }
+
+ if (!isMobile) {
+ $("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizeHeight(); } });
+ $(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
+ var cookieWidth = readCookie(cookiePath+'width');
+ var cookieHeight = readCookie(cookiePath+'height');
+ if (cookieWidth) {
+ restoreWidth(cookieWidth);
+ } else if ($(".side-nav-resizable").length) {
+ resizeWidth();
+ }
+ if (cookieHeight) {
+ restoreHeight(cookieHeight);
+ } else {
+ resizeHeight();
+ }
+ }
+
+ if (devdocNav.length) { // only dev guide and sdk
+ highlightNav(location.href);
+ }
+}
+
+function highlightNav(fullPageName) {
+ fullPageName = fullPageName.replace(/^https?:\/\//, '');
+ var lastSlashPos = fullPageName.lastIndexOf("/");
+ var firstSlashPos = fullPageName.indexOf("/");
+ if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html')
+ fullPageName = fullPageName + "index.html";
+ }
+ var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length);
+ var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5);
+ var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
+ if ((link.length == 0) && (fullPageName.indexOf("/guide/") != -1)) {
+// if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide)
+ lastBackstep = pathPageName.lastIndexOf("/");
+ while (link.length == 0) {
+ backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep);
+ link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory + 1)+"index.html']");
+ lastBackstep = pathPageName.lastIndexOf("/", lastBackstep - 1);
+ if (lastBackstep == 0) break;
+ }
+ }
+ link.parent().addClass('selected');
+ if (link.parent().parent().is(':hidden')) {
+ toggle(link.parent().parent().parent(), false);
+ } else if (link.parent().parent().hasClass('toggle-list')) {
+ toggle(link.parent().parent(), false);
+ }
+}
+
+function resizeHeight() {
+ var windowHeight = ($(window).height() - HEADER_HEIGHT);
+ var swapperHeight = windowHeight - 13;
+ $("#swapper").css({height:swapperHeight + "px"});
+ sidenav.css({height:windowHeight + "px"});
+ content.css({height:windowHeight + "px"});
+ resizePackagesNav.css({maxHeight:swapperHeight + "px"});
+ classesNav.css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
+ $("#packages-nav").css({height:parseInt(resizePackagesNav.css("height")) - 6 + "px"}); //move 6px for handle
+ devdocNav.css({height:sidenav.css("height")});
+ $("#nav-tree").css({height:swapperHeight + "px"});
+
+ var basePath = getBaseUri(location.pathname);
+ var section = basePath.substring(1,basePath.indexOf("/",1));
+ writeCookie("height", resizePackagesNav.css("height"), section, null);
+}
+
+function resizeWidth() {
+ var windowWidth = $(window).width() + "px";
+ if (sidenav.length) {
+ var sidenavWidth = sidenav.css("width");
+ } else {
+ var sidenavWidth = 0;
+ }
+ content.css({marginLeft:parseInt(sidenavWidth) + 6 + "px", //account for 6px-wide handle-bar
+ width:parseInt(windowWidth) - parseInt(sidenavWidth) - 6 + "px"});
+ resizePackagesNav.css({width:sidenavWidth});
+ classesNav.css({width:sidenavWidth});
+ $("#packages-nav").css({width:sidenavWidth});
+
+ var basePath = getBaseUri(location.pathname);
+ var section = basePath.substring(1,basePath.indexOf("/",1));
+ writeCookie("width", sidenavWidth, section, null);
+}
+
+function resizeAll() {
+ if (!isMobile) {
+ resizeHeight();
+ if ($(".side-nav-resizable").length) {
+ resizeWidth();
+ }
+ }
+}
+
+function getBaseUri(uri) {
+ var intlUrl = (uri.substring(0,6) == "/intl/");
+ if (intlUrl) {
+ base = uri.substring(uri.indexOf('intl/')+5,uri.length);
+ base = base.substring(base.indexOf('/')+1, base.length);
+ //alert("intl, returning base url: /" + base);
+ return ("/" + base);
+ } else {
+ //alert("not intl, returning uri as found.");
+ return uri;
+ }
+}
+
+function requestAppendHL(uri) {
+//append "?hl=<lang> to an outgoing request (such as to blog)
+ var lang = getLangPref();
+ if (lang) {
+ var q = 'hl=' + lang;
+ uri += '?' + q;
+ window.location = uri;
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function loadLast(cookiePath) {
+ var location = window.location.href;
+ if (location.indexOf("/"+cookiePath+"/") != -1) {
+ return true;
+ }
+ var lastPage = readCookie(cookiePath + "_lastpage");
+ if (lastPage) {
+ window.location = lastPage;
+ return false;
+ }
+ return true;
+}
+
+$(window).unload(function(){
+ var path = getBaseUri(location.pathname);
+ if (path.indexOf("/reference/") != -1) {
+ writeCookie("lastpage", path, "reference", null);
+ } else if (path.indexOf("/guide/") != -1) {
+ writeCookie("lastpage", path, "guide", null);
+ }
+});
+
+function toggle(obj, slide) {
+ var ul = $("ul", obj);
+ var li = ul.parent();
+ if (li.hasClass("closed")) {
+ if (slide) {
+ ul.slideDown("fast");
+ } else {
+ ul.show();
+ }
+ li.removeClass("closed");
+ li.addClass("open");
+ $(".toggle-img", li).attr("title", "hide pages");
+ } else {
+ ul.slideUp("fast");
+ li.removeClass("open");
+ li.addClass("closed");
+ $(".toggle-img", li).attr("title", "show pages");
+ }
+}
+
+function buildToggleLists() {
+ $(".toggle-list").each(
+ function(i) {
+ $("div", this).append("<a class='toggle-img' href='#' title='show pages' onClick='toggle(this.parentNode.parentNode, true); return false;'></a>");
+ $(this).addClass("closed");
+ });
+}
+
+function getNavPref() {
+ var v = readCookie('reference_nav');
+ if (v != NAV_PREF_TREE) {
+ v = NAV_PREF_PANELS;
+ }
+ return v;
+}
+
+function chooseDefaultNav() {
+ nav_pref = getNavPref();
+ if (nav_pref == NAV_PREF_TREE) {
+ $("#nav-panels").toggle();
+ $("#panel-link").toggle();
+ $("#nav-tree").toggle();
+ $("#tree-link").toggle();
+ }
+}
+
+function swapNav() {
+ if (nav_pref == NAV_PREF_TREE) {
+ nav_pref = NAV_PREF_PANELS;
+ } else {
+ nav_pref = NAV_PREF_TREE;
+ init_default_navtree(toRoot);
+ }
+ var date = new Date();
+ date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
+ writeCookie("nav", nav_pref, "reference", date.toGMTString());
+
+ $("#nav-panels").toggle();
+ $("#panel-link").toggle();
+ $("#nav-tree").toggle();
+ $("#tree-link").toggle();
+
+ if ($("#nav-tree").is(':visible')) scrollIntoView("nav-tree");
+ else {
+ scrollIntoView("packages-nav");
+ scrollIntoView("classes-nav");
+ }
+}
+
+function scrollIntoView(nav) {
+ var navObj = $("#"+nav);
+ if (navObj.is(':visible')) {
+ var selected = $(".selected", navObj);
+ if (selected.length == 0) return;
+ if (selected.is("div")) selected = selected.parent();
+
+ var scrolling = document.getElementById(nav);
+ var navHeight = navObj.height();
+ var offsetTop = selected.position().top;
+ if (selected.parent().parent().is(".toggle-list")) offsetTop += selected.parent().parent().position().top;
+ if(offsetTop > navHeight - 92) {
+ scrolling.scrollTop = offsetTop - navHeight + 92;
+ }
+ }
+}
+
+function toggleAllInherited(linkObj, expand) {
+ var a = $(linkObj);
+ var table = $(a.parent().parent().parent());
+ var expandos = $(".jd-expando-trigger", table);
+ if ( (expand == null && a.text() == "[Expand]") || expand ) {
+ expandos.each(function(i) {
+ toggleInherited(this, true);
+ });
+ a.text("[Collapse]");
+ } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
+ expandos.each(function(i) {
+ toggleInherited(this, false);
+ });
+ a.text("[Expand]");
+ }
+ return false;
+}
+
+function toggleAllSummaryInherited(linkObj) {
+ var a = $(linkObj);
+ var content = $(a.parent().parent().parent());
+ var toggles = $(".toggle-all", content);
+ if (a.text() == "[Expand All]") {
+ toggles.each(function(i) {
+ toggleAllInherited(this, true);
+ });
+ a.text("[Collapse All]");
+ } else {
+ toggles.each(function(i) {
+ toggleAllInherited(this, false);
+ });
+ a.text("[Expand All]");
+ }
+ return false;
+}
+
+
+function changeTabLang(lang) {
+ var nodes = $("#header-tabs").find("."+lang);
+ for (i=0; i < nodes.length; i++) { // for each node in this language
+ var node = $(nodes[i]);
+ node.siblings().css("display","none"); // hide all siblings
+ if (node.not(":empty").length != 0) { //if this languages node has a translation, show it
+ node.css("display","inline");
+ } else { //otherwise, show English instead
+ node.css("display","none");
+ node.siblings().filter(".en").css("display","inline");
+ }
+ }
+}
+
+function changeNavLang(lang) {
+ var nodes = $("#side-nav").find("."+lang);
+ for (i=0; i < nodes.length; i++) { // for each node in this language
+ var node = $(nodes[i]);
+ node.siblings().css("display","none"); // hide all siblings
+ if (node.not(":empty").length != 0) { // if this languages node has a translation, show it
+ node.css("display","inline");
+ } else { // otherwise, show English instead
+ node.css("display","none");
+ node.siblings().filter(".en").css("display","inline");
+ }
+ }
+}
+
+function changeDocLang(lang) {
+ changeTabLang(lang);
+ changeNavLang(lang);
+}
+
+function changeLangPref(lang, refresh) {
+ var date = new Date();
+ expires = date.toGMTString(date.setTime(date.getTime()+(10*365*24*60*60*1000))); // keep this for 50 years
+ //alert("expires: " + expires)
+ writeCookie("pref_lang", lang, null, expires);
+ //changeDocLang(lang);
+ if (refresh) {
+ l = getBaseUri(location.pathname);
+ window.location = l;
+ }
+}
+
+function loadLangPref() {
+ var lang = readCookie("pref_lang");
+ if (lang != 0) {
+ $("#language").find("option[value='"+lang+"']").attr("selected",true);
+ }
+}
+
+function getLangPref() {
+ var lang = $("#language").find(":selected").attr("value");
+ if (!lang) {
+ lang = readCookie("pref_lang");
+ }
+ return (lang != 0) ? lang : 'en';
+}
+
+
+function toggleContent(obj) {
+ var button = $(obj);
+ var div = $(obj.parentNode);
+ var toggleMe = $(".toggle-content-toggleme",div);
+ if (button.hasClass("show")) {
+ toggleMe.slideDown();
+ button.removeClass("show").addClass("hide");
+ } else {
+ toggleMe.slideUp();
+ button.removeClass("hide").addClass("show");
+ }
+ $("span", button).toggle();
+}
diff --git a/tools/droiddoc/templates-pdk/assets-pdk/favicon.ico b/tools/droiddoc/templates-pdk/assets/favicon.ico
similarity index 100%
rename from tools/droiddoc/templates-pdk/assets-pdk/favicon.ico
rename to tools/droiddoc/templates-pdk/assets/favicon.ico
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/rebox-gradient.gif b/tools/droiddoc/templates-pdk/assets/images/rebox-gradient.gif
new file mode 100644
index 0000000..124e844
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/rebox-gradient.gif
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets-pdk/placeholder b/tools/droiddoc/templates-pdk/assets/placeholder
similarity index 100%
rename from tools/droiddoc/templates-pdk/assets-pdk/placeholder
rename to tools/droiddoc/templates-pdk/assets/placeholder
diff --git a/tools/droiddoc/templates-pdk/customization.cs b/tools/droiddoc/templates-pdk/customization.cs
index dfebb12..3e9be06 100644
--- a/tools/droiddoc/templates-pdk/customization.cs
+++ b/tools/droiddoc/templates-pdk/customization.cs
@@ -5,23 +5,28 @@
def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
- <a href="http://source.android.com" tabindex="-1"><img
- src="<?cs var:toroot ?>assets/images/open_source.png" alt="Open Source Project: Platform Development Kit" /></a>
- <ul class="<?cs
- if:releases ?> releases<?cs
- elif:guide ?> guide<?cs
- elif:licenses ?>licenses <?cs
- elif:home ?>home <?cs
- elif:community ?>community <?cs /if ?>">
+ <a href="<?cs var:toroot?>" tabindex="-1"><img
+ src="<?cs var:toroot ?>assets/images/open_source.png" alt="Android Open Source Project" /></a>
+ <ul class="<?cs if:home ?>home<?cs
+ elif:doc.type == "source" ?>source<?cs
+ elif:doc.type == "porting" ?>porting<?cs
+ elif:doc.type == "compatibility" ?>compatibility<?cs
+ elif:doc.type == "downloads" ?>downloads<?cs
+ elif:doc.type == "community" ?>community<?cs
+ elif:doc.type == "about" ?>about<?cs /if ?>">
<li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
- <li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html"
- onClick="return loadLast('guide)'"><span>Guide</span></a></li>
- <li id="releases-ink"><a href="<?cs var:toroot ?>releases/index.html"
- onClick="return loadLast('releases)'"><span>Releases</span></a></li>
- <li id="licenses-link"><a href="<?cs var:toroot ?>licenses/index.html"
- onClick="return loadLast('licenses)'"><span>Licenses</span></a></li>
+ <li id="source-link"><a href="<?cs var:toroot ?>source/index.html"
+ onClick="return loadLast('source')"><span>Source</span></a></li>
+ <li id="porting-link"><a href="<?cs var:toroot ?>porting/index.html"
+ onClick="return loadLast('porting')"><span>Porting</span></a></li>
+ <li id="compatibility-link"><a href="<?cs var:toroot ?>compatibility/index.html"
+ onClick="return loadLast('compatibility')"><span>Compatibility</span></a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
- onClick="return loadLast('community)'"><span>Community</span></a></li>
+ onClick="return loadLast('community')"><span>Community</span></a></li>
+ <li id="downloads-link"><a href="<?cs var:toroot ?>downloads/index.html"
+ onClick="return loadLast('downloads')"><span>Downloads</span></a></li>
+ <li id="about-link"><a href="<?cs var:toroot ?>about/index.html"
+ onClick="return loadLast('about')"><span>About</span></a></li>
</ul>
</div>
<div id="headerRight">
@@ -37,12 +42,11 @@
/def ?><?cs # custom_masthead ?>
-<?cs
-def:guide_nav() ?>
+<?cs def:community_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
- include:"../../../../development/pdk/docs/guide/pdk_toc.cs" ?>
+ include:"../../../../development/pdk/docs/community/community_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
@@ -50,14 +54,14 @@
scrollIntoView("devdoc-nav");
});
</script>
+ </div>
<?cs /def ?>
-<?cs
-def:licenses_nav() ?>
+<?cs def:about_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
- include:"../../../../development/pdk/docs/licenses/licenses_toc.cs" ?>
+ include:"../../../../development/pdk/docs/about/about_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
@@ -65,14 +69,14 @@
scrollIntoView("devdoc-nav");
});
</script>
+ </div>
<?cs /def ?>
-<?cs
-def:releases_nav() ?>
+<?cs def:porting_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
- include:"../../../../development/pdk/docs/releases/releases_toc.cs" ?>
+ include:"../../../../development/pdk/docs/porting/porting_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
@@ -80,18 +84,71 @@
scrollIntoView("devdoc-nav");
});
</script>
+ </div>
<?cs /def ?>
-<?cs
-def:custom_left_nav() ?><?cs
- if:doc.type == "guide" ?><?cs
- call:guide_nav() ?><?cs
- elif:doc.type == "licenses" ?><?cs
- call:licenses_nav() ?><?cs
- elif:doc.type == "releases" ?><?cs
- call:releases_nav() ?><?cs
- /if ?><?cs
-/def ?>
+<?cs def:source_nav() ?>
+ <div class="g-section g-tpl-240" id="body-content">
+ <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div id="devdoc-nav"><?cs
+ include:"../../../../development/pdk/docs/source/source_toc.cs" ?>
+ </div>
+ </div> <!-- end side-nav -->
+ <script>
+ addLoadEvent(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+ </div>
+<?cs /def ?>
+
+<?cs def:downloads_nav() ?>
+ <div class="g-section g-tpl-240" id="body-content">
+ <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div id="devdoc-nav"><?cs
+ include:"../../../../development/pdk/docs/downloads/downloads_toc.cs" ?>
+ </div>
+ </div> <!-- end side-nav -->
+ <script>
+ addLoadEvent(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+ </div>
+<?cs /def ?>
+
+<?cs def:compatibility_nav() ?>
+ <div class="g-section g-tpl-240" id="body-content">
+ <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div id="devdoc-nav"><?cs
+ include:"../../../../development/pdk/docs/compatibility/compatibility_toc.cs" ?>
+ </div>
+ </div> <!-- end side-nav -->
+ <script>
+ addLoadEvent(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+ </div>
+<?cs /def ?>
+
+<?cs def:custom_left_nav() ?>
+ <?cs if:doc.hidenav != "true" ?>
+ <?cs if:doc.type == "source" ?>
+ <?cs call:source_nav() ?>
+ <?cs elif:doc.type == "porting" ?>
+ <?cs call:porting_nav() ?>
+ <?cs elif:doc.type == "compatibility" ?>
+ <?cs call:compatibility_nav() ?>
+ <?cs elif:doc.type == "downloads" ?>
+ <?cs call:downloads_nav() ?>
+ <?cs elif:doc.type == "community" ?>
+ <?cs call:community_nav() ?>
+ <?cs elif:doc.type == "about" ?>
+ <?cs call:about_nav() ?>
+ <?cs /if ?>
+ <?cs /if ?>
+<?cs /def ?>
<?cs # appears at the bottom of every page ?><?cs
def:custom_cc_copyright() ?>
diff --git a/tools/droiddoc/templates-pdk/head_tag.cs b/tools/droiddoc/templates-pdk/head_tag.cs
index 47b332a..915dc0e 100644
--- a/tools/droiddoc/templates-pdk/head_tag.cs
+++ b/tools/droiddoc/templates-pdk/head_tag.cs
@@ -11,7 +11,6 @@
<link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" />
<link href="<?cs var:toroot ?>assets-pdk/pdk-local.css" rel="stylesheet" type="text/css" />
<script src="<?cs var:toroot ?>assets/search_autocomplete.js" type="text/javascript"></script>
-<script src="<?cs var:toroot ?>reference/lists.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>assets/jquery-resizable.min.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>assets/android-developer-docs.js" type="text/javascript"></script>
<script type="text/javascript">
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 604b5ee..1ebfb69 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -151,6 +151,10 @@
</a>
</div>
+ <p>If you are new to the Android SDK, please read the <a href="#quickstart">Quick Start</a>,
+ below, for an overview of how to install and set up the SDK.</p>
+
+
<table class="download">
<tr>
<th>Platform</th>
@@ -200,14 +204,17 @@
<?cs if:android.whichdoc != "online" && sdk.preview ?>
<p>Welcome developers! The next release of the Android platform will be
- Android 1.6 and we are pleased to announce the availability of an early look SDK
- to give you a head-start on developing applications for it. </p>
+Android <?cs var:sdk.preview.version ?> and we are pleased to announce the
+availability of an early look SDK to give you a head-start on developing
+applications for it. </p>
- <p>The Android 1.6 platform includes a variety of improvements and new features
- for users and developers. Additionally, the SDK itself introduces several new
- capabilities that enable you to develop applications more efficiently.
- See the <a href="http://developer.android.com/sdk/preview/features.html">
- Android 1.6 Highlights</a> document for a list of highlights.</p>
+ <p>The Android <?cs var:sdk.preview.version ?> platform includes a variety of
+improvements and new features for users and developers. Additionally, the SDK
+itself introduces several new capabilities that enable you to develop
+applications more efficiently. See the <a
+href="http://developer.android.com/sdk/preview/features.html">Android
+<?cs var:sdk.preview.version ?> Highlights</a> document for a list of
+highlights.</p>
<?cs /if ?>
<?cs call:tag_list(root.descr) ?>
diff --git a/tools/event_log_tags.py b/tools/event_log_tags.py
new file mode 100644
index 0000000..4e6d960
--- /dev/null
+++ b/tools/event_log_tags.py
@@ -0,0 +1,124 @@
+# Copyright (C) 2009 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.
+
+"""A module for reading and parsing event-log-tags files."""
+
+import re
+import sys
+
+class Tag(object):
+ __slots__ = ["tagnum", "tagname", "description", "filename", "linenum"]
+
+ def __init__(self, tagnum, tagname, description, filename, linenum):
+ self.tagnum = tagnum
+ self.tagname = tagname
+ self.description = description
+ self.filename = filename
+ self.linenum = linenum
+
+
+class TagFile(object):
+ """Read an input event-log-tags file."""
+ def AddError(self, msg, linenum=None):
+ if linenum is None:
+ linenum = self.linenum
+ self.errors.append((self.filename, linenum, msg))
+
+ def AddWarning(self, msg, linenum=None):
+ if linenum is None:
+ linenum = self.linenum
+ self.warnings.append((self.filename, linenum, msg))
+
+ def __init__(self, filename, file_object=None):
+ """'filename' is the name of the file (included in any error
+ messages). If 'file_object' is None, 'filename' will be opened
+ for reading."""
+ self.errors = []
+ self.warnings = []
+ self.tags = []
+ self.options = {}
+
+ self.filename = filename
+ self.linenum = 0
+
+ if file_object is None:
+ try:
+ file_object = open(filename, "rb")
+ except (IOError, OSError), e:
+ self.AddError(str(e))
+ return
+
+ try:
+ for self.linenum, line in enumerate(file_object):
+ self.linenum += 1
+
+ line = line.strip()
+ if not line or line[0] == '#': continue
+ parts = re.split(r"\s+", line, 2)
+
+ if len(parts) < 2:
+ self.AddError("failed to parse \"%s\"" % (line,))
+ continue
+
+ if parts[0] == "option":
+ self.options[parts[1]] = parts[2:]
+ continue
+
+ try:
+ tag = int(parts[0])
+ except ValueError:
+ self.AddError("\"%s\" isn't an integer tag" % (parts[0],))
+ continue
+
+ tagname = parts[1]
+ if len(parts) == 3:
+ description = parts[2]
+ else:
+ description = None
+
+ self.tags.append(Tag(tag, tagname, description,
+ self.filename, self.linenum))
+ except (IOError, OSError), e:
+ self.AddError(str(e))
+
+
+def BooleanFromString(s):
+ """Interpret 's' as a boolean and return its value. Raise
+ ValueError if it's not something we can interpret as true or
+ false."""
+ s = s.lower()
+ if s in ("true", "t", "1", "on", "yes", "y"):
+ return True
+ if s in ("false", "f", "0", "off", "no", "n"):
+ return False
+ raise ValueError("'%s' not a valid boolean" % (s,))
+
+
+def WriteOutput(output_file, data):
+ """Write 'data' to the given output filename (which may be None to
+ indicate stdout). Emit an error message and die on any failure.
+ 'data' may be a string or a StringIO object."""
+ if not isinstance(data, str):
+ data = data.getvalue()
+ try:
+ if output_file is None:
+ out = sys.stdout
+ output_file = "<stdout>"
+ else:
+ out = open(output_file, "wb")
+ out.write(data)
+ out.close()
+ except (IOError, OSError), e:
+ print >> sys.stderr, "failed to write %s: %s" % (output_file, e)
+ sys.exit(1)
diff --git a/tools/java-event-log-tags.py b/tools/java-event-log-tags.py
new file mode 100755
index 0000000..3713bd8
--- /dev/null
+++ b/tools/java-event-log-tags.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2009 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.
+
+"""
+Usage: java-event-log-tags.py [-o output_file] <input_file>
+
+Generate a java class containing constants for each of the event log
+tags in the given input file.
+
+-h to display this usage message and exit.
+"""
+
+import cStringIO
+import getopt
+import os
+import re
+import sys
+
+import event_log_tags
+
+output_file = None
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "ho:")
+except getopt.GetoptError, err:
+ print str(err)
+ print __doc__
+ sys.exit(2)
+
+for o, a in opts:
+ if o == "-h":
+ print __doc__
+ sys.exit(2)
+ elif o == "-o":
+ output_file = a
+ else:
+ print >> sys.stderr, "unhandled option %s" % (o,)
+ sys.exit(1)
+
+if len(args) != 1:
+ print "need exactly one input file, not %d" % (len(args),)
+ print __doc__
+ sys.exit(1)
+
+fn = args[0]
+tagfile = event_log_tags.TagFile(fn)
+
+if "java_package" not in tagfile.options:
+ tagfile.AddError("java_package option not specified", linenum=0)
+
+hide = True
+if "javadoc_hide" in tagfile.options:
+ hide = event_log_tags.BooleanFromString(tagfile.options["javadoc_hide"][0])
+
+if tagfile.errors:
+ for fn, ln, msg in tagfile.errors:
+ print >> sys.stderr, "%s:%d: error: %s" % (fn, ln, msg)
+ sys.exit(1)
+
+buffer = cStringIO.StringIO()
+buffer.write("/* This file is auto-generated. DO NOT MODIFY.\n"
+ " * Source file: %s\n"
+ " */\n\n" % (fn,))
+
+buffer.write("package %s;\n\n" % (tagfile.options["java_package"][0],))
+
+basename, _ = os.path.splitext(os.path.basename(fn))
+
+if hide:
+ buffer.write("/**\n"
+ " * @hide\n"
+ " */\n")
+buffer.write("public class %s {\n" % (basename,))
+buffer.write(" private %s() { } // don't instantiate\n" % (basename,))
+
+for t in tagfile.tags:
+ if t.description:
+ buffer.write("\n /** %d %s %s */\n" % (t.tagnum, t.tagname, t.description))
+ else:
+ buffer.write("\n /** %d %s */\n" % (t.tagnum, t.tagname))
+
+ buffer.write(" public static final int %s = %d;\n" %
+ (t.tagname.upper(), t.tagnum))
+
+keywords = frozenset(["abstract", "continue", "for", "new", "switch", "assert",
+ "default", "goto", "package", "synchronized", "boolean",
+ "do", "if", "private", "this", "break", "double",
+ "implements", "protected", "throw", "byte", "else",
+ "import", "public", "throws", "case", "enum",
+ "instanceof", "return", "transient", "catch", "extends",
+ "int", "short", "try", "char", "final", "interface",
+ "static", "void", "class", "finally", "long", "strictfp",
+ "volatile", "const", "float", "native", "super", "while"])
+
+def javaName(name):
+ out = name[0].lower() + re.sub(r"[^A-Za-z0-9]", "", name.title())[1:]
+ if out in keywords:
+ out += "_"
+ return out
+
+javaTypes = ["ERROR", "int", "long", "String", "Object[]"]
+for t in tagfile.tags:
+ methodName = javaName("write_" + t.tagname)
+ if t.description:
+ args = [arg.strip("() ").split("|") for arg in t.description.split(",")]
+ else:
+ args = []
+ argTypesNames = ", ".join([javaTypes[int(arg[1])] + " " + javaName(arg[0]) for arg in args])
+ argNames = "".join([", " + javaName(arg[0]) for arg in args])
+ buffer.write("\n public static void %s(%s) {" % (methodName, argTypesNames))
+ buffer.write("\n android.util.EventLog.writeEvent(%s%s);" % (t.tagname.upper(), argNames))
+ buffer.write("\n }\n")
+
+
+buffer.write("}\n");
+
+event_log_tags.WriteOutput(output_file, buffer)
diff --git a/tools/merge-event-log-tags.py b/tools/merge-event-log-tags.py
new file mode 100755
index 0000000..2852612
--- /dev/null
+++ b/tools/merge-event-log-tags.py
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2009 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.
+
+"""
+Usage: merge-event-log-tags.py [-o output_file] [input_files...]
+
+Merge together zero or more event-logs-tags files to produce a single
+output file, stripped of comments. Checks that no tag numbers conflict
+and fails if they do.
+
+-h to display this usage message and exit.
+"""
+
+import cStringIO
+import getopt
+import sys
+
+import event_log_tags
+
+by_tagnum = {}
+errors = []
+warnings = []
+
+output_file = None
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "ho:")
+except getopt.GetoptError, err:
+ print str(err)
+ print __doc__
+ sys.exit(2)
+
+for o, a in opts:
+ if o == "-h":
+ print __doc__
+ sys.exit(2)
+ elif o == "-o":
+ output_file = a
+ else:
+ print >> sys.stderr, "unhandled option %s" % (o,)
+ sys.exit(1)
+
+for fn in args:
+ tagfile = event_log_tags.TagFile(fn)
+
+ for t in tagfile.tags:
+ tagnum = t.tagnum
+ tagname = t.tagname
+ description = t.description
+
+ if t.tagnum in by_tagnum:
+ orig = by_tagnum[t.tagnum]
+
+ if (t.tagname == orig.tagname and
+ t.description == orig.description):
+ # if the name and description are identical, issue a warning
+ # instead of failing (to make it easier to move tags between
+ # projects without breaking the build).
+ tagfile.AddWarning("tag %d \"%s\" duplicated in %s:%d" %
+ (t.tagnum, t.tagname, orig.filename, orig.linenum),
+ linenum=t.linenum)
+ else:
+ tagfile.AddError("tag %d used by conflicting \"%s\" from %s:%d" %
+ (t.tagnum, orig.tagname, orig.filename, orig.linenum),
+ linenum=t.linenum)
+ continue
+
+ by_tagnum[t.tagnum] = t
+
+ errors.extend(tagfile.errors)
+ warnings.extend(tagfile.warnings)
+
+if errors:
+ for fn, ln, msg in errors:
+ print >> sys.stderr, "%s:%d: error: %s" % (fn, ln, msg)
+ sys.exit(1)
+
+if warnings:
+ for fn, ln, msg in warnings:
+ print >> sys.stderr, "%s:%d: warning: %s" % (fn, ln, msg)
+
+buffer = cStringIO.StringIO()
+for n in sorted(by_tagnum):
+ t = by_tagnum[n]
+ if t.description:
+ buffer.write("%d %s %s\n" % (t.tagnum, t.tagname, t.description))
+ else:
+ buffer.write("%d %s\n" % (t.tagnum, t.tagname))
+
+event_log_tags.WriteOutput(output_file, buffer)
diff --git a/tools/releasetools/check_target_files_signatures b/tools/releasetools/check_target_files_signatures
new file mode 100755
index 0000000..17aebdc
--- /dev/null
+++ b/tools/releasetools/check_target_files_signatures
@@ -0,0 +1,449 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2009 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.
+
+"""
+Check the signatures of all APKs in a target_files .zip file. With
+-c, compare the signatures of each package to the ones in a separate
+target_files (usually a previously distributed build for the same
+device) and flag any changes.
+
+Usage: check_target_file_signatures [flags] target_files
+
+ -c (--compare_with) <other_target_files>
+ Look for compatibility problems between the two sets of target
+ files (eg., packages whose keys have changed).
+
+ -l (--local_cert_dirs) <dir,dir,...>
+ Comma-separated list of top-level directories to scan for
+ .x509.pem files. Defaults to "vendor,build". Where cert files
+ can be found that match APK signatures, the filename will be
+ printed as the cert name, otherwise a hash of the cert plus its
+ subject string will be printed instead.
+
+ -t (--text)
+ Dump the certificate information for both packages in comparison
+ mode (this output is normally suppressed).
+
+"""
+
+import sys
+
+if sys.hexversion < 0x02040000:
+ print >> sys.stderr, "Python 2.4 or newer is required."
+ sys.exit(1)
+
+import os
+import re
+import sha
+import shutil
+import subprocess
+import tempfile
+import zipfile
+
+import common
+
+# Work around a bug in python's zipfile module that prevents opening
+# of zipfiles if any entry has an extra field of between 1 and 3 bytes
+# (which is common with zipaligned APKs). This overrides the
+# ZipInfo._decodeExtra() method (which contains the bug) with an empty
+# version (since we don't need to decode the extra field anyway).
+class MyZipInfo(zipfile.ZipInfo):
+ def _decodeExtra(self):
+ pass
+zipfile.ZipInfo = MyZipInfo
+
+OPTIONS = common.OPTIONS
+
+OPTIONS.text = False
+OPTIONS.compare_with = None
+OPTIONS.local_cert_dirs = ("vendor", "build")
+
+PROBLEMS = []
+PROBLEM_PREFIX = []
+
+def AddProblem(msg):
+ PROBLEMS.append(" ".join(PROBLEM_PREFIX) + " " + msg)
+def Push(msg):
+ PROBLEM_PREFIX.append(msg)
+def Pop():
+ PROBLEM_PREFIX.pop()
+
+
+def Banner(msg):
+ print "-" * 70
+ print " ", msg
+ print "-" * 70
+
+
+def GetCertSubject(cert):
+ p = common.Run(["openssl", "x509", "-inform", "DER", "-text"],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ out, err = p.communicate(cert)
+ if err and not err.strip():
+ return "(error reading cert subject)"
+ for line in out.split("\n"):
+ line = line.strip()
+ if line.startswith("Subject:"):
+ return line[8:].strip()
+ return "(unknown cert subject)"
+
+
+class CertDB(object):
+ def __init__(self):
+ self.certs = {}
+
+ def Add(self, cert, name=None):
+ if cert in self.certs:
+ if name:
+ self.certs[cert] = self.certs[cert] + "," + name
+ else:
+ if name is None:
+ name = "unknown cert %s (%s)" % (sha.sha(cert).hexdigest()[:12],
+ GetCertSubject(cert))
+ self.certs[cert] = name
+
+ def Get(self, cert):
+ """Return the name for a given cert."""
+ return self.certs.get(cert, None)
+
+ def FindLocalCerts(self):
+ to_load = []
+ for top in OPTIONS.local_cert_dirs:
+ for dirpath, dirnames, filenames in os.walk(top):
+ certs = [os.path.join(dirpath, i)
+ for i in filenames if i.endswith(".x509.pem")]
+ if certs:
+ to_load.extend(certs)
+
+ for i in to_load:
+ f = open(i)
+ cert = ParseCertificate(f.read())
+ f.close()
+ name, _ = os.path.splitext(i)
+ name, _ = os.path.splitext(name)
+ self.Add(cert, name)
+
+ALL_CERTS = CertDB()
+
+
+def ParseCertificate(data):
+ """Parse a PEM-format certificate."""
+ cert = []
+ save = False
+ for line in data.split("\n"):
+ if "--END CERTIFICATE--" in line:
+ break
+ if save:
+ cert.append(line)
+ if "--BEGIN CERTIFICATE--" in line:
+ save = True
+ cert = "".join(cert).decode('base64')
+ return cert
+
+
+def CertFromPKCS7(data, filename):
+ """Read the cert out of a PKCS#7-format file (which is what is
+ stored in a signed .apk)."""
+ Push(filename + ":")
+ try:
+ p = common.Run(["openssl", "pkcs7",
+ "-inform", "DER",
+ "-outform", "PEM",
+ "-print_certs"],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ out, err = p.communicate(data)
+ if err and not err.strip():
+ AddProblem("error reading cert:\n" + err)
+ return None
+
+ cert = ParseCertificate(out)
+ if not cert:
+ AddProblem("error parsing cert output")
+ return None
+ return cert
+ finally:
+ Pop()
+
+
+class APK(object):
+ def __init__(self, full_filename, filename):
+ self.filename = filename
+ self.cert = None
+ Push(filename+":")
+ try:
+ self.RecordCert(full_filename)
+ self.ReadManifest(full_filename)
+ finally:
+ Pop()
+
+ def RecordCert(self, full_filename):
+ try:
+ f = open(full_filename)
+ apk = zipfile.ZipFile(f, "r")
+ pkcs7 = None
+ for info in apk.infolist():
+ if info.filename.startswith("META-INF/") and \
+ (info.filename.endswith(".DSA") or info.filename.endswith(".RSA")):
+ if pkcs7 is not None:
+ AddProblem("multiple certs")
+ pkcs7 = apk.read(info.filename)
+ self.cert = CertFromPKCS7(pkcs7, info.filename)
+ ALL_CERTS.Add(self.cert)
+ if not pkcs7:
+ AddProblem("no signature")
+ finally:
+ f.close()
+
+ def ReadManifest(self, full_filename):
+ p = common.Run(["aapt", "dump", "xmltree", full_filename,
+ "AndroidManifest.xml"],
+ stdout=subprocess.PIPE)
+ manifest, err = p.communicate()
+ if err:
+ AddProblem("failed to read manifest")
+ return
+
+ self.shared_uid = None
+ self.package = None
+
+ for line in manifest.split("\n"):
+ line = line.strip()
+ m = re.search('A: (\S*?)(?:\(0x[0-9a-f]+\))?="(.*?)" \(Raw', line)
+ if m:
+ name = m.group(1)
+ if name == "android:sharedUserId":
+ if self.shared_uid is not None:
+ AddProblem("multiple sharedUserId declarations")
+ self.shared_uid = m.group(2)
+ elif name == "package":
+ if self.package is not None:
+ AddProblem("multiple package declarations")
+ self.package = m.group(2)
+
+ if self.package is None:
+ AddProblem("no package declaration")
+
+
+class TargetFiles(object):
+ def __init__(self):
+ self.max_pkg_len = 30
+ self.max_fn_len = 20
+
+ def LoadZipFile(self, filename):
+ d = common.UnzipTemp(filename, '*.apk')
+ try:
+ self.apks = {}
+ self.apks_by_basename = {}
+ for dirpath, dirnames, filenames in os.walk(d):
+ for fn in filenames:
+ if fn.endswith(".apk"):
+ fullname = os.path.join(dirpath, fn)
+ displayname = fullname[len(d)+1:]
+ apk = APK(fullname, displayname)
+ self.apks[apk.package] = apk
+ self.apks_by_basename[os.path.basename(apk.filename)] = apk
+
+ self.max_pkg_len = max(self.max_pkg_len, len(apk.package))
+ self.max_fn_len = max(self.max_fn_len, len(apk.filename))
+ finally:
+ shutil.rmtree(d)
+
+ z = zipfile.ZipFile(open(filename, "rb"))
+ self.certmap = common.ReadApkCerts(z)
+ z.close()
+
+ def CheckSharedUids(self):
+ """Look for any instances where packages signed with different
+ certs request the same sharedUserId."""
+ apks_by_uid = {}
+ for apk in self.apks.itervalues():
+ if apk.shared_uid:
+ apks_by_uid.setdefault(apk.shared_uid, []).append(apk)
+
+ for uid in sorted(apks_by_uid.keys()):
+ apks = apks_by_uid[uid]
+ for apk in apks[1:]:
+ if apk.cert != apks[0].cert:
+ break
+ else:
+ # all the certs are the same; this uid is fine
+ continue
+
+ AddProblem("uid %s shared across multiple certs" % (uid,))
+
+ print "uid %s is shared by packages with different certs:" % (uid,)
+ x = [(i.cert, i.package, i) for i in apks]
+ x.sort()
+ lastcert = None
+ for cert, _, apk in x:
+ if cert != lastcert:
+ lastcert = cert
+ print " %s:" % (ALL_CERTS.Get(cert),)
+ print " %-*s [%s]" % (self.max_pkg_len,
+ apk.package, apk.filename)
+ print
+
+ def CheckExternalSignatures(self):
+ for apk_filename, certname in self.certmap.iteritems():
+ if certname == "EXTERNAL":
+ # Apps marked EXTERNAL should be signed with the test key
+ # during development, then manually re-signed after
+ # predexopting. Consider it an error if this app is now
+ # signed with any key that is present in our tree.
+ apk = self.apks_by_basename[apk_filename]
+ name = ALL_CERTS.Get(apk.cert)
+ if not name.startswith("unknown "):
+ Push(apk.filename)
+ AddProblem("hasn't been signed with EXTERNAL cert")
+ Pop()
+
+ def PrintCerts(self):
+ """Display a table of packages grouped by cert."""
+ by_cert = {}
+ for apk in self.apks.itervalues():
+ by_cert.setdefault(apk.cert, []).append((apk.package, apk))
+
+ order = [(-len(v), k) for (k, v) in by_cert.iteritems()]
+ order.sort()
+
+ for _, cert in order:
+ print "%s:" % (ALL_CERTS.Get(cert),)
+ apks = by_cert[cert]
+ apks.sort()
+ for _, apk in apks:
+ if apk.shared_uid:
+ print " %-*s %-*s [%s]" % (self.max_fn_len, apk.filename,
+ self.max_pkg_len, apk.package,
+ apk.shared_uid)
+ else:
+ print " %-*s %-*s" % (self.max_fn_len, apk.filename,
+ self.max_pkg_len, apk.package)
+ print
+
+ def CompareWith(self, other):
+ """Look for instances where a given package that exists in both
+ self and other have different certs."""
+
+ all = set(self.apks.keys())
+ all.update(other.apks.keys())
+
+ max_pkg_len = max(self.max_pkg_len, other.max_pkg_len)
+
+ by_certpair = {}
+
+ for i in all:
+ if i in self.apks:
+ if i in other.apks:
+ # in both; should have the same cert
+ if self.apks[i].cert != other.apks[i].cert:
+ by_certpair.setdefault((other.apks[i].cert,
+ self.apks[i].cert), []).append(i)
+ else:
+ print "%s [%s]: new APK (not in comparison target_files)" % (
+ i, self.apks[i].filename)
+ else:
+ if i in other.apks:
+ print "%s [%s]: removed APK (only in comparison target_files)" % (
+ i, other.apks[i].filename)
+
+ if by_certpair:
+ AddProblem("some APKs changed certs")
+ Banner("APK signing differences")
+ for (old, new), packages in sorted(by_certpair.items()):
+ print "was", ALL_CERTS.Get(old)
+ print "now", ALL_CERTS.Get(new)
+ for i in sorted(packages):
+ old_fn = other.apks[i].filename
+ new_fn = self.apks[i].filename
+ if old_fn == new_fn:
+ print " %-*s [%s]" % (max_pkg_len, i, old_fn)
+ else:
+ print " %-*s [was: %s; now: %s]" % (max_pkg_len, i,
+ old_fn, new_fn)
+ print
+
+
+def main(argv):
+ def option_handler(o, a):
+ if o in ("-c", "--compare_with"):
+ OPTIONS.compare_with = a
+ elif o in ("-l", "--local_cert_dirs"):
+ OPTIONS.local_cert_dirs = [i.strip() for i in a.split(",")]
+ elif o in ("-t", "--text"):
+ OPTIONS.text = True
+ else:
+ return False
+ return True
+
+ args = common.ParseOptions(argv, __doc__,
+ extra_opts="c:l:t",
+ extra_long_opts=["compare_with=",
+ "local_cert_dirs="],
+ extra_option_handler=option_handler)
+
+ if len(args) != 1:
+ common.Usage(__doc__)
+ sys.exit(1)
+
+ ALL_CERTS.FindLocalCerts()
+
+ Push("input target_files:")
+ try:
+ target_files = TargetFiles()
+ target_files.LoadZipFile(args[0])
+ finally:
+ Pop()
+
+ compare_files = None
+ if OPTIONS.compare_with:
+ Push("comparison target_files:")
+ try:
+ compare_files = TargetFiles()
+ compare_files.LoadZipFile(OPTIONS.compare_with)
+ finally:
+ Pop()
+
+ if OPTIONS.text or not compare_files:
+ Banner("target files")
+ target_files.PrintCerts()
+ target_files.CheckSharedUids()
+ target_files.CheckExternalSignatures()
+ if compare_files:
+ if OPTIONS.text:
+ Banner("comparison files")
+ compare_files.PrintCerts()
+ target_files.CompareWith(compare_files)
+
+ if PROBLEMS:
+ print "%d problem(s) found:\n" % (len(PROBLEMS),)
+ for p in PROBLEMS:
+ print p
+ return 1
+
+ return 0
+
+
+if __name__ == '__main__':
+ try:
+ r = main(sys.argv[1:])
+ sys.exit(r)
+ except common.ExternalError, e:
+ print
+ print " ERROR: %s" % (e,)
+ print
+ sys.exit(1)
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 26f216d..ab6678a 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -37,6 +37,11 @@
OPTIONS.device_specific = None
OPTIONS.extras = {}
+
+# Values for "certificate" in apkcerts that mean special things.
+SPECIAL_CERT_STRINGS = ("PRESIGNED", "EXTERNAL")
+
+
class ExternalError(RuntimeError): pass
@@ -141,12 +146,15 @@
BuildAndAddBootableImage(os.path.join(OPTIONS.input_tmp, "BOOT"),
"boot.img", output_zip)
-def UnzipTemp(filename):
+def UnzipTemp(filename, pattern=None):
"""Unzip the given archive into a temporary directory and return the name."""
tmp = tempfile.mkdtemp(prefix="targetfiles-")
OPTIONS.tempfiles.append(tmp)
- p = Run(["unzip", "-o", "-q", filename, "-d", tmp], stdout=subprocess.PIPE)
+ cmd = ["unzip", "-o", "-q", filename, "-d", tmp]
+ if pattern is not None:
+ cmd.append(pattern)
+ p = Run(cmd, stdout=subprocess.PIPE)
p.communicate()
if p.returncode != 0:
raise ExternalError("failed to unzip input target-files \"%s\"" %
@@ -163,9 +171,8 @@
need_passwords = []
devnull = open("/dev/null", "w+b")
for k in sorted(keylist):
- # An empty-string key is used to mean don't re-sign this package.
- # Obviously we don't need a password for this non-key.
- if not k:
+ # We don't need a password for things that aren't really keys.
+ if k in SPECIAL_CERT_STRINGS:
no_passwords.append(k)
continue
@@ -251,6 +258,28 @@
print " ", msg
+def ReadApkCerts(tf_zip):
+ """Given a target_files ZipFile, parse the META/apkcerts.txt file
+ and return a {package: cert} dict."""
+ certmap = {}
+ for line in tf_zip.read("META/apkcerts.txt").split("\n"):
+ line = line.strip()
+ if not line: continue
+ m = re.match(r'^name="(.*)"\s+certificate="(.*)"\s+'
+ r'private_key="(.*)"$', line)
+ if m:
+ name, cert, privkey = m.groups()
+ if cert in SPECIAL_CERT_STRINGS and not privkey:
+ certmap[name] = cert
+ elif (cert.endswith(".x509.pem") and
+ privkey.endswith(".pk8") and
+ cert[:-9] == privkey[:-4]):
+ certmap[name] = cert[:-9]
+ else:
+ raise ValueError("failed to parse line from apkcerts.txt:\n" + line)
+ return certmap
+
+
COMMON_DOCSTRING = """
-p (--path) <dir>
Prepend <dir>/bin to the list of places to search for binaries
diff --git a/tools/releasetools/sign_target_files_apks b/tools/releasetools/sign_target_files_apks
index 9d296d8..5fca691 100755
--- a/tools/releasetools/sign_target_files_apks
+++ b/tools/releasetools/sign_target_files_apks
@@ -83,17 +83,18 @@
OPTIONS.tag_changes = ("-test-keys", "+release-keys")
def GetApkCerts(tf_zip):
- certmap = {}
- for line in tf_zip.read("META/apkcerts.txt").split("\n"):
- line = line.strip()
- if not line: continue
- m = re.match(r'^name="(.*)"\s+certificate="(.*)\.x509\.pem"\s+'
- r'private_key="\2\.pk8"$', line)
- if not m:
- raise SigningError("failed to parse line from apkcerts.txt:\n" + line)
- certmap[m.group(1)] = OPTIONS.key_map.get(m.group(2), m.group(2))
- for apk, cert in OPTIONS.extra_apks.iteritems():
+ certmap = common.ReadApkCerts(tf_zip)
+
+ # apply the key remapping to the contents of the file
+ for apk, cert in certmap.iteritems():
certmap[apk] = OPTIONS.key_map.get(cert, cert)
+
+ # apply all the -e options, overriding anything in the file
+ for apk, cert in OPTIONS.extra_apks.iteritems():
+ if not cert:
+ cert = "PRESIGNED"
+ certmap[apk] = OPTIONS.key_map.get(cert, cert)
+
return certmap
@@ -114,68 +115,6 @@
sys.exit(1)
-def SharedUserForApk(data):
- tmp = tempfile.NamedTemporaryFile()
- tmp.write(data)
- tmp.flush()
-
- p = common.Run(["aapt", "dump", "xmltree", tmp.name, "AndroidManifest.xml"],
- stdout=subprocess.PIPE)
- data, _ = p.communicate()
- if p.returncode != 0:
- raise ExternalError("failed to run aapt dump")
- lines = data.split("\n")
- for i in lines:
- m = re.match(r'^\s*A: android:sharedUserId\([0-9a-fx]*\)="([^"]*)" .*$', i)
- if m:
- return m.group(1)
- return None
-
-
-def CheckSharedUserIdsConsistent(input_tf_zip, apk_key_map):
- """Check that all packages that request the same shared user id are
- going to be signed with the same key."""
-
- shared_user_apks = {}
- maxlen = len("(unknown key)")
-
- for info in input_tf_zip.infolist():
- if info.filename.endswith(".apk"):
- data = input_tf_zip.read(info.filename)
-
- name = os.path.basename(info.filename)
- shared_user = SharedUserForApk(data)
- key = apk_key_map[name]
- maxlen = max(maxlen, len(key))
-
- if shared_user is not None:
- shared_user_apks.setdefault(
- shared_user, {}).setdefault(key, []).append(name)
-
- errors = []
- for k, v in shared_user_apks.iteritems():
- # each shared user should have exactly one key used for all the
- # apks that want that user.
- if len(v) > 1:
- errors.append((k, v))
-
- if not errors: return
-
- print "ERROR: shared user inconsistency. All apks wanting to use"
- print " a given shared user must be signed with the same key."
- print
- errors.sort()
- for user, keys in errors:
- print 'shared user id "%s":' % (user,)
- for key, apps in keys.iteritems():
- print ' %-*s %s' % (maxlen, key or "(unknown key)", apps[0])
- for a in apps[1:]:
- print (' ' * (maxlen+5)) + a
- print
-
- sys.exit(1)
-
-
def SignApk(data, keyname, pw):
unsigned = tempfile.NamedTemporaryFile()
unsigned.write(data)
@@ -203,7 +142,7 @@
if info.filename.endswith(".apk"):
name = os.path.basename(info.filename)
key = apk_key_map[name]
- if key:
+ if key not in common.SPECIAL_CERT_STRINGS:
print " signing: %-*s (%s)" % (maxsize, name, key)
signed_data = SignApk(data, key, key_passwords[key])
output_tf_zip.writestr(out_info, signed_data)
@@ -221,6 +160,18 @@
output_tf_zip.writestr(out_info, data)
+def EditTags(tags):
+ """Given a string containing comma-separated tags, apply the edits
+ specified in OPTIONS.tag_changes and return the updated string."""
+ tags = set(tags.split(","))
+ for ch in OPTIONS.tag_changes:
+ if ch[0] == "-":
+ tags.discard(ch[1:])
+ elif ch[0] == "+":
+ tags.add(ch[1:])
+ return ",".join(sorted(tags))
+
+
def RewriteProps(data):
output = []
for line in data.split("\n"):
@@ -229,24 +180,17 @@
if line and line[0] != '#':
key, value = line.split("=", 1)
if key == "ro.build.fingerprint":
- pieces = line.split("/")
- tags = set(pieces[-1].split(","))
- for ch in OPTIONS.tag_changes:
- if ch[0] == "-":
- tags.discard(ch[1:])
- elif ch[0] == "+":
- tags.add(ch[1:])
- line = "/".join(pieces[:-1] + [",".join(sorted(tags))])
+ pieces = value.split("/")
+ pieces[-1] = EditTags(pieces[-1])
+ value = "/".join(pieces)
elif key == "ro.build.description":
- pieces = line.split(" ")
+ pieces = value.split(" ")
assert len(pieces) == 5
- tags = set(pieces[-1].split(","))
- for ch in OPTIONS.tag_changes:
- if ch[0] == "-":
- tags.discard(ch[1:])
- elif ch[0] == "+":
- tags.add(ch[1:])
- line = " ".join(pieces[:-1] + [",".join(sorted(tags))])
+ pieces[-1] = EditTags(pieces[-1])
+ value = " ".join(pieces)
+ elif key == "ro.build.tags":
+ value = EditTags(value)
+ line = key + "=" + value
if line != original_line:
print " replace: ", original_line
print " with: ", line
@@ -350,7 +294,6 @@
apk_key_map = GetApkCerts(input_zip)
CheckAllApksSigned(input_zip, apk_key_map)
- CheckSharedUserIdsConsistent(input_zip, apk_key_map)
key_passwords = common.GetKeyPasswords(set(apk_key_map.values()))
SignApks(input_zip, output_zip, apk_key_map, key_passwords)