auto import from //branches/cupcake/...@130745

This commit is contained in:
The Android Open Source Project 2009-02-10 15:43:57 -08:00
parent 35cfb08c58
commit 475fa12ade
77 changed files with 871 additions and 538 deletions

View File

@ -60,6 +60,11 @@ $(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)
# ************************************************
# 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)" \
@ -559,6 +560,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 +570,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

View File

@ -23,4 +23,10 @@
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
BUILD_ID := MAIN
BUILD_ID := CUPCAKE
# DISPLAY_BUILD_NUMBER should only be set for development branches,
# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
# a more descriptive BUILD_ID_DISPLAY, otherwise BUILD_ID_DISPLAY
# is the same as BUILD_ID
DISPLAY_BUILD_NUMBER := true

View File

@ -84,3 +84,111 @@ $(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
current_build_config := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)
building_sdk :=
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)")
force_installclean := true
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

@ -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

@ -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

@ -325,10 +325,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
@ -339,8 +335,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
@ -632,40 +627,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

@ -69,6 +69,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
@ -98,6 +104,14 @@ libopencoremp4.so 0xA7400000
libopencoremp4reg.so 0xA7300000
libopencoreplayer.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) ====)\

View File

@ -181,6 +181,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 +193,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

@ -43,9 +43,18 @@ CTS_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts.jar
CTS_CASE_LIST := \
DeviceInfoCollector \
CtsTestStubs \
CtsTextTestCases \
CtsViewTestCases \
CtsAppTestCases \
CtsContentTestCases \
CtsDatabaseTestCases \
CtsGraphicsTestCases \
CtsLocationTestCases \
CtsNetTestCases \
CtsOsTestCases \
CtsProviderTestCases \
CtsTextTestCases \
CtsUtilTestCases \
CtsViewTestCases \
CtsWidgetTestCases \
SignatureTest
DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans
@ -84,11 +93,12 @@ $(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_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

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

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

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"

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));
}

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

@ -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

@ -5,14 +5,8 @@
<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>
src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" /></a>
<?cs call:default_search_box() ?>
<ul class="<?cs
if:reference ?>reference<?cs
elif:guide ?>guide<?cs
@ -20,11 +14,13 @@
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>
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"
@ -33,14 +29,26 @@
<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 def:sdk_nav() ?>
<div class="g-section g-tpl-180" id="body-content">
<div class="g-unit g-first" id="side-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:"../../../java/android/html/sdk/sdk_toc.cs" ?>
</div>
@ -82,9 +90,26 @@
<?cs /if ?>
<?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_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 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 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() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?>
<?cs def:custom_buildinfo() ?>Android 1.1 r1 - <?cs var:page.now ?><?cs /def ?>

View File

@ -1,88 +1,94 @@
<?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">
<div id="jd-content">
<h1><?cs var:sdk.version ?></h1>
<p><em>
<?cs var:sdk.date ?> -
<a href="RELEASENOTES.html">Release Notes</a>
</em></p>
<?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 ?>
<h1><?cs var:page.title ?></h1>
<p><em>
<?cs var:sdk.date ?>
</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>
<p>Before downloading, please read the <a href="terms.html">Terms</a>
that govorn the use of the Android SDK.</p>
<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>
<table class="download">
<?cs if:sdk.not_latest_version ?>
<div class="special">
<p><strong>This is NOT the latest version of the Android SDK</strong>.</p>
<p>Go to the <a href="<?cs var:toroot ?>sdk/index.html">SDK home page</a> to be directed to the latest version.</p>
</div>
<?cs /if ?>
<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 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,68 @@ hr.blue {
/* LAYOUT */
#body-content {
margin:0;
position:fixed;
top:103px;
position:relative;
width:100%;
}
#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 +239,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 +254,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 +279,7 @@ hr.blue {
#search {
height:45px;
margin:0 10px 0 0;
margin:15px 10px 0 0;
}
/* main */
@ -296,7 +292,7 @@ hr.blue {
#mainBodyFixed {
margin: 20px 10px;
color: #333;
width:920px;
width:930px;
}
#mainBodyFixed h3,
@ -329,13 +325,6 @@ hr.blue {
background-color:none;
}
#mainBodyFixed a,
#mainBodyFluid a {
color: #006699;
font-size: 13px;
text-decoration: underline;
}
#mainBodyLeft {
float: left;
width: 600px;
@ -383,17 +372,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 +410,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 +536,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 +550,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,
@ -692,44 +686,71 @@ 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;
}
#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;
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,
@ -740,7 +761,7 @@ td.gsc-search-button {
.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;
@ -761,7 +782,7 @@ div#app-list {
position:absolute;
margin:11px 0 0;
_margin-top:13px;
width:100%;
width:1000%;
}
#app-list a {
@ -794,9 +815,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;
@ -199,6 +203,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 +223,7 @@
#jd-header {
background-color: #E2E2E2;
padding: 7px 20px;
padding: 7px 15px;
}
#jd-header h1 {
@ -268,10 +283,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 +371,7 @@ links to summary tables) */
}
#jd-content {
padding: 18px 20px;
padding: 18px 15px;
}
hr {
@ -640,22 +657,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 0 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 +743,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 +893,7 @@ tr.alt-color {
}
/* expando trigger */
#jd-content .jd-expando-trigger {
#jd-content .jd-expando-trigger-img {
margin:0;
}
@ -1042,4 +1078,4 @@ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body
display:none;
}
}
}

