Merge commit 'remotes/korg/cupcake' into cupcake_to_master

Conflicts:
	core/prelink-linux-arm.map
This commit is contained in:
Jean-Baptiste Queru 2009-03-18 16:58:18 -07:00
commit ccf4b83b02
98 changed files with 2018 additions and 1133 deletions

View File

@ -65,6 +65,14 @@ ifndef CUSTOM_MODULES
#CUSTOM_MODULES:=
endif
# Choose additional locales, like "en_US" or "it_IT", to add to any
# built product. Any locales that appear in CUSTOM_LOCALES but not in
# the locale list for the selected product will be added to the end
# of PRODUCT_LOCALES.
ifndef CUSTOM_LOCALES
#CUSTOM_LOCALES:=
endif
# If you have a special place to put your ouput files, set this, otherwise
# it goes to <build-root>/out
#OUT_DIR:=/tmp/stuff
@ -80,6 +88,11 @@ ifndef NO_FALLBACK_FONT
#NO_FALLBACK_FONT:=true
endif
# To enabled instrumentation in webcore based apps like gmail and
# the browser, define WEBCORE_INSTRUMENTATION:=true
#WEBCORE_INSTRUMENTATION:=true
#endif
# when the build system changes such that this file must be updated, this
# variable will be changed. After you have modified this file with the new
# changes (see buildspec.mk.default), update this to the new value from

View File

@ -60,6 +60,16 @@ $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/NOTICE.html)
$(call add-clean-step, find $(OUT_DIR) -type f -name "*.java" -print0 | xargs -0 rm -f)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sapphire/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/led)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/mountd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/mountd.conf)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Browser_intermediates)
$(call add-clean-step, rm -f vendor/google/apps/Talk/res/drawable/%*)
$(call add-clean-step, rm -rf $(OUT_DIR)/product/*/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_os_NetStat.o)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/libjni_andpyime_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/share)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/obj/SHARED_LIBRARIES/libwebcore_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST

View File

@ -109,6 +109,7 @@ $(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE)
PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \
PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \
BUILD_ID="$(BUILD_ID)" \
BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
BUILD_NUMBER="$(BUILD_NUMBER)" \
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
@ -196,20 +197,6 @@ $(APKCERTS_FILE): $(all_built_packages)
.PHONY: apkcerts-list
apkcerts-list: $(APKCERTS_FILE)
# -----------------------------------------------------------------
# installed file list
INSTALLED_FILES_FILE := $(PRODUCT_OUT)/installed-files.txt
$(INSTALLED_FILES_FILE): $(ALL_DEFAULT_INSTALLED_MODULES)
@echo Installed file list: $@
@mkdir -p $(dir $@)
@rm -f $@
$(hide) (cd $(PRODUCT_OUT) && \
find system data -type f -printf 'name="%p" size=%s\n') | \
sort > $@
.PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE)
# -----------------------------------------------------------------
# module info file
ifdef CREATE_MODULE_INFO_FILE
@ -559,6 +546,7 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT2),true)
## Generate an ext2 image
define build-userdataimage-target
$(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
@mkdir -p $(TARGET_OUT_DATA)
$(call build-userimage-ext2-target,$(TARGET_OUT_DATA),$(INSTALLED_USERDATAIMAGE_TARGET),userdata,)
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE))
endef
@ -568,6 +556,7 @@ else # TARGET_USERIMAGES_USE_EXT2 != true
## Generate a yaffs2 image
define build-userdataimage-target
$(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
@mkdir -p $(TARGET_OUT_DATA)
$(hide) $(MKYAFFS2) -f $(TARGET_OUT_DATA) $(INSTALLED_USERDATAIMAGE_TARGET)
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE))
endef
@ -615,7 +604,14 @@ recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET)
recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
recovery_resources := $(call include-path-for, recovery)/res
recovery_resources_common := $(call include-path-for, recovery)/res
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
$(recovery_resources_private) -type f)
ifeq ($(recovery_resources_private),)
$(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE))
endif
INTERNAL_RECOVERYIMAGE_ARGS := \
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
@ -633,7 +629,7 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \
$(recovery_binary) \
$(recovery_initrc) $(recovery_kernel) \
$(INSTALLED_2NDBOOTLOADER_TARGET) \
$(recovery_build_prop)
$(recovery_build_prop) $(recovery_resource_deps)
@echo ----- Making recovery image ------
rm -rf $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_OUT)
@ -645,7 +641,9 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) \
echo Modifying ramdisk contents...
cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
cp -rf $(recovery_resources) $(TARGET_RECOVERY_ROOT_OUT)/
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
$(foreach item,$(recovery_resources_private), \
cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | gzip > $(recovery_ramdisk)
@ -888,6 +886,21 @@ endif
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
# -----------------------------------------------------------------
# installed file list
# Depending on $(INSTALLED_SYSTEMIMAGE) ensures that it
# gets the DexOpt one if we're doing that.
INSTALLED_FILES_FILE := $(PRODUCT_OUT)/installed-files.txt
$(INSTALLED_FILES_FILE): $(INSTALLED_SYSTEMIMAGE)
@echo Installed file list: $@
@mkdir -p $(dir $@)
@rm -f $@
$(hide) build/tools/fileslist.py $(TARGET_OUT) $(TARGET_OUT_DATA) > $@
.PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE)
$(call dist-for-goals, sdk, $(INSTALLED_FILES_FILE))
# -----------------------------------------------------------------
# A zip of the tests that are built when running "make tests".
# This is very similar to BUILT_TARGET_FILES_PACKAGE, but we

View File

@ -188,9 +188,15 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* Adding the word ABSOLUTE below, so that the _stack below won't float
into a random section. If _stack is not absolutely with .stack section,
we saw that sometimes _stack got inserted into the .debug_frame section
because it's processed by the linker at that moment. As a result, _stack
symbol will get wrongly moved and gelf_update_symshndx() will return
invalid data. */
.stack 0x80000 :
{
_stack = .;
_stack = ABSOLUTE(.);
*(.stack)
}
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }

View File

@ -190,9 +190,15 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* Adding the word ABSOLUTE below, so that the _stack below won't float
into a random section. If _stack is not absolutely with .stack section,
we saw that sometimes _stack got inserted into the .debug_frame section
because it's processed by the linker at that moment. As a result, _stack
symbol will get wrongly moved and gelf_update_symshndx() will return
invalid data. */
.stack 0x80000 :
{
_stack = .;
_stack = ABSOLUTE(.);
*(.stack)
}
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }

View File

@ -82,7 +82,7 @@ ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES)))
endif
# The definition of should-install-to-system will be different depending
# on which goal (e.g., user/eng/sdk) is being built.
# on which goal (e.g., sdk or just droid) is being built.
ifdef LOCAL_IS_HOST_MODULE
use_data :=
else

View File

