Reconcile with jb-mr2-release jb-mr2-zeroday-release jb-mr2-zeroday-deb-release - do not merge
Change-Id: I80fa0805a168773ba273726fb4827b6cc24bfb08
diff --git a/core/Makefile b/core/Makefile
index 55ab6a5..eb02ff4 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -190,9 +190,14 @@
TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
bash $(BUILDINFO_SH) > $@
- $(hide) if [ -f "$(system_prop_file)" ]; then \
- cat $(system_prop_file) >> $@; \
- fi
+ $(hide) $(foreach file,$(system_prop_file), \
+ if [ -f "$(file)" ]; then \
+ echo "#" >> $@; \
+ echo Target buildinfo from: "$(file)"; \
+ echo "# from $(file)" >> $@; \
+ echo "#" >> $@; \
+ cat $(file) >> $@; \
+ fi;)
$(if $(ADDITIONAL_BUILD_PROPERTIES), \
$(hide) echo >> $@; \
echo "#" >> $@; \
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 188c352..f6497da 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -264,6 +264,7 @@
endif
endif
$(proto_java_sources_file_stamp): PRIVATE_PROTOC_FLAGS := $(LOCAL_PROTOC_FLAGS)
+$(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_PARAMS := $(LOCAL_PROTO_JAVA_OUTPUT_PARAMS)
$(proto_java_sources_file_stamp) : $(proto_sources_fullpath) $(PROTOC)
$(call transform-proto-to-java)
@@ -529,7 +530,7 @@
ifdef LOCAL_DEX_PREOPT
installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
-$(installed_odex) : $(built_odex) | $(ACP)
+$(installed_odex) : $(built_odex) $(LOCAL_BUILT_MODULE) | $(ACP)
@echo "Install: $@"
$(copy-file-to-target)
diff --git a/core/build_id.mk b/core/build_id.mk
index 31e6b0e..e954794 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -13,9 +13,20 @@
# 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 "CRB01"). It must be a single word, and is
+# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
+#
+BUILD_ID := OPENMASTER
-export BUILD_ID=JWR66X
+# 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
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 8d84814..7ad58b2 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -120,6 +120,7 @@
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,nano,full
LOCAL_PROTOC_FLAGS:=
+LOCAL_PROTO_JAVA_OUTPUT_PARAMS:=
LOCAL_NO_CRT:=
LOCAL_PROPRIETARY_MODULE:=
LOCAL_MODULE_OWNER:=
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 371ba96..8fc39e9 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -101,7 +101,7 @@
-fstack-protector \
-Wa,--noexecstack \
-Werror=format-security \
- -D_FORTIFY_SOURCE=1 \
+ -D_FORTIFY_SOURCE=2 \
-fno-short-enums \
$(arch_variant_cflags)
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index 83fe657..c878ae5 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -89,7 +89,7 @@
-funwind-tables \
-Wa,--noexecstack \
-Werror=format-security \
- -D_FORTIFY_SOURCE=1 \
+ -D_FORTIFY_SOURCE=2 \
$(arch_variant_cflags)
android_config_h := $(call select-android-config-h,linux-mips)
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 04531b2..5c9a76b 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -90,7 +90,7 @@
-Ulinux \
-Wa,--noexecstack \
-Werror=format-security \
- -D_FORTIFY_SOURCE=1 \
+ -D_FORTIFY_SOURCE=2 \
-Wstrict-aliasing=2 \
-fPIC -fPIE \
-ffunction-sections \
diff --git a/core/combo/arch/mips/mips32r2-fp-xburst.mk b/core/combo/arch/mips/mips32r2-fp-xburst.mk
new file mode 100644
index 0000000..fee9cb3
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2-fp-xburst.mk
@@ -0,0 +1,16 @@
+# Configuration for Android on Ingenic xb4780/Xburst MIPS CPU.
+# Generating binaries for MIPS32R2/hard-float/little-endian without
+# support for the Madd family of instructions.
+
+ARCH_MIPS_HAS_FPU :=true
+ARCH_HAVE_ALIGNED_DOUBLES :=true
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -mhard-float \
+ -mno-fused-madd
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/config.mk b/core/config.mk
index e7ee49f..8872ea9 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -143,8 +143,8 @@
board_config_mk := \
$(strip $(wildcard \
$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
- device/*/$(TARGET_DEVICE)/BoardConfig.mk \
- vendor/*/$(TARGET_DEVICE)/BoardConfig.mk \
+ $(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
+ $(shell test -d vendor && find vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
))
ifeq ($(board_config_mk),)
$(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))
diff --git a/core/definitions.mk b/core/definitions.mk
index 7834baa..3d19e72 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -892,7 +892,7 @@
$(hide) for f in $(PRIVATE_PROTO_SRC_FILES); do \
$(PROTOC) \
$(addprefix --proto_path=, $(PRIVATE_PROTO_INCLUDES)) \
- $(PRIVATE_PROTO_JAVA_OUTPUT_OPTION)=$(PRIVATE_PROTO_JAVA_OUTPUT_DIR) \
+ $(PRIVATE_PROTO_JAVA_OUTPUT_OPTION)="$(PRIVATE_PROTO_JAVA_OUTPUT_PARAMS):$(PRIVATE_PROTO_JAVA_OUTPUT_DIR)" \
$(PRIVATE_PROTOC_FLAGS) \
$$f || exit 33; \
done
@@ -1999,6 +1999,7 @@
###########################################################
## Define device-specific radio files
###########################################################
+INSTALLED_RADIOIMAGE_TARGET :=
# Copy a radio image file to the output location, and add it to
# INSTALLED_RADIOIMAGE_TARGET.
@@ -2150,6 +2151,9 @@
# when requested.
include $(BUILD_SYSTEM)/distdir.mk
+# Include any vendor specific definitions.mk file
+-include $(TOPDIR)vendor/*/build/core/definitions.mk
+
# broken:
# $(foreach file,$^,$(if $(findstring,.a,$(suffix $file)),-l$(file),$(file)))
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 82dd153..0c9904a 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -4,7 +4,7 @@
####################################
# TODO: replace it with device's BOOTCLASSPATH
-DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:telephony-common:voip-common:mms-common:android.policy:services:apache-xml
+DEXPREOPT_BOOT_JARS := core:conscrypt:okhttp:core-junit:bouncycastle:ext:framework:telephony-common:voip-common:mms-common:android.policy:services:apache-xml
DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 83cf404..8a5c556 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -51,8 +51,6 @@
LOCAL_DROIDDOC_CUSTOM_ASSET_DIR := assets
endif
-$(full_target): PRIVATE_CLASSPATH:=$(LOCAL_CLASSPATH)
-full_java_lib_deps :=
$(full_target): PRIVATE_BOOTCLASSPATH :=
ifeq ($(BUILD_OS),linux)
@@ -75,19 +73,13 @@
endif # LOCAL_SDK_VERSION
LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
-full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
-full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
+endif # !LOCAL_IS_HOST_MODULE
-# we're not going to generate docs from any of these classes, but we need them
-# to build properly.
-ifneq ($(strip $(LOCAL_STATIC_JAVA_LIBRARIES)),)
-full_java_libs += $(addprefix $(LOCAL_PATH)/,$(LOCAL_STATIC_JAVA_LIBRARIES)) $(LOCAL_CLASSPATH)
-full_java_lib_deps += $(addprefix $(LOCAL_PATH)/,$(LOCAL_STATIC_JAVA_LIBRARIES)) $(LOCAL_CLASSPATH)
-endif
+full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) $(LOCAL_CLASSPATH)
+full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) $(LOCAL_CLASSPATH)
$(full_target): PRIVATE_CLASSPATH := $(subst $(space),:,$(full_java_libs))
-endif # !LOCAL_IS_HOST_MODULE
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index cda6e10..02274e4 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -95,7 +95,7 @@
$(transform-classes.jar-to-dex)
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
-$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources) | $(AAPT)
+$(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
@echo "Host Jar: $(PRIVATE_MODULE) ($@)"
$(create-empty-package)
$(add-dex-to-package)
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
index c4b4af4..18e689e 100644
--- a/core/llvm_config.mk
+++ b/core/llvm_config.mk
@@ -64,7 +64,8 @@
-mtune=mips32r2 \
-march=mips32 \
-mtune=mips32 \
- -msynci
+ -msynci \
+ -mno-fused-madd
endif
ifeq ($(TARGET_ARCH),x86)
RS_TRIPLE := i686-unknown-linux
diff --git a/core/main.mk b/core/main.mk
index e03801c..282d9c3 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -547,10 +547,20 @@
$(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
$(if $(r), \
$(eval r := $(call module-installed-files,$(r))) \
- $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \
+ $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+ $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+ $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \
+ $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \
+ $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \
+ $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \
) \
)
+t_m :=
+h_m :=
+t_r :=
+h_r :=
+
# Resolve the dependencies on shared libraries.
$(foreach m,$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES), \
$(eval p := $(subst :,$(space),$(m))) \
@@ -794,9 +804,14 @@
unbundled_build_modules := $(TARGET_BUILD_APPS)
endif
+ # Dist the installed files if they exist.
apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED))
- # dist the unbundled app.
$(call dist-for-goals,apps_only, $(apps_only_installed_files))
+ # For uninstallable modules such as static Java library, we have to dist the built file,
+ # as <module_name>.<suffix>
+ apps_only_dist_built_files := $(foreach m,$(unbundled_build_modules),$(if $(ALL_MODULES.$(m).INSTALLED),,\
+ $(ALL_MODULES.$(m).BUILT):$(m)$(suffix $(ALL_MODULES.$(m).BUILT))))
+ $(call dist-for-goals,apps_only, $(apps_only_dist_built_files))
ifeq ($(EMMA_INSTRUMENT),true)
$(EMMA_META_ZIP) : $(apps_only_installed_files)
@@ -823,6 +838,10 @@
$(INSTALLED_FACTORY_BUNDLE_TARGET) \
)
+ # Put a copy of the radio/bootloader files in the dist dir.
+ $(foreach f,$(INSTALLED_RADIOIMAGE_TARGET), \
+ $(call dist-for-goals, droidcore, $(f)))
+
ifneq ($(TARGET_BUILD_PDK),true)
$(call dist-for-goals, droidcore, \
$(APPS_ZIP) \
diff --git a/core/package.mk b/core/package.mk
index 2012351..36fb54c 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -130,11 +130,13 @@
LOCAL_PROGUARD_ENABLED:=$(strip $(LOCAL_PROGUARD_ENABLED))
ifndef LOCAL_PROGUARD_ENABLED
+ifneq ($(DISABLE_PROGUARD),true)
ifneq ($(filter user userdebug, $(TARGET_BUILD_VARIANT)),)
# turn on Proguard by default for user & userdebug build
LOCAL_PROGUARD_ENABLED :=full
endif
endif
+endif
ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
# the package explicitly request to disable proguard.
LOCAL_PROGUARD_ENABLED :=
diff --git a/core/pathmap.mk b/core/pathmap.mk
index d0339ea..7024e3e 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -114,7 +114,7 @@
v4 \
v7/gridlayout \
v7/appcompat \
- v8/renderscript \
+ v7/mediarouter \
v13
#
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 6e08832..fd8e0f5 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -84,6 +84,14 @@
ifdef LOCAL_INSTALLED_MODULE
ifdef LOCAL_SHARED_LIBRARIES
$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_MODULE):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(LOCAL_SHARED_LIBRARIES))
+
+# We also need the LOCAL_BUILT_MODULE dependency,
+# since we use -rpath-link which points to the built module's path.
+built_shared_libraries := \
+ $(addprefix $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \
+ $(addsuffix $($(my_prefix)SHLIB_SUFFIX), \
+ $(LOCAL_SHARED_LIBRARIES)))
+$(LOCAL_BUILT_MODULE) : $(built_shared_libraries)
endif
endif
diff --git a/core/proguard.flags b/core/proguard.flags
index d8ad3bd..1e3951b 100644
--- a/core/proguard.flags
+++ b/core/proguard.flags
@@ -1,11 +1,3 @@
-# see http://sourceforge.net/tracker/?func=detail&aid=2787465&group_id=54750&atid=474707
--optimizations !code/simplification/arithmetic
--optimizations !code/simplification/cast
--allowaccessmodification
-
-# To prevent name conflict in incremental obfuscation.
--useuniqueclassmembernames
-
# dex does not like code run through proguard optimize and preverify steps.
-dontoptimize
-dontpreverify
@@ -16,8 +8,10 @@
# Add this flag in your package's own configuration if it's needed.
#-flattenpackagehierarchy
-# Some classes in the libraries extend package private classes to chare common functionality
-# that isn't explicitly part of the API
--dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers
+# Keep classes and methods that have the guava @VisibleForTesting annotation
+-keep @com.google.common.annotations.VisibleForTesting class *
+-keepclassmembers class * {
+@com.google.common.annotations.VisibleForTesting *;
+}
-include proguard_basic_keeps.flags
diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags
index 049ce88..0ce81ef 100644
--- a/core/proguard_basic_keeps.flags
+++ b/core/proguard_basic_keeps.flags
@@ -1,3 +1,15 @@
+# see http://sourceforge.net/tracker/?func=detail&aid=2787465&group_id=54750&atid=474707
+-optimizations !code/simplification/arithmetic
+-optimizations !code/simplification/cast
+-allowaccessmodification
+
+# To prevent name conflict in incremental obfuscation.
+-useuniqueclassmembernames
+
+# Some classes in the libraries extend package private classes to chare common functionality
+# that isn't explicitly part of the API
+-dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers
+
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
@@ -16,12 +28,6 @@
java.lang.Class class$(java.lang.String, boolean);
}
-# Keep classes and methods that have the guava @VisibleForTesting annotation
--keep @com.google.common.annotations.VisibleForTesting class *
--keepclassmembers class * {
-@com.google.common.annotations.VisibleForTesting *;
-}
-
# Keep serializable classes and necessary members for serializable classes
# Copied from the ProGuard manual at http://proguard.sourceforge.net.
-keepnames class * implements java.io.Serializable
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 5b041d6..9154f32 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -81,13 +81,15 @@
endef
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
+CONSCRYPT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt,,COMMON)
BOUNCYCASTLE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,bouncycastle,,COMMON)
APACHEXML_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-xml,,COMMON)
+OKHTTP_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp,,COMMON)
SQLITEJDBC_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,sqlite-jdbc,,COMMON)
JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
CORETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar
+GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(CONSCRYPT_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(OKHTTP_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar
CTS_CORE_XMLS := \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml \
@@ -103,7 +105,7 @@
# 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.
-$(CTS_CORE_XMLS): $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar | $(ACP)
+$(CTS_CORE_XMLS): $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(OKHTTP_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar | $(ACP)
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik,\
cts/tests/core/libcore/dalvik/AndroidManifest.xml,\
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 5812da0..b9e1456 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 4.3
+ PLATFORM_VERSION := 4.3.2.1.000.000
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
diff --git a/envsetup.sh b/envsetup.sh
index 2de2375..d64bd29 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1270,7 +1270,8 @@
fi
# Execute the contents of any vendorsetup.sh files we can find.
-for f in `/bin/ls vendor/*/vendorsetup.sh vendor/*/*/vendorsetup.sh device/*/*/vendorsetup.sh 2> /dev/null`
+for f in `test -d device && find device -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null` \
+ `test -d vendor && find vendor -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null`
do
echo "including $f"
. $f
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 35cbd27..3bd4f31 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -44,3 +44,11 @@
# Build and enable the OpenGL ES View renderer. When running on the emulator,
# the GLES renderer disables itself if host GL acceleration isn't available.
USE_OPENGL_RENDERER := true
+
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 576716800
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 209715200
+BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 512
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
diff --git a/target/board/generic_mips/BoardConfig.mk b/target/board/generic_mips/BoardConfig.mk
index c3881b4..e6f43af 100644
--- a/target/board/generic_mips/BoardConfig.mk
+++ b/target/board/generic_mips/BoardConfig.mk
@@ -48,3 +48,11 @@
# Build and enable the OpenGL ES View renderer. When running on the emulator,
# the GLES renderer disables itself if host GL acceleration isn't available.
USE_OPENGL_RENDERER := true
+
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 576716800
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 209715200
+BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 512
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 4a9e5fe..ed7da38 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -33,3 +33,11 @@
# Build and enable the OpenGL ES View renderer. When running on the emulator,
# the GLES renderer disables itself if host GL acceleration isn't available.
USE_OPENGL_RENDERER := true
+
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 576716800
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 209715200
+BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 512
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
diff --git a/target/product/base.mk b/target/product/base.mk
index 129fb2a..ebb341c 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -87,6 +87,7 @@
netcfg \
netd \
ping \
+ ping6 \
platform.xml \
pppd \
pm \
diff --git a/target/product/core.mk b/target/product/core.mk
index 0e7aad6..d503ddc 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -36,7 +36,6 @@
TelephonyProvider \
UserDictionaryProvider \
VpnDialogs \
- abcc \
atrace \
libandroidfw \
libaudiopreprocessing \
@@ -72,6 +71,7 @@
libwebrtc_audio_preprocessing \
mdnsd \
mms-common \
+ okhttp \
requestsync \
telephony-common \
voip-common
@@ -81,7 +81,9 @@
PRODUCT_PACKAGES += \
apache-xml-hostdex \
bouncycastle-hostdex \
+ conscrypt-hostdex \
core-hostdex \
+ okhttp-hostdex \
libcrypto \
libexpat \
libicui18n \
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 96a8592..4c2cdfb 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -38,6 +38,7 @@
cacerts \
com.android.location.provider \
com.android.location.provider.xml \
+ conscrypt \
core \
core-junit \
dalvikvm \
@@ -51,7 +52,6 @@
ext \
framework-res \
hprof-conv \
- icu.dat \
installd \
ip \
ip-up-vpn \
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index 194fb7a..2c71ed5 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -49,6 +49,7 @@
PRODUCT_PACKAGES += \
audio \
clatd \
+ clatd.conf \
dhcpcd.conf \
network \
pand \
@@ -57,9 +58,6 @@
wpa_supplicant
PRODUCT_PACKAGES += \
- icu.dat
-
-PRODUCT_PACKAGES += \
librs_jni \
libvideoeditor_jni \
libvideoeditor_core \
diff --git a/target/product/mini.mk b/target/product/mini.mk
index 751b481..c1074f7 100644
--- a/target/product/mini.mk
+++ b/target/product/mini.mk
@@ -64,7 +64,6 @@
Shell \
TelephonyProvider \
UserDictionaryProvider \
- abcc \
apache-xml \
audio \
bouncycastle \
@@ -72,6 +71,7 @@
cacerts \
com.android.location.provider \
com.android.location.provider.xml \
+ conscrypt \
core \
core-junit \
dalvikvm \
@@ -85,7 +85,6 @@
ext \
framework-res \
hprof-conv \
- icu.dat \
installd \
ip \
ip-up-vpn \
@@ -144,6 +143,7 @@
libz \
mdnsd \
network \
+ okhttp \
pand \
requestsync \
screencap \
@@ -169,10 +169,6 @@
hostapd \
wpa_supplicant.conf
-
-PRODUCT_PACKAGES += \
- icu.dat
-
PRODUCT_PACKAGES += \
librs_jni \
libvideoeditor_jni \
diff --git a/tools/droiddoc/templates-ds/assets/css/default.css b/tools/droiddoc/templates-ds/assets/css/default.css
index da06e31..5bd95a8 100644
--- a/tools/droiddoc/templates-ds/assets/css/default.css
+++ b/tools/droiddoc/templates-ds/assets/css/default.css
@@ -2393,6 +2393,30 @@
}
/* --------------------------------------------------------------------------
+Butterbar
+*/
+#butterbar-wrapper {
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+}
+#butterbar {
+ width:940px;
+ margin:0 auto;
+}
+#butterbar-message {
+ background-color:#f80;
+ float:right;
+ font-size:12px;
+ font-weight:bold;
+ padding:0 10px;
+ border-radius: 0 0 5px 5px;
+}
+#butterbar-message a {color:#fff !important}
+#butterbar-message a:hover {text-decoration:underline;}
+
+/* --------------------------------------------------------------------------
Misc
*/
diff --git a/tools/droiddoc/templates-sac/assets/css/default.css b/tools/droiddoc/templates-sac/assets/css/default.css
index 1ce78fe..0d9e601 100644
--- a/tools/droiddoc/templates-sac/assets/css/default.css
+++ b/tools/droiddoc/templates-sac/assets/css/default.css
@@ -1160,6 +1160,53 @@
tr:first-of-type th:first-of-type:empty {
visibility: hidden;
}
+
+/* opcodes table */
+
+table.instruc td:first-child {
+ width: 12%;
+}
+
+table.instruc td:first-child + td {
+ width: 23%;
+}
+
+table.instruc td:first-child + td + td {
+ width: 28%;
+}
+
+table.instruc td:first-child + td + td + td {
+ width: 37%;
+}
+
+/* supplemental opcode format table */
+
+table.supplement td:first-child {
+ width: 20%;
+}
+
+table.supplement td:first-child + td {
+ width: 20%;
+}
+
+table.supplement td:first-child + td + td {
+ width: 60%;
+}
+
+/* math details table */
+
+table.math td:first-child {
+ width: 10%;
+}
+
+table.math td:first-child + td {
+ width: 30%;
+}
+
+table.math td:first-child + td + td {
+ width: 60%;
+}
+
/* --------------------------------------------------------------------------
Footer
*/
@@ -2414,6 +2461,30 @@
}
/* --------------------------------------------------------------------------
+Butterbar
+*/
+#butterbar-wrapper {
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+}
+#butterbar {
+ width:940px;
+ margin:0 auto;
+}
+#butterbar-message {
+ background-color:#f80;
+ float:right;
+ font-size:12px;
+ font-weight:bold;
+ padding:0 10px;
+ border-radius: 0 0 5px 5px;
+}
+#butterbar-message a {color:#fff !important}
+#butterbar-message a:hover {text-decoration:underline;}
+
+/* --------------------------------------------------------------------------
Misc
*/
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 6e72a38..3bfb687 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -90,7 +90,7 @@
outline:none;
width:auto;
margin: 20px 0 0; }
-
+
#devdoc-nav h2 {
border:0;
}
@@ -99,7 +99,7 @@
position: fixed;
margin:0;
top: 20px; }
-
+
#devdoc-nav span.small {
font-size:12px;
font-weight:normal;
@@ -116,7 +116,7 @@
a:focus,
a:active {
color: #33b5e5 !important; }
-
+
a.external-link {
background:url('../images/styles/open_new_page.png') no-repeat 100% 50%;
padding-right:16px;
@@ -338,10 +338,10 @@
width: 34px;
height: 34px; }
#nav li.expanded li ul.tree-list-children {
- padding:0;
+ padding:0;
}
#nav li.expanded li ul.tree-list-children .tree-list-children {
- padding:0 0 0 10px;
+ padding:0 0 0 10px;
}
#nav li span.tree-list-subtitle {
display:inline-block;
@@ -408,7 +408,7 @@
.content-header.just-links {
margin-bottom:0;
padding-bottom:0;}
-
+
.content-header h1 {
color:#000;
margin:0;
@@ -470,8 +470,8 @@
height: 10px;
display: inline-block;
margin-left: 5px; }
-
-
+
+
.training-nav-top a {
display:block;
float:left;
@@ -488,25 +488,25 @@
border-left:0;
width:123px;
}
-
+
.paging-links a.disabled,
.training-nav-top a.disabled,
.content-footer a.disabled {
color:#bbb;
}
-
+
.paging-links a.disabled:hover,
.training-nav-top a.disabled:hover,
.content-footer a.disabled:hover {
cursor:default;
color:#bbb !important;
}
-
+
.training-nav-top a.start-class-link,
.training-nav-top a.start-course-link {
width:262px;
}
-
+
/* list of classes on course landing page */
ol.class-list {
list-style:none;
@@ -549,7 +549,7 @@
ol.class-list li a.title:hover span {
display:block;
}
-
+
#jd-content
ol.class-list li img {
float:left;
@@ -577,29 +577,29 @@
margin:0 0 6px;
line-height:16px;
}
-
-
+
+
.hide {
display:none !important;
}
-
+
.content-footer.next-class {
display:block;
border:0;
margin-top:0;
padding-top:0;
}
-
+
.content-footer.next-class a.next-class-link {
display:block;
float:right;
text-transform:uppercase;
}
-
-
-
+
+
+
/* inner-doc tabs w/ title */
-
+
div#title-tabs-wrapper {
border-bottom:1px solid #ccc;
margin:20px 0 30px;
@@ -844,6 +844,18 @@
width: 216px;
height: 384px; }
+.framed-nexus4-port-216 {
+ background: transparent url(../images/styles/device_nexus4_blank_port_432.png) no-repeat
+scroll top left;
+ background-size:240px 465px;
+ padding: 52px 12px 52px 12px;
+ overflow: hidden; }
+ .framed-nexus4-port-216, .framed-nexus4-port-216 video,
+ .framed-nexus4-port-216 img {
+ width: 216px;
+ height: 360px; }
+
+
/* landing page disclosures */
.landing-page-link {
text-decoration: none;
@@ -920,7 +932,7 @@
.ui-table th,
.ui-table td {
padding: 5px 10px;
- background-color: inherit;
+ background-color: inherit;
border:0;}
.ui-table thead th {
font-weight: bold; }
@@ -945,7 +957,7 @@
background-image: url(../images/styles/ico_wrong.png); }
.do-dont-label.good {
background-image: url(../images/styles/ico_good.png); }
-
+
@@ -996,7 +1008,7 @@
fieldset, iframe, img {
border: 0;
}
-img {
+img {
-ms-interpolation-mode: bicubic;
vertical-align: middle;
max-width: 100%;
@@ -1031,7 +1043,7 @@
margin-right:320px;
}
h1.super {
- font-size: 37px;
+ font-size: 37px;
}
h2 {
color:#333;
@@ -1052,13 +1064,13 @@
font-size: 16px;
}
h5 {
- font-size: 14px;
+ font-size: 14px;
}
h5, h6 {
margin: 5px 0;
}
h6 {
- font-size: 12px;
+ font-size: 12px;
}
hr { /* applied to the bottom of h2 elements */
height: 1px;
@@ -1244,7 +1256,7 @@
padding: 0 24px 0 0;
}
.locales form {
- margin: 0;
+ margin: 0;
}
.locales select, .sites select {
line-height: 3.08;
@@ -1340,7 +1352,7 @@
padding: 2.5em 0;
border-top: solid 1px #ddd;
border-bottom: solid 1px #ddd;
- background: #f7f7f7;
+ background: #f7f7f7;
}
.wrap {
margin: 0 auto;
@@ -1466,7 +1478,7 @@
top: 24px;
left: 0
}
-.search .left, .search .right {
+.search .left, .search .right {
height: 5px;
width: 1px
}
@@ -1537,7 +1549,7 @@
padding: 0
}
.search-dropdown ul li {
- clear: both
+ clear: both
}
.search-dropdown img {
float: left;
@@ -1670,7 +1682,7 @@
endColorstr='#ffffff',GradientType=0 ); /* IE6-8 */
-webkit-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
-moz-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
- box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
+ box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
color: #258AAF !important;
}
.button.big {
@@ -1703,7 +1715,7 @@
width:130px;
text-transform:uppercase;
font-weight:bold;
-
+
background-color: #f3f3f3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));
background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
@@ -1754,10 +1766,14 @@
#qv-wrapper {
float:right;
clear:right;
- margin:-27px 0 0 20px; /* negative top-margin to counter the content-header bottom margin */
+ margin:0 0 0 20px; /* negative top-margin to counter the content-header bottom margin */
padding:0 0 20px;
}
+#tb-wrapper {
+ margin:-27px 0 0 20px; /* negative top-margin to counter the content-header bottom margin */
+}
+
#tb,
#qv {
font-size:13px;
@@ -1784,11 +1800,13 @@
font-size:inherit;
}
-#tb .download-box {
+#tb .download-box,
+#qv .download-box {
padding:0 0 0 15px;
}
-#tb .download-box .filename {
+#tb .download-box .filename,
+#qv .download-box .filename {
font-size:11px;
margin:4px 4px 10px;
color:#666;
@@ -1955,9 +1973,9 @@
padding: 5px;
width: 130px;
}
-
+
.article form .browse .browse-msg {
- font-size: 11.5px;
+ font-size: 11.5px;
}
.article form .browse .button-secondary {
height: auto;
@@ -1972,7 +1990,7 @@
color: #222;
line-height: normal;
padding: 6px 10px;
- width: 300px;
+ width: 300px;
}
.article form textarea {
height: 150px;
@@ -2079,7 +2097,7 @@
padding: 1em;
overflow: auto;
border: solid 1px #ddd;
- background: #f7f7f7;
+ background: #f7f7f7;
}
.str { color: #080; }
.kwd { color: #008; }
@@ -2109,16 +2127,16 @@
height:270px;
max-height: inherit;
overflow: hidden;
- position: relative;
+ position: relative;
}
#classes-nav {
overflow: hidden;
- position: relative;
+ position: relative;
}
#packages-nav ul, #classes-nav ul {
list-style-type: none;
margin: 10px 0 20px 0;
- padding: 0;
+ padding: 0;
}
#classes-nav li {
font-weight: bold;
@@ -2136,7 +2154,7 @@
#classes-nav li li a, #classes-nav li li a:active, #classes-nav li li a:visited,
#nav-tree li a, #nav-tree li a:active, #nav-tree li a:visited {
color: #222;
- font-weight: normal;
+ font-weight: normal;
}
#packages-nav li a, #packages-nav li a:active, #packages-nav li a:visited,
#classes-nav li li a, #classes-nav li li a:active, #classes-nav li li a:visited {
@@ -2182,7 +2200,7 @@
#nav-swap .fullscreen.disabled {
background-position: 0 0;
}
-#nav-swap .fullscreen:hover,
+#nav-swap .fullscreen:hover,
#nav-swap .fullscreen:focus {
cursor:pointer;
}
@@ -2259,13 +2277,13 @@
margin-right:0;
}
#doc-content-container {
- margin-left: 291px
+ margin-left: 291px
}
#doc-header, #doc-content {
padding: 1em 2em;
}
#doc-header {
- background: #f7f7f7;
+ background: #f7f7f7;
}
#doc-header h1 {
line-height: 0;
@@ -2340,9 +2358,6 @@
#jd-content img.toggle-content-img {
margin:0 5px 5px 0;
}
-div.toggle-content p {
- margin:10px 0 0;
-}
div.toggle-content-toggleme {
padding:0 0 0 15px;
}
@@ -2393,7 +2408,7 @@
border-bottom: solid 1px #ededed;
background: #f7f7f7 url("../images/resizable-s2.png") no-repeat scroll center center; }
/*
-.ui-resizable-e {
+.ui-resizable-e {
cursor: e-resize; width: 10px; right: 0; top: 0; height: 100%; border-right: solid
1px #ededed;background: #f7f7f7 url("../images/resizable-e2.png") no-repeat scroll center center; }
*/
@@ -2401,7 +2416,7 @@
/* --------------------------------------------------------------------------
Lightbox
*/
-.lightbox {
+.lightbox {
width: 769px;
padding: 1.5em;
margin: 0 auto;
@@ -2414,7 +2429,7 @@
.lightbox .header {
float: left;
width: 720px;
- margin: -10px 20px 10px 0;
+ margin: -10px 20px 10px 0;
}
.lightbox .close {
float: right;
@@ -2429,6 +2444,30 @@
}
/* --------------------------------------------------------------------------
+Butterbar
+*/
+#butterbar-wrapper {
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+}
+#butterbar {
+ width:940px;
+ margin:0 auto;
+}
+#butterbar-message {
+ background-color:#f80;
+ float:right;
+ font-size:12px;
+ font-weight:bold;
+ padding:0 10px;
+ border-radius: 0 0 5px 5px;
+}
+#butterbar-message a {color:#fff !important}
+#butterbar-message a:hover {text-decoration:underline;}
+
+/* --------------------------------------------------------------------------
Misc
*/
@@ -2450,7 +2489,7 @@
.caption {
margin: 0.5em 0 2em 0;
color: #000;
- font-size: 11.5px;
+ font-size: 11.5px;
}
.nolist {
@@ -2509,19 +2548,19 @@
}
p.code-caption {
- margin: 0 0 4px 0;
+ margin-bottom: 4px;
font: 12px/1.5 monospace;
color:#666;
}
-div.note,
-div.caution,
+div.note,
+div.caution,
div.warning {
margin: 0 0 15px;
}
-p.note, div.note,
-p.caution, div.caution,
+p.note, div.note,
+p.caution, div.caution,
p.warning, div.warning {
padding: 0 0 0 10px;
border-left: 4px solid;
@@ -2615,46 +2654,78 @@
background-image: url(../images/styles/disclosure_up.png);
}
-/* notice sidebox link used in Design docs */
-a.notice-developers {
+/* notice box for cross links between Design/Develop docs */
+a.notice-developers,
+a.notice-designers {
float:right;
- width:240px;
+ clear:right;
+ width:238px;
min-height:50px;
margin:0 0 20px 20px;
border:1px solid #ddd;
}
-a.notice-developers div {
+a.notice-developers.wide,
+a.notice-designers.wide {
+ width:278px;
+}
+a.notice-developers div,
+a.notice-designers div {
min-height:40px;
- background:url('../images/styles/notice-developers.png') no-repeat 10px 10px;
+ background:url('../images/styles/notice-developers@2x.png') no-repeat 10px 10px;
+ background-size:40px 40px;
padding:10px 10px 10px 60px;
}
-a.notice-developers:hover {
+a.notice-designers div {
+ background:url('../images/styles/notice-designers@2x.png') no-repeat 10px 10px;
+ background-size:40px 40px;
+}
+a.notice-developers:hover,
+a.notice-designers:hover {
background:#eee;
}
-a.notice-developers h3 {
+a.notice-developers h3,
+a.notice-designers h3 {
font-size:14px;
font-weight:normal;
text-transform:uppercase;
color:#000 !important;
margin:0;
}
-a.notice-developers p {
+a.notice-developers p,
+a.notice-designers p {
margin:0;
line-height:16px;
}
-a.notice-developers.left {
+a.notice-developers.left,
+a.notice-designers.left {
margin-left:0;
float:left;
}
+/* hide nested list items; companion to hideNestedLists() */
+.hide-nested li ol,
+.hide-nested li ul {
+ display:none;
+}
+
+a.header-toggle {
+ display:block;
+ float:right;
+ text-transform:uppercase;
+ font-size:.8em !important;
+ font-weight:normal;
+ margin-top:2px;
+}
+
+
/* -----------------------------------------------
-good/bad example containers
+good/bad example containers
*/
div.example-block {
background-repeat: no-repeat;
- background-position:10px 8px;
+ background-position:10px 8px;
background-color:#ccc;
padding:4px;
margin:.8em auto 1.5em 2em;
@@ -2688,7 +2759,7 @@
}
/* -----------------------------------------------
-Dialog box for popup messages
+Dialog box for popup messages
*/
div.dialog {
@@ -2754,9 +2825,9 @@
/* --------------------------------------------------------------------------
-Slideshow Controls & Next/Prev
+Slideshow Controls & Next/Prev
*/
-.slideshow-next, .slideshow-prev {
+.slideshow-next, .slideshow-prev {
width: 20px;
height: 36px;
text-indent: -1000em;
@@ -2779,7 +2850,7 @@
a.slideshow-prev, a.slideshow-prev:visited {
- float: left;
+ float: left;
background: url(../images/arrow-left.png) no-repeat 0 0
@@ -2787,18 +2858,18 @@
.slideshow-next:hover, .slideshow-prev:hover, .slideshow-next:focus, .slideshow-prev:focus {
- background-position: 0 -36px
+ background-position: 0 -36px
}
.slideshow-next:active, .slideshow-prev:active {
- background-position: 0 -72px
+ background-position: 0 -72px
}
.slideshow-nav {
width: 74px;
- margin: 0 auto;
+ margin: 0 auto;
}
.slideshow-nav a, .slideshow-nav a:visited {
display: inline-block;
@@ -2818,7 +2889,7 @@
.slideshow-nav a:active {
background: #1e799a;
- background: #ebebeb;
+ background: #ebebeb;
-webkit-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
-moz-box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, .05);
@@ -2831,7 +2902,7 @@
*/
ul.tabs {
padding: 0;
- margin: 2em 0 0 0;
+ margin: 2em 0 0 0;
}
ul.tabs:before, ul.tabs:after {
content: "";
@@ -2840,7 +2911,7 @@
}
ul.tabs li {
list-style-type: none;
- float: left;
+ float: left;
}
ul.tabs li a, ul.tabs li a:active, ul.tabs li a:visited {
display: block;
@@ -2854,7 +2925,7 @@
-moz-border-radius-bottomright: px;
-moz-border-radius-bottomleft: px;
-webkit-border-radius: 2px 2px px px;
- border-radius: 2px 2px px px;
+ border-radius: 2px 2px px px;
border-top: solid 1px #ebebeb;
border-left: solid 1px #ebebeb;
border-right: solid 1px #ebebeb;
@@ -2869,7 +2940,7 @@
EndColorStr='#fafafa');
}
ul.tabs li a:hover {
- color: #33B5E5;
+ color: #33B5E5;
}
ul.tabs li a.selected {
height: 37px;
@@ -2908,9 +2979,9 @@
.dialog .box-border .top,
.dialog .box-border .bottom { width:391px; }
-.box-border .left, .box-border .right {
+.box-border .left, .box-border .right {
width: 1px;
- height: 8px;
+ height: 8px;
}
.box-border .top { top: 0; left: 0 }
.box-border .top .left { top: 1px; left: 0 }
@@ -2945,10 +3016,10 @@
transition: color .4s ease;
}
.feature-box:hover {
- cursor: pointer;
+ cursor: pointer;
}
.feature-box:hover .box-border .top, .feature-box:hover .box-border .bottom, .feature-box:hover
-.left, .feature-box:hover .right {
+.left, .feature-box:hover .right {
background-color: #33B5E5;
}
.feature-box:hover h4, .feature-box:hover a {
@@ -2957,7 +3028,7 @@
/* --------------------------------------------------------------------------
Page-Specific Styles
*/
-.colors {
+.colors {
position: relative;
float: left;
width: 92px;
@@ -3376,7 +3447,7 @@
font-size:0.85em;
}
-.suggest-card.reference
+.suggest-card.reference
.search_filtered li.header {
color:#aaa;
font-size: 0.81em;
@@ -3727,7 +3798,7 @@
}
#quicknav {
- float:none;
+ float:none;
clear:both;
margin-left:180px;
margin-top:-30px;
@@ -3795,7 +3866,7 @@
#header-wrap.quicknav {
height:196px;
-
+
}
/* SEARCH AND MORE */
@@ -3842,7 +3913,7 @@
left: 0
}
-.search .left, .search .right {
+.search .left, .search .right {
height: 5px;
width: 1px
}
@@ -3868,10 +3939,10 @@
.search form input {
color: #2f2f2f;
font-size: 0.95em;
- width: 178px;
+ width: 178px;
border: none;
- margin-left: 6px;
- z-index: 1500;
+ margin-left: 6px;
+ z-index: 1500;
position: relative;
background-color: transparent;
border-bottom:1px solid #CCC;
@@ -3940,10 +4011,10 @@
opacity:0;
-webkit-transform-origin:100% 0%;
- -moz-transform-origin:100% 0%;
+ -moz-transform-origin:100% 0%;
-o-transform-origin:100% 0%;
transform-origin:100% 0%;
-
+
-webkit-transition-property: -webkit-opacity;
-webkit-transition-duration: .25s;
-webkit-transition-timing-function:ease;
@@ -3955,7 +4026,7 @@
-o-transition-property: -o-opacity;
-o-transition-duration: .25s;
-o-transition-timing-function:ease;
-
+
transition-property: opacity;
transition-duration: .25s;
transition-timing-function:ease;
@@ -4053,9 +4124,9 @@
border-radius:6px;
background-color:#ccc;
cursor:pointer;
- -webkit-transition:color .5s ease-in;
- -moz-transition:color .5s ease-in;
- -o-transition:color .5s ease-in;
+ -webkit-transition:color .5s ease-in;
+ -moz-transition:color .5s ease-in;
+ -o-transition:color .5s ease-in;
transition:color .5s ease-in;
}
.slideshow-container .pagination ul li:hover {
@@ -4191,7 +4262,7 @@
background-image: -ms-linear-gradient(left, #5dbcd9, #4cadcb);
background-image: -o-linear-gradient(left, #5dbcd9, #4cadcb);
background-image: linear-gradient(left, #5dbcd9, #4cadcb);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5dbcd9', EndColorStr='#4cadcb');
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5dbcd9', EndColorStr='#4cadcb');
}
.jspHorizontalBar .jspTrack,
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/device_nexus4_blank_port_432.png b/tools/droiddoc/templates-sdk/assets/images/styles/device_nexus4_blank_port_432.png
new file mode 100644
index 0000000..9d41aa3
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/device_nexus4_blank_port_432.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers.png b/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers.png
new file mode 100644
index 0000000..1fb22a2
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers@2x.png b/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers@2x.png
new file mode 100644
index 0000000..bc2f74b
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/notice-designers@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers.png b/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers.png
index dd04606..a29c31a 100644
--- a/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers.png
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers@2x.png b/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers@2x.png
new file mode 100644
index 0000000..d42f537
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/styles/notice-developers@2x.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index f61cf1e..fa7554b 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -11,7 +11,7 @@
var basePath = getBaseUri(location.pathname);
var SITE_ROOT = toRoot + basePath.substring(1,basePath.indexOf("/",1));
var GOOGLE_DATA; // combined data for google service apis, used for search suggest
-
+
// Ensure that all ajax getScript() requests allow caching
$.ajaxSetup({
cache: true
@@ -59,10 +59,10 @@
toggleFullscreen(false);
}
});
-
+
// initialize the divs with custom scrollbars
$('.scroll-pane').jScrollPane( {verticalGutter:0} );
-
+
// add HRs below all H2s (except for a few other h2 variants)
$('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').not('h2.norule').css({marginBottom:0}).after('<hr/>');
@@ -78,7 +78,7 @@
});
// Set up quicknav
- var quicknav_open = false;
+ var quicknav_open = false;
$("#btn-quicknav").click(function() {
if (quicknav_open) {
$(this).removeClass('active');
@@ -90,20 +90,20 @@
expand();
}
})
-
+
var expand = function() {
$('#header-wrap').addClass('quicknav');
$('#quicknav').stop().show().animate({opacity:'1'});
}
-
+
var collapse = function() {
$('#quicknav').stop().animate({opacity:'0'}, 100, function() {
$(this).hide();
$('#header-wrap').removeClass('quicknav');
});
}
-
-
+
+
//Set up search
$("#search_autocomplete").focus(function() {
$("#search-container").addClass('active');
@@ -127,7 +127,7 @@
}
})
-
+
// prep nav expandos
var pagePath = document.location.pathname;
// account for intl docs by removing the intl/*/ path
@@ -183,6 +183,7 @@
$("#nav-x li.google a").addClass("selected");
} else {
$("#nav-x li.reference a").addClass("selected");
+ changeApiLevel(); // turn things grey
}
} else if ((rootDir == "tools") || (rootDir == "sdk")) {
$("#nav-x li.tools a").addClass("selected");
@@ -209,7 +210,7 @@
// set up prev links
var $prevLink = [];
var $prevListItem = $selListItem.prev('li');
-
+
var crossBoundaries = ($("body.design").length > 0) || ($("body.guide").length > 0) ? true :
false; // navigate across topic boundaries only in design docs
if ($prevListItem.length) {
@@ -224,10 +225,10 @@
// jump to this section's index page (if it exists)
var $parentListItem = $selListItem.parents('li');
$prevLink = $selListItem.parents('li').find('a');
-
+
// except if cross boundaries aren't allowed, and we're at the top of a section already
// (and there's another parent)
- if (!crossBoundaries && $parentListItem.hasClass('nav-section')
+ if (!crossBoundaries && $parentListItem.hasClass('nav-section')
&& $selListItem.hasClass('nav-section')) {
$prevLink = [];
}
@@ -238,7 +239,7 @@
var startClass = false;
var training = $(".next-class-link").length; // decides whether to provide "next class" link
var isCrossingBoundary = false;
-
+
if ($selListItem.hasClass('nav-section')) {
// we're on an index page, jump to the first topic
$nextLink = $selListItem.find('ul:eq(0)').find('a:eq(0)');
@@ -251,7 +252,7 @@
// then set the landing page "start link" text to be the first doc title
$('.topic-start-link').text($nextLink.text().toUpperCase());
}
-
+
// If the selected page has a description, then it's a class or article homepage
if ($selListItem.find('a[description]').length) {
// this means we're on a class landing page
@@ -273,7 +274,7 @@
if (startClass) {
$('.start-class-link').attr('href', $nextLink.attr('href')).removeClass("hide");
- // if there's no training bar (below the start button),
+ // if there's no training bar (below the start button),
// then we need to add a bottom border to button
if (!$("#tb").length) {
$('.start-class-link').css({'border-bottom':'1px solid #DADADA'});
@@ -283,7 +284,7 @@
$('.next-page-link').attr('href','')
.removeClass("hide").addClass("disabled")
.click(function() { return false; });
-
+
$('.next-class-link').attr('href',$nextLink.attr('href'))
.removeClass("hide").append($nextLink.html());
$('.next-class-link').find('.new').empty();
@@ -298,7 +299,7 @@
} else {
$('.prev-page-link').attr('href', $prevLink.attr('href')).removeClass("hide");
}
- }
+ }
// If this is a training 'article', there should be no prev/next nav
// ... if the grandparent is the "nav" ... and it has no child list items...
@@ -307,16 +308,16 @@
$('.next-page-link,.prev-page-link').attr('href','').addClass("disabled")
.click(function() { return false; });
}
-
+
}
-
-
-
+
+
+
// Set up the course landing pages for Training with class names and descriptions
if ($('body.trainingcourse').length) {
var $classLinks = $selListItem.find('ul li a').not('#nav .nav-section .nav-section ul a');
var $classDescriptions = $classLinks.attr('description');
-
+
var $olClasses = $('<ol class="class-list"></ol>');
var $liClass;
var $imgIcon;
@@ -328,18 +329,20 @@
$liClass = $('<li></li>');
$h2Title = $('<a class="title" href="'+$(this).attr('href')+'"><h2>' + $(this).html()+'</h2><span></span></a>');
$pSummary = $('<p class="description">' + $(this).attr('description') + '</p>');
-
+
$olLessons = $('<ol class="lesson-list"></ol>');
-
+
$lessons = $(this).closest('li').find('ul li a');
-
+
if ($lessons.length) {
- $imgIcon = $('<img src="'+toRoot+'assets/images/resource-tutorial.png" alt=""/>');
+ $imgIcon = $('<img src="'+toRoot+'assets/images/resource-tutorial.png" '
+ + ' width="64" height="64" alt=""/>');
$lessons.each(function(index) {
$olLessons.append('<li><a href="'+$(this).attr('href')+'">' + $(this).html()+'</a></li>');
});
} else {
- $imgIcon = $('<img src="'+toRoot+'assets/images/resource-article.png" alt=""/>');
+ $imgIcon = $('<img src="'+toRoot+'assets/images/resource-article.png" '
+ + ' width="64" height="64" alt=""/>');
$pSummary.addClass('article');
}
@@ -370,7 +373,7 @@
// first hide all other siblings
var $others = $('li.nav-section.expanded', $(this).closest('ul'));
$others.removeClass('expanded').children('ul').slideUp(250);
-
+
// now expand me
section.closest('li').addClass('expanded');
section.children('ul').slideDown(250, function() {
@@ -378,7 +381,7 @@
});
}
});
-
+
$(".scroll-pane").scroll(function(event) {
event.preventDefault();
return false;
@@ -410,10 +413,10 @@
// from a scrollable div and so there's no need to make adjustments to our layout
return;
}
- var scrollTop = $(window).scrollTop();
+ var scrollTop = $(window).scrollTop();
var headerHeight = $('#header').outerHeight();
var subheaderHeight = $('#nav-x').outerHeight();
- var searchResultHeight = $('#searchResults').is(":visible") ?
+ var searchResultHeight = $('#searchResults').is(":visible") ?
$('#searchResults').outerHeight() : 0;
var totalHeaderHeight = headerHeight + subheaderHeight + searchResultHeight;
// we set the navbar fixed when the scroll position is beyond the height of the site header...
@@ -423,20 +426,20 @@
if ($("#doc-col").height() < $("#side-nav").height()) {
navBarShouldBeFixed = false;
}
-
+
var scrollLeft = $(window).scrollLeft();
// When the sidenav is fixed and user scrolls horizontally, reposition the sidenav to match
if (navBarIsFixed && (scrollLeft != prevScrollLeft)) {
updateSideNavPosition();
prevScrollLeft = scrollLeft;
}
-
- // Don't continue if the header is sufficently far away
+
+ // Don't continue if the header is sufficently far away
// (to avoid intensive resizing that slows scrolling)
if (navBarIsFixed && navBarShouldBeFixed) {
return;
}
-
+
if (navBarIsFixed != navBarShouldBeFixed) {
if (navBarShouldBeFixed) {
// make it fixed
@@ -447,7 +450,7 @@
.prependTo('#body-content');
// add neato "back to top" button
$('#devdoc-nav a.totop').css({'display':'block','width':$("#nav").innerWidth()+'px'});
-
+
// update the sidenaav position for side scrolling
updateSideNavPosition();
} else {
@@ -459,12 +462,12 @@
$('#devdoc-nav a.totop').hide();
}
navBarIsFixed = navBarShouldBeFixed;
- }
-
+ }
+
resizeNav(250); // pass true in order to delay the scrollbar re-initialization for performance
});
-
+
var navBarLeftPos;
if ($('#devdoc-nav').length) {
setNavBarLeftPos();
@@ -527,16 +530,16 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- // Revise the sidenav widths to make room for the scrollbar
+ // Revise the sidenav widths to make room for the scrollbar
// which avoids the visible width from changing each time the bar appears
var $sidenav = $("#side-nav");
var sidenav_width = parseInt($sidenav.innerWidth());
-
+
$("#devdoc-nav #nav").css("width", sidenav_width - 4 + "px"); // 4px is scrollbar width
$(".scroll-pane").removeAttr("tabindex"); // get rid of tabindex added by jscroller
-
+
if ($(".scroll-pane").length > 1) {
// Check if there's a user preference for the panel heights
var cookieHeight = readCookie("reference_height");
@@ -544,7 +547,7 @@
restoreHeight(cookieHeight);
}
}
-
+
resizeNav();
/* init the language selector based on user cookie for lang */
@@ -591,7 +594,7 @@
// Find this page's <li> in sidenav and set selected
$selListItem = $selNavLink.closest('li');
$selListItem.addClass('selected');
-
+
// Traverse up the tree and expand all parent nav-sections
$selNavLink.parents('li.nav-section').each(function() {
$(this).addClass('expanded');
@@ -637,7 +640,7 @@
$('#devdoc-nav').css({left: -newLeft});
$('#devdoc-nav .totop').css({left: -(newLeft - parseInt($('#side-nav').css('margin-left')))});
}
-
+
@@ -682,7 +685,7 @@
var $nav = $("#devdoc-nav");
var $window = $(window);
var navHeight;
-
+
// Get the height of entire window and the total header height.
// Then figure out based on scroll position whether the header is visible
var windowHeight = $window.height();
@@ -690,12 +693,12 @@
var headerHeight = $('#header').outerHeight();
var subheaderHeight = $('#nav-x').outerHeight();
var headerVisible = (scrollTop < (headerHeight + subheaderHeight));
-
- // get the height of space between nav and top of window.
+
+ // get the height of space between nav and top of window.
// Could be either margin or top position, depending on whether the nav is fixed.
- var topMargin = (parseInt($nav.css('margin-top')) || parseInt($nav.css('top'))) + 1;
+ var topMargin = (parseInt($nav.css('margin-top')) || parseInt($nav.css('top'))) + 1;
// add 1 for the #side-nav bottom margin
-
+
// Depending on whether the header is visible, set the side nav's height.
if (headerVisible) {
// The sidenav height grows as the header goes off screen
@@ -704,44 +707,44 @@
// Once header is off screen, the nav height is almost full window height
navHeight = windowHeight - topMargin;
}
-
-
-
+
+
+
$scrollPanes = $(".scroll-pane");
if ($scrollPanes.length > 1) {
// subtract the height of the api level widget and nav swapper from the available nav height
navHeight -= ($('#api-nav-header').outerHeight(true) + $('#nav-swap').outerHeight(true));
-
+
$("#swapper").css({height:navHeight + "px"});
if ($("#nav-tree").is(":visible")) {
$("#nav-tree").css({height:navHeight});
}
-
- var classesHeight = navHeight - parseInt($("#resize-packages-nav").css("height")) - 10 + "px";
+
+ var classesHeight = navHeight - parseInt($("#resize-packages-nav").css("height")) - 10 + "px";
//subtract 10px to account for drag bar
-
- // if the window becomes small enough to make the class panel height 0,
+
+ // if the window becomes small enough to make the class panel height 0,
// then the package panel should begin to shrink
if (parseInt(classesHeight) <= 0) {
$("#resize-packages-nav").css({height:navHeight - 10}); //subtract 10px for drag bar
$("#packages-nav").css({height:navHeight - 10});
}
-
+
$("#classes-nav").css({'height':classesHeight, 'margin-top':'10px'});
$("#classes-nav .jspContainer").css({height:classesHeight});
-
-
+
+
} else {
$nav.height(navHeight);
}
-
+
if (delay) {
updateFromResize = true;
delayedReInitScrollbars(delay);
} else {
reInitScrollbars();
}
-
+
}
var updateScrollbars = false;
@@ -760,7 +763,7 @@
updateFromResize = false;
return;
}
-
+
// We're scheduled for an update and the update request came from this method's setTimeout
if (updateScrollbars && !updateFromResize) {
reInitScrollbars();
@@ -778,7 +781,7 @@
var api = $(this).data('jsp');
if (!api) { setTimeout(reInitScrollbars,300); return;}
api.reinitialise( {verticalGutter:0} );
- });
+ });
$(".scroll-pane").removeAttr("tabindex"); // get rid of tabindex added by jscroller
}
@@ -809,7 +812,7 @@
-/** Scroll the jScrollPane to make the currently selected item visible
+/** Scroll the jScrollPane to make the currently selected item visible
This is called when the page finished loading. */
function scrollIntoView(nav) {
var $nav = $("#"+nav);
@@ -818,13 +821,18 @@
if ($nav.is(':visible')) {
var $selected = $(".selected", $nav);
- if ($selected.length == 0) return;
-
- var selectedOffset = $selected.position().top;
- if (selectedOffset + 90 > $nav.height()) { // add 90 so that we scroll up even
- // if the current item is close to the bottom
- api.scrollTo(0, selectedOffset - ($nav.height() / 4), false); // scroll the item into view
- // to be 1/4 of the way from the top
+ if ($selected.length == 0) {
+ // If no selected item found, exit
+ return;
+ }
+
+ var selectedOffset = $selected.offset().top; // measure offset from top, relative to entire page
+ if (selectedOffset > $nav.height() * .8) { // multiply nav height by .8 so we move up any
+ // items more than 80% down the nav
+ // scroll the item up by an amount 125px less than the window height (account for site header)
+ // and then multiply nav height by .8 to match the 80% threshold used above
+ api.scrollTo(0, selectedOffset - 125 - ($nav.height() * .8), false);
+
}
}
}
@@ -873,7 +881,7 @@
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
expiration = date.toGMTString();
}
- var cookieValue = cookie_namespace + section + cookie + "=" + val
+ var cookieValue = cookie_namespace + section + cookie + "=" + val
+ "; expires=" + expiration+"; path=/";
document.cookie = cookieValue;
}
@@ -898,52 +906,7 @@
-
-
-
-
-
-
-/*
-
-REMEMBER THE PREVIOUS PAGE FOR EACH TAB
-
-function loadLast(cookiePath) {
- var location = window.location.href;
- if (location.indexOf("/"+cookiePath+"/") != -1) {
- return true;
- }
- var lastPage = readCookie(cookiePath + "_lastpage");
- if (lastPage) {
- window.location = lastPage;
- return false;
- }
- return true;
-}
-
-
-
-$(window).unload(function(){
- var path = getBaseUri(location.pathname);
- if (path.indexOf("/reference/") != -1) {
- writeCookie("lastpage", path, "reference", null);
- } else if (path.indexOf("/guide/") != -1) {
- writeCookie("lastpage", path, "guide", null);
- } else if ((path.indexOf("/resources/") != -1) || (path.indexOf("/training/") != -1)) {
- writeCookie("lastpage", path, "resources", null);
- }
-});
-
-*/
-
-
-
-
-
-
-
-
-
+/* MISC LIBRARY FUNCTIONS */
@@ -970,9 +933,6 @@
}
-
-
-
function buildToggleLists() {
$(".toggle-list").each(
function(i) {
@@ -983,7 +943,19 @@
-
+function hideNestedItems(list, toggle) {
+ $list = $(list);
+ // hide nested lists
+ if($list.hasClass('showing')) {
+ $("li ol", $list).hide('fast');
+ $list.removeClass('showing');
+ // show nested lists
+ } else {
+ $("li ol", $list).show('fast');
+ $list.addClass('showing');
+ }
+ $(".more,.less",$(toggle)).toggle();
+}
@@ -1048,7 +1020,7 @@
$("#panel-link").toggle();
$("#nav-tree").toggle();
$("#tree-link").toggle();
-
+
resizeNav();
// Gross nasty hack to make tree view show up upon first swap by setting height manually
@@ -1056,7 +1028,7 @@
.css({'height':$("#nav-tree .jspContainer .jspPane").height() +'px'});
// Another nasty hack to make the scrollbar appear now that we have height
resizeNav();
-
+
if ($("#nav-tree").is(':visible')) {
scrollIntoView("nav-tree");
} else {
@@ -1111,7 +1083,7 @@
function changeLangPref(lang, submit) {
var date = new Date();
- expires = date.toGMTString(date.setTime(date.getTime()+(10*365*24*60*60*1000)));
+ expires = date.toGMTString(date.setTime(date.getTime()+(10*365*24*60*60*1000)));
// keep this for 50 years
//alert("expires: " + expires)
writeCookie("pref_lang", lang, null, expires);
@@ -1162,13 +1134,13 @@
toggleMe.slideDown();
$(".toggle-content-text", obj).toggle();
div.removeClass("closed").addClass("open");
- $(".toggle-content-img", div).attr("title", "hide").attr("src", toRoot
+ $(".toggle-content-img", div).attr("title", "hide").attr("src", toRoot
+ "assets/images/triangle-opened.png");
} else { // if it's open, close it
toggleMe.slideUp('fast', function() { // Wait until the animation is done before closing arrow
$(".toggle-content-text", obj).toggle();
div.removeClass("open").addClass("closed");
- $(".toggle-content-img", div).attr("title", "show").attr("src", toRoot
+ $(".toggle-content-img", div).attr("title", "show").attr("src", toRoot
+ "assets/images/triangle-closed.png");
});
}
@@ -1196,7 +1168,7 @@
-/*
+/*
* Slideshow 1.0
* Used on /index.html and /develop/index.html for carousel
*
@@ -1237,7 +1209,7 @@
(function($) {
$.fn.dacSlideshow = function(o) {
-
+
//Options - see above
o = $.extend({
btnPrev: null,
@@ -1252,8 +1224,8 @@
pagination: true
}, o || {});
-
- //Set up a carousel for each
+
+ //Set up a carousel for each
return this.each(function() {
var running = false;
@@ -1262,7 +1234,7 @@
var div = $(this);
var ul = $("ul", div);
var tLi = $("li", ul);
- var tl = tLi.size();
+ var tl = tLi.size();
var timer = null;
var li = $("li", ul);
@@ -1281,7 +1253,7 @@
ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize));
div.css(sizeCss, divSize+"px");
-
+
//Pagination
if (o.pagination) {
var pagination = $("<div class='pagination'></div>");
@@ -1299,7 +1271,7 @@
div.append(pagination);
}
}
-
+
//Previous button
if(o.btnPrev)
$(o.btnPrev).click(function(e) {
@@ -1324,18 +1296,18 @@
pauseRotateTimer();
}
});
-
+
//Auto rotation
if(o.auto) startRotateTimer();
-
+
function startRotateTimer() {
clearInterval(timer);
timer = setInterval(function() {
if (curr == tl-1) {
go(0);
} else {
- go(curr+o.scroll);
- }
+ go(curr+o.scroll);
+ }
}, o.autoTime);
$(o.btnPause).removeClass('paused');
}
@@ -1373,11 +1345,11 @@
[]
).addClass("disabled");
-
+
var nav_items = $('li', pagination);
nav_items.removeClass('active');
nav_items.eq(to).addClass('active');
-
+
}
if(o.auto) startRotateTimer();
@@ -1399,7 +1371,7 @@
})(jQuery);
-/*
+/*
* dacSlideshow 1.0
* Used on develop/index.html for side-sliding tabs
*
@@ -1438,7 +1410,7 @@
*/
(function($) {
$.fn.dacTabbedList = function(o) {
-
+
//Options - see above
o = $.extend({
speed : 250,
@@ -1446,8 +1418,8 @@
nav_id: null,
frame_id: null
}, o || {});
-
- //Set up a carousel for each
+
+ //Set up a carousel for each
return this.each(function() {
var curr = 0;
@@ -1455,17 +1427,17 @@
var animCss = "margin-left";
var sizeCss = "width";
var div = $(this);
-
+
var nav = $(o.nav_id, div);
var nav_li = $("li", nav);
- var nav_size = nav_li.size();
+ var nav_size = nav_li.size();
var frame = div.find(o.frame_id);
var content_width = $(frame).find('ul').width();
//Buttons
$(nav_li).click(function(e) {
go($(nav_li).index($(this)));
})
-
+
//Go to an item
function go(to) {
if(!running) {
@@ -1478,10 +1450,10 @@
}
);
-
+
nav_li.removeClass('active');
nav_li.eq(to).addClass('active');
-
+
}
return false;
@@ -1688,7 +1660,7 @@
* otherwise invokes search suggestions on key-up event.
* @param e The JS event
* @param kd True if the event is key-down
- * @param toroot A string for the site's root path
+ * @param toroot A string for the site's root path
* @returns True if the event should bubble up
*/
function search_changed(e, kd, toroot)
@@ -1782,7 +1754,7 @@
if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
gSelectedIndex++;
}
- // set item selected
+ // set item selected
$('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
return false;
}
@@ -1800,7 +1772,7 @@
if ($($("li", $selectedUl)[gSelectedIndex]).hasClass("header")) {
gSelectedIndex++;
}
- // set item selected
+ // set item selected
$('li:nth-child('+(gSelectedIndex+1)+')', $selectedUl).addClass('jd-selected');
return false;
}
@@ -2031,7 +2003,7 @@
function search_focus_changed(obj, focused)
{
- if (!focused) {
+ if (!focused) {
if(obj.value == ""){
$(".search .close").addClass("hide");
}
@@ -2052,9 +2024,9 @@
$("#searchResults").slideUp();
$(".search .close").addClass("hide");
location.hash = '';
-
+
$("#search_autocomplete").val("").blur();
-
+
// reset the ajax search callback to nothing, so results don't appear unless ENTER
searchControl.setSearchStartingCallback(this, function(control, searcher, query) {});
@@ -2212,10 +2184,10 @@
setTimeout(function() {
// remove any residual page numbers
$('#searchResults .gsc-tabsArea .gsc-cursor-box.gs-bidi-start-align').remove();
- // move the page numbers to the left position; make a clone,
+ // move the page numbers to the left position; make a clone,
// because the element is drawn to the DOM only once
- // and because we're going to remove it (previous line),
- // we need it to be available to move again as the user navigates
+ // and because we're going to remove it (previous line),
+ // we need it to be available to move again as the user navigates
$('#searchResults .gsc-webResult .gsc-cursor-box.gs-bidi-start-align:visible')
.clone().appendTo('#searchResults .gsc-tabsArea');
}, 200);
@@ -2277,22 +2249,22 @@
var maxLevel = 1;
/******* SIDENAV DIMENSIONS ************/
-
+
function initSidenavHeightResize() {
// Change the drag bar size to nicely fit the scrollbar positions
var $dragBar = $(".ui-resizable-s");
$dragBar.css({'width': $dragBar.parent().width() - 5 + "px"});
-
- $( "#resize-packages-nav" ).resizable({
+
+ $( "#resize-packages-nav" ).resizable({
containment: "#nav-panels",
handles: "s",
alsoResize: "#packages-nav",
resize: function(event, ui) { resizeNav(); }, /* resize the nav while dragging */
stop: function(event, ui) { saveNavPanels(); } /* once stopped, save the sizes to cookie */
});
-
+
}
-
+
function updateSidenavFixedWidth() {
if (!navBarIsFixed) return;
$('#devdoc-nav').css({
@@ -2300,7 +2272,7 @@
'margin' : $('#side-nav').css('margin')
});
$('#devdoc-nav a.totop').css({'display':'block','width':$("#nav").innerWidth()+'px'});
-
+
initSidenavHeightResize();
}
@@ -2311,7 +2283,7 @@
'margin' : $('#side-nav').css('margin')
});
$('#devdoc-nav .totop').css({'left': 'inherit'});
-
+
initSidenavHeightResize();
}
@@ -2395,7 +2367,7 @@
if (apiLevelNum > selectedLevelNum) {
obj.addClass("absent").attr("title","Requires API Level \""
+ apiLevel + "\" or higher");
- }
+ }
else obj.removeClass("absent").removeAttr("title");
});
}
@@ -2464,7 +2436,7 @@
node.expanded = false;
}
}
-
+
node.children_ul = null;
node.get_children_ul = function() {
@@ -2492,7 +2464,7 @@
get_node(me, node);
if ($(node.label_div).hasClass("absent")) {
$(node.get_children_ul()).addClass("absent");
- }
+ }
$(node.get_children_ul()).slideDown("fast");
}
node.plus_img.src = me.toroot + "assets/images/triangle-opened-small.png";
@@ -2568,7 +2540,7 @@
init_navtree("tree-list", toroot, NAVTREE_DATA);
}
});
-
+
// perform api level toggling because because the whole tree is new to the DOM
var selectedLevel = $("#apiLevelSelector option:selected").val();
toggleVisisbleApis(selectedLevel, "#side-nav");
@@ -2635,8 +2607,8 @@
node.depth = mom.depth + 1;
node.get_children_ul = function() {
if (!node.children_ul) {
- node.children_ul = document.createElement("ul");
- node.children_ul.className = "tree-list-children";
+ node.children_ul = document.createElement("ul");
+ node.children_ul.className = "tree-list-children";
node.li.appendChild(node.children_ul);
}
return node.children_ul;
@@ -2644,8 +2616,8 @@
node.li = document.createElement("li");
mom.get_children_ul().appendChild(node.li);
-
-
+
+
if(link) {
child = document.createElement("a");
@@ -2658,7 +2630,7 @@
if (children_data != null) {
node.li.className="nav-section";
node.label_div = document.createElement("div");
- node.label_div.className = "nav-section-header-ref";
+ node.label_div.className = "nav-section-header-ref";
node.li.appendChild(node.label_div);
get_google_node(me, node);
node.label_div.appendChild(child);
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 3ebf697..ecc26f5 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -79,63 +79,112 @@
<tr>
<th>Platform</th>
<th>Package</th>
- <th>Size</th>
+ <th style="white-space:nowrap">Size (Bytes)</th>
<th>MD5 Checksum</th>
</tr>
<tr>
- <td>Windows 32-bit</td>
+ <td rowspan="2" style="white-space:nowrap">Windows 32-bit</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
</td>
- <td><?cs var:ndk.win32_bytes ?> bytes</td>
+ <td><?cs var:ndk.win32_bytes ?></td>
<td><?cs var:ndk.win32_checksum ?></td>
</tr>
<tr>
- <td>Windows 64-bit</td>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.win32.legacy_bytes ?></td>
+ <td><?cs var:ndk.win32.legacy_checksum ?></td>
+ </tr>
+ <tr>
+ <td rowspan="2" style="white-space:nowrap">Windows 64-bit</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
</td>
- <td><?cs var:ndk.win64_bytes ?> bytes</td>
+ <td><?cs var:ndk.win64_bytes ?></td>
<td><?cs var:ndk.win64_checksum ?></td>
</tr>
<tr>
- <td>Mac OS X 32-bit</td>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.win64.legacy_bytes ?></td>
+ <td><?cs var:ndk.win64.legacy_checksum ?></td>
+ </tr>
+ <tr>
+ <td rowspan="2" style="white-space:nowrap">Mac OS X 32-bit</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
</td>
- <td><?cs var:ndk.mac32_bytes ?> bytes</td>
+ <td><?cs var:ndk.mac32_bytes ?></td>
<td><?cs var:ndk.mac32_checksum ?></td>
</tr>
<tr>
- <td>Mac OS X 64-bit</td>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.mac32.legacy_bytes ?></td>
+ <td><?cs var:ndk.mac32.legacy_checksum ?></td>
+ </tr>
+ <tr>
+ <td rowspan="2" style="white-space:nowrap">Mac OS X 64-bit</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
</td>
- <td><?cs var:ndk.mac64_bytes ?> bytes</td>
+ <td><?cs var:ndk.mac64_bytes ?></td>
<td><?cs var:ndk.mac64_checksum ?></td>
</tr>
<tr>
- <td>Linux 32-bit (x86)</td>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.mac64.legacy_bytes ?></td>
+ <td><?cs var:ndk.mac64.legacy_checksum ?></td>
+ </tr>
+
+ <tr>
+ <td rowspan="2" style="white-space:nowrap">Linux 32-bit (x86)</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
</td>
- <td><?cs var:ndk.linux32_bytes ?> bytes</td>
+ <td><?cs var:ndk.linux32_bytes ?></td>
<td><?cs var:ndk.linux32_checksum ?></td>
</tr>
<tr>
- <td>Linux 64-bit (x86)</td>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.linux32.legacy_bytes ?></td>
+ <td><?cs var:ndk.linux32.legacy_checksum ?></td>
+ </tr>
+ <tr>
+ <td rowspan="2" style="white-space:nowrap">Linux 64-bit (x86)</td>
<td>
<a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
</td>
- <td><?cs var:ndk.linux64_bytes ?> bytes</td>
+ <td><?cs var:ndk.linux64_bytes ?></td>
<td><?cs var:ndk.linux64_checksum ?></td>
</tr>
+ <tr>
+ <td>
+ <a onClick="return onDownload(this)"
+ href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
+ </td>
+ <td><?cs var:ndk.linux64.legacy_bytes ?></td>
+ <td><?cs var:ndk.linux64.legacy_checksum ?></td>
+ </tr>
</table>
<?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 263ae11..58582ba 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -20,6 +20,7 @@
import os
import platform
import re
+import shlex
import shutil
import subprocess
import sys
@@ -40,6 +41,11 @@
class Options(object): pass
OPTIONS = Options()
OPTIONS.search_path = "out/host/linux-x86"
+OPTIONS.signapk_path = "framework/signapk.jar" # Relative to search_path
+OPTIONS.extra_signapk_args = []
+OPTIONS.java_path = "java" # Use the one on the path by default.
+OPTIONS.public_key_suffix = ".x509.pem"
+OPTIONS.private_key_suffix = ".pk8"
OPTIONS.verbose = False
OPTIONS.tempfiles = []
OPTIONS.device_specific = None
@@ -379,6 +385,7 @@
no_passwords = []
need_passwords = []
+ key_passwords = {}
devnull = open("/dev/null", "w+b")
for k in sorted(keylist):
# We don't need a password for things that aren't really keys.
@@ -386,19 +393,36 @@
no_passwords.append(k)
continue
- p = Run(["openssl", "pkcs8", "-in", k+".pk8",
+ p = Run(["openssl", "pkcs8", "-in", k+OPTIONS.private_key_suffix,
"-inform", "DER", "-nocrypt"],
stdin=devnull.fileno(),
stdout=devnull.fileno(),
stderr=subprocess.STDOUT)
p.communicate()
if p.returncode == 0:
+ # Definitely an unencrypted key.
no_passwords.append(k)
else:
- need_passwords.append(k)
+ p = Run(["openssl", "pkcs8", "-in", k+OPTIONS.private_key_suffix,
+ "-inform", "DER", "-passin", "pass:"],
+ stdin=devnull.fileno(),
+ stdout=devnull.fileno(),
+ stderr=subprocess.PIPE)
+ stdout, stderr = p.communicate()
+ if p.returncode == 0:
+ # Encrypted key with empty string as password.
+ key_passwords[k] = ''
+ elif stderr.startswith('Error decrypting key'):
+ # Definitely encrypted key.
+ # It would have said "Error reading key" if it didn't parse correctly.
+ need_passwords.append(k)
+ else:
+ # Potentially, a type of key that openssl doesn't understand.
+ # We'll let the routines in signapk.jar handle it.
+ no_passwords.append(k)
devnull.close()
- key_passwords = PasswordManager().GetPasswords(need_passwords)
+ key_passwords.update(PasswordManager().GetPasswords(need_passwords))
key_passwords.update(dict.fromkeys(no_passwords, None))
return key_passwords
@@ -426,11 +450,13 @@
else:
sign_name = output_name
- cmd = ["java", "-Xmx2048m", "-jar",
- os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
+ cmd = [OPTIONS.java_path, "-Xmx2048m", "-jar",
+ os.path.join(OPTIONS.search_path, OPTIONS.signapk_path)]
+ cmd.extend(OPTIONS.extra_signapk_args)
if whole_file:
cmd.append("-w")
- cmd.extend([key + ".x509.pem", key + ".pk8",
+ cmd.extend([key + OPTIONS.public_key_suffix,
+ key + OPTIONS.private_key_suffix,
input_name, sign_name])
p = Run(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
@@ -494,12 +520,14 @@
r'private_key="(.*)"$', line)
if m:
name, cert, privkey = m.groups()
+ public_key_suffix_len = len(OPTIONS.public_key_suffix)
+ private_key_suffix_len = len(OPTIONS.private_key_suffix)
if cert in SPECIAL_CERT_STRINGS and not privkey:
certmap[name] = cert
- elif (cert.endswith(".x509.pem") and
- privkey.endswith(".pk8") and
- cert[:-9] == privkey[:-4]):
- certmap[name] = cert[:-9]
+ elif (cert.endswith(OPTIONS.public_key_suffix) and
+ privkey.endswith(OPTIONS.private_key_suffix) and
+ cert[:-public_key_suffix_len] == privkey[:-private_key_suffix_len]):
+ certmap[name] = cert[:-public_key_suffix_len]
else:
raise ValueError("failed to parse line from apkcerts.txt:\n" + line)
return certmap
@@ -543,8 +571,10 @@
try:
opts, args = getopt.getopt(
argv, "hvp:s:x:" + extra_opts,
- ["help", "verbose", "path=", "device_specific=", "extra="] +
- list(extra_long_opts))
+ ["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=",
+ "java_path=", "public_key_suffix=", "private_key_suffix=",
+ "device_specific=", "extra="] +
+ list(extra_long_opts))
except getopt.GetoptError, err:
Usage(docstring)
print "**", str(err), "**"
@@ -560,6 +590,16 @@
OPTIONS.verbose = True
elif o in ("-p", "--path"):
OPTIONS.search_path = a
+ elif o in ("--signapk_path",):
+ OPTIONS.signapk_path = a
+ elif o in ("--extra_signapk_args",):
+ OPTIONS.extra_signapk_args = shlex.split(a)
+ elif o in ("--java_path",):
+ OPTIONS.java_path = a
+ elif o in ("--public_key_suffix",):
+ OPTIONS.public_key_suffix = a
+ elif o in ("--private_key_suffix",):
+ OPTIONS.private_key_suffix = a
elif o in ("-s", "--device_specific"):
OPTIONS.device_specific = a
elif o in ("-x", "--extra"):
diff --git a/tools/releasetools/sign_target_files_apks b/tools/releasetools/sign_target_files_apks
index eaad8a4..9fb1008 100755
--- a/tools/releasetools/sign_target_files_apks
+++ b/tools/releasetools/sign_target_files_apks
@@ -208,7 +208,7 @@
try:
keylist = input_tf_zip.read("META/otakeys.txt").split()
except KeyError:
- raise ExternalError("can't read META/otakeys.txt from input")
+ raise common.ExternalError("can't read META/otakeys.txt from input")
extra_recovery_keys = misc_info.get("extra_recovery_keys", None)
if extra_recovery_keys:
@@ -223,7 +223,7 @@
for k in keylist:
m = re.match(r"^(.*)\.x509\.pem$", k)
if not m:
- raise ExternalError("can't parse \"%s\" from META/otakeys.txt" % (k,))
+ raise common.ExternalError("can't parse \"%s\" from META/otakeys.txt" % (k,))
k = m.group(1)
mapped_keys.append(OPTIONS.key_map.get(k, k) + ".x509.pem")
@@ -247,7 +247,7 @@
stdout=subprocess.PIPE)
data, _ = p.communicate()
if p.returncode != 0:
- raise ExternalError("failed to run dumpkeys")
+ raise common.ExternalError("failed to run dumpkeys")
common.ZipWriteStr(output_tf_zip, "RECOVERY/RAMDISK/res/keys", data)
# SystemUpdateActivity uses the x509.pem version of the keys, but