View File

@ -3,7 +3,7 @@ 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";
@ -23,16 +23,17 @@ function addLoadEvent(newfun) {
}
}
addLoadEvent(prepare);
window.onresize = resizeAll;
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 +71,21 @@ 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() {
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizeHeight(); } });
$(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
$("#side-nav").css({position:"absolute",left:0});
content = $("#doc-content");
resizePackagesNav = $("#resize-packages-nav");
@ -88,7 +93,6 @@ function prepare() {
sidenav = $("#side-nav");
devdocNav = $("#devdoc-nav");
if (location.href.indexOf("/reference/") != -1) {
var cookiePath = "reference_";
} else if (location.href.indexOf("/guide/") != -1) {
@ -107,22 +111,30 @@ function prepare() {
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)) { // if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide)
lastBackstep = pathPageName.lastIndexOf("/");
while (link.length == 0) {
backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep);
link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory + 1)+"index.html']");
lastBackstep = pathPageName.lastIndexOf("/", lastBackstep - 1);
if (lastBackstep == 0) break;
}
}
link.parent().addClass('selected');
if (link.parent().parent().is(':hidden')) {
@ -143,26 +155,22 @@ 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() {
@ -171,6 +179,10 @@ function resizeAll() {
}
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 +191,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 +202,6 @@ $(window).unload(function(){
function toggle(obj, slide) {
var ul = $("ul", obj);
var li = ul.parent();
@ -253,7 +259,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 +278,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

@ -80,6 +80,7 @@ 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);
@ -89,9 +90,10 @@ function buildCarousel() {
img.setAttribute("src", 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: 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

@ -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";
}
}
@ -160,6 +160,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>
@ -288,7 +296,7 @@ Summary:
<?cs # if there are inherited attrs, write the table ?>
<?cs if:inhattrs ?>
<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) ?>
@ -336,7 +344,7 @@ Summary:
<?cs # if there are inherited constants, write the table ?>
<?cs if:inhconstants ?>
<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) ?>
@ -369,7 +377,7 @@ Summary:
<?cs # if there are inherited fields, write the table ?>
<?cs if:inhfields ?>
<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) ?>
@ -426,7 +434,7 @@ Summary:
<?cs # if there are inherited methods, write the table ?>
<?cs if:inhmethods ?>
<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) ?>
@ -586,6 +594,8 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
</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

@ -17,6 +17,8 @@
<?cs # appears on the left side of the blue bar at the bottom of every page ?>
<?cs def:custom_copyright() ?><?cs /def ?>
<?cs def:custom_cc_copyright() ?><?cs /def ?>
<?cs def:custom_footerlinks() ?><?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 ?>

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 else ?>
<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,5 +1,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>favicon.ico" />
<title><?cs var:page.title ?> | <?cs
if:guide ?>Guide | <?cs
elif:reference ?>Reference | <?cs
@ -7,7 +8,7 @@
elif:sample ?>Samples | <?cs
/if ?>Android Developers</title>
<?cs if:guide ?>
<?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" />

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

@ -223,10 +223,10 @@ This <?cs var:kind ?> is deprecated.
<?cs # An expando trigger ?>
<?cs def:expando_trigger(id, default) ?>
<a href="javascript:toggle_inherited('<?cs var:id ?>')" class="jd-expando-trigger"
<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" /></a>
class="jd-expando-trigger-img" /></a>
<?cs /def ?>
<?cs # An expandable list of classes ?>
@ -318,28 +318,27 @@ This <?cs var:kind ?> is deprecated.
<?cs /def ?>
<?cs def:default_search_box() ?>
<div id="search" align="right">
<div id="search" >
<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;">
<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"
tabindex="1" title="search developer docs"
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="search_changed(event, false, '<?cs var:toroot?>')" />
<br/>
<div id="search_filtered_div">
<table id="search_filtered" class="no-display" cellspacing=0>
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="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"/>
<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>

View File

@ -1,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
@ -12,8 +13,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

@ -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,3 +1,4 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
<?cs set:guide="true" ?>
<html>
@ -22,6 +23,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" ?>
<?cs set:guide="true" ?>
<html>
@ -36,6 +37,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>