@ -91,6 +91,8 @@ $(yacc_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \
$(call transform-y-to-cpp,$(PRIVATE_CPP_EXTENSION))
$(yacc_headers): $(intermediates)/%.h: $(intermediates)/%$(LOCAL_CPP_EXTENSION)
$(yacc_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(yacc_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(yacc_objects): $(intermediates)/%.o: $(intermediates)/%$(LOCAL_CPP_EXTENSION)
$(transform-$(PRIVATE_HOST)cpp-to-o)
endif
@ -109,6 +111,8 @@ $(lex_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \
$(TOPDIR)$(LOCAL_PATH)/%.l
$(transform-l-to-cpp)
$(lex_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(lex_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(lex_objects): $(intermediates)/%.o: \
$(intermediates)/%$(LOCAL_CPP_EXTENSION) \
$(PRIVATE_ADDITIONAL_DEPENDENCIES) \

29
core/build_id.mk Normal file → Executable file
View File

@ -1,26 +1,3 @@
#
# Copyright (C) 2008 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.
#
#
# Defines branch-specific values.
#
# BUILD_ID is usually used to specify the branch name
# (like "MAIN") or a branch name and a release candidate
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
BUILD_ID := MAIN
# This branch was born out of a naming conventions fix.
# The decision was to keep the RC names the same.
export BUILD_ID=CRA71C

View File

@ -84,3 +84,121 @@ $(shell \
clean_steps_file :=
INTERNAL_CLEAN_STEPS :=
INTERNAL_CLEAN_BUILD_VERSION :=
# Since products and build variants (unfortunately) share the same
# PRODUCT_OUT staging directory, things can get out of sync if different
# build configurations are built in the same tree. The following logic
# will notice when the configuration has changed and remove the files
# necessary to keep things consistent.
previous_build_config_file := $(PRODUCT_OUT)/previous_build_config.mk
# TODO: this special case for the sdk is only necessary while "sdk"
# is a valid make target. Eventually, it will just be a product, at
# which point TARGET_PRODUCT will handle it and we can avoid this check
# of MAKECMDGOALS. The "addprefix" is just to keep things pretty.
ifneq ($(TARGET_PRODUCT),sdk)
building_sdk := $(addprefix -,$(filter sdk,$(MAKECMDGOALS)))
else
# Don't bother with this extra part when explicitly building the sdk product.
building_sdk :=
endif
# A change in the list of locales warrants an installclean, too.
locale_list := $(subst $(space),$(comma),$(strip $(PRODUCT_LOCALES)))
current_build_config := \
$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(locale_list)}
building_sdk :=
locale_list :=
force_installclean := false
# Read the current state from the file, if present.
# Will set PREVIOUS_BUILD_CONFIG.
#
PREVIOUS_BUILD_CONFIG :=
-include $(previous_build_config_file)
PREVIOUS_BUILD_CONFIG := $(strip $(PREVIOUS_BUILD_CONFIG))
ifdef PREVIOUS_BUILD_CONFIG
ifneq "$(current_build_config)" "$(PREVIOUS_BUILD_CONFIG)"
$(info *** Build configuration changed: "$(PREVIOUS_BUILD_CONFIG)" -> "$(current_build_config)")
ifneq ($(DISABLE_AUTO_INSTALLCLEAN),true)
force_installclean := true
else
$(info DISABLE_AUTO_INSTALLCLEAN is set; skipping auto-clean. Your tree may be in an inconsistent state.)
endif
endif
endif # else, this is the first build, so no need to clean.
PREVIOUS_BUILD_CONFIG :=
# Write the new state to the file.
#
$(shell \
mkdir -p $(dir $(previous_build_config_file)) && \
echo "PREVIOUS_BUILD_CONFIG := $(current_build_config)" > \
$(previous_build_config_file) \
)
previous_build_config_file :=
current_build_config :=
#
# installclean logic
#
# The files/dirs to delete during an installclean. This includes the
# non-common APPS directory, which may contain the wrong resources.
# Use "./" in front of the paths to avoid accidentally deleting random
# parts of the filesystem if any of the *_OUT vars resolve to blank.
#
# Deletes all of the files that change between different build types,
# like "make user" vs. "make sdk". This lets you work with different
# build types without having to do a full clean each time. E.g.:
#
# $ make -j8 all
# $ make installclean
# $ make -j8 user
# $ make installclean
# $ make -j8 sdk
#
installclean_files := \
./$(HOST_OUT)/obj/NOTICE_FILES \
./$(HOST_OUT)/sdk \
./$(PRODUCT_OUT)/*.img \
./$(PRODUCT_OUT)/*.txt \
./$(PRODUCT_OUT)/*.xlb \
./$(PRODUCT_OUT)/*.zip \
./$(PRODUCT_OUT)/data \
./$(PRODUCT_OUT)/obj/APPS \
./$(PRODUCT_OUT)/obj/NOTICE_FILES \
./$(PRODUCT_OUT)/obj/PACKAGING \
./$(PRODUCT_OUT)/recovery \
./$(PRODUCT_OUT)/root \
./$(PRODUCT_OUT)/system
# The files/dirs to delete during a dataclean, which removes any files
# in the staging and emulator data partitions.
dataclean_files := \
./$(PRODUCT_OUT)/data/* \
./$(PRODUCT_OUT)/data-qemu/* \
./$(PRODUCT_OUT)/userdata-qemu.img
# Define the rules for commandline invocation.
.PHONY: dataclean
dataclean: FILES := $(dataclean_files)
dataclean:
$(hide) rm -rf $(FILES)
@echo "Deleted emulator userdata images."
.PHONY: installclean
installclean: FILES := $(installclean_files)
installclean: dataclean
$(hide) rm -rf $(FILES)
@echo "Deleted images and staging directories."
ifeq "$(force_installclean)" "true"
$(info *** Forcing "make installclean"...)
$(shell rm -rf $(dataclean_files) $(installclean_files))
$(info *** Done with the cleaning, now starting the real build.)
endif
force_installclean :=

View File

@ -93,9 +93,5 @@ define get-file-size
stat -f "%z" $(1)
endef
# Which gcc to use to build qemu, which doesn't work right when
# built with 4.2.1 or later.
GCCQEMU := prebuilt/darwin-x86/toolchain/i686-apple-darwin8-4.0.1/bin/gcc
endif

View File

@ -67,7 +67,8 @@ $(combo_target)LD := $($(combo_target)TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
$(combo_target)NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
TARGET_arm_release_CFLAGS := -fomit-frame-pointer \
TARGET_arm_release_CFLAGS := -O2 \
-fomit-frame-pointer \
-fstrict-aliasing \
-funswitch-loops \
-finline-limit=300
@ -128,7 +129,7 @@ $(combo_target)GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden
$(combo_target)RELEASE_CFLAGS := \
-DSK_RELEASE -DNDEBUG \
-O2 -g \
-g \
-Wstrict-aliasing=2 \
-finline-functions \
-fno-inline-functions-called-once \

View File

@ -12,12 +12,7 @@ ifeq ($(combo_target),HOST_)
define get-file-size
stat --format "%s" "$(1)"
endef
# Which gcc to use to build qemu, which doesn't work right when
# built with 4.2.1 or later.
GCCQEMU := prebuilt/linux-x86/toolchain/i686-linux-gnu-3.4.6/bin/gcc
endif # _HOST
endif
# On the sim, we build the "host" tools in 64 bit iff the compiler
# does it for us automatically. In other words, that means on 64 bit

View File

@ -20,6 +20,7 @@ SRC_HEADERS := \
$(TOPDIR)hardware/ril/include \
$(TOPDIR)dalvik/libnativehelper/include \
$(TOPDIR)frameworks/base/include \
$(TOPDIR)frameworks/base/opengl/include \
$(TOPDIR)external/skia/include
SRC_HOST_HEADERS:=$(TOPDIR)tools/include
SRC_LIBRARIES:= $(TOPDIR)libs
@ -87,6 +88,8 @@ COMMON_PACKAGE_SUFFIX := .zip
COMMON_JAVA_PACKAGE_SUFFIX := .jar
COMMON_ANDROID_PACKAGE_SUFFIX := .apk
# list of flags to turn specific warnings in to errors
TARGET_ERROR_FLAGS := -Werror=return-type
# ###############################################################
# Include sub-configuration files
@ -245,6 +248,16 @@ TARGET_GLOBAL_LD_DIRS += -L$(TARGET_OUT_INTERMEDIATE_LIBRARIES)
HOST_PROJECT_INCLUDES:= $(SRC_HEADERS) $(SRC_HOST_HEADERS) $(HOST_OUT_HEADERS)
TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS)
# Many host compilers don't support these flags, so we have to make
# sure to only specify them for the target compilers checked in to
# the source tree. The simulator uses the target flags but the
# host compiler, so only set them for the target when the target
# is not the simulator.
ifneq ($(TARGET_SIMULATOR),true)
TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS)
TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS)
endif
ifeq ($(HOST_BUILD_TYPE),release)
HOST_GLOBAL_CFLAGS+= $(HOST_RELEASE_CFLAGS)
HOST_GLOBAL_CPPFLAGS+= $(HOST_RELEASE_CPPFLAGS)

View File

@ -558,7 +558,7 @@ hide := @
else
define pretty
endef
hide :=
hide :=
endif
###########################################################
@ -984,7 +984,7 @@ endef
###########################################################
## Commands for running gcc to link a statically linked
## executable. In practice, we only use this on arm, so
## the other platforms don't have the
## the other platforms don't have the
## transform-o-to-static-executable defined
###########################################################
@ -1033,7 +1033,7 @@ endef
###########################################################
## Commands for running javac to make .class files
## Commands for running javac to make .class files
###########################################################
#@echo "Source intermediates dir: $(PRIVATE_SOURCE_INTERMEDIATES_DIR)"
@ -1064,9 +1064,9 @@ $(hide) $(AAPT) package $(PRIVATE_AAPT_FLAGS) -m -z \
endef
ifeq ($(HOST_OS),windows)
xlint_unchecked :=
xlint_unchecked :=
else
#xlint_unchecked := -Xlint:unchecked
#xlint_unchecked := -Xlint:unchecked
endif
# emit-line, <word list>, <output file>
@ -1102,7 +1102,7 @@ endef
# For a list of jar files, unzip them to a specified directory,
# but make sure that no META-INF files come along for the ride.
#
#
# $(1): files to unzip
# $(2): destination directory
define unzip-jar-files
@ -1250,7 +1250,7 @@ $(hide) if [ -f "$(PRIVATE_INTERMEDIATES_DIR)/classes.lst" ]; then \
endef
# TODO(joeo): If we can ever upgrade to post 3.81 make and get the
# new prebuilt rules to work, we should change this to copy the
# new prebuilt rules to work, we should change this to copy the
# resources to the out directory and then copy the resources.
# Note: not using aapt tool for this because we aren't making
@ -1263,11 +1263,15 @@ define transform-host-java-to-package
@mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES), \
$(PRIVATE_CLASS_INTERMEDIATES_DIR))
$(call dump-words-to-file,$(sort\
$(PRIVATE_JAVA_SOURCES)),\
$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq)
$(hide) $(HOST_JAVAC) -encoding ascii -g \
$(xlint_unchecked) \
$(addprefix -classpath ,$(strip \
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) $(PRIVATE_JAVA_SOURCES) || \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR)\
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq || \
( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
$@ $(PRIVATE_JAR_MANIFEST) $(PRIVATE_EXTRA_JAR_ARGS) \
@ -1482,4 +1486,3 @@ include $(BUILD_SYSTEM)/distdir.mk
# sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
# -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
# rm -f $*.d

View File

@ -46,13 +46,20 @@ endef
# and "dist" is specified, the marked files will be copied to DIST_DIR.
#
# $(1): a list of goals (e.g. droid, sdk, pdk, ndk)
# $(2): the dist files to add to those goals
# $(2): the dist files to add to those goals. If the file contains ':',
# the text following the colon is the name that the file is copied
# to under the dist directory. Subdirs are ok, and will be created
# at copy time if necessary.
define dist-for-goals
$(foreach file,$(2), \
$(eval fw := $(subst :,$(space),$(file))) \
$(eval src := $(word 1,$(fw))) \
$(eval dst := $(word 2,$(fw))) \
$(eval dst := $(if $(dst),$(dst),$(notdir $(src)))) \
$(eval \
$(call copy-one-dist-file, \
$(file), \
$(DIST_DIR)/$(notdir $(file)), \
$(src), \
$(DIST_DIR)/$(dst), \
$(1) \
) \
) \

View File

@ -101,6 +101,8 @@ $(info ***************************************************************)
$(info ***************************************************************)
$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \
the make command line.)
# XXX The single quote on this line fixes gvim's syntax highlighting.
# Without which, the rest of this file is impossible to read.
$(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or)
$(info choosecombo.)
$(info ***************************************************************)
@ -108,6 +110,15 @@ $(info ***************************************************************)
$(error stopping)
endif
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
$(info ***************************************************************)
$(info ***************************************************************)
$(info Invalid variant: $(TARGET_BUILD_VARIANT)
$(info Valid values are: $(INTERNAL_VALID_VARIANTS)
$(info ***************************************************************)
$(info ***************************************************************)
$(error stopping)
endif
###
### In this section we set up the things that are different
@ -122,10 +133,10 @@ ifneq (,$(user_variant))
# Target is secure in user builds.
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
override_build_tags := user
tags_to_install := user
ifeq ($(user_variant),userdebug)
# Pick up some extra useful tools
override_build_tags += debug
tags_to_install += debug
else
# Disable debugging in plain user builds.
enable_target_debugging :=
@ -136,11 +147,17 @@ ifneq (,$(user_variant))
ifeq ($(HOST_OS)-$(WITH_DEXPREOPT_buildbot),linux-true)
WITH_DEXPREOPT := true
endif
# Disallow mock locations by default for user builds
ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0
else # !user_variant
# Turn on checkjni for non-user builds.
ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1
# Set device insecure for non-user builds.
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
# Allow mock locations by default for non user builds
ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1
endif # !user_variant
ifeq (true,$(strip $(enable_target_debugging)))
@ -153,10 +170,19 @@ else # !enable_target_debugging
ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 persist.service.adb.enable=0
endif # !enable_target_debugging
## eng ##
ifeq ($(TARGET_BUILD_VARIANT),eng)
tags_to_install := user debug eng
# Don't require the setup wizard on eng builds
ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\
$(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES)))
endif
## tests ##
ifeq ($(TARGET_BUILD_VARIANT),tests)
override_build_tags := eng debug user development tests
tags_to_install := user debug eng tests
endif
## sdk ##
@ -165,7 +191,9 @@ ifneq ($(filter sdk,$(MAKECMDGOALS)),)
ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))),1)
$(error The 'sdk' target may not be specified with any other targets)
endif
override_build_tags := user
# TODO: this should be eng I think. Since the sdk is built from the eng
# variant.
tags_to_install := user
ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true
ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes
else # !sdk
@ -173,13 +201,26 @@ else # !sdk
ADDITIONAL_BUILD_PROPERTIES += ro.config.sync=yes
endif
ifeq "" "$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES))"
# Install an apns-conf.xml file if one's not already being installed.
PRODUCT_COPY_FILES += development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml
ifeq ($(filter sdk,$(MAKECMDGOALS)),)
# Install an apns-conf.xml file if one's not already being installed.
ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
PRODUCT_COPY_FILES += \
development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml
ifeq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
$(warning implicitly installing apns-conf_sdk.xml)
endif
endif
# If we're on an eng or tests build, but not on the sdk, and we have
# a better one, use that instead.
ifneq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
ifeq ($(filter sdk,$(MAKECMDGOALS)),)
apns_to_use := $(wildcard vendor/google/etc/apns-conf.xml)
ifneq ($(strip $(apns_to_use)),)
PRODUCT_COPY_FILES := \
$(filter-out %:system/etc/apns-conf.xml,$(PRODUCT_COPY_FILES)) \
$(strip $(apns_to_use)):system/etc/apns-conf.xml
endif
endif
endif
ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
@ -192,24 +233,17 @@ 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.
# For most goals, anything tagged with "eng"/"debug"/"user" should
# For most goals, anything not tagged with the "tests" tag should
# be installed in /system.
define should-install-to-system
$(filter eng debug user,$(1))
$(if $(filter tests,$(1)),,true)
endef
ifneq (,$(filter sdk,$(MAKECMDGOALS)))
# For the sdk goal, anything with the "samples" tag should be
# installed in /data even if that module also has "eng"/"debug"/"user".
define should-install-to-system
$(if $(filter samples,$(1)),,$(filter eng debug user development,$(1)))
endef
endif
ifeq ($(TARGET_BUILD_VARIANT),)
# For the default goal, everything should be installed in /system.
define should-install-to-system
true
$(if $(filter samples tests,$(1)),,true)
endef
endif
@ -332,10 +366,6 @@ else # !BUILD_TINY_ANDROID
#
INTERNAL_DEFAULT_DOCS_TARGETS := offline-sdk-docs
subdirs := $(TOP)
# Only include Android.mk files directly under vendor/*, not
# *all* Android.mk files under vendor (which is what would happen
# if we didn't prune vendor in the findleaves call).
subdir_makefiles += $(wildcard vendor/*/Android.mk)
FULL_BUILD := true
@ -346,8 +376,7 @@ endif # !SDK_ONLY
# Can't use first-makefiles-under here because
# --mindepth=2 makes the prunes not work.
subdir_makefiles += \
$(shell build/tools/findleaves.sh \
--prune="./vendor" --prune="./out" $(subdirs) Android.mk)
$(shell build/tools/findleaves.sh --prune="./out" $(subdirs) Android.mk)
# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
# or under vendor/*/$(TARGET_DEVICE). Search in both places, but
@ -453,6 +482,8 @@ add-required-deps :=
Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \
$(ALL_BUILT_MODULES) \
$(CUSTOM_MODULES))
# TODO: Remove the 3 places in the tree that use
# ALL_DEFAULT_INSTALLED_MODULES and get rid of it from this list.
ifdef FULL_BUILD
# The base list of modules to build for this product is specified
@ -481,30 +512,23 @@ 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))
droid_MODULES := $(sort $(Default_MODULES) \
$(eng_MODULES) \
$(debug_MODULES) \
$(user_MODULES) \
$(all_development_MODULES))
# THIS IS A TOTAL HACK AND SHOULD NOT BE USED AS AN EXAMPLE
modules_to_build := $(droid_MODULES)
ifneq ($(override_build_tags),)
modules_to_build := $(sort $(Default_MODULES) \
$(foreach tag,$(override_build_tags),$($(tag)_MODULES)))
#$(error skipping modules $(filter-out $(modules_to_build),$(Default_MODULES) $(droid_MODULES)))
ifeq ($(strip $(tags_to_install)),)
$(error ASSERTION FAILED: tags_to_install should not be empty)
endif
modules_to_install := $(sort $(Default_MODULES) \
$(foreach tag,$(tags_to_install),$($(tag)_MODULES)))
# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
# Filter out (do not install) any overridden packages.
overridden_packages := $(call get-package-overrides,$(modules_to_build))
overridden_packages := $(call get-package-overrides,$(modules_to_install))
ifdef overridden_packages
# old_modules_to_build := $(modules_to_build)
modules_to_build := \
$(filter-out $(foreach p,$(overridden_packages),%/$(p) %/$(p).apk), \
$(modules_to_build))
# old_modules_to_install := $(modules_to_install)
modules_to_install := \
$(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \
$(modules_to_install))
endif
#$(error filtered out $(filter-out $(modules_to_build),$(old_modules_to_build)))
#$(error filtered out
# $(filter-out $(modules_to_install),$(old_modules_to_install)))
# Don't include any GNU targets in the SDK. It's ok (and necessary)
# to build the host tools, but nothing that's going to be installed
@ -517,8 +541,8 @@ ifneq ($(filter sdk,$(MAKECMDGOALS)),)
$(TARGET_OUT_DATA)/%, \
$(sort $(call get-tagged-modules,gnu)))
$(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d)))
modules_to_build := \
$(filter-out $(target_gnu_MODULES),$(modules_to_build))
modules_to_install := \
$(filter-out $(target_gnu_MODULES),$(modules_to_install))
endif
@ -526,9 +550,9 @@ endif
# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
# contains everything that's built during the current make, but it also further
# extends ALL_DEFAULT_INSTALLED_MODULES.
ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_build)
ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_install)
include $(BUILD_SYSTEM)/Makefile
modules_to_build := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
ALL_DEFAULT_INSTALLED_MODULES :=
endif # dont_bother
@ -550,7 +574,7 @@ $(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers
# All the droid stuff, in directories
.PHONY: files
files: prebuilt $(modules_to_build) $(INSTALLED_ANDROID_INFO_TXT_TARGET)
files: prebuilt $(modules_to_install) $(INSTALLED_ANDROID_INFO_TXT_TARGET)
# -------------------------------------------------------------------
@ -580,7 +604,8 @@ droidcore: files \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INTERNAL_DEFAULT_DOCS_TARGETS)
$(INTERNAL_DEFAULT_DOCS_TARGETS) \
$(INSTALLED_FILES_FILE)
# The actual files built by the droidcore target changes depending
# on the build variant.
@ -639,40 +664,7 @@ clobber:
@rm -rf $(OUT_DIR)
@echo "Entire build directory removed."
.PHONY: dataclean
dataclean:
@rm -rf $(PRODUCT_OUT)/data/*
@rm -rf $(PRODUCT_OUT)/data-qemu/*
@rm -rf $(PRODUCT_OUT)/userdata-qemu.img
@echo "Deleted emulator userdata images."
.PHONY: installclean
# Deletes all of the files that change between different build types,
# like "make user" vs. "make sdk". This lets you work with different
# build types without having to do a full clean each time. E.g.:
#
# $ make -j8 all
# $ make installclean
# $ make -j8 user
# $ make installclean
# $ make -j8 sdk
#
installclean: dataclean
$(hide) rm -rf ./$(PRODUCT_OUT)/system
$(hide) rm -rf ./$(PRODUCT_OUT)/recovery
$(hide) rm -rf ./$(PRODUCT_OUT)/data
$(hide) rm -rf ./$(PRODUCT_OUT)/root
$(hide) rm -rf ./$(PRODUCT_OUT)/obj/NOTICE_FILES
@# Remove APPS because they may contain the wrong resources.
$(hide) rm -rf ./$(PRODUCT_OUT)/obj/APPS
$(hide) rm -rf ./$(HOST_OUT)/obj/NOTICE_FILES
$(hide) rm -rf ./$(HOST_OUT)/sdk
$(hide) rm -rf ./$(PRODUCT_OUT)/obj/PACKAGING
$(hide) rm -f ./$(PRODUCT_OUT)/*.img
$(hide) rm -f ./$(PRODUCT_OUT)/*.zip
$(hide) rm -f ./$(PRODUCT_OUT)/*.txt
$(hide) rm -f ./$(PRODUCT_OUT)/*.xlb
@echo "Deleted images and staging directories."
# The rules for dataclean and installclean are defined in cleanbuild.mk.
#xxx scrape this from ALL_MODULE_NAME_TAGS
.PHONY: modules

View File

@ -182,8 +182,9 @@ endef
# $(2): makefile representing this node
# $(3): list of node variable names
#
#TODO: keep a debug stack to make error messages more helpful
# _include_stack contains the list of included files, with the most recent files first.
define _import-node
$(eval _include_stack := $(2) $$(_include_stack))
$(call clear-var-list, $(3))
$(eval include $(2))
$(call copy-var-list, $(1).$(2), $(3))
@ -196,6 +197,7 @@ define _import-node
$(call _expand-inherited-values,$(1),$(2),$(3))
$(eval $(1).$(2).inherited :=)
$(eval _include_stack := $(wordlist 2,9999,$$(_include_stack)))
endef
#
@ -229,10 +231,15 @@ define import-nodes
$(if \
$(foreach _in,$(2), \
$(eval _node_import_context := _nic.$(1).[[$(_in)]]) \
$(if $(_include_stack),$(eval $(error ASSERTION FAILED: _include_stack \
should be empty here: $(_include_stack))),) \
$(eval _include_stack := ) \
$(call _import-nodes-inner,$(_node_import_context),$(_in),$(3)) \
$(call move-var-list,$(_node_import_context).$(_in),$(1).$(_in),$(3)) \
$(eval _node_import_context :=) \
$(eval $(1) := $($(1)) $(_in)) \
$(if $(_include_stack),$(eval $(error ASSERTION FAILED: _include_stack \
should be empty here: $(_include_stack))),) \
) \
,)
endef

View File

@ -30,13 +30,6 @@ ifeq ($(LOCAL_PACKAGE_NAME),)
$(error $(LOCAL_PATH): Package modules must define LOCAL_PACKAGE_NAME)
endif
LOCAL_MODULE_TAGS := $(strip $(LOCAL_MODULE_TAGS))
ifeq ($(LOCAL_MODULE_TAGS),)
$(error $(LOCAL_PATH): Package modules must define LOCAL_MODULE_TAGS)
endif
#$(warning $(LOCAL_PATH) $(LOCAL_PACKAGE_NAME) $(sort $(LOCAL_MODULE_TAGS)))
ifneq ($(strip $(LOCAL_MODULE_SUFFIX)),)
$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE_SUFFIX)
endif
@ -60,6 +53,14 @@ $(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS)
endif
LOCAL_MODULE_CLASS := APPS
# Package LOCAL_MODULE_TAGS default to optional
LOCAL_MODULE_TAGS := $(strip $(LOCAL_MODULE_TAGS))
ifeq ($(LOCAL_MODULE_TAGS),)
LOCAL_MODULE_TAGS := optional
endif
#$(warning $(LOCAL_PATH) $(LOCAL_PACKAGE_NAME) $(sort $(LOCAL_MODULE_TAGS)))
ifeq (,$(LOCAL_ASSET_DIR))
LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets
endif
@ -69,6 +70,7 @@ ifeq (,$(LOCAL_RESOURCE_DIR))
endif
LOCAL_RESOURCE_DIR := \
$(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(PRODUCT_PACKAGE_OVERLAYS))) \
$(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(DEVICE_PACKAGE_OVERLAYS))) \
$(LOCAL_RESOURCE_DIR)
# this is an app, so add the system libraries to the search path

View File

@ -52,7 +52,13 @@ libpixelflinger.so 0xACF00000
libcorecg.so 0xACE00000
libsurfaceflinger.so 0xACD00000
libagl.so 0xACC00000
libGLES_CM.so 0xACB00000
libGLESv1_CM.so 0xACB00000
libGLESv2.so 0xACA00000
libOpenVG_CM.so 0xAC900000
libOpenVGU_CM.so 0xAC800000
libEGL.so 0xAC700000
libexif.so 0xAC500000
libui.so 0xAC400000
libsgl.so 0xAC000000
@ -90,6 +96,14 @@ libopencore_player.so 0xA7800000
libopencore_common.so 0xA7300000
libopencore_2way.so 0xA7000000
# opencore hardware support
libmm-adspsvc.so 0xA6FFD000
libOmxCore.so 0xA6FF0000
libOmxMpeg4Dec.so 0xA6FC0000
libOmxH264Dec.so 0xA6F90000
libOmxVidEnc.so 0xA6F60000
libopencorehw.so 0xA6F50000
# libraries for specific apps or temporary libraries
libcam_ipl.so 0x9F000000
libwbxml.so 0x9E800000

View File

@ -23,14 +23,8 @@
# $(call ) isn't necessary.
#
define _find-android-products-files
$(foreach vendor,$(wildcard vendor/*), \
$(if $(wildcard $(vendor)/AndroidProducts.mk), \
$(vendor)/AndroidProducts.mk \
, \
$(wildcard $(vendor)/*/AndroidProducts.mk) \
) \
) \
$(wildcard $(SRC_TARGET_DIR)/product/AndroidProducts.mk)
$(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk) \
$(SRC_TARGET_DIR)/product/AndroidProducts.mk
endef
#
@ -67,7 +61,10 @@ _product_var_list := \
PRODUCT_COPY_FILES \
PRODUCT_OTA_PUBLIC_KEYS \
PRODUCT_POLICY \
PRODUCT_PACKAGE_OVERLAYS
PRODUCT_PACKAGE_OVERLAYS \
DEVICE_PACKAGE_OVERLAYS \
PRODUCT_CONTRIBUTORS_FILE \
PRODUCT_TAGS
define dump-product
$(info ==== $(1) ====)\
@ -83,9 +80,19 @@ endef
#
# $(1): product to inherit
#
# Does three things:
# 1. Inherits all of the variables from $1.
# 2. Records the inheritance in the .INHERITS_FROM variable
# 3. Records that we've visited this node, in ALL_PRODUCTS
#
define inherit-product
$(foreach v,$(_product_var_list), \
$(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1))))
$(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1)))) \
$(eval inherit_var := \
PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \
$(eval $(inherit_var) := $(sort $($(inherit_var)) $(strip $(1)))) \
$(eval inherit_var:=) \
$(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack))))
endef
#

