Merge "Close inherited PIPE before doing work" into gingerbread
diff --git a/CleanSpec.mk b/CleanSpec.mk
index f0beb1d..e70a50a 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -53,6 +53,7 @@
$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(OUT_DIR))
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/Makefile b/core/Makefile
index 72d4ae7..a0961a8 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -15,15 +15,18 @@
# <dest file> is relative to $(PRODUCT_OUT), so it should look like,
# e.g., "system/etc/file.xml".
# The filter part means "only eval the copy-one-file rule if this
-# src:dest pair is the first one to match %:dest"
+# src:dest pair is the first one to match the same dest"
+unique_product_copy_files_destinations := $(sort \
+ $(foreach cf,$(PRODUCT_COPY_FILES), $(call word-colon,2,$(cf))))
$(foreach cf,$(PRODUCT_COPY_FILES), \
- $(eval _src := $(call word-colon,1,$(cf))) \
- $(eval _dest := $(call word-colon,2,$(cf))) \
- $(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
- $(if $(filter $(_src):$(_dest),$(firstword $(filter %:$(_dest),$(PRODUCT_COPY_FILES)))), \
- $(eval $(call copy-one-file,$(_src),$(_fulldest))),) \
- $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
- )
+ $(eval _src := $(call word-colon,1,$(cf))) \
+ $(eval _dest := $(call word-colon,2,$(cf))) \
+ $(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
+ $(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
+ $(eval $(call copy-one-file,$(_src),$(_fulldest))) \
+ $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
+ $(eval unique_product_copy_files_destinations := $(filter-out $(_dest), \
+ $(unique_product_copy_files_destinations)))))
# -----------------------------------------------------------------
# docs/index.html
@@ -277,12 +280,15 @@
event_log_tags_file := $(TARGET_OUT)/etc/event-log-tags
-# Include tags from all packages included in this product.
+# Include tags from all packages included in this product, plus all
+# tags that are part of the system (ie, not in a vendor/ or device/
+# directory).
event_log_tags_src := \
$(sort $(foreach m,\
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) \
$(call module-names-for-tag-list,user), \
- $(ALL_MODULES.$(m).EVENT_LOG_TAGS)))
+ $(ALL_MODULES.$(m).EVENT_LOG_TAGS)) \
+ $(filter-out vendor/% device/% out/%,$(all_event_log_tags_src)))
$(event_log_tags_file): PRIVATE_SRC_FILES := $(event_log_tags_src)
$(event_log_tags_file): PRIVATE_MERGED_FILE := $(all_event_log_tags_file)
@@ -1022,6 +1028,7 @@
ifneq ($(TARGET_PRODUCT),sdk)
ifneq ($(TARGET_DEVICE),generic)
ifneq ($(TARGET_NO_KERNEL),true)
+ifneq ($(recovery_fstab),)
# -----------------------------------------------------------------
# OTA update package
@@ -1074,6 +1081,7 @@
.PHONY: updatepackage
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
+endif # recovery_fstab is defined
endif # TARGET_NO_KERNEL != true
endif # TARGET_DEVICE != generic
endif # TARGET_PRODUCT != sdk
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk
index cf25ce1..821b03a 100644
--- a/core/cleanbuild.mk
+++ b/core/cleanbuild.mk
@@ -160,8 +160,6 @@
# 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
@@ -174,28 +172,34 @@
# $ 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 \
- ./$(PRODUCT_OUT)/dex_bootjars \
- ./$(PRODUCT_OUT)/obj/JAVA_LIBRARIES
+ $(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 \
+ $(PRODUCT_OUT)/dex_bootjars \
+ $(PRODUCT_OUT)/obj/JAVA_LIBRARIES
# 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
+ $(PRODUCT_OUT)/data/* \
+ $(PRODUCT_OUT)/data-qemu/* \
+ $(PRODUCT_OUT)/userdata-qemu.img
+
+# make sure *_OUT is set so that we won't result in deleting random parts
+# of the filesystem.
+ifneq (2,$(words $(HOST_OUT) $(PRODUCT_OUT)))
+ $(error both HOST_OUT and PRODUCT_OUT should be set at this point.)
+endif
# Define the rules for commandline invocation.
.PHONY: dataclean
@@ -212,6 +216,7 @@
ifeq "$(force_installclean)" "true"
$(info *** Forcing "make installclean"...)
+ $(info *** rm -rf $(dataclean_files) $(installclean_files))
$(shell rm -rf $(dataclean_files) $(installclean_files))
$(info *** Done with the cleaning, now starting the real build.)
endif
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index fa2dfe3..c871613 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -22,6 +22,26 @@
stat --format "%s" "$(1)" | tr -d '\n'
endef
+# Special case for the Linux SDK: We need to use a special cross-toolchain
+# that generates machine code that will run properly on Ubuntu 8.04 (Hardy)
+# By default, the code generated by the Lucid host toolchain will not run
+# on previous versions of the platform, due to GLibc ABI mistmatches
+# (Lucid is 2.11, Hardy is 2.7)
+#
+# Note that components that need to be built as 64-bit (e.g. clearsilver
+# which is loaded by the 64-bit JVM through JNI), will have to use
+# LOCAL_CC and LOCAL_CXX to override this.
+#
+ifeq ($(TARGET_PRODUCT),sdk)
+HOST_SDK_TOOLCHAIN_PREFIX := prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/bin/i686-linux
+# Don't do anything if the toolchain is not there
+ifneq (,$(strip $(wildcard $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc)))
+HOST_CC := $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc
+HOST_CXX := $(HOST_SDK_TOOLCHAIN_PREFIX)-g++
+HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)-ar
+endif # $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc exists
+endif # TARGET_PRODUCT == sdk
+
# We build everything in 32-bit, because some host tools are
# 32-bit-only anyway (emulator, acc), and because it gives us
# more consistency between the host tools and the target.
diff --git a/core/definitions.mk b/core/definitions.mk
index 6232668..11cea3f 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1001,7 +1001,7 @@
# it to be overriden en-masse see combo/linux-arm.make for an example.
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
define transform-host-o-to-shared-lib-inner
-$(HOST_CXX) \
+$(PRIVATE_CXX) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
-Wl,-rpath,\$$ORIGIN/../lib \
-shared -Wl,-soname,$(notdir $@) \
@@ -1051,7 +1051,7 @@
# it to be overriden en-masse see combo/linux-arm.make for an example.
ifneq ($(TARGET_CUSTOM_LD_COMMAND),true)
define transform-o-to-shared-lib-inner
-$(TARGET_CXX) \
+$(PRIVATE_CXX) \
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
-Wl,-rpath,\$$ORIGIN/../lib \
@@ -1113,7 +1113,7 @@
ifneq ($(TARGET_CUSTOM_LD_COMMAND),true)
define transform-o-to-executable-inner
-$(TARGET_CXX) \
+$(PRIVATE_CXX) \
$(TARGET_GLOBAL_LDFLAGS) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
$(TARGET_GLOBAL_LD_DIRS) \
@@ -1164,7 +1164,7 @@
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
define transform-host-o-to-executable-inner
-$(HOST_CXX) \
+$(PRIVATE_CXX) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
-Wl,-rpath,\$$ORIGIN/../lib \
$(HOST_GLOBAL_LD_DIRS) \
diff --git a/core/main.mk b/core/main.mk
index 81bebc8..fc152e2 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -446,6 +446,8 @@
subdirs := \
bionic \
system/core \
+ system/extras/ext4_utils \
+ system/extras/su \
build/libs \
build/target \
build/tools/acp \
@@ -761,9 +763,10 @@
ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET)
sdk: $(ALL_SDK_TARGETS)
$(call dist-for-goals,sdk, \
- $(ALL_SDK_TARGETS) \
- $(SYMBOLS_ZIP) \
- )
+ $(ALL_SDK_TARGETS) \
+ $(SYMBOLS_ZIP) \
+ $(INSTALLED_BUILD_PROP_TARGET) \
+)
.PHONY: findbugs
findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET)
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index e27c43c..8c36ef6 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -69,13 +69,14 @@
# $1 : The output file where the description should be written (without the '.xml' extension)
# $2 : The AndroidManifest.xml corresponding to the test package
# $3 : The name of the TestSuite generator class to use
-# $4 : The Android.mk corresponding to the test package (required for host-side tests only)
+# $4 : The directory containing vogar expectations files
+# $5 : The Android.mk corresponding to the test package (required for host-side tests only)
define generate-core-test-description
@echo "Generate core-test description ("$(notdir $(1))")"
$(hide) java $(PRIVATE_JAVAOPTS) \
-classpath $(PRIVATE_CLASSPATH) \
$(PRIVATE_PARAMS) CollectAllTests $(1) \
- $(2) $(3) $(4)
+ $(2) $(3) $(4) $(5)
endef
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
@@ -99,22 +100,22 @@
$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(RUNNER_INTERMEDIATES)/javalib.jar $(SUPPORT_INTERMEDIATES)/javalib.jar $(DOM_INTERMEDIATES)/javalib.jar $(XML_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.dom,\
cts/tests/core/dom/AndroidManifest.xml,\
- tests.dom.AllTests)
+ tests.dom.AllTests, libcore/expectations)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.io,\
cts/tests/core/luni-io/AndroidManifest.xml,\
- tests.luni.AllTestsIo)
+ tests.luni.AllTestsIo, libcore/expectations)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.lang,\
cts/tests/core/luni-lang/AndroidManifest.xml,\
- tests.luni.AllTestsLang)
+ tests.luni.AllTestsLang, libcore/expectations)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.net,\
cts/tests/core/luni-net/AndroidManifest.xml,\
- tests.luni.AllTestsNet)
+ tests.luni.AllTestsNet, libcore/expectations)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.util,\
cts/tests/core/luni-util/AndroidManifest.xml,\
- tests.luni.AllTestsUtil)
+ tests.luni.AllTestsUtil, libcore/expectations)
$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.xml,\
cts/tests/core/xml/AndroidManifest.xml,\
- tests.xml.AllTests)
+ tests.xml.AllTests, libcore/expectations)
$(hide) touch $@
@@ -139,7 +140,7 @@
$(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(RUNNER_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(TESTS_INTERMEDIATES)/javalib.jar $(HOSTTESTLIB_JAR) $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
$(call generate-core-test-description,$(CORE_VM_TEST_DESC),\
cts/tests/vm-tests/AndroidManifest.xml,\
- dot.junit.AllJunitHostTests, cts/tools/vm-tests/Android.mk)
+ dot.junit.AllJunitHostTests, libcore/expectations, cts/tools/vm-tests/Android.mk)
$(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar
# Move app security host-side tests to the repository
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index 62adeee..9133312 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -27,10 +27,23 @@
sdk_addon_deps :=
files_to_copy :=
+define stub-addon-jar-file
+$(subst .jar,_stub-addon.jar,$(1))
+endef
+
+define stub-addon-jar
+$(call stub-addon-jar-file,$(1)): $(1) | mkstubs
+ $(info Stubbing addon jar using $(PRODUCT_SDK_ADDON_STUB_DEFS))
+ $(hide) java -jar $(call module-installed-files,mkstubs) $(if $(hide),,--v) \
+ "$$<" "$$@" @$(PRODUCT_SDK_ADDON_STUB_DEFS)
+endef
+
# Files that are built and then copied into the sdk-addon
ifneq ($(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_MODULES)),)
$(foreach cf,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_MODULES), \
$(eval _src := $(call module-stubs-files,$(call word-colon,1,$(cf)))) \
+ $(eval $(call stub-addon-jar,$(_src))) \
+ $(eval _src := $(call stub-addon-jar-file,$(_src))) \
$(if $(_src),,$(eval $(error Unknown or unlinkable module: $(call word-colon,1,$(cf)). Requested by $(INTERNAL_PRODUCT)))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
$(eval files_to_copy += $(_src):$(_dest)) \
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 93199c2..be4826f 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 2.3
+ PLATFORM_VERSION := 2.3.4
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -53,7 +53,7 @@
# intermediate builds). During development, this number remains at the
# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
# the code-name of the new development work.
- PLATFORM_SDK_VERSION := 9
+ PLATFORM_SDK_VERSION := 10
endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
@@ -96,4 +96,3 @@
# 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
-
diff --git a/target/product/languages_full.mk b/target/product/languages_full.mk
index 6c49c79..236dfa2 100644
--- a/target/product/languages_full.mk
+++ b/target/product/languages_full.mk
@@ -15,9 +15,13 @@
#
# This is a build configuration that just contains a list of languages.
-# It helps in situations where laugnages must come first in the list,
+# It helps in situations where languages must come first in the list,
# mostly because screen densities interfere with the list of locales and
# the system misbehaves when a density is the first locale.
-# Those are all the locales that have translations.
-PRODUCT_LOCALES := en_US en_GB fr_FR it_IT es_ES es_US de_DE nl_NL cs_CZ pl_PL zh_TW zh_CN ru_RU ko_KR nb_NO pt_PT pt_BR da_DK el_GR sv_SE tr_TR ja_JP
+# Those are all the locales that have translations and are displayable
+# by TextView in this branch.
+PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH
+
+# Not currently usable:
+# ar, fa, th
diff --git a/tools/droiddoc/src/DocFile.java b/tools/droiddoc/src/DocFile.java
index cc7a8cf..180fdcd 100644
--- a/tools/droiddoc/src/DocFile.java
+++ b/tools/droiddoc/src/DocFile.java
@@ -129,7 +129,7 @@
} else {
if (outfile.indexOf("sdk/") != -1) {
hdf.setValue("sdk", "true");
- if ((outfile.indexOf("index.html") != -1) || (outfile.indexOf("features.html") != -1)) {
+ if ((outfile.indexOf("index.html") != -1) && (outfile.indexOf("preview/") == -1)) {
ClearPage.write(hdf, "sdkpage.cs", outfile);
} else {
ClearPage.write(hdf, "docpage.cs", outfile);
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 3216376..6c35b81 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -29,7 +29,16 @@
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?>Download the SDK<?cs /if ?>
</a> ...</p>
+
<?cs else ?>
+<?cs # else, if NOT redirect ...
+#
+#
+# The following is for SDK/NDK pages
+#
+#
+?>
+
<div class="g-unit" id="doc-content" >
<div id="jd-header" class="guide-header" >
<span class="crumb"> </span>
@@ -37,13 +46,6 @@
</div>
<div id="jd-content">
- <?cs
- if:ndk ?><?cs
- else ?><?cs
- if:android.whichdoc == "online" ?><p><em><?cs
- var:sdk.date ?></em></p><?cs
- /if ?><?cs
- /if ?>
<?cs if:sdk.not_latest_version ?>
<div class="special">
@@ -52,12 +54,23 @@
</div>
<?cs /if ?>
-<?cs if:android.whichdoc != "online" && !android.preview ?>
-<!-- <p>The sections below provide an overview of how to install the SDK package. </p> -->
-
-<?cs else ?>
- <?cs if:ndk ?>
+<?cs if:ndk ?>
+<?cs #
+#
+#
+#
+#
+#
+#
+# the following is for the NDK
+#
+# (nested in if/else redirect)
+#
+#
+#
+#
+?>
<p>The Android NDK is a companion tool to the Android SDK that lets you build
performance-critical portions of your apps in native code. It provides headers and
@@ -113,54 +126,23 @@
</tr>
</table>
- <?cs else ?><?cs if:android.whichdoc == "online" ?>
-
- <?cs if:sdk.preview ?>
- <p>Welcome developers! The next release of the Android platform will be
- Android 1.6 and we are pleased to announce the availability of an early look
- SDK to give you a head-start on developing applications for it. </p>
-
- <p>The Android <?cs var:sdk.preview.version ?> platform includes a variety of
- improvements and new features for users and developers. Additionally, the SDK
- itself introduces several new capabilities that enable you to develop
- applications more efficiently. See the <a href="features.html">Android <?cs
- var:sdk.preview.version ?> Platform Highlights</a> document for a list of
- highlights.</p>
-<?cs /if ?>
-<?cs # end if NDK ... the following is for the SDK ?>
-
-<?cs #
- <div class="toggle-content special">
- <p>The Android SDK has changed! If you've worked with the Android SDK before,
- you will notice several important differences:</p>
-
- <div class="toggle-content-toggleme" style="display:none">
- <ul style="padding-bottom:.0;">
- <li style="margin-top:.5em">The SDK downloadable package includes <em>only</em>
- the latest version of the Android SDK Tools.</li>
- <li>Once you've installed the SDK, you now use the Android SDK and AVD Manager
- to download all of the SDK components that you need, such as Android platforms,
- SDK add-ons, tools, and documentation. </li>
- <li>The new approach is modular — you can install only the components you
- need and update any or all components without affecting other parts of your
- development environment.</li>
- <li>In short, once you've installed the new SDK, you will not need to download
- an SDK package again. Instead, you will use the Android SDK and AVD Manager to
- keep your development environment up-to-date. </li>
- </ul>
- <p style="margin-top:0">If you are currently using the Android 1.6 SDK, you
- do not need to install the new SDK, because your existing SDK already
- includes the Android SDK and AVD Manager tool. To develop against Android
- 2.0.1, for example, you can just download the Android 2.0.1 platform (and
- updated SDK Tools) into your existing SDK. Refer to <a
- href="adding-components.html">Adding SDK Components</a>.</p>
- </div>
-
- <a href='#' class='toggle-content-button show' onclick="toggleContent(this,true);return false;">
- <span>show more</span><span style='display:none'>show less</span>
- </a>
- </div>
+ <?cs else ?>
+<?cs # end if NDK ...
+#
+#
+#
+#
+#
+#
+# the following is for the SDK
+#
+# (nested in if/else redirect and if/else NDK)
+#
+#
+#
+#
?>
+ <?cs if:android.whichdoc == "online" ?>
<p>Welcome Developers! If you are new to the Android SDK, please read the steps below, for an
overview of how to set up the SDK. </p>
@@ -213,16 +195,6 @@
<td><?cs var:sdk.linux_bytes ?> bytes</td>
<td><?cs var:sdk.linux_checksum ?></td>
</tr>
- <?cs if:adt.zip_download ?>
- <tr class="alt-color">
- <td>ADT Plugin for Eclipse <?cs var:adt.zip_version ?></td>
- <td>
- <a href="http://dl.google.com/android/<?cs var:adt.zip_download ?>"><?cs var:adt.zip_download ?></a>
- </td>
- <td><?cs var:adt.zip_bytes ?> bytes</td>
- <td><?cs var:adt.zip_checksum ?></td>
- </tr>
- <?cs /if ?>
</table>
@@ -237,36 +209,21 @@
$("#next-steps").show();
}
</script>
+ <?cs /if ?> <?cs # end if online ?>
- <?cs /if ?>
- <?cs /if ?>
-<?cs /if ?>
+<?cs /if ?> <?cs # end if/else NDK ?>
-<?cs if:android.whichdoc != "online" && sdk.preview ?>
- <p>Welcome developers! The next release of the Android platform will be
-Android <?cs var:sdk.preview.version ?> and we are pleased to announce the
-availability of an early look SDK to give you a head-start on developing
-applications for it. </p>
+<?cs /if ?> <?cs # end if/else redirect ?>
- <p>The Android <?cs var:sdk.preview.version ?> platform includes a variety of
-improvements and new features for users and developers. Additionally, the SDK
-itself introduces several new capabilities that enable you to develop
-applications more efficiently. See the <a
-href="http://developer.android.com/sdk/preview/features.html">Android
-<?cs var:sdk.preview.version ?> Highlights</a> document for a list of
-highlights.</p>
-<?cs /if ?>
+<?cs call:tag_list(root.descr) ?>
- <?cs call:tag_list(root.descr) ?>
-
-<?cs /if ?>
</div><!-- end jd-content -->
<?cs if:!sdk.redirect ?>
- <?cs include:"footer.cs" ?>
+<?cs include:"footer.cs" ?>
<?cs /if ?>
-</div><!-- end doc-content -->
+</div><!-- end g-unit -->
<?cs include:"trailer.cs" ?>
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates/assets/android-developer-docs.css
index a574237..1672c93 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates/assets/android-developer-docs.css
@@ -726,34 +726,36 @@
padding:0;
}
-p.note, p.caution, p.warning {
+p.note, div.note,
+p.caution, div.caution,
+p.warning, div.warning {
margin: 1em;
padding: 0 0 0 .5em;
border-left: 4px solid;
}
-p.special-note {
+p.special-note,
+div.special-note {
background-color:#EBF3DB;
padding:10px 20px;
margin:0 0 1em;
}
-p.note {
+p.note,
+div.note {
border-color: #99aacc;
}
-p.warning {
+p.warning,
+div.warning {
border-color: #aa0033;
}
-p.caution {
+p.caution,
+div.caution {
border-color: #ffcf00;
}
-p.warning b, p.warning strong {
- font-weight: bold;
-}
-
li p.note, li p.warning {
margin: .5em 0 0 0;
padding: .2em .5em .2em .9em;
diff --git a/tools/droiddoc/templates/assets/android-developer-reference.js b/tools/droiddoc/templates/assets/android-developer-reference.js
index daddde0..31a702b 100644
--- a/tools/droiddoc/templates/assets/android-developer-reference.js
+++ b/tools/droiddoc/templates/assets/android-developer-reference.js
@@ -56,7 +56,7 @@
if (userApiLevelEnabled == 0) {
toggleVisisbleApis(selectedLevel, "body");
} else {
- selectedLevel = $("#apiLevelSelector option:selected").val();
+ selectedLevel = parseInt($("#apiLevelSelector option:selected").val());
toggleVisisbleApis(selectedLevel, "body");
var date = new Date();
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index ac1566b..52e7aed 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -138,10 +138,6 @@
makeint("boot_size")
d["fstab"] = LoadRecoveryFSTab(zip)
- if not d["fstab"]:
- if "fs_type" not in d: d["fs_type"] = "yaffs2"
- if "partition_type" not in d: d["partition_type"] = "MTD"
-
return d
def LoadRecoveryFSTab(zip):
@@ -151,9 +147,7 @@
try:
data = zip.read("RECOVERY/RAMDISK/etc/recovery.fstab")
except KeyError:
- # older target-files that doesn't have a recovery.fstab; fall back
- # to the fs_type and partition_type keys.
- return
+ raise ValueError("Could not find RECOVERY/RAMDISK/etc/recovery.fstab")
d = {}
for line in data.split("\n"):
@@ -367,9 +361,6 @@
p = info_dict["fstab"][mount_point]
fs_type = p.fs_type
limit = info_dict.get(p.device + "_size", None)
- else:
- fs_type = info_dict.get("fs_type", None)
- limit = info_dict.get(target + "_size", None)
if not fs_type or not limit: return
if fs_type == "yaffs2":
@@ -794,9 +785,4 @@
if fstab:
return PARTITION_TYPES[fstab[mount_point].fs_type], fstab[mount_point].device
else:
- devices = {"/boot": "boot",
- "/recovery": "recovery",
- "/radio": "radio",
- "/data": "userdata",
- "/cache": "cache"}
- return info["partition_type"], info.get("partition_path", "") + devices[mount_point]
+ return None
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 756d673..a7c8e32 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -140,13 +140,6 @@
(p.fs_type, common.PARTITION_TYPES[p.fs_type],
p.device, p.mount_point))
self.mounts.add(p.mount_point)
- else:
- what = mount_point.lstrip("/")
- what = self.info.get("partition_path", "") + what
- self.script.append('mount("%s", "%s", "%s", "%s");' %
- (self.info["fs_type"], self.info["partition_type"],
- what, mount_point))
- self.mounts.add(mount_point)
def UnpackPackageDir(self, src, dst):
"""Unpack a given directory from the OTA package into the given
@@ -173,12 +166,6 @@
p = fstab[partition]
self.script.append('format("%s", "%s", "%s");' %
(p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device))
- else:
- # older target-files without per-partition types
- partition = self.info.get("partition_path", "") + partition
- self.script.append('format("%s", "%s", "%s");' %
- (self.info["fs_type"], self.info["partition_type"],
- partition))
def DeleteFiles(self, file_list):
"""Delete all files in file_list."""
@@ -231,23 +218,6 @@
'package_extract_file("%(fn)s", "%(device)s");' % args)
else:
raise ValueError("don't know how to write \"%s\" partitions" % (p.fs_type,))
- else:
- # backward compatibility with older target-files that lack recovery.fstab
- if self.info["partition_type"] == "MTD":
- self.script.append(
- ('assert(package_extract_file("%(fn)s", "/tmp/%(partition)s.img"),\n'
- ' write_raw_image("/tmp/%(partition)s.img", "%(partition)s"),\n'
- ' delete("/tmp/%(partition)s.img"));')
- % {'partition': partition, 'fn': fn})
- elif self.info["partition_type"] == "EMMC":
- self.script.append(
- ('package_extract_file("%(fn)s", "%(dir)s%(partition)s");')
- % {'partition': partition, 'fn': fn,
- 'dir': self.info.get("partition_path", ""),
- })
- else:
- raise ValueError("don't know how to write \"%s\" partitions" %
- (self.info["partition_type"],))
def SetPermissions(self, fn, uid, gid, mode):
"""Set file ownership and permissions."""