View File

@ -50,6 +50,11 @@ $(strip \
endef
# These are the valid values of TARGET_BUILD_VARIANT. Also, if anything else is passed
# as the variant in the PRODUCT-$TARGET_BUILD_PRODUCT-$TARGET_BUILD_VARIANT form,
# it will be treated as a goal, and the eng variant will be used.
INTERNAL_VALID_VARIANTS := user userdebug eng tests
# ---------------------------------------------------------------
# Provide "PRODUCT-<prodname>-<goal>" targets, which lets you build
# a particular configuration without needing to set up the environment.
@ -75,17 +80,15 @@ ifdef product_goals
# The variant they want
TARGET_BUILD_VARIANT := $(word 2,$(product_goals))
# HACK HACK HACK
# The build server wants to do make PRODUCT-dream-installclean
# which really means TARGET_PRODUCT=dream make installclean.
ifneq ($(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT)),)
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
TARGET_BUILD_VARIANT := eng
default_goal_substitution :=
else
default_goal_substitution := $(DEFAULT_GOAL)
endif
# HACK HACK HACK
# Hack to make the linux build servers use dexpreopt.
# OSX is still a little flaky. Most engineers don't use this
@ -149,6 +152,15 @@ TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)
PRODUCT_LOCALES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOCALES))
# TODO: also keep track of things like "port", "land" in product files.
# If CUSTOM_LOCALES contains any locales not already included
# in PRODUCT_LOCALES, add them to PRODUCT_LOCALES.
extra_locales := $(filter-out $(PRODUCT_LOCALES),$(CUSTOM_LOCALES))
ifneq (,$(extra_locales))
$(info Adding CUSTOM_LOCALES [$(extra_locales)] to PRODUCT_LOCALES [$(PRODUCT_LOCALES)])
PRODUCT_LOCALES += $(extra_locales)
extra_locales :=
endif
# Assemble the list of options.
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES)
@ -181,6 +193,10 @@ PRODUCT_POLICY := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_POLICY))
PRODUCT_COPY_FILES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COPY_FILES))
# The HTML file containing the contributors to the project.
PRODUCT_CONTRIBUTORS_FILE := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CONTRIBUTORS_FILE))
# A list of property assignments, like "key = value", with zero or more
# whitespace characters on either side of the '='.
PRODUCT_PROPERTY_OVERRIDES := \
@ -189,6 +205,11 @@ PRODUCT_PROPERTY_OVERRIDES := \
# Should we use the default resources or add any product specific overlays
PRODUCT_PACKAGE_OVERLAYS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))
DEVICE_PACKAGE_OVERLAYS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).DEVICE_PACKAGE_OVERLAYS))
# An list of whitespace-separated words.
PRODUCT_TAGS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_TAGS))
# Add the product-defined properties to the build properties.
ADDITIONAL_BUILD_PROPERTIES := \

View File

@ -15,22 +15,7 @@
cts_dir := $(HOST_OUT)/cts
cts_tools_src_dir := cts/tools
# Build a name that looks like:
#
# linux-x86 --> android-cts_12345_linux-x86
# darwin-x86 --> android-cts_12345_mac-x86
# windows-x86 --> android-cts_12345_windows
#
cts_name := android-cts_$(FILE_NAME_TAG)
ifeq ($(HOST_OS),darwin)
cts_host_os := mac
else
cts_host_os := $(HOST_OS)
endif
ifneq ($(HOST_OS),windows)
cts_host_os := $(cts_host_os)-$(HOST_ARCH)
endif
cts_name := $(cts_name)_$(cts_host_os)
cts_name := android-cts
CTS_EXECUTABLE := cts
ifeq ($(HOST_OS),windows)
@ -43,10 +28,22 @@ CTS_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts.jar
CTS_CASE_LIST := \
DeviceInfoCollector \
CtsTestStubs \
CtsTextTestCases \
CtsViewTestCases \
CtsAppTestCases \
CtsContentTestCases \
CtsDatabaseTestCases \
CtsGraphicsTestCases \
SignatureTest
CtsHardwareTestCases \
CtsLocationTestCases \
CtsOsTestCases \
CtsPermissionTestCases \
CtsProviderTestCases \
CtsTextTestCases \
CtsUtilTestCases \
CtsViewTestCases \
CtsWidgetTestCases \
CtsNetTestCases \
SignatureTest \
android.core.tests
DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans
@ -65,32 +62,89 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) | $(ACP)
$(hide) chmod ug+rwX $(PRIVATE_DIR)/tools/$(notdir $(CTS_EXECUTABLE_PATH))
$(foreach apk,$(CTS_CASE_LIST), \
$(call copy-testcase-apk,$(apk)))
# Copy CTS host config to CTS directory
# Copy CTS host config and start script to CTS directory
$(hide) $(ACP) -fp $(cts_tools_src_dir)/utils/host_config.xml $(PRIVATE_DIR)/repository/
$(hide) $(ACP) -fp $(cts_tools_src_dir)/utils/startcts $(PRIVATE_DIR)/tools/
$(hide) touch $@
# Generate the test plan for the core-tests
CORE_TEST_PLAN := $(cts_dir)/$(cts_name)/repository/testcases/android.core.tests
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(CORE_INTERMEDIATES)/javalib.jar:$(TESTS_INTERMEDIATES)/javalib.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR)
$(CORE_TEST_PLAN): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
$(CORE_TEST_PLAN): PRIVATE_JAVAOPTS:=-Xmx256M
$(CORE_TEST_PLAN): PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true
$(CORE_TEST_PLAN): PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true
$(CORE_TEST_PLAN): PRIVATE_CUSTOM_TOOL := java $(PRIVATE_JAVAOPTS) \
-classpath $(PRIVATE_CLASSPATH) \
$(PRIVATE_PARAMS) CollectAllTests $(CORE_TEST_PLAN) \
cts/tests/core/AndroidManifest.xml tests.AllTests
# Why does this depend on javalib.jar instead of classes.jar? Because
# even though the tool will operate on the classes.jar files, the
# build system requires that dependencies use javalib.jar. If
# javalib.jar is up-to-date, then classes.jar is as well. Depending
# on classes.jar will build the files incorrectly.
$(CORE_TEST_PLAN): android.core.tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp
@echo "Generate the CTS test plan: $@"
@echo $(PRIVATE_CUSTOM_TOOL)
$(transform-generated-source)
# ----- Generate the test plan for the vm-tests -----
#
CORE_VM_TEST_PLAN := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests
VMTESTS_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests,1,)
# core tests only needed to get hold of junit-framework-classes
TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR)
$(CORE_VM_TEST_PLAN): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
$(CORE_VM_TEST_PLAN): PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true
$(CORE_VM_TEST_PLAN): PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true
$(CORE_VM_TEST_PLAN): PRIVATE_JAVAOPTS:=-Xmx256M
$(CORE_VM_TEST_PLAN): PRIVATE_CUSTOM_TOOL := java $(PRIVATE_JAVAOPTS) \
-classpath $(PRIVATE_CLASSPATH) \
$(PRIVATE_PARAMS) CollectAllTests $(CORE_VM_TEST_PLAN) \
cts/tests/vm-tests/AndroidManifest.xml dot.junit.AllJunitHostTests cts/tools/vm-tests/Android.mk
# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
$(CORE_VM_TEST_PLAN): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
@echo "Generate the CTS vm-test plan: $@"
@echo $(PRIVATE_CUSTOM_TOOL)
$(transform-generated-source)
$(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar
# Generate the default test plan for User.
$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_tools_src_dir)/utils/genDefaultTestPlan.sh
$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_tools_src_dir)/utils/genDefaultTestPlan.sh $(CORE_VM_TEST_PLAN) $(CORE_TEST_PLAN)
$(hide) bash $(cts_tools_src_dir)/utils/genDefaultTestPlan.sh cts/tests/tests/ \
$(PRIVATE_DIR) $(TMP_DIR) $(TOP) $(TARGET_COMMON_OUT_ROOT) $(OUT_DIR)
# Package CTS and clean up.
#
# TODO:
# Pack cts.bat into the same zip file as well. See http://buganizer/issue?id=1656821 for more details
INTERNAL_CTS_TARGET := $(cts_dir)/$(cts_name).zip
$(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name)
$(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir)
$(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
$(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN)
$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) $(CORE_TEST_PLAN) $(CORE_VM_TEST_PLAN)
@echo "Package CTS: $@"
$(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
.PHONY: cts
.PHONY: cts
cts: $(INTERNAL_CTS_TARGET) adb
$(call dist-for-goals,cts,$(INTERNAL_CTS_TARGET))
define copy-testcase-apk
$(hide) $(ACP) -fp $(call intermediates-dir-for,APPS,$(1))/package.apk \
$(PRIVATE_DIR)/repository/testcases/$(1).apk
endef

View File

@ -0,0 +1,35 @@
#
# 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.
#
products_pdf := $(OUT_DIR)/products.pdf
# This rule doens't include any nodes that don't inherit from
# anything or don't have anything inherit from them, to make the
# graph more readable. To add that, add this line to the rule
# below:
# $(foreach p,$(ALL_PRODUCTS), echo \"$(p)\";) \
$(products_pdf):
$(hide) ( \
echo 'digraph {'; \
$(foreach p,$(ALL_PRODUCTS), \
$(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), \
echo \"$(d)\" -\> \"$(p)\";)) \
echo '}' \
) | dot -Tpdf -Nshape=box -o $@
product-graph: $(products_pdf)

View File

@ -71,3 +71,14 @@ ifeq "" "$(BUILD_NUMBER)"
# anyone trying to parse it as an integer will probably get "0".
BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)
endif
ifeq "true" "$(DISPLAY_BUILD_NUMBER)"
# if the build_id.mk has this defined, then BUILD_ID is updated with
# the BUILD_NUMBER as well. For development branches, this will be
# set, but release branches this will not be set.
BUILD_DISPLAY_ID := "$(BUILD_ID).$(BUILD_NUMBER)"
else
BUILD_DISPLAY_ID := "$(BUILD_ID)"
endif

View File

@ -8,6 +8,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- cgrep: Greps on all local C/C++ files.
- jgrep: Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir: Go to the directory containing a file.
Look at the source to view more functions. The complete list is:
EOF
@ -644,7 +645,9 @@ function mmm()
local MAKEFILE=
local ARGS=
local DIR TO_CHOP
for DIR in $@ ; do
local DASH_ARGS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')
local DIRS=$(echo "$@" | awk -v RS=" " -v ORS=" " '/^[^-].*$/')
for DIR in $DIRS ; do
DIR=`echo $DIR | sed -e 's:/$::'`
if [ -f $DIR/Android.mk ]; then
TO_CHOP=`echo $T | wc -c | tr -d ' '`
@ -666,7 +669,7 @@ function mmm()
fi
fi
done
ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T files $ARGS
ONE_SHOT_MAKEFILE="$MAKEFILE" make -C $T $DASH_ARGS files $ARGS
else
echo "Couldn't locate the top of the tree. Try setting TOP."
fi
@ -881,39 +884,26 @@ function runhat()
adb ${adbOptions} shell >/dev/null mkdir /data/misc
adb ${adbOptions} shell chmod 777 /data/misc
# send a SIGUSR1 to cause the hprof dump
echo "Poking $targetPid and waiting for data..."
adb ${adbOptions} shell kill -10 $targetPid
echo "Press enter when logcat shows \"GC freed ## objects / ## bytes\""
echo "Press enter when logcat shows \"hprof: heap dump completed\""
echo -n "> "
read
local availFiles=( $(adb ${adbOptions} shell ls /data/misc | grep '^heap-dump' | sed -e 's/.*heap-dump-/heap-dump-/' | sort -r | tr '[:space:][:cntrl:]' ' ') )
local devHeadFile=/data/misc/${availFiles[0]}
local devTailFile=/data/misc/${availFiles[1]}
local devFile=/data/misc/${availFiles[0]}
local localFile=/tmp/$$-hprof
local localHeadFile=/tmp/$$-hprof-head
local localTailFile=/tmp/$$-hprof-tail
echo "Retrieving file $devFile..."
adb ${adbOptions} pull $devFile $localFile
echo "Retrieving file $devHeadFile..."
adb ${adbOptions} pull $devHeadFile $localHeadFile
echo "Retrieving file $devTailFile..."
adb ${adbOptions} pull $devTailFile $localTailFile
adb ${adbOptions} shell rm $devFile
local combinedFile=$outputFile
if [ "$combinedFile" = "" ]; then
combinedFile=/tmp/$$.hprof
fi
cat $localHeadFile $localTailFile >$combinedFile
adb ${adbOptions} shell rm $devHeadFile
adb ${adbOptions} shell rm $devTailFile
rm $localHeadFile
rm $localTailFile
echo "Running hat on $combinedFile"
echo "Running hat on $localFile"
echo "View the output by pointing your browser at http://localhost:7000/"
echo ""
hat $combinedFile
hat $localFile
}
function getbugreports()
@ -984,6 +974,50 @@ function runtest()
(cd "$T" && development/tools/runtest $@)
}
function godir () {
if [[ -z "$1" ]]; then
echo "Usage: godir <regex>"
return
fi
if [[ ! -f $T/filelist ]]; then
echo -n "Creating index..."
(cd $T; find . -wholename ./out -prune -o -type f > filelist)
echo " Done"
echo ""
fi
local lines
lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
if [[ ${#lines[@]} = 0 ]]; then
echo "Not found"
return
fi
local pathname
local choice
if [[ ${#lines[@]} > 1 ]]; then
while [[ -z "$pathname" ]]; do
local index=1
local line
for line in ${lines[@]}; do
printf "%6s %s\n" "[$index]" $line
index=$(($index + 1))
done
echo
echo -n "Select one: "
unset choice
read choice
if [[ $choice -gt ${#lines[@]} || $choice -lt 1 ]]; then
echo "Invalid choice"
continue
fi
pathname=${lines[$(($choice-$_arrayoffset))]}
done
else
# even though zsh arrays are 1-based, $foo[0] is an alias for $foo[1]
pathname=${lines[0]}
fi
cd $T/$pathname
}
# determine whether arrays are zero-based (bash) or one-based (zsh)
_xarray=(a b c)
if [ -z "${_xarray[${#_xarray[@]}]}" ]

View File

@ -26,7 +26,16 @@ else
INSTALLED_RADIOIMAGE_TARGET :=
endif
include $(TARGET_DEVICE_DIR)/Android.mk
ifeq (,$(wildcard $(TARGET_DEVICE_DIR)/AndroidBoard.mk))
ifeq (,$(wildcard $(TARGET_DEVICE_DIR)/Android.mk))
$(error Missing "$(TARGET_DEVICE_DIR)/AndroidBoard.mk")
else
# TODO: Remove this check after people have had a chance to switch,
# after April 2009.
$(error Please rename "$(TARGET_DEVICE_DIR)/Android.mk" to "$(TARGET_DEVICE_DIR)/AndroidBoard.mk")
endif
endif
include $(TARGET_DEVICE_DIR)/AndroidBoard.mk
# Generate a file that contains various information about the
# device we're building for. This file is typically packaged up

View File

@ -21,3 +21,7 @@ PRODUCT_PACKAGES := \
UserDictionaryProvider \
PackageInstaller \
Bugreport
#include basic ringtones
include frameworks/base/data/sounds/OriginalAudio.mk

View File

@ -9,6 +9,7 @@ PRODUCT_PACKAGES := \
Camera \
DrmProvider \
LatinIME \
Launcher \
Mms \
Music \
Settings \

View File

@ -8,6 +8,7 @@ PRODUCT_DEVICE := generic
PRODUCT_PACKAGES := \
DownloadProvider \
GoogleSearch \
MediaProvider \
SettingsProvider \
PackageInstaller \

View File

@ -15,9 +15,13 @@ PRODUCT_PACKAGES := \
Mms \
Settings \
SdkSetup \
CustomLocale \
gpstest \
sqlite3
sqlite3 \
SoftKeyboard
PRODUCT_COPY_FILES := \
development/data/etc/vold.conf:system/etc/vold.conf
$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)

View File

@ -122,8 +122,8 @@ public class ClassInfo {
}
for (String iface : mInterfaces) {
if (!cl.mInterfaces.contains(iface)) {
Errors.error(Errors.REMOVED_INTERFACE,
cl.position(), "Removed interface " + iface);
Errors.error(Errors.REMOVED_INTERFACE, cl.position(),
"Class " + qualifiedName() + " no longer implements " + iface);
}
}
for (String iface : cl.mInterfaces) {

View File

@ -4,6 +4,7 @@ echo "# begin build properties"
echo "# autogenerated by buildinfo.sh"
echo "ro.build.id=$BUILD_ID"
echo "ro.build.display.id=$BUILD_DISPLAY_ID"
echo "ro.build.version.incremental=$BUILD_NUMBER"
echo "ro.build.version.sdk=$PLATFORM_SDK_VERSION"
echo "ro.build.version.release=$PLATFORM_VERSION"

76
tools/check_builds.sh Executable file
View File

@ -0,0 +1,76 @@
# 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:
#
# Source this file into your environment. Then:
#
# $ golden_builds sdk-sdk generic-eng generic-userdebug dream-eng
#
# will build a set of combos. This might take a while. Then you can
# go make changes, and run:
#
# $ check_builds sdk-sdk generic-eng generic-userdebug dream-eng
#
# Go get dinner, and when you get back, there will be a file
# test-builds/sizes.html that has a pretty chart of which files are
# in which tree, and how big they are. In that chart, cells for files
# that are missing are red, and rows where the file sizes are not all
# the same will be blue.
#
TEST_BUILD_DIR=test-builds
function do_builds
{
PREFIX=$1
shift
while [ -n "$1" ]
do
rm -rf $TEST_BUILD_DIR/$PREFIX-$1
make -j6 PRODUCT-$1 dist DIST_DIR=$TEST_BUILD_DIR/$PREFIX-$1
if [ $? -ne 0 ] ; then
echo FAILED
return
fi
shift
done
}
function golden_builds
{
rm -rf $TEST_BUILD_DIR/golden-* $TEST_BUILD_DIR/dist-*
do_builds golden "$@"
}
function compare_builds
{
local inputs=
while [ -n "$1" ]
do
inputs="$inputs $TEST_BUILD_DIR/golden-$1/installed-files.txt"
inputs="$inputs $TEST_BUILD_DIR/dist-$1/installed-files.txt"
shift
done
build/tools/compare_fileslist.py $inputs > $TEST_BUILD_DIR/sizes.html
}
function check_builds
{
rm -rf $TEST_BUILD_DIR/dist-*
do_builds dist "$@"
compare_builds "$@"
}

106
tools/compare_fileslist.py Executable file
View File

@ -0,0 +1,106 @@
#!/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.
#
import cgi, os, string, sys
def IsDifferent(row):
val = None
for v in row:
if v:
if not val:
val = v
else:
if val != v:
return True
return False
def main(argv):
inputs = argv[1:]
data = {}
index = 0
for input in inputs:
f = file(input, "r")
lines = f.readlines()
f.close()
lines = map(string.split, lines)
lines = map(lambda (x,y): (y,int(x)), lines)
for fn,sz in lines:
if not data.has_key(fn):
data[fn] = {}
data[fn][index] = sz
index = index + 1
rows = []
for fn,sizes in data.iteritems():
row = [fn]
for i in range(0,index):
if sizes.has_key(i):
row.append(sizes[i])
else:
row.append(None)
rows.append(row)
rows = sorted(rows, key=lambda x: x[0])
print """<html>
<head>
<style type="text/css">
.fn, .sz, .z, .d {
padding-left: 10px;
padding-right: 10px;
}
.sz, .z, .d {
text-align: right;
}
.fn {
background-color: #ffffdd;
}
.sz {
background-color: #ffffcc;
}
.z {
background-color: #ffcccc;
}
.d {
background-color: #99ccff;
}
</style>
</head>
<body>
"""
print "<table>"
print "<tr>"
for input in inputs:
combo = input.split(os.path.sep)[1]
print " <td class='fn'>%s</td>" % cgi.escape(combo)
print "</tr>"
for row in rows:
print "<tr>"
for sz in row[1:]:
if not sz:
print " <td class='z'>&nbsp;</td>"
elif IsDifferent(row[1:]):
print " <td class='d'>%d</td>" % sz
else:
print " <td class='sz'>%d</td>" % sz
print " <td class='fn'>%s</td>" % cgi.escape(row[0])
print "</tr>"
print "</table>"
print "</body></html>"
if __name__ == '__main__':
main(sys.argv)

View File

@ -29,12 +29,20 @@ LOCAL_PATH := $(my-dir)
# would have different versions.
intermediates := \
$(call intermediates-dir-for,PACKAGING,dexpreopt)
dexpreopt_initrc := $(LOCAL_PATH)/etc/init.rc
dexpreopt_system_dir := $(intermediates)/system
built_afar := $(call intermediates-dir-for,EXECUTABLES,afar)/afar
built_dowrapper := \
$(call intermediates-dir-for,EXECUTABLES,dexopt-wrapper)/dexopt-wrapper
# Generate a stripped-down init.rc based on the real one.
dexpreopt_initrc := $(intermediates)/etc/init.rc
geninitrc_script := $(LOCAL_PATH)/geninitrc.awk
$(dexpreopt_initrc): script := $(geninitrc_script)
$(dexpreopt_initrc): system/core/rootdir/init.rc $(geninitrc_script)
@echo "Dexpreopt init.rc: $@"
@mkdir -p $(dir $@)
$(hide) awk -f $(script) < $< > $@
BUILT_DEXPREOPT_RAMDISK := $(intermediates)/ramdisk.img
$(BUILT_DEXPREOPT_RAMDISK): intermediates := $(intermediates)
$(BUILT_DEXPREOPT_RAMDISK): dexpreopt_root_out := $(intermediates)/root

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@ -25,6 +26,9 @@ LOCAL_C_INCLUDES += \
LOCAL_STATIC_LIBRARIES := \
libdex
LOCAL_SHARED_LIBRARIES := \
libcutils
LOCAL_MODULE := dexopt-wrapper
LOCAL_MODULE_TAGS := tests

View File

@ -14,6 +14,8 @@
#include <fcntl.h>
#include <errno.h>
#include "cutils/properties.h"
//using namespace android;
/*
@ -36,9 +38,13 @@ static void runDexopt(int zipFd, int odexFd, const char* inputFileName)
static const int kMaxIntLen = 12; // '-'+10dig+'\0' -OR- 0x+8dig
char zipNum[kMaxIntLen];
char odexNum[kMaxIntLen];
char dexoptFlags[PROPERTY_VALUE_MAX];
const char* androidRoot;
char* execFile;
/* pull optional configuration tweaks out of properties */
property_get("dalvik.vm.dexopt-flags", dexoptFlags, "");
/* find dexopt executable; this exists for simulator compatibility */
androidRoot = getenv("ANDROID_ROOT");
if (androidRoot == NULL)
@ -50,7 +56,7 @@ static void runDexopt(int zipFd, int odexFd, const char* inputFileName)
sprintf(odexNum, "%d", odexFd);
execl(execFile, execFile, "--zip", zipNum, odexNum, inputFileName,
(char*) NULL);
dexoptFlags, (char*) NULL);
fprintf(stderr, "execl(%s) failed: %s\n", kDexOptBin, strerror(errno));
}
@ -109,7 +115,7 @@ int doStuff(const char* zipName, const char* odexName)
exit(67); /* usually */
} else {
/* parent -- wait for child to finish */
printf("waiting for verify+opt, pid=%d\n", (int) pid);
printf("--- waiting for verify+opt, pid=%d\n", (int) pid);
int status, oldStatus;
pid_t gotPid;

View File

@ -95,9 +95,9 @@ def StartEmulator(exe_name='emulator', kernel=None,
or unqualified (and left to exec() to find).
kernel: If set, passed to the emulator as "-kernel".
ramdisk: If set, passed to the emulator as "-ramdisk".
image: If set, passed to the emulator as "-image".
image: If set, passed to the emulator as "-system".
userdata: If set, passed to the emulator as "-initdata" and "-data".
system: If set, passed to the emulator as "-system".
system: If set, passed to the emulator as "-sysdir".
Returns:
A subprocess.Popen that refers to the emulator process, or None if
@ -107,9 +107,10 @@ def StartEmulator(exe_name='emulator', kernel=None,
args = [exe_name]
if kernel: args += ['-kernel', kernel]
if ramdisk: args += ['-ramdisk', ramdisk]
if image: args += ['-image', image]
if image: args += ['-system', image]
if userdata: args += ['-initdata', userdata, '-data', userdata]
if system: args += ['-system', system]
if system: args += ['-sysdir', system]
args += ['-partition-size', '128']
args += ['-no-window', '-netfast', '-noaudio']
_USE_PIPE = True

View File

@ -1,167 +0,0 @@
on init
loglevel 3
# setup the global environment
export PATH /sbin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
# Backward compatibility
symlink /system/etc /etc
# create mountpoints and mount tmpfs on sqlite_stmt_journals and debugfs on d
mkdir /d
mkdir /sdcard 0000 system system
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /sqlite_stmt_journals 01777 root root
mount tmpfs tmpfs /sqlite_stmt_journals
mount debugfs debugfs /d
mount rootfs rootfs / ro remount
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 mtd@system /system
# dexpreopt needs to write to /system
### mount yaffs2 mtd@system /system ro remount
# We chown/chmod /data again so because mount is run as root + defaults
mount yaffs2 mtd@userdata /data
chown system system /data
chmod 0771 /data
# Same reason as /data above
mount yaffs2 mtd@cache /cache
chown system cache /cache
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
chown system system /cache/recovery
chmod 0770 /cache/recovery
# create basic filesystem structure
mkdir /data/dalvik-cache 0777 root root
mkdir /data/misc 01771 system misc
mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.SECONDARY_SERVER_ADJ 2
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.CONTENT_PROVIDER_ADJ 14
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144
# Write value must be consistent with the above properties.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15
write /proc/sys/vm/overcommit_memory 1
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
class_start default
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown bluetooth bluetooth /sys/module/board_trout/parameters/bluetooth_power_on
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/board_trout/parameters/bluetooth_power_on
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
## Daemon processes to be run by init.
##
service console /system/bin/sh
console

View File

@ -0,0 +1,62 @@
#
# 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.
#
BEGIN {
fixed_remount = 0;
console_state = 0;
}
/^ mount yaffs2 mtd@system \/system ro remount$/ {
fixed_remount = 1;
print " # dexpreopt needs to write to /system";
print " ### " $0;
next;
}
console_state == 0 && /^service console \/system\/bin\/sh$/ {
console_state = 1;
print;
next;
}
console_state == 1 && /^ console$/ {
console_state = 2;
print;
exit;
}
console_state == 1 {
# The second line of the console entry should always immediately
# follow the first.
exit;
}
{ print }
END {
failed = 0;
if (fixed_remount != 1) {
print "ERROR: no match for remount line" > "/dev/stderr";
failed = 1;
}
if (console_state != 2) {
print "ERROR: no match for console lines" > "/dev/stderr";
failed = 1;
}
if (failed == 1) {
print ">>>> FAILED <<<<"
exit 1;
}
}

View File

@ -15,8 +15,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := docs
LOCAL_SRC_FILES := \
AnnotationInstanceInfo.java \
AnnotationValueInfo.java \

View File

@ -461,10 +461,13 @@ public class DroidDoc
continue;
}
Boolean allHidden = true;
int pass = 1;
ClassInfo[] classesToCheck = pkg.ordinaryClasses();
int pass = 0;
ClassInfo[] classesToCheck = null;
while (pass < 5 ) {
switch(pass) {
case 0:
classesToCheck = pkg.ordinaryClasses();
break;
case 1:
classesToCheck = pkg.enums();
break;

View File

@ -25,10 +25,12 @@ public class Errors
private static class Message implements Comparable {
SourcePositionInfo pos;
int level;
String msg;
Message(SourcePositionInfo p, String m) {
Message(SourcePositionInfo p, int l, String m) {
pos = p;
level = l;
msg = m;
}
@ -50,14 +52,15 @@ public class Errors
return;
}
String which = (!warningsAreErrors && error.level == WARNING) ? " warning " : " error ";
int level = (!warningsAreErrors && error.level == WARNING) ? WARNING : ERROR;
String which = level == WARNING ? " warning " : " error ";
String message = which + error.code + ": " + text;
if (where == null) {
where = new SourcePositionInfo("unknown", 0, 0);
}
allErrors.add(new Message(where, message));
allErrors.add(new Message(where, level, message));
if (error.level == ERROR || (warningsAreErrors && error.level == WARNING)) {
hadError = true;
@ -66,7 +69,14 @@ public class Errors
public static void printErrors() {
for (Message m: allErrors) {
System.err.println(m.toString());
if (m.level == WARNING) {
System.err.println(m.toString());
}
}
for (Message m: allErrors) {
if (m.level == ERROR) {
System.err.println(m.toString());
}
}
}

View File

@ -117,36 +117,55 @@ public class PackageInfo extends DocInfo implements ContainerInfo
public void makeClassLinkListHDF(HDF data, String base)
{
makeLink(data, base);
ClassInfo.makeLinkListHDF(data, base + ".interfaces", ClassInfo.sortByName(interfaces()));
ClassInfo.makeLinkListHDF(data, base + ".classes", ClassInfo.sortByName(ordinaryClasses()));
ClassInfo.makeLinkListHDF(data, base + ".enums", ClassInfo.sortByName(enums()));
ClassInfo.makeLinkListHDF(data, base + ".exceptions", ClassInfo.sortByName(exceptions()));
ClassInfo.makeLinkListHDF(data, base + ".errors", ClassInfo.sortByName(errors()));
ClassInfo.makeLinkListHDF(data, base + ".interfaces", interfaces());
ClassInfo.makeLinkListHDF(data, base + ".classes", ordinaryClasses());
ClassInfo.makeLinkListHDF(data, base + ".enums", enums());
ClassInfo.makeLinkListHDF(data, base + ".exceptions", exceptions());
ClassInfo.makeLinkListHDF(data, base + ".errors", errors());
}
public ClassInfo[] interfaces()
{
return filterHidden(Converter.convertClasses(mPackage.interfaces()));
if (mInterfaces == null) {
mInterfaces = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
mPackage.interfaces())));
}
return mInterfaces;
}
public ClassInfo[] ordinaryClasses()
{
return filterHidden(Converter.convertClasses(mPackage.ordinaryClasses()));
if (mOrdinaryClasses == null) {
mOrdinaryClasses = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
mPackage.ordinaryClasses())));
}
return mOrdinaryClasses;
}
public ClassInfo[] enums()
{
return filterHidden(Converter.convertClasses(mPackage.enums()));
if (mEnums == null) {
mEnums = ClassInfo.sortByName(filterHidden(Converter.convertClasses(mPackage.enums())));
}
return mEnums;
}
public ClassInfo[] exceptions()
{
return filterHidden(Converter.convertClasses(mPackage.exceptions()));
if (mExceptions == null) {
mExceptions = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
mPackage.exceptions())));
}
return mExceptions;
}
public ClassInfo[] errors()
{
return filterHidden(Converter.convertClasses(mPackage.errors()));
if (mErrors == null) {
mErrors = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
mPackage.errors())));
}
return mErrors;
}
// in hashed containers, treat the name as the key
@ -157,5 +176,10 @@ public class PackageInfo extends DocInfo implements ContainerInfo
private String mName;
private PackageDoc mPackage;
private ClassInfo[] mInterfaces;
private ClassInfo[] mOrdinaryClasses;
private ClassInfo[] mEnums;
private ClassInfo[] mExceptions;
private ClassInfo[] mErrors;
}

View File

@ -1,90 +1,121 @@
<?cs # This default template file is meant to be replaced. ?>
<?cs # Use the -tempatedir arg to javadoc to set your own directory with a replacement for this file in it. ?>
<?cs def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
<a href="<?cs var:toroot ?>index.html" tabindex="-1"><img
src="<?cs var:toroot ?>assets/images/bg_logo.jpg" /></a>
</div>
<div id="headerRight">
<div id="headerLinks" align="right">
<img src="<?cs var:toroot ?>assets/images/icon_world.jpg"><span class="text">&nbsp;<a href="#">English</a> | <a href="http://www.android.com">Android.com</a></span>
</div>
<?cs
def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
<a href="<?cs var:toroot ?>index.html" tabindex="-1"><img
src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" /></a>
<ul class="<?cs
if:reference ?>reference<?cs
elif:guide ?>guide<?cs
elif:sdk ?>sdk<?cs
elif:home ?>home<?cs
elif:community ?>community<?cs
elif:publish ?>publish<?cs
elif:about ?>about<?cs /if ?>">
<li id="home-link"><a href="<?cs var:toroot ?><?cs
if:android.whichdoc != "online" ?>offline.html<?cs
else ?>index.html<?cs /if ?>">
<span>Home</span></a></li>
<li id="sdk-link"><a href="<?cs var:toroot ?>sdk/1.1_r1/index.html"><span>SDK</span></a></li>
<li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html"
onClick="return loadLast('guide')"><span>Dev Guide</span></a></li>
<li id="reference-link"><a href="<?cs var:toroot ?>reference/packages.html"
onClick="return loadLast('reference')"><span>Reference</span></a></li>
<li><a href="http://android-developers.blogspot.com"><span>Blog</span></a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html"><span>Community</span></a></li>
</ul>
</div>
<div id="headerRight">
<div id="headerLinks">
<!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> -->
<span class="text">
<!-- &nbsp;<a href="#">English</a> | -->
<a href="http://www.android.com">Android.com</a>
</span>
</div><?cs
call:default_search_box() ?>
</div><!-- headerRight -->
</div><!-- header --><?cs
/def ?><?cs # custom_masthead ?>
<?cs call:default_search_box() ?>
<ul class="<?cs
if:reference ?>reference<?cs
elif:guide ?>guide<?cs
elif:sdk ?>sdk<?cs
elif:home ?>home<?cs
elif:community ?>community<?cs
elif:publish ?>publish<?cs
elif:about ?>about<?cs /if ?>">
<?cs if:android.whichdoc == "online" ?>
<li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
<?cs /if ?>
<li id="sdk-link"><a href="<?cs var:toroot ?>sdk/index.html"><span>SDK</span></a></li>
<li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html"
onClick="return loadLast('guide')"><span>Dev Guide</span></a></li>
<li id="reference-link"><a href="<?cs var:toroot ?>reference/packages.html"
onClick="return loadLast('reference')"><span>Reference</span></a></li>
<li><a href="http://android-developers.blogspot.com"><span>Blog</span></a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html"><span>Community</span></a></li>
</ul>
</div><!-- headerRight -->
</div><!-- header -->
<?cs /def ?><?cs # custom_masthead ?>
<?cs def:sdk_nav() ?>
<div class="g-section g-tpl-180" id="body-content">
<div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav">
<?cs include:"../../../java/android/html/sdk/sdk_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<?cs
def:sdk_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first not-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<?cs /def ?>
<?cs def:guide_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:"../../../java/android/html/guide/guide_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
addLoadEvent(function() {
scrollIntoView("devdoc-nav");
});
</script>
<?cs
def:guide_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:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
addLoadEvent(function() {
scrollIntoView("devdoc-nav");
});
</script>
<?cs /def ?>
<?cs def:publish_nav() ?>
<div class="g-section g-tpl-180" id="body-content">
<div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav">
<?cs include:"../../../java/android/html/publish/publish_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<?cs
def:publish_nav() ?>
<div class="g-section g-tpl-180" id="body-content">
<div class="g-unit g-first" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../frameworks/base/docs/html/publish/publish_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<?cs /def ?>
<?cs def:custom_left_nav() ?>
<?cs if:guide ?>
<?cs call:guide_nav() ?>
<?cs elif:publish ?>
<?cs call:publish_nav() ?>
<?cs elif:sdk ?>
<?cs call:sdk_nav() ?>
<?cs else ?>
<?cs call:default_left_nav() ?>
<?cs /if ?>
<?cs /def ?>
<?cs
def:custom_left_nav() ?><?cs
if:guide ?><?cs
call:guide_nav() ?><?cs
elif:publish ?><?cs
call:publish_nav() ?><?cs
elif:sdk ?><?cs
call:sdk_nav() ?><?cs
else ?><?cs
call:default_left_nav() ?><?cs
/if ?><?cs
/def ?>
<?cs # appears at the bottom of every page ?><?cs
def:custom_cc_copyright() ?>
Except as noted, this content is
licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
Creative Commons Attribution 2.5</a>. For details and
restrictions, see the <a href="<?cs var:toroot ?>license.html">Content
License</a>.<?cs
/def ?>
<?cs # appears on the left side of the blue bar at the bottom of every page ?>
<?cs def:custom_copyright() ?>Copyright 2008 <a href="http://source.android.com/">The Android Open Source Project</a><?cs /def ?>
<?cs
def:custom_copyright() ?>
Except as noted, this content is licensed under <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
Content License</a>.<?cs
/def ?>
<?cs # appears on the right side of the blue bar at the bottom of every page ?>
<?cs def:custom_buildinfo() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?>
<?cs
def:custom_footerlinks() ?>
<p>
<a href="http://www.android.com/terms.html">Site Terms of Service</a> -
<a href="http://www.android.com/privacy.html">Privacy Policy</a> -
<a href="http://www.android.com/branding.html">Brand Guidelines</a>
</p><?cs
/def ?>
<?cs # appears on the right side of the blue bar at the bottom of every page ?><?cs
def:custom_buildinfo() ?>
Android 1.1 r1 - <?cs var:page.now ?><?cs
/def ?>

View File

@ -1,88 +1,106 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
<?cs if:sdk.redirect ?>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html">
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
</head>
<?cs else ?>
<?cs include:"head_tag.cs" ?>
<?cs /if ?>
<body class="gc-documentation">
<a name="top"></a>
<?cs call:custom_masthead() ?>
<?cs call:sdk_nav() ?>
<div class="g-unit" id="doc-content" >
<div id="jd-content" style="min-width:870px">
<h1><?cs var:sdk.version ?></h1>
<p><em>
<?cs var:sdk.date ?> -
<a href="RELEASENOTES.html">Release Notes</a>
</em></p>
<div id="qv-wrapper">
<div id="qv">
<h2>Get Started</h2>
<p><a href="requirements.html">System and Sofware Requirements</a></p>
<p><a href="installing.html">Guide to Installing the SDK</a></p>
<h2>Upgrade</h2>
<p><a href="upgrading.html">Upgrading the SDK</a></p>
<p><a href="migrating/changes-overview.html">API changes overview</a></p>
<p><a href="migrating/changes.html">API differences report</a></p>
<h2>Using Eclipse?</h2>
<p>Android provides an Eclipse plugin to help make programming and debugging easier.</p>
<p><a href="<?cs var:toroot ?>guide/developing/tools/adt.html">Install Eclipse plugin</a></p>
</div>
</div>
<?cs if:sdk.redirect ?>
Redirecting to
<a href="<?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html">
<?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html
</a>...
<?cs else ?>
<div id="jd-header" class="guide-header" >
<span class="crumb">&nbsp;</span>
<h1><?cs if:android.whichdoc == "online" ?>Download <?cs /if ?><?cs var:page.title ?></h1>
</div>
<p>Before downloading, please read the <a href="terms.html">Terms</a>
that govorn the use of the Android SDK.</p>
<div id="jd-content">
<p class="special-note"><strong>Please note:</strong> The Android SDK is under active development.
Please keep this in mind as you explore its capabilities. If you discover any issues, we
welcome you to notify us of them via our Issue Tracker.</p>
<p><em>
<?cs var:sdk.date ?>
</em></p>
<table class="download">
<?cs if:sdk.not_latest_version ?>
<div class="special">
<p><strong>This is NOT the current Android SDK release.</strong></p>
<p>Use the links under <strong>Current SDK Release</strong>, on the left, to be directed to the current SDK.</p>
</div>
<?cs /if ?>
<?cs if:android.whichdoc != "online" ?>
<p>The sections below provide an overview of the SDK package. </p>
<?cs else ?>
<p>Before downloading, please read the <a href="<?cs var:toroot ?>sdk/<?cs var:sdk.version ?>/requirements.html">
System Requirements</a> document. As you start the download, you will also need to review and agree to
the Terms and Conditions that govern the use of the Android SDK. </p>
<table class="download">
<tr>
<th>Platform</th>
<th>Package</th>
<th>Size</th>
<th>MD5 Checksum</th>
</tr>
<tr>
<th>Platform</th>
<th>Package</th>
<th>Size</th>
<th>MD5 Checksum</th>
</tr>
<tr>
<td>Windows</td>
<td>
<a href="http://dl.google.com/android/<?cs var:sdk.win_download ?>"><?cs var:sdk.win_download ?></a>
</td>
<td><?cs var:sdk.win_bytes ?></td>
<td><?cs var:sdk.win_checksum ?></td>
</tr>
<tr class="alt-color">
<td>Mac OS X (intel)</td>
<td>
<a href="http://dl.google.com/android/<?cs var:sdk.mac_download ?>"><?cs var:sdk.mac_download ?></a>
</td>
<td><?cs var:sdk.mac_bytes ?></td>
<td><?cs var:sdk.mac_checksum ?></td>
</tr>
<tr>
<td>Linux (i386)</td>
<td>
<a href="http://dl.google.com/android/<?cs var:sdk.linux_download ?>"><?cs var:sdk.linux_download ?></a>
</td>
<td><?cs var:sdk.linux_bytes ?></td>
<td><?cs var:sdk.linux_checksum ?></td>
</tr>
</table>
<td>Windows</td>
<td>
<a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.win_download ?>"><?cs var:sdk.win_download ?></a>
</td>
<td><?cs var:sdk.win_bytes ?> bytes</td>
<td><?cs var:sdk.win_checksum ?></td>
</tr>
<tr class="alt-color">
<td>Mac OS X (intel)</td>
<td>
<a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.mac_download ?>"><?cs var:sdk.mac_download ?></a>
</td>
<td><?cs var:sdk.mac_bytes ?> bytes</td>
<td><?cs var:sdk.mac_checksum ?></td>
</tr>
<tr>
<td>Linux (i386)</td>
<td>
<a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.linux_download ?>"><?cs var:sdk.linux_download ?></a>
</td>
<td><?cs var:sdk.linux_bytes ?> bytes</td>
<td><?cs var:sdk.linux_checksum ?></td>
</tr>
</table>
<?cs /if ?>
<?cs call:tag_list(root.descr) ?>
<?cs /if ?>
</div><!-- end jd-content -->
<?cs include:"footer.cs" ?>
</div><!-- end doc-content -->
</div><!-- end body-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -18,22 +18,25 @@ embed,object,applet {
/* 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;
overflow:hidden;
padding:0;
margin:0;
background-image:url(images/bg_fade.jpg);
background-repeat:repeat-x;
}
a, a code {
color:#00c;
color:#006699;
}
a:active,
a:active code {
color:#f00;
@ -41,7 +44,7 @@ a:active code {
a:visited,
a:visited code {
color:#551a8b;
color:#006699;
}
input, select,
@ -164,75 +167,69 @@ hr.blue {
/* LAYOUT */
#body-content {
margin:0;
position:fixed;
top:103px;
position:relative;
width:100%;
background: url('images/preliminary.png');
}
#header {
border-bottom: #74AC23 solid 3px;
height: 100px;
height: 114px;
position:relative;
z-index:100;
min-width:620px;
min-width:576px;
padding:0 10px;
border-bottom:3px solid #94b922;
}
#headerLeft{
position:absolute;
border:none;
margin:20px 0 0 10px;
overflow:visible;
font-size: 36px;
padding: 25px 0 0;
}
#headerRight {
float:right;
border:none;
width:615px;
height:100px;
position:absolute;
right:0;
top:0;
text-align:right;
}
/* Tabs in the header */
#header ul {
list-style: none;
float: right;
margin: 0px 3px 0px 0px;
padding: 0px 0px 0px 0px;
height: 32px;
position:absolute;
bottom:0;
right:0;
margin: 7px 0 0;
padding: 0;
height: 29px;
}
#header li {
float: left;
margin: 0px 5px 0px 0px;
margin: 0px 2px 0px 0px;
padding:0;
}
#header li a {
text-decoration: none;
display: block;
background-image: url(images/tab_default.png);
background-image: url(images/bg_images_sprite.png);
background-position: 0 -58px;
background-repeat: no-repeat;
color: #666;
font-size: 13px;
font-weight: normal;
width: 96px;
height: 32px;
font-weight: bold;
width: 94px;
height: 29px;
text-align: center;
margin: 0px;
}
#header li a:hover {
background-image: url(images/tab_hover.png);
background-image: url(images/bg_images_sprite.png);
background-position: 0 -29px;
background-repeat: no-repeat;
color: #fff;
}
#header li a span {
position:relative;
top:9px;
top:7px;
}
/* TAB HIGHLIGHTING */
@ -243,7 +240,8 @@ hr.blue {
.sdk #sdk-link a,
.community #community-link a,
.about #about-link a {
background-image: url(images/tab_selected.png);
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
background-repeat: no-repeat;
color: #fff;
font-weight: bold;
@ -257,14 +255,13 @@ hr.blue {
.sdk #sdk-link a:hover,
.community #community-link a:hover,
.about #about-link a:hover {
background-image: url(images/tab_selected.png);
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
}
#headerLinks {
margin:10px 10px 0 0;
height:13px;
/* nudge IE because green border is inside header */
_margin-top:7px;
}
#headerLinks .text {
@ -283,7 +280,7 @@ hr.blue {
#search {
height:45px;
margin:0 10px 0 0;
margin:15px 10px 0 0;
}
/* main */
@ -296,7 +293,8 @@ hr.blue {
#mainBodyFixed {
margin: 20px 10px;
color: #333;
width:920px;
width:930px;
position:relative;
}
#mainBodyFixed h3,
@ -329,18 +327,12 @@ hr.blue {
background-color:none;
}
#mainBodyFixed a,
#mainBodyFluid a {
color: #006699;
font-size: 13px;
text-decoration: underline;
}
#mainBodyLeft {
float: left;
width: 600px;
margin-right: 20px;
color: #333;
position:relative;
}
div.indent {
@ -383,17 +375,17 @@ div.indent {
#mainBodyRight td {
border:0px solid #666;
padding:0px 5px;
text-align:left;
padding:0px 5px;
text-align:left;
}
#mainBodyRight .blueBorderBox {
border:5px solid #ddf0f2;
padding:18px 18px 18px 18px;
text-align:left;
padding:18px 18px 18px 18px;
text-align:left;
}
#mainBodyRight .seperator {
#mainBodyFixed .seperator {
background-image:url(images/hr_gray_side.jpg);
background-repeat:no-repeat;
width: 100%;
@ -421,17 +413,27 @@ div.indent {
float: left;
width:90%;
margin: 20px;
color: #666;
color: #aaa;
font-size: 11px;
}
#footer a {
color: #666;
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 {
@ -537,16 +539,13 @@ vertical-align: bottom;
#search_filtered_div {
position:absolute;
margin-top:-1px;
z-index:101;
width:280px;
border:1px solid #BCCDF0;
background-color:#fff;
}
#search_filtered {
border:1px solid #BCCDF0;
background-color:#fff;
position:relative;
top:-1px;
_top:-19px; /*IE*/
min-width:100%;
}
#search_filtered td{
@ -554,11 +553,9 @@ vertical-align: bottom;
border-bottom: 1px solid #669999;
line-height:1.5em;
}
#search_filtered a{
color:#0000cc;
}
#search_filtered .jd-selected {
background-color: #A4C639;
background-color: #94b922;
cursor:pointer;
}
#search_filtered .jd-selected,
@ -685,6 +682,33 @@ td.gsc-search-button {
height:1.8em;
}
/* 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 */
@ -692,57 +716,79 @@ td.gsc-search-button {
padding: 0px 0px 0px 0px;
float: left;
width: 584px;
height: 450px;
height: 580px;
background:url(images/home/bg_home_middle.png) no-repeat 0 0;
position:relative;
}
#homeMiddle #homeTitle {
margin:17px 17px 0;
height:35px;
#homeTitle {
margin:15px 15px 0;
height:30px;
background:url(images/hr_gray_side.jpg) no-repeat 0 29px;
}
#homeTitle h2 {
padding:0;
}
#announcement-block {
margin:15px 15px 0;
height:125px;
}
#announcement-block img {
float:left;
margin:0 30px 0 0;
}
#announcement {
float:left;
margin:0;
}
.clearer { clear:both; }
#arrow-left, #arrow-right {
display:block;
width:25px;
height:116px;
float:left;
width:42px;
height:42px;
background-image:url(images/home/carousel_buttons_sprite.png);
background-repeat:no-repeat;
}
#arrow-left {
float:left;
margin:0 15px 0 10px;
margin:35px 3px 0 10px;
}
#arrow-right {
float:left;
margin-left:15px;
margin:35px 10px 0 0;
}
.arrow-left-off,
#arrow-left.arrow-left-off:hover {
background-position:0 0;
}
.arrow-right-off,
#arrow-right.arrow-right-off:hover {
background-position:-42px 0;
}
#arrow-left:hover {
background-image:url(images/arrow_left_off.jpg);
background-position:0 -42px;
}
#arrow-right:hover {
background-position:-42px -42px;
}
.arrow-left-on {
background-image:url(images/arrow_left_on.jpg);
}
.arrow-right-off,
#arrow-right:hover {
background-image:url(images/arrow_right_off.jpg);
background-position:0 0;
}
.arrow-right-on {
background-image:url(images/arrow_right_on.jpg);
background-position:-42px 0;
}
.arrow-right-off,
.arrow-left-off {
cursor:default;
}
.app-list-container {
clear:both;
text-align: center;
margin:37px 25px 0;
margin:37px 20px 0;
_margin-top:33px;
border:0px solid #ccc;
position:relative;
width:100%;
}
@ -761,7 +807,7 @@ div#app-list {
position:absolute;
margin:11px 0 0;
_margin-top:13px;
width:100%;
width:1000%;
}
#app-list a {
@ -794,9 +840,14 @@ div#app-list {
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;
}

View File

@ -34,6 +34,10 @@
font-size:12px;
}
#side-nav.not-resizable {
background:url('images/sidenav-rule.png') no-repeat 243px 0;
}
#resize-packages-nav {
/* keeps the resize handle below the h-scroll handle */
height:270px;
@ -69,6 +73,7 @@
padding:0;
line-height:16px;
white-space:nowrap;
zoom:1;
}
#side-nav li h2 {
@ -81,6 +86,7 @@
#side-nav li a {
text-decoration:none;
padding: 0 0 0 18px;
zoom:1;
}
#side-nav li a:hover {
@ -199,6 +205,17 @@
overflow-y: scroll;
}
#nav-swap {
font-size:10px;
line-height:10px;
margin-left:1em;
text-decoration:none;
display:block;
}
#tree-link {
}
/* DOCUMENT BODY */
@ -208,7 +225,7 @@
#jd-header {
background-color: #E2E2E2;
padding: 7px 20px;
padding: 7px 15px;
}
#jd-header h1 {
@ -268,10 +285,12 @@ font-size:.9em;
text-decoration:underline;
}
/* a div inside a sumtable th holding "Expand All" */
.expandall {
float:right;
font-weight:normal;
/* the link inside a sumtable for "Show All/Hide All" */
.toggle-all {
display:block;
float:right;
font-weight:normal;
font-size:0.9em;
}
/* adjustments for in/direct subclasses tables */
@ -354,7 +373,7 @@ links to summary tables) */
}
#jd-content {
padding: 18px 20px;
padding: 18px 15px;
}
hr {
@ -640,22 +659,18 @@ pre.classic {
#qv-wrapper {
float: right;
position:relative;
width:315px;
width:310px;
background-color:#fff;
padding:4px 30px 15px 20px;
top:-55px;
left:20px;
margin:-48px 0 2px 0;
padding:0 0 20px 35px;
}
#qv {
background-color:#fff;
border:4px solid #dee8f1;
margin:0 0 0 15px;
margin:0;
padding:0 6px 6px;
margin-top:0px;
width:295;
float:right;
width:270px;
font-size:.9em;
}
@ -730,27 +745,50 @@ pre.classic {
.sidebox-wrapper {
float: right;
width:300px;
width:280px;
background-color:#fff;
margin: 0 0 0 15px;
padding: 5px 0 5px 15px;
margin: 0;
padding: 20px 0 20px 20px;
}
.sidebox-inner {
border-left:1px solid #dee8f1;
background-color:#ffffee;
padding:0 5px 0 15px;
padding:5px 8px 5px 12px;
font-size:90%;
width:260px;
}
.sidebox {
float: right;
width:285px;
width:260px;
background-color:#ffffee;
border-left:1px solid #dee8f1;
margin: 0 0 0 15px;
margin: 12px 0 0 15px;
padding:5px 8px 0 12px;
font-size:90%;
}
.sidebox p,
.sidebox-inner p {
margin-bottom: .25em;
}
.sidebox ul,
.sidebox-inner ul {
padding: 0 0 0 1.5em;
}
.sidebox li ul,
.sidebox-inner li ul {
margin-top:0;
margin-bottom:.1em;
}
.sidebox li,
.sidebox-inner li {
padding:0 0 0 0em;
}
#jd-content .sidebox h2,
#jd-content .sidebox h3,
@ -857,7 +895,7 @@ tr.alt-color {
}
/* expando trigger */
#jd-content .jd-expando-trigger {
#jd-content .jd-expando-trigger-img {
margin:0;
}
@ -1042,4 +1080,4 @@ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body
display:none;
}
}
}

View File

@ -3,13 +3,13 @@ var classesNav;
var devdocNav;
var sidenav;
var content;
var HEADER_HEIGHT = 103;
var HEADER_HEIGHT = 117;
var cookie_style = '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;
@ -23,16 +23,34 @@ function addLoadEvent(newfun) {
}
}
addLoadEvent(prepare);
var agent = navigator['userAgent'];
if ((agent.indexOf("Mobile") != -1) ||
(agent.indexOf("BlackBerry") != -1) ||
(agent.indexOf("Mini") != -1)) {
isMobile = true;
addLoadEvent(mobileSetup);
}
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'});
}
function setToRoot(root) {
toRoot = root;
// note: toRoot also used by carousel.js
}
function restoreWidth(navWidth) {
var windowWidth = $(window).width() + "px";
content.css({marginLeft:navWidth, width:parseInt(windowWidth) - parseInt(navWidth) + "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});
@ -70,17 +88,18 @@ function getCookie(cookie) {
}
function writeCookie(cookie, val, path, expiration) {
if (!val) return;
if (!val) return;
var date = new Date();
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
expiration = expiration ? expiration : date.toGMTString();
if (location.href.indexOf("/reference/") != -1) {
document.cookie = cookie_style+'_reference_'+cookie+'='+ val+'; path=' + toRoot + path +
((expiration) ? '; expires=' + expiration : '');
document.cookie = cookie_style+'_reference_'+cookie+'='+val+'; expires='+expiration+'; path='+'/'+path;
} else if (location.href.indexOf("/guide/") != -1) {
document.cookie = cookie_style+'_guide_'+cookie+'='+val+'; path=' + toRoot + path +
((expiration) ? '; expires=' + expiration : '');
document.cookie = cookie_style+'_guide_'+cookie+'='+val+'; expires='+expiration+'; path='+'/'+path;
}
}
function prepare() {
function init() {
$("#side-nav").css({position:"absolute",left:0});
content = $("#doc-content");
resizePackagesNav = $("#resize-packages-nav");
@ -88,41 +107,54 @@ function prepare() {
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_";
}
var cookieWidth = getCookie(cookiePath+'width');
var cookieHeight = getCookie(cookiePath+'height');
if (cookieWidth) {
restoreWidth(cookieWidth);
} else {
resizeWidth();
}
if (cookieHeight) {
restoreHeight(cookieHeight);
} else {
resizeHeight();
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 = getCookie(cookiePath+'width');
var cookieHeight = getCookie(cookiePath+'height');
if (cookieWidth) {
restoreWidth(cookieWidth);
} else if ($(".side-nav-resizable").length) {
resizeWidth();
}
if (cookieHeight) {
restoreHeight(cookieHeight);
} else {
resizeHeight();
}
}
if (devdocNav.length) {
if (devdocNav.length) { // only dev guide and sdk
highlightNav(location.href);
}
}
function highlightNav(fullPageName) {
var lastSlashPos = fullPageName.lastIndexOf("/");
var firstSlashPos = fullPageName.indexOf("/",8); // first slash after http://
var firstSlashPos = (fullPageName.indexOf("/guide/") != -1) ?
fullPageName.indexOf("/guide/") :
fullPageName.indexOf("/sdk/"); // first slash after /guide or /sdk
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) { // if there's no match, then the nav url must be the parent dir (ie, this doc isn't listed, so highlight the parent
link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, pathPageName.lastIndexOf("/") + 1)+"']");
if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/sdk/") != -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 and sdk)
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')) {
@ -143,34 +175,38 @@ function resizeHeight() {
$("#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"});
writeCookie("height", resizePackagesNav.css("height"), "reference/", null);
writeCookie("height", resizePackagesNav.css("height"), "", null);
}
function resizeWidth() {
if (location.href.indexOf("/reference/") != -1) {
var path = "reference/";
} else if (location.href.indexOf("/guide/") != -1) {
var path = "guide/";
}
var windowWidth = $(window).width() + "px";
if (sidenav.length) {
var sidenavWidth = sidenav.css("width");
} else {
var sidenavWidth = 0;
}
content.css({marginLeft:sidenavWidth, width:parseInt(windowWidth) - parseInt(sidenavWidth) + "px"});
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});
writeCookie("width", sidenavWidth, path, null);
writeCookie("width", sidenavWidth, "", null);
}
function resizeAll() {
resizeHeight();
resizeWidth();
if (!isMobile) {
resizeHeight();
if ($(".side-nav-resizable").length) {
resizeWidth();
}
}
}
function loadLast(cookiePath) {
var location = window.location.href;
if (location.indexOf("/"+cookiePath+"/") != -1) {
return true;
}
var lastPage = getCookie(cookiePath + "_lastpage");
if (lastPage) {
window.location = lastPage;
@ -179,11 +215,6 @@ function loadLast(cookiePath) {
return true;
}
$(document).ready(function(){
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizeHeight(); } });
$(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
});
$(window).unload(function(){
var href = location.href;
if (href.indexOf("/reference/") != -1) {
@ -195,7 +226,6 @@ $(window).unload(function(){
function toggle(obj, slide) {
var ul = $("ul", obj);
var li = ul.parent();
@ -253,7 +283,7 @@ function swapNav() {
}
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());
writeCookie("nav", nav_pref, "", date.toGMTString());
$("#nav-panels").toggle();
$("#panel-link").toggle();
@ -272,14 +302,50 @@ function scrollIntoView(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 offset = selected.position();
if(offset.top > navHeight - 92) {
scrolling.scrollTop = offset.top - navHeight + 92;
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;
}

View File

@ -9,7 +9,7 @@
var oldVid = "multi"; // set the default video
var nowPlayingString = "Now playing:";
var assetsRoot = "/assets/";
var assetsRoot = "assets/";
/* -- app thumbnail switcher -- */
@ -60,7 +60,7 @@ function droid(appName){
descDiv.className = "desc-left";
}
imgDiv.innerHTML = "<img src='" + assetsRoot + "images/home/" + droid.img + "'>";
imgDiv.innerHTML = "<img src='" + toRoot + assetsRoot + "images/home/" + droid.img + "'>";
descDiv.innerHTML = (droid.title != "") ? "<h3>" + droid.title + "</h3>" + droid.desc : droid.desc;
if(oldDroid)
@ -80,18 +80,20 @@ function buildCarousel() {
var a = document.createElement("a");
var img = document.createElement("img");
var br = document.createElement("br");
var span = document.createElement("span");
var text = document.createTextNode(droid.name);
a.setAttribute("id", "droidlink-" + x);
a.className = x;
a.setAttribute("href", "#");
a.onclick = function() { showPreview(this.className); return false; }
img.setAttribute("src", assetsRoot + "images/home/" + droid.icon);
img.setAttribute("src", toRoot + assetsRoot + "images/home/" + droid.icon);
img.setAttribute("alt", "");
span.appendChild(text);
a.appendChild(img);
a.appendChild(br);
a.appendChild(text);
a.appendChild(span);
appList.appendChild(a);
}
}
@ -111,7 +113,7 @@ var arrowLeft = 'arrow-left'; // the left control arrow
function showPreview(slideName) {
// centerSlide(slideName);
centerSlide(slideName);
if (slideName.indexOf('selected') != -1) {
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,78 @@
/**
* jQuery history event v0.1
* Copyright (c) 2008 Tom Rodenberg <tarodenberg gmail com>
* Licensed under the GPL (http://www.gnu.org/licenses/gpl.html) license.
*/
(function($) {
var currentHash, previousNav, timer, hashTrim = /^.*#/;
var msie = {
iframe: null,
getDoc: function() {
return msie.iframe.contentWindow.document;
},
getHash: function() {
return msie.getDoc().location.hash;
},
setHash: function(hash) {
var d = msie.getDoc();
d.open();
d.close();
d.location.hash = hash;
}
};
var historycheck = function() {
var hash = msie.iframe ? msie.getHash() : location.hash;
if (hash != currentHash) {
currentHash = hash;
if (msie.iframe) {
location.hash = currentHash;
}
var current = $.history.getCurrent();
$.event.trigger('history', [current, previousNav]);
previousNav = current;
}
};
$.history = {
add: function(hash) {
hash = '#' + hash.replace(hashTrim, '');
if (currentHash != hash) {
var previous = $.history.getCurrent();
location.hash = currentHash = hash;
if (msie.iframe) {
msie.setHash(currentHash);
}
$.event.trigger('historyadd', [$.history.getCurrent(), previous]);
}
if (!timer) {
timer = setInterval(historycheck, 100);
}
},
getCurrent: function() {
if (currentHash) {
return currentHash.replace(hashTrim, '');
} else {
return "";
}
}
};
$.fn.history = function(fn) {
$(this).bind('history', fn);
};
$.fn.historyadd = function(fn) {
$(this).bind('historyadd', fn);
};
$(function() {
currentHash = location.hash;
if ($.browser.msie) {
msie.iframe = $('<iframe style="display:none" src="javascript:false;"></iframe>').prependTo('body')[0];
msie.setHash(currentHash);
currentHash = msie.getHash();
}
});
})(jQuery);

View File

@ -70,7 +70,7 @@ function sync_selection_table(toroot)
//if we have results, make the table visible and initialize result info
if (gMatches.length > 0) {
filtered.className = "showing";
document.getElementById("search_filtered_div").className = "showing";
var N = gMatches.length < ROW_COUNT ? gMatches.length : ROW_COUNT;
for (i=0; i<N; i++) {
r = filtered.rows[i];
@ -97,7 +97,7 @@ function sync_selection_table(toroot)
}*/
//if we have no results, hide the table
} else {
filtered.className = "no-display";
document.getElementById("search_filtered_div").className = "no-display";
}
}
@ -107,7 +107,8 @@ function search_changed(e, kd, toroot)
var text = search.value;
// 13 = enter
if (kd && (e.keyCode == 13)) {
if (!kd && (e.keyCode == 13)) {
document.getElementById("search_filtered_div").className = "no-display";
if (gSelectedIndex >= 0) {
window.location = toroot + gMatches[gSelectedIndex].link;
return false;
@ -145,6 +146,7 @@ function search_changed(e, kd, toroot)
}
}
sync_selection_table(toroot);
return true; // allow the event to bubble up to the search api
}
}
@ -160,6 +162,12 @@ function search_focus_changed(obj, focused)
obj.value = DEFAULT_TEXT;
obj.style.color="#aaaaaa";
}
document.getElementById("search_filtered").className = "no-display";
document.getElementById("search_filtered_div").className = "no-display";
}
}
function submit_search() {
var query = document.getElementById('search_autocomplete').value;
document.location = '/search.html#q=' + query;
return false;
}

View File

@ -1,21 +1,29 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
<body>
<script type="text/javascript">
function toggle_inherited(base) {
function toggleInherited(linkObj, expand) {
var base = linkObj.getAttribute("id");
var list = document.getElementById(base + "-list");
var summary = document.getElementById(base + "-summary");
var trigger = document.getElementById(base + "-trigger");
if (list.style.display == "none") {
list.style.display = "block";
summary.style.display = "none";
trigger.src = "<?cs var:toroot ?>assets/images/triangle-closed.png";
} else {
var a = $(linkObj);
if ( (expand == null && a.hasClass("closed")) || expand ) {
list.style.display = "none";
summary.style.display = "block";
trigger.src = "<?cs var:toroot ?>assets/images/triangle-opened.png";
a.removeClass("closed");
a.addClass("opened");
} else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
list.style.display = "block";
summary.style.display = "none";
trigger.src = "<?cs var:toroot ?>assets/images/triangle-closed.png";
a.removeClass("opened");
a.addClass("closed");
}
return false;
}
</script>
@ -96,7 +104,7 @@ Summary:
<?cs /if ?>
</nobr>
<?cs if:inhattrs || inhconstants || inhfields || inhmethods || subcount(class.subclasses.direct) || subcount(class.subclasses.indirect) ?>
&#124; [<a href="">Expand All</a>]
&#124; <a href="#" onclick="return toggleAllSummaryInherited(this)">[Expand All]</a>
<?cs /if ?>
</div>
</div>
@ -149,7 +157,7 @@ Summary:
</table>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<?cs if:subcount(class.subclasses.direct) ?>
<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
<?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
@ -287,8 +295,10 @@ Summary:
<?cs # if there are inherited attrs, write the table ?>
<?cs if:inhattrs ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
<table id="inhattrs" class="jd-sumtable"><tr><th>
<div class="expandall">[<a href="">Expand All</a>]</div>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited XML Attributes</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.attrs) ?>
@ -327,7 +337,7 @@ Summary:
<?cs if:subcount(class.constants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
<?cs call:write_constant_summary(class.constants) ?>
</table>
@ -335,8 +345,10 @@ Summary:
<?cs # if there are inherited constants, write the table ?>
<?cs if:inhconstants ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<table id="inhconstants" class="jd-sumtable"><tr><th>
<div class="expandall">[<a href="">Expand All</a>]</div>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Constants</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.constants) ?>
@ -368,8 +380,10 @@ Summary:
<?cs # if there are inherited fields, write the table ?>
<?cs if:inhfields ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- =========== FIELD SUMMARY =========== -->
<table id="inhfields" class="jd-sumtable"><tr><th>
<div class="expandall">[<a href="">Expand All</a>]</div>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Fields</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.fields) ?>
@ -425,8 +439,10 @@ Summary:
<?cs # if there are inherited methods, write the table ?>
<?cs if:inhmethods ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="jd-sumtable"><tr><th>
<div class="expandall">[<a href="">Expand All</a>]</div>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Methods</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.methods) ?>
@ -454,7 +470,9 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs def:write_field_details(fields) ?>
<?cs each:field=fields ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<div class="jd-details" id="<?cs var:field.anchor ?>">
<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
<A NAME="<?cs var:field.anchor ?>"></A>
<div class="jd-details">
<h4 class="jd-details-title">
<span class="normal">
<?cs var:field.scope ?>
@ -485,8 +503,9 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs def:write_method_details(methods) ?>
<?cs each:method=methods ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<div class="jd-details" id="<?cs var:method.anchor ?>">
<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
<A NAME="<?cs var:method.anchor ?>"></A>
<div class="jd-details">
<h4 class="jd-details-title">
<span class="normal">
<?cs var:method.scope ?>
@ -506,8 +525,9 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs def:write_attr_details(attrs) ?>
<?cs each:attr=attrs ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<div class="jd-details" id="<?cs var:attr.anchor ?>">
<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
<A NAME="<?cs var:attr.anchor ?>"></A>
<div class="jd-details">
<h4 class="jd-details-title"><?cs var:attr.name ?></h4>
<div class="jd-details-descr">
<?cs call:description(attr) ?>
@ -528,30 +548,40 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<!-- XML Attributes -->
<?cs if:subcount(class.attrs) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= FIELD DETAIL ======== -->
<h2>XML Attributes</h2>
<?cs call:write_attr_details(class.attrs) ?>
<?cs /if ?>
<!-- Enum Values -->
<?cs if:subcount(class.enumConstants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= ENUM CONSTANTS DETAIL ======== -->
<h2>Enum Values</h2>
<?cs call:write_field_details(class.enumConstants) ?>
<?cs /if ?>
<!-- Constants -->
<?cs if:subcount(class.constants) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= ENUM CONSTANTS DETAIL ======== -->
<h2>Constants</h2>
<?cs call:write_field_details(class.constants) ?>
<?cs /if ?>
<!-- Fields -->
<?cs if:subcount(class.fields) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= FIELD DETAIL ======== -->
<h2>Fields</h2>
<?cs call:write_field_details(class.fields) ?>
<?cs /if ?>
<!-- Public ctors -->
<?cs if:subcount(class.ctors.public) ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2>Public Constructors</h2>
<?cs call:write_method_details(class.ctors.public) ?>
<?cs /if ?>
@ -565,7 +595,7 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs /if ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<?cs if:subcount(class.methods.public) ?>
<h2>Public Methods</h2>
@ -579,13 +609,16 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs call:write_method_details(class.methods.protected) ?>
<?cs /if ?>
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
<?cs # the next two lines must be exactly like this to be parsed by eclipse ?>
<!-- ========= END OF CLASS DATA ========= -->
<A NAME="navbar_top"></A>
<?cs include:"footer.cs" ?>
</div> <!-- jd-content -->
</div><!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -33,6 +34,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div><!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -2,23 +2,23 @@
<?cs # Use the -templatedir arg to javadoc to set your own directory with a ?>
<?cs # replacement for this file in it. ?>
<?cs def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
<a href="<?cs var:toroot ?>index.html" tabindex="-1"><?cs var:page.title ?></a>
</div>
<div id="headerRight">
<?cs call:default_search_box() ?>
</div><!-- headerRight -->
</div><!-- header -->
<?cs # appears at the top of every page ?><?cs
def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
<a href="<?cs var:toroot ?>index.html" tabindex="-1"><?cs var:page.title ?></a>
</div>
<div id="headerRight">
<?cs call:default_search_box() ?>
</div><!-- headerRight -->
</div><!-- header --><?cs
/def ?>
<?cs /def ?><?cs # custom_masthead ?>
<?cs # appears on the left side of the blue bar at the bottom of every page ?>
<?cs # appear at the bottom of every page ?>
<?cs def:custom_copyright() ?><?cs /def ?>
<?cs # appears on the right side of the blue bar at the bottom of every page ?>
<?cs def:custom_cc_copyright() ?><?cs /def ?>
<?cs def:custom_footerlinks() ?><?cs /def ?>
<?cs def:custom_buildinfo() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?>
<?cs # appears on the side of the page ?>
<?cs def:custom_left_nav() ?><?cs call:default_left_nav() ?><?cs /def ?>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -31,8 +32,9 @@
<?cs include:"footer.cs" ?>
</div><!-- end doc-content -->
</div><!-- end body-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -0,0 +1 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

View File

@ -1,12 +1,19 @@
<div id="footer">
<div id="copyright">
<?cs call:custom_copyright() ?>
</div>
<div id="build-info">
<?cs call:custom_buildinfo() ?>
</div>
</div>
<?cs if:reference||guide ?>
<div id="copyright">
<?cs call:custom_copyright() ?>
</div>
<div id="build_info">
<?cs call:custom_buildinfo() ?>
</div>
<?cs elif:!hide_license_footer ?>
<div id="copyright">
<?cs call:custom_cc_copyright() ?>
</div>
<?cs /if ?>
<div id="footerlinks">
<?cs call:custom_footerlinks() ?>
</div>
</div> <!-- end footer -->

View File

@ -1,31 +1,31 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?cs var:page.title ?> | <?cs
if:guide ?>Guide | <?cs
elif:reference ?>Reference | <?cs
elif:sdk ?>SDK | <?cs
elif:sample ?>Samples | <?cs
/if ?>Android Developers</title>
<?cs if:guide ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" />
<?cs else ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
<?cs /if ?>
<script src="<?cs var:toroot ?>assets/search_autocomplete.js"></script>
<script src="<?cs var:toroot ?>reference/lists.js"></script>
<script src="<?cs var:toroot ?>assets/jquery-resizable.min.js"></script>
<script src="<?cs var:toroot ?>assets/android-developer-docs.js"></script>
<script>
<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>favicon.ico" />
<title><?cs
if:page.title ?><?cs
var:page.title ?><?cs
if:sdk.version ?> (<?cs
var:sdk.version ?>)<?cs
/if ?> | <?cs
/if ?>Android Developers</title><?cs
if:guide||sdk ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" /><?cs
else ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /><?cs
/if ?>
<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">
setToRoot("<?cs var:toroot ?>");
</script>
<script src="<?cs var:toroot ?>navtree_data.js"></script>
<script src="<?cs var:toroot ?>assets/navtree.js"></script>
</script><?cs
if:reference ?>
<script src="<?cs var:toroot ?>navtree_data.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>assets/navtree.js" type="text/javascript"></script><?cs
/if ?>
<noscript>
<style>
<style type="text/css">
body{overflow:auto;}
#body-content{position:relative; top:0;}
#doc-content{overflow:visible;border-left:3px solid #666;}

View File

@ -60,7 +60,9 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div><!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -30,6 +30,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div><!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,8 +1,7 @@
<?cs # A link to a package ?>
<?cs def:package_link(pkg)) ?>
<a href="<?cs var:toroot ?><?cs var:pkg.link ?>"><?cs var:pkg.name ?></a>
<?cs /def ?>
<?cs # A link to a package ?><?cs
def:package_link(pkg)) ?>
<a href="<?cs var:toroot ?><?cs var:pkg.link ?>"><?cs var:pkg.name ?></a><?cs
/def ?>
<?cs # A link to a type, or not if it's a primitive type
link: whether to create a link at the top level, always creates links in
@ -14,344 +13,325 @@
.superBounds.N.(more links) (... super ... & ...)
.extendsBounds.N.(more links) (... extends ... & ...)
.typeArguments.N.(more links) (< ... >)
?>
<?cs def:type_link_impl(type, link) ?><?cs
if:type.link && link=="true" ?><a href="<?cs var:toroot ?><?cs var:type.link ?>"><?cs /if
?><?cs var:type.label ?><?cs if:type.link && link=="true" ?></a><?cs /if ?><?cs
if:subcount(type.extendsBounds) ?><?cs
each:t=type.extendsBounds ?><?cs
if:first(t) ?>&nbsp;extends&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
call:type_link_impl(t, "true") ?><?cs
/each ?><?cs
/if ?><?cs
if:subcount(type.superBounds) ?><?cs
each:t=type.superBounds ?><?cs
if:first(t) ?>&nbsp;super&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
call:type_link_impl(t, "true") ?><?cs
/each ?><?cs
/if ?><?cs
if:subcount(type.typeArguments)
?>&lt;<?cs each:t=type.typeArguments ?><?cs call:type_link_impl(t, "true") ?><?cs
if:!last(t) ?>,&nbsp;<?cs /if ?><?cs
/each ?>&gt;<?cs
/if ?><?cs
?><?cs
def:type_link_impl(type, link) ?><?cs
if:type.link && link=="true" ?><a href="<?cs var:toroot ?><?cs var:type.link ?>"><?cs /if
?><?cs var:type.label ?><?cs if:type.link && link=="true" ?></a><?cs /if ?><?cs
if:subcount(type.extendsBounds) ?><?cs
each:t=type.extendsBounds ?><?cs
if:first(t) ?>&nbsp;extends&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
call:type_link_impl(t, "true") ?><?cs
/each ?><?cs
/if ?><?cs
if:subcount(type.superBounds) ?><?cs
each:t=type.superBounds ?><?cs
if:first(t) ?>&nbsp;super&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
call:type_link_impl(t, "true") ?><?cs
/each ?><?cs
/if ?><?cs
if:subcount(type.typeArguments)
?>&lt;<?cs each:t=type.typeArguments ?><?cs call:type_link_impl(t, "true") ?><?cs
if:!last(t) ?>,&nbsp;<?cs /if ?><?cs
/each ?>&gt;<?cs
/if ?><?cs
/def ?>
<?cs def:class_name(type) ?><?cs call:type_link_impl(type, "false") ?><?cs /def ?>
<?cs def:type_link(type) ?><?cs call:type_link_impl(type, "true") ?><?cs /def ?>
<?cs # A comma separated parameter list ?>
<?cs def:parameter_list(params) ?><?cs
each:param = params ?><?cs
call:type_link(param.type)?> <?cs
var:param.name ?><?cs
if: name(param)!=subcount(params)-1?>, <?cs /if ?><?cs
/each ?><?cs
<?cs # A comma separated parameter list ?><?cs
def:parameter_list(params) ?><?cs
each:param = params ?><?cs
call:type_link(param.type)?> <?cs
var:param.name ?><?cs
if: name(param)!=subcount(params)-1?>, <?cs /if ?><?cs
/each ?><?cs
/def ?>
<?cs # Print a list of tags (e.g. description text ?>
<?cs def:tag_list(tags) ?><?cs
each:tag = tags ?><?cs
if:tag.name == "Text" ?><?cs var:tag.text?><?cs
elif:tag.kind == "@more" ?><p><?cs
elif:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
elif:tag.kind == "@code" ?><code class="Code prettyprint"><?cs var:tag.text ?></code><?cs
elif:tag.kind == "@samplecode" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@sample" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@include" ?><?cs var:tag.text ?><?cs
elif:tag.kind == "@docRoot" ?><?cs var:toroot ?><?cs
elif:tag.kind == "@inheritDoc" ?><?cs # This is the case when @inheritDoc is in something
that doesn't inherit from anything?><?cs
elif:tag.kind == "@attr" ?><?cs
else ?>{<?cs var:tag.name?> <?cs var:tag.text ?>}<?cs
/if ?><?cs
/each ?><?cs
<?cs # Print a list of tags (e.g. description text ?><?cs
def:tag_list(tags) ?><?cs
each:tag = tags ?><?cs
if:tag.name == "Text" ?><?cs var:tag.text?><?cs
elif:tag.kind == "@more" ?><p><?cs
elif:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
elif:tag.kind == "@code" ?><code class="Code prettyprint"><?cs var:tag.text ?></code><?cs
elif:tag.kind == "@samplecode" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@sample" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@include" ?><?cs var:tag.text ?><?cs
elif:tag.kind == "@docRoot" ?><?cs var:toroot ?><?cs
elif:tag.kind == "@inheritDoc" ?><?cs # This is the case when @inheritDoc is in something
that doesn't inherit from anything?><?cs
elif:tag.kind == "@attr" ?><?cs
else ?>{<?cs var:tag.name?> <?cs var:tag.text ?>}<?cs
/if ?><?cs
/each ?><?cs
/def ?>
<?cs # The message about This xxx is deprecated. ?>
<?cs def:deprecated_text(kind) ?>
This <?cs var:kind ?> is deprecated.
<?cs /def ?>
<?cs # Show the short-form description of something. These come from shortDescr and deprecated ?>
<?cs def:short_descr(obj) ?><?cs
if:subcount(obj.deprecated) ?>
<em><?cs call:deprecated_text(obj.kind) ?>
<?cs call:tag_list(obj.deprecated) ?></em><?cs
else ?><?cs call:tag_list(obj.shortDescr) ?><?cs
/if ?><?cs
<?cs # The message about This xxx is deprecated. ?><?cs
def:deprecated_text(kind) ?>
This <?cs var:kind ?> is deprecated.<?cs
/def ?>
<?cs # Show the red box with the deprecated warning ?>
<?cs def:deprecated_warning(obj) ?>
<?cs if:subcount(obj.deprecated) ?><p>
<p class="warning jd-deprecated-warning">
<strong><?cs call:deprecated_text(obj.kind) ?></strong>
<?cs call:tag_list(obj.deprecated) ?>
</p>
<?cs /if ?>
<?cs /def ?>
<?cs # Show the short-form description of something. These come from shortDescr and deprecated ?><?cs
def:short_descr(obj) ?><?cs
if:subcount(obj.deprecated) ?>
<em><?cs call:deprecated_text(obj.kind) ?>
<?cs call:tag_list(obj.deprecated) ?></em><?cs
else ?><?cs call:tag_list(obj.shortDescr) ?><?cs
/if ?><?cs
/def ?>
<?cs # print the See Also: section ?>
<?cs def:see_also_tags(also) ?>
<?cs if:subcount(also) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">See Also</h5>
<ul class="nolist">
<?cs each:tag=also
?><li><?cs
if:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs
var:tag.label ?></a><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
else ?>[ERROR: Unknown @see kind]<?cs
/if ?></li>
<?cs /each ?>
</ul>
</div>
<?cs /if ?>
<?cs # Show the red box with the deprecated warning ?><?cs
def:deprecated_warning(obj) ?><?cs
if:subcount(obj.deprecated) ?><p>
<p class="warning jd-deprecated-warning">
<strong><?cs call:deprecated_text(obj.kind) ?></strong><?cs
call:tag_list(obj.deprecated) ?>
</p><?cs
/if ?><?cs
/def ?>
<?cs # print the See Also: section ?><?cs
def:see_also_tags(also) ?><?cs
if:subcount(also) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">See Also</h5>
<ul class="nolist"><?cs
each:tag=also ?><li><?cs
if:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs
var:tag.label ?></a><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
else ?>[ERROR: Unknown @see kind]<?cs
/if ?></li><?cs
/each ?>
</ul>
</div><?cs
/if ?>
<?cs /def ?>
<?cs # Print the long-form description for something.
Uses the following fields: deprecated descr seeAlso
?>
<?cs def:description(obj) ?>
<?cs call:deprecated_warning(obj) ?>
<div class="jd-tagdata jd-tagdescr"><p><?cs call:tag_list(obj.descr) ?></p></div>
<?cs if:subcount(obj.attrRefs) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Related XML Attributes</h5>
<ul class="nolist">
<?cs each:attr=obj.attrRefs ?>
<li><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></li>
<?cs /each ?>
</ul>
</div>
<?cs /if ?>
<?cs if:subcount(obj.paramTags) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<?cs each:tag=obj.paramTags
?><tr>
<th><?cs if:tag.isTypeParameter ?>&lt;<?cs /if ?><?cs var:tag.name
?><?cs if:tag.isTypeParameter ?>&gt;<?cs /if ?></td>
<td><?cs call:tag_list(tag.comment) ?></td>
</tr>
<?cs /each ?>
</table>
</div>
<?cs /if ?>
<?cs if:subcount(obj.returns) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><?cs call:tag_list(obj.returns) ?></li></ul>
</div>
<?cs /if ?>
<?cs if:subcount(obj.throws) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable">
<?cs each:tag=obj.throws
?> <tr>
Uses the following fields: deprecated descr seeAlso ?><?cs
def:description(obj) ?><?cs
call:deprecated_warning(obj) ?>
<div class="jd-tagdata jd-tagdescr"><p><?cs call:tag_list(obj.descr) ?></p></div><?cs
if:subcount(obj.attrRefs) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Related XML Attributes</h5>
<ul class="nolist"><?cs
each:attr=obj.attrRefs ?>
<li><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></li><?cs
/each ?>
</ul>
</div><?cs
/if ?><?cs
if:subcount(obj.paramTags) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable"><?cs
each:tag=obj.paramTags ?>
<tr>
<th><?cs if:tag.isTypeParameter ?>&lt;<?cs /if ?><?cs var:tag.name
?><?cs if:tag.isTypeParameter ?>&gt;<?cs /if ?></td>
<td><?cs call:tag_list(tag.comment) ?></td>
</tr><?cs
/each ?>
</table>
</div><?cs
/if ?><?cs
if:subcount(obj.returns) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Returns</h5>
<ul class="nolist"><li><?cs call:tag_list(obj.returns) ?></li></ul>
</div><?cs
/if ?><?cs
if:subcount(obj.throws) ?>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Throws</h5>
<table class="jd-tagtable"><?cs
each:tag=obj.throws ?>
<tr>
<th><?cs call:type_link(tag.type) ?></td>
<td><?cs call:tag_list(tag.comment) ?></td>
</tr>
<?cs /each ?>
</table>
</div>
<?cs /if ?>
</tr><?cs
/each ?>
</table>
</div><?cs
/if ?><?cs
call:see_also_tags(obj.seeAlso) ?><?cs
/def ?>
<?cs call:see_also_tags(obj.seeAlso) ?>
<?cs # A table of links to classes with descriptions, as in a package file or the nested classes ?><?cs
def:class_link_table(classes) ?><?cs
set:count = #1 ?>
<table class="jd-sumtable-expando"><?cs
each:cl=classes ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?>&nbsp;</td>
</tr><?cs set:count = count + #1 ?><?cs
/each ?>
</table><?cs
/def ?>
<?cs /def ?>
<?cs # A list of links to classes, for use in the side navigation of packages ?><?cs
def:class_link_list(label, classes) ?><?cs
if:subcount(classes) ?>
<li><h2><?cs var:label ?></h2>
<ul><?cs
each:cl=classes ?>
<li><?cs call:type_link(cl.type) ?></li><?cs
/each ?>
</ul>
</li><?cs
/if ?><?cs
/def ?>
<?cs # A list of links to classes, for use in the side navigation of classes ?><?cs
def:list(label, classes) ?><?cs
if:subcount(classes) ?>
<li><h2><?cs var:label ?></h2>
<ul><?cs
each:cl=classes ?>
<li <?cs if:class.name == cl.label?>class="selected"<?cs /if ?>><?cs call:type_link(cl) ?></li><?cs
/each ?>
</ul>
</li><?cs
/if ?><?cs
/def ?>
<?cs # A table of links to classes with descriptions, as in a package file or the nested classes ?>
<?cs def:class_link_table(classes) ?>
<?cs set:count = #1 ?>
<table class="jd-sumtable-expando"><?cs
each:cl=classes ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?>&nbsp;</td>
</tr><?cs set:count = count + #1 ?><?cs
/each ?>
</table>
<?cs /def ?>
<?cs # An expando trigger ?><?cs
def:expando_trigger(id, default) ?>
<a href="#" onclick="return toggleInherited(this, null)" id="<?cs var:id ?>" class="jd-expando-trigger closed"
><img id="<?cs var:id ?>-trigger"
src="<?cs var:toroot ?>assets/images/triangle-<?cs var:default ?>.png"
class="jd-expando-trigger-img" /></a><?cs
/def ?>
<?cs # A list of links to classes, for use in the side navigation of packages ?>
<?cs def:class_link_list(label, classes) ?>
<?cs if:subcount(classes) ?>
<li><h2><?cs var:label ?></h2>
<ul>
<?cs each:cl=classes ?>
<li><?cs call:type_link(cl.type) ?></li>
<?cs /each ?>
</ul>
</li>
<?cs /if ?>
<?cs /def ?>
<?cs # An expandable list of classes ?><?cs
def:expandable_class_list(id, classes, default) ?>
<div id="<?cs var:id ?>">
<div id="<?cs var:id ?>-list"
class="jd-inheritedlinks"
<?cs if:default != "list" ?>style="display: none;"<?cs /if ?>
><?cs
each:cl=classes ?>
<?cs call:type_link(cl.type) ?><?cs if:!last(cl) ?>,<?cs /if ?><?cs
/each ?>
</div>
<div id="<?cs var:id ?>-summary"
<?cs if:default != "summary" ?>style="display: none;"<?cs /if ?>
><?cs
call:class_link_table(classes) ?>
</div>
</div><?cs
/def ?>
<?cs # A list of links to classes, for use in the side navigation of classes ?>
<?cs def:list(label, classes) ?>
<?cs if:subcount(classes) ?>
<li><h2><?cs var:label ?></h2>
<ul>
<?cs each:cl=classes ?>
<li <?cs if:class.name == cl.label?>class="selected"<?cs /if ?>><?cs call:type_link(cl) ?></li>
<?cs /each ?>
</ul>
</li>
<?cs /if ?>
<?cs /def ?>
<?cs # An expando trigger ?>
<?cs def:expando_trigger(id, default) ?>
<a href="javascript:toggle_inherited('<?cs var:id ?>')" class="jd-expando-trigger"
><img id="<?cs var:id ?>-trigger"
src="<?cs var:toroot ?>assets/images/triangle-<?cs var:default ?>.png"
class="jd-expando-trigger" /></a>
<?cs /def ?>
<?cs # An expandable list of classes ?>
<?cs def:expandable_class_list(id, classes, default) ?>
<div id="<?cs var:id ?>">
<div id="<?cs var:id ?>-list"
class="jd-inheritedlinks"
<?cs if:default != "list" ?>style="display: none;"<?cs /if ?>
>
<?cs each:cl=classes ?>
<?cs call:type_link(cl.type) ?><?cs if:!last(cl) ?>,<?cs /if ?>
<?cs /each ?>
</div>
<div id="<?cs var:id ?>-summary"
<?cs if:default != "summary" ?>style="display: none;"<?cs /if ?>
>
<?cs call:class_link_table(classes) ?>
</div>
</div>
<?cs /def ?>
<?cs def:default_left_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="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
<div id="packages-nav">
<div id="index-links"><nobr>
<a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> |
<a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
</div>
<?cs # The default side navigation for the reference docs ?><?cs
def:default_left_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="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
<div id="packages-nav">
<div id="index-links"><nobr>
<a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> |
<a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
</div>
<ul><?cs
each:pkg=docs.packages ?>
<li <?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?>class="selected"<?cs /if ?>><?cs call:package_link(pkg) ?></li><?cs
/each ?>
</ul><br/>
</div> <!-- end packages -->
</div> <!-- end resize-packages -->
<div id="classes-nav"><?cs
if:subcount(class.package) ?>
<ul>
<?cs each:pkg=docs.packages ?>
<li <?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?>class="selected"<?cs /if ?>><?cs call:package_link(pkg) ?></li>
<?cs /each ?>
</ul><br/>
</div> <!-- end packages -->
</div> <!-- end resize-packages -->
<div id="classes-nav">
<?cs if:subcount(class.package) ?>
<ul>
<?cs call:list("Interfaces", class.package.interfaces) ?>
<?cs call:list("Classes", class.package.classes) ?>
<?cs call:list("Enums", class.package.enums) ?>
<?cs call:list("Exceptions", class.package.exceptions) ?>
<?cs call:list("Errors", class.package.errors) ?>
</ul>
<?cs elif:subcount(package) ?>
<ul>
<?cs call:class_link_list("Interfaces", package.interfaces) ?>
<?cs call:class_link_list("Classes", package.classes) ?>
<?cs call:class_link_list("Enums", package.enums) ?>
<?cs call:class_link_list("Exceptions", package.exceptions) ?>
<?cs call:class_link_list("Errors", package.errors) ?>
</ul>
<?cs else ?>
<script>
/*addLoadEvent(maxPackageHeight);*/
</script>
<p style="padding:10px">Select a package to view its members</p>
<?cs /if ?><br/>
</div><!-- end classes -->
</div><!-- end nav-panels -->
<div id="nav-tree" style="display:none">
<div id="index-links"><nobr>
<a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> |
<a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
</div>
</div><!-- end nav-tree -->
</div><!-- end swapper -->
</div> <!-- end side-nav -->
<script>
$("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav");
chooseDefaultNav();
if ($("#nav-tree").is(':visible')) init_navtree("nav-tree", "<?cs var:toroot ?>", NAVTREE_DATA);
else {
addLoadEvent(function() {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
}
$("#swapper").css({borderBottom:"2px solid #aaa"});
</script>
<?cs /def ?>
<?cs def:default_search_box() ?>
<div id="search" align="right">
<div id="searchForm">
<form accept-charset="utf-8" class="gsc-search-box"
onsubmit="document.location='<?cs var:toroot ?>search.html?' + document.getElementById('search_autocomplete').value; return false;">
<table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td class="gsc-input">
<input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off"
tabindex="1" title="search developer docs"
value="search developer docs"
onFocus="search_focus_changed(this, true)"
onBlur="search_focus_changed(this, false)"
onkeydown="return search_changed(event, true, '<?cs var:toroot?>')"
onkeyup="search_changed(event, false, '<?cs var:toroot?>')" />
<br/>
<div id="search_filtered_div">
<table id="search_filtered" class="no-display" cellspacing=0>
</table>
</div>
</td>
<td class="gsc-search-button">
<input type="button" value="Search" title="search" id="search-button" class="gsc-search-button" onclick="document.location='<?cs var:toroot ?>search.html?' + document.getElementById('search_autocomplete').value;" tabindex="2"/>
</td>
<td class="gsc-clear-button">
<div title="clear results" class="gsc-clear-button">&nbsp;</div>
</td>
</tr></tbody>
</table>
</form>
</div><!-- searchForm -->
</div><!-- search -->
<?cs /def ?>
<?cs call:list("Interfaces", class.package.interfaces) ?>
<?cs call:list("Classes", class.package.classes) ?>
<?cs call:list("Enums", class.package.enums) ?>
<?cs call:list("Exceptions", class.package.exceptions) ?>
<?cs call:list("Errors", class.package.errors) ?>
</ul><?cs
elif:subcount(package) ?>
<ul>
<?cs call:class_link_list("Interfaces", package.interfaces) ?>
<?cs call:class_link_list("Classes", package.classes) ?>
<?cs call:class_link_list("Enums", package.enums) ?>
<?cs call:class_link_list("Exceptions", package.exceptions) ?>
<?cs call:class_link_list("Errors", package.errors) ?>
</ul><?cs
else ?>
<script>
/*addLoadEvent(maxPackageHeight);*/
</script>
<p style="padding:10px">Select a package to view its members</p><?cs
/if ?><br/>
</div><!-- end classes -->
</div><!-- end nav-panels -->
<div id="nav-tree" style="display:none">
<div id="index-links"><nobr>
<a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> |
<a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
</div>
</div><!-- end nav-tree -->
</div><!-- end swapper -->
</div> <!-- end side-nav -->
<script>
if (!isMobile) {
$("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav");
chooseDefaultNav();
if ($("#nav-tree").is(':visible')) init_navtree("nav-tree", "<?cs var:toroot ?>", NAVTREE_DATA);
else {
addLoadEvent(function() {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
}
$("#swapper").css({borderBottom:"2px solid #aaa"});
} else {
swapNav(); // tree view should be used on mobile
}
</script><?cs
/def ?>
<?cs # The default search box that goes in the header ?><?cs
def:default_search_box() ?>
<div id="search" >
<div id="searchForm">
<form accept-charset="utf-8" class="gsc-search-box"
onsubmit="return submit_search()">
<table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td class="gsc-input">
<input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off"
title="search developer docs" name="q"
value="search developer docs"
onFocus="search_focus_changed(this, true)"
onBlur="search_focus_changed(this, false)"
onkeydown="return search_changed(event, true, '<?cs var:toroot?>')"
onkeyup="return search_changed(event, false, '<?cs var:toroot?>')" />
<div id="search_filtered_div" class="no-display">
<table id="search_filtered" cellspacing=0>
</table>
</div>
</td>
<td class="gsc-search-button">
<input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" />
</td>
<td class="gsc-clear-button">
<div title="clear results" class="gsc-clear-button">&nbsp;</div>
</td>
</tr></tbody>
</table>
</form>
</div><!-- searchForm -->
</div><!-- search --><?cs
/def ?>
<?cs include:"customization.cs" ?>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -6,14 +7,15 @@
<?cs call:custom_masthead() ?>
<div id="body-content">
<div id="doc-content">
<div id="doc-content" style="position:relative;">
<?cs call:tag_list(root.descr) ?>
<?cs include:"footer.cs" ?>
</div><!-- end doc-content -->
</div><!-- end body-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -24,6 +25,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div> <!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -44,6 +45,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div><!-- doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -30,6 +31,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div> <!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,14 +1,19 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<?cs set:guide="true" ?>
<html>
<?cs include:"head_tag.cs" ?>
<?cs include:"header.cs" ?>
<div class="g-unit" id="doc-content">
<div class="g-unit" id="doc-content"><a name="top"></a>
<div id="jd-header">
<div id="jd-header" class="guide-header">
<span class="crumb">
<a href="<?cs var:toroot ?>guide/samples/index.html">Sample Code &gt;</a>
</span>
<h1><?cs var:page.title ?></h1>
<?cs var:subdir ?>
</div>
<div id="jd-content">
@ -22,6 +27,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div> <!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,14 +1,19 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<?cs set:guide="true" ?>
<html>
<?cs include:"head_tag.cs" ?>
<?cs include:"header.cs" ?>
<div class="g-unit" id="doc-content">
<div class="g-unit" id="doc-content"><a name="top"></a>
<div id="jd-header">
<h1><?cs var:projectTitle ?></h1>
<?cs var:subdir ?>
<div id="jd-header" class="guide-header">
<span class="crumb">
<a href="<?cs var:toroot ?>guide/samples/index.html">Sample Code &gt;</a>
</span>
<h1><?cs var:page.title ?></h1>
</div>
<div id="jd-content">
@ -19,7 +24,7 @@
<h2>Subdirectories</h2>
<ul class="nolist">
<?cs each:dir=subdirs ?>
<li><a href="<?cs var:dir.name ?>/"><?cs var:dir.name ?>/</a></li>
<li><a href="<?cs var:dir.name ?>/index.html"><?cs var:dir.name ?>/</a></li>
<?cs /each ?>
</ul>
<?cs /if ?>
@ -36,6 +41,8 @@
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
</div><!-- end doc-content -->
<?cs include:"analytics.cs" ?>
<?cs include:"trailer.cs" ?>
</body>
</html>

View File

@ -1,4 +1,7 @@
</div> <!-- end body-content --> <?cs # normally opened by header.cs ?>
<script type="text/javascript">
init(); /* initialize android-developer-docs.js */
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

45
tools/fileslist.py Executable file
View File

@ -0,0 +1,45 @@
#!/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.
#
import os, sys
def get_file_size(path):
st = os.lstat(path)
return st.st_size;
def main(argv):
output = []
roots = argv[1:]
for root in roots:
base = len(root[:root.rfind(os.path.sep)])
for dir, dirs, files in os.walk(root):
relative = dir[base:]
for f in files:
try:
row = (
get_file_size(os.path.sep.join((dir, f))),
os.path.sep.join((relative, f)),
)
output.append(row)
except os.error:
pass
for row in output:
print "%12d %s" % row
if __name__ == '__main__':
main(sys.argv)