merge from donut

This commit is contained in:
Jean-Baptiste Queru 2009-09-03 14:12:45 -07:00
commit dc785843c7
36 changed files with 586 additions and 211 deletions

View File

@ -299,7 +299,7 @@ else # TARGET_BOOTIMAGE_USE_EXT2 != true
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
$(call pretty,"Target boot image: $@")
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@
$(hide) $(call assert-max-file-size,$@,$(BOARD_BOOTIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$@,$(BOARD_BOOTIMAGE_MAX_SIZE),raw)
endif # TARGET_BOOTIMAGE_USE_EXT2
else # TARGET_NO_KERNEL
@ -577,7 +577,7 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@
@echo ----- Made recovery image -------- $@
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$@,$(BOARD_RECOVERYIMAGE_MAX_SIZE),raw)
else
INSTALLED_RECOVERYIMAGE_TARGET :=
@ -662,7 +662,7 @@ endif
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) | $(ACP)
@echo "Install system fs image: $@"
$(copy-file-to-target)
$(hide) $(call assert-max-file-size,$@ $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$@ $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_MAX_SIZE),yaffs)
systemimage: $(INSTALLED_SYSTEMIMAGE)
@ -671,7 +671,7 @@ systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \
| $(INTERNAL_MKUSERFS)
@echo "make $@: ignoring dependencies"
$(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE))
$(hide) $(call assert-max-file-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_MAX_SIZE),yaffs)
#######
## system tarball
@ -708,7 +708,7 @@ define build-userdataimage-target
$(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
@mkdir -p $(TARGET_OUT_DATA)
$(call build-userimage-ext2-target,$(TARGET_OUT_DATA),$(INSTALLED_USERDATAIMAGE_TARGET),userdata,)
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE),yaffs)
endef
else # TARGET_USERIMAGES_USE_EXT2 != true
@ -718,7 +718,7 @@ define build-userdataimage-target
$(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
@mkdir -p $(TARGET_OUT_DATA)
$(hide) $(MKYAFFS2) -f $(TARGET_OUT_DATA) $(INSTALLED_USERDATAIMAGE_TARGET)
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE))
$(hide) $(call assert-max-file-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_MAX_SIZE),yaffs)
endef
endif # TARGET_USERIMAGES_USE_EXT2

View File

@ -47,6 +47,7 @@ LOCAL_PREBUILT_LIBS:=
LOCAL_PREBUILT_EXECUTABLES:=
LOCAL_PREBUILT_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STRIP_COMMENTS:=
LOCAL_INTERMEDIATE_SOURCES:=
LOCAL_JAVA_LIBRARIES:=
LOCAL_NO_STANDARD_LIBRARIES:=

View File

@ -1469,6 +1469,19 @@ define copy-file-to-target-with-cp
$(hide) cp -fp $< $@
endef
# The same as copy-file-to-target, but use the zipalign tool to do so.
define copy-file-to-target-with-zipalign
@mkdir -p $(dir $@)
$(hide) $(ZIPALIGN) -f 4 $< $@
endef
# The same as copy-file-to-target, but strip out "# comment"-style
# comments (for config files and such).
define copy-file-to-target-strip-comments
@mkdir -p $(dir $@)
$(hide) sed -e 's/#.*$$//' -e 's/[ \t]*$$//' -e '/^$$/d' < $< > $@
endef
# The same as copy-file-to-target, but don't preserve
# the old modification time.
define copy-file-to-new-target
@ -1489,6 +1502,18 @@ define transform-prebuilt-to-target
$(copy-file-to-target)
endef
# Copy a prebuilt file to a target location, using zipalign on it.
define transform-prebuilt-to-target-with-zipalign
@echo "$(if $(PRIVATE_IS_HOST_MODULE),host,target) Prebuilt APK: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target-with-zipalign)
endef
# Copy a prebuilt file to a target location, stripping "# comment" comments.
define transform-prebuilt-to-target-strip-comments
@echo "$(if $(PRIVATE_IS_HOST_MODULE),host,target) Prebuilt: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target-strip-comments)
endef
###########################################################
## On some platforms (MacOS), after copying a static
@ -1547,6 +1572,7 @@ endef
# $(1): The file(s) to check (often $@)
# $(2): The maximum total image size, in decimal bytes
# $(3): the type of filesystem "yaffs" or "raw"
#
# If $(2) is empty, evaluates to "true"
#
@ -1560,9 +1586,15 @@ $(if $(2), \
printname=$$(echo -n "$(1)" | tr " " +); \
echo "$$printname total size is $$total"; \
img_blocksize=$(call image-size-from-data-size,$(BOARD_FLASH_BLOCK_SIZE)); \
if [ "$(3)" == "yaffs" ]; then \
reservedblocks=5; \
else \
reservedblocks=0; \
fi; \
twoblocks=$$((img_blocksize * 2)); \
onepct=$$((((($(2) / 100) - 1) / img_blocksize + 1) * img_blocksize)); \
reserve=$$((twoblocks > onepct ? twoblocks : onepct)); \
reserve=$$(((twoblocks > onepct ? twoblocks : onepct) + \
reservedblocks * img_blocksize)); \
maxsize=$$(($(2) - reserve)); \
if [ "$$total" -gt "$$maxsize" ]; then \
echo "error: $$printname too large ($$total > [$(2) - $$reserve])"; \

View File

@ -339,6 +339,7 @@ ifeq ($(SDK_ONLY),true)
subdirs := \
prebuilt \
build/libs/host \
build/tools/zipalign \
dalvik/dexdump \
dalvik/libdex \
dalvik/tools/dmtracedump \
@ -366,7 +367,6 @@ ifneq (,$(shell which javac 2>/dev/null))
$(warning sdk-only: javac available.)
subdirs += \
build/tools/signapk \
build/tools/zipalign \
dalvik/dx \
dalvik/libcore \
development/apps \

View File

@ -3,7 +3,7 @@
##
## Additional inputs from base_rules.make:
## None.
##
##
###########################################################
ifneq ($(LOCAL_PREBUILT_LIBS),)
@ -26,8 +26,35 @@ else
prebuilt_module_is_a_library :=
endif
# Ensure that prebuilt .apks have been aligned.
ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ZIPALIGN)
$(transform-prebuilt-to-target-with-zipalign)
else
ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
$(transform-prebuilt-to-target-strip-comments)
else
$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP)
$(transform-prebuilt-to-target)
endif
endif
ifeq ($(LOCAL_CERTIFICATE),)
# can't re-sign this package, so predexopt is not available.
else
# If this is not an absolute certificate, assign it to a generic one.
ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
LOCAL_CERTIFICATE := $(SRC_TARGET_DIR)/product/security/$(LOCAL_CERTIFICATE)
endif
PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
endif
ifneq ($(prebuilt_module_is_a_library),)
ifneq ($(LOCAL_IS_HOST_MODULE),)
$(transform-host-ranlib-copy-hack)

View File

@ -26,6 +26,7 @@ endif
CTS_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts.jar
junit_host_jar := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar
HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar
CTS_CORE_CASE_LIST := android.core.tests.annotation \
android.core.tests.archive \
@ -49,12 +50,25 @@ CTS_CORE_CASE_LIST := android.core.tests.annotation \
android.core.tests.xnet \
android.core.tests.runner
CTS_SECURITY_APPS_LIST := \
CtsAppAccessData \
CtsAppWithData \
CtsInstrumentationAppDiffCert \
CtsPermissionDeclareApp \
CtsSharedUidInstall \
CtsSharedUidInstallDiffCert \
CtsSimpleAppInstall \
CtsSimpleAppInstallDiffCert \
CtsTargetInstrumentationApp \
CtsUsePermissionDiffCert
CTS_CASE_LIST := \
DeviceInfoCollector \
CtsTestStubs \
CtsAppTestCases \
CtsContentTestCases \
CtsDatabaseTestCases \
CtsGestureTestCases \
CtsGraphicsTestCases \
CtsHardwareTestCases \
CtsLocationTestCases \
@ -78,13 +92,14 @@ CTS_CASE_LIST := \
CtsPerformance5TestCases \
ApiDemos \
ApiDemosReferenceTest \
$(CTS_CORE_CASE_LIST)
$(CTS_CORE_CASE_LIST) \
$(CTS_SECURITY_APPS_LIST)
DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans
$(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar)
$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(ACP)
$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(ACP)
# Make necessary directory for CTS
@rm -rf $(PRIVATE_CTS_DIR)
@mkdir -p $(TMP_DIR)
@ -97,6 +112,8 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(ACP)
$(hide) $(ACP) -fp $(CTS_EXECUTABLE_PATH) $(PRIVATE_DIR)/tools
# Copy junit jar
$(hide) $(ACP) -fp $(PRIVATE_JUNIT_HOST_JAR) $(PRIVATE_DIR)/tools
# Copy hosttestlib jar
$(hide) $(ACP) -fp $(HOSTTESTLIB_JAR) $(PRIVATE_DIR)/tools
# Change mode of the executables
$(hide) chmod ug+rwX $(PRIVATE_DIR)/tools/$(notdir $(CTS_EXECUTABLE_PATH))
$(foreach apk,$(CTS_CASE_LIST), \
@ -106,13 +123,17 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(ACP)
$(hide) touch $@
# Generate the test descriptions for the core-tests
# Parameters:
# $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)
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)
$(2) $(3) $(4)
endef
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
@ -214,10 +235,17 @@ $(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INT
dot.junit.AllJunitHostTests, 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
APP_SECURITY_LIB := $(cts_dir)/$(cts_name)/repository/testcases/CtsAppSecurityTests.jar
$(APP_SECURITY_LIB): $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(cts_dir)/all_cts_files_stamp $(ACP)
$(ACP) -fv $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(APP_SECURITY_LIB)
# Generate the default test plan for User.
$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/genDefaultTestPlan.sh $(CORE_VM_TEST_DESC)
$(hide) bash $(cts_tools_src_dir)/utils/genDefaultTestPlan.sh cts/tests/tests/ \
$(PRIVATE_DIR) $(TMP_DIR) $(TOP) $(TARGET_COMMON_OUT_ROOT) $(OUT_DIR)
# Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
$(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
$(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
# Package CTS and clean up.
#

View File

@ -41,7 +41,7 @@ ifeq "" "$(PLATFORM_VERSION)"
# 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 := Donut
PLATFORM_VERSION := 1.6
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@ -53,13 +53,13 @@ ifeq "" "$(PLATFORM_SDK_VERSION)"
# 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 := 3
PLATFORM_SDK_VERSION := 4
endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# If the build is not a final release build, then this is the current
# development code-name. If this is a final release build, it is simply "REL".
PLATFORM_VERSION_CODENAME := Donut
PLATFORM_VERSION_CODENAME := REL
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"

View File

@ -24,6 +24,5 @@ PRODUCT_PACKAGES := \
VpnServices \
UserDictionaryProvider \
PackageInstaller \
WebSearchProvider \
Bugreport

View File

@ -12,7 +12,6 @@ PRODUCT_PACKAGES := \
MediaProvider \
SettingsProvider \
PackageInstaller \
WebSearchProvider \
Bugreport \
Launcher \
Settings \

View File

@ -863,6 +863,7 @@ public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Sco
data.setValue(base + ".kind", this.kind());
TagInfo.makeHDF(data, base + ".shortDescr", this.firstSentenceTags());
TagInfo.makeHDF(data, base + ".deprecated", deprecatedTags());
data.setValue(base + ".since", getSince());
}
/**

View File

@ -56,6 +56,7 @@ public class DroidDoc
public static ArrayList<String[]> mHDFData = new ArrayList<String[]>();
public static Map<Character,String> escapeChars = new HashMap<Character,String>();
public static String title = "";
public static SinceTagger sinceTagger = new SinceTagger();
public static boolean checkLevel(int level)
{
@ -97,7 +98,6 @@ public class DroidDoc
String apiFile = null;
String debugStubsFile = "";
HashSet<String> stubPackages = null;
SinceTagger sinceTagger = new SinceTagger();
root = r;
@ -518,6 +518,7 @@ public class DroidDoc
i++;
}
sinceTagger.writeVersionNames(data);
return data;
}

View File

@ -25,7 +25,7 @@ public class NavTree {
for (PackageInfo pkg: DroidDoc.choosePackages()) {
children.add(makePackageNode(pkg));
}
Node node = new Node("Reference", dir + "packages.html", children);
Node node = new Node("Reference", dir + "packages.html", children, null);
StringBuilder buf = new StringBuilder();
if (false) {
@ -46,7 +46,7 @@ public class NavTree {
private static Node makePackageNode(PackageInfo pkg) {
ArrayList<Node> children = new ArrayList();
children.add(new Node("Description", pkg.fullDescriptionHtmlPage(), null));
children.add(new Node("Description", pkg.fullDescriptionHtmlPage(), null, null));
addClassNodes(children, "Interfaces", pkg.interfaces());
addClassNodes(children, "Classes", pkg.ordinaryClasses());
@ -54,7 +54,7 @@ public class NavTree {
addClassNodes(children, "Exceptions", pkg.exceptions());
addClassNodes(children, "Errors", pkg.errors());
return new Node(pkg.name(), pkg.htmlPage(), children);
return new Node(pkg.name(), pkg.htmlPage(), children, pkg.getSince());
}
private static void addClassNodes(ArrayList<Node> parent, String label, ClassInfo[] classes) {
@ -62,12 +62,12 @@ public class NavTree {
for (ClassInfo cl: classes) {
if (cl.checkLevel()) {
children.add(new Node(cl.name(), cl.htmlPage(), null));
children.add(new Node(cl.name(), cl.htmlPage(), null, cl.getSince()));
}
}
if (children.size() > 0) {
parent.add(new Node(label, null, children));
parent.add(new Node(label, null, children, null));
}
}
@ -75,11 +75,13 @@ public class NavTree {
private String mLabel;
private String mLink;
ArrayList<Node> mChildren;
private String mSince;
Node(String label, String link, ArrayList<Node> children) {
Node(String label, String link, ArrayList<Node> children, String since) {
mLabel = label;
mLink = link;
mChildren = children;
mSince = since;
}
static void renderString(StringBuilder buf, String s) {
@ -136,6 +138,8 @@ public class NavTree {
renderString(buf, mLink);
buf.append(", ");
renderChildren(buf);
buf.append(", ");
renderString(buf, mSince);
buf.append(" ]");
}
}

View File

@ -123,6 +123,7 @@ public class PackageInfo extends DocInfo implements ContainerInfo
ClassInfo.makeLinkListHDF(data, base + ".enums", enums());
ClassInfo.makeLinkListHDF(data, base + ".exceptions", exceptions());
ClassInfo.makeLinkListHDF(data, base + ".errors", errors());
data.setValue(base + ".since", getSince());
}
public ClassInfo[] interfaces()

View File

@ -4,6 +4,8 @@ import com.android.apicheck.*;
import java.util.*;
import org.clearsilver.HDF;
/**
* Applies version information to the DroidDoc class model from apicheck XML
* files. Sample usage:
@ -45,6 +47,17 @@ public class SinceTagger {
}
}
/**
* Writes an index of the version names to {@code data}.
*/
public void writeVersionNames(HDF data) {
int index = 1;
for (String version : xmlToName.values()) {
data.setValue("since." + index + ".name", version);
index++;
}
}
/**
* Applies the version information to {@code classDocs} where not already
* present.

View File

@ -1,24 +1,27 @@
<?cs # This file defines custom definitions for the masthead (logo, searchbox, tabs, etc) and
left nav (toc) that gets placed on all pages. ?>
left nav (toc) that gets placed on all pages, for the open source site?>
<?cs
def:custom_masthead() ?>
<div id="header">
<div id="headerLeft">
<a href="<?cs var:toroot ?>guide/index.html" tabindex="-1"><img
<a href="http://source.android.com" tabindex="-1"><img
src="<?cs var:toroot ?>assets/images/open_source.png" alt="Open Source Project: Platform Development Kit" /></a>
<ul class="<?cs
if:reference ?> <?cs
elif:guide ?> <?cs
elif:sdk ?> <?cs
elif:home ?> <?cs
elif:community ?> <?cs
elif:publish ?> <?cs
elif:about ?> <?cs /if ?>">
<!--<li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html"
onClick="return loadLast('guide)'"><span>Dev Guide</span></a></li>
<li id="opensource-link"><a href="http://source.android.com/"
onClick="return loadLast('open')"><span>Open Source</span></a></li>-->
if:releases ?> releases<?cs
elif:guide ?> guide<?cs
elif:licenses ?>licenses <?cs
elif:home ?>home <?cs
elif:community ?>community <?cs /if ?>">
<li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
<li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html"
onClick="return loadLast('guide)'"><span>Guide</span></a></li>
<li id="releases-ink"><a href="<?cs var:toroot ?>releases/index.html"
onClick="return loadLast('releases)'"><span>Releases</span></a></li>
<li id="licenses-link"><a href="<?cs var:toroot ?>licenses/index.html"
onClick="return loadLast('licenses)'"><span>Licenses</span></a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
onClick="return loadLast('community)'"><span>Community</span></a></li>
</ul>
</div>
<div id="headerRight">
@ -49,9 +52,45 @@ def:guide_nav() ?>
</script>
<?cs /def ?>
<?cs
def:licenses_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../development/pdk/docs/licenses/licenses_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
addLoadEvent(function() {
scrollIntoView("devdoc-nav");
});
</script>
<?cs /def ?>
<?cs
def:releases_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
<div id="devdoc-nav"><?cs
include:"../../../../development/pdk/docs/releases/releases_toc.cs" ?>
</div>
</div> <!-- end side-nav -->
<script>
addLoadEvent(function() {
scrollIntoView("devdoc-nav");
});
</script>
<?cs /def ?>
<?cs
def:custom_left_nav() ?><?cs
call:guide_nav() ?><?cs
def:custom_left_nav() ?><?cs
if:doc.type == "guide" ?><?cs
call:guide_nav() ?><?cs
elif:doc.type == "licenses" ?><?cs
call:licenses_nav() ?><?cs
elif:doc.type == "releases" ?><?cs
call:releases_nav() ?><?cs
/if ?><?cs
/def ?>
<?cs # appears at the bottom of every page ?><?cs

View File

@ -47,34 +47,51 @@ def:custom_masthead() ?>
<div id="headerRight">
<div id="headerLinks">
<?cs if:template.showLanguageMenu ?>
<img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" />
<span id="language">
<img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="Language:" />
<span id="language">
<select name="language" onChange="changeLangPref(this.value, true)">
<option value="en">English&nbsp;&nbsp;&nbsp;</option>
<option value="ja"></option>
<?cs #
<option value="de">Deutsch</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="it">Italiano</option>
<option value="zh-CN"> ()</option>
<option value="zh-TW"> ()</option>
?>
<option value="en">English&nbsp;&nbsp;&nbsp;</option>
<option value="ja"></option>
<?cs #
<option value="de">Deutsch</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="it">Italiano</option>
<option value="zh-CN"> ()</option>
<option value="zh-TW"> ()</option>
?>
</select>
<script type="text/javascript">
<!--
loadLangPref();
//-->
</script>
</span>
</span>
<?cs /if ?>
<a href="http://www.android.com">Android.com</a>
</div><?cs
call:default_search_box() ?>
call:default_search_box() ?><?cs
if:reference ?>
<div id="api-level-toggle">
<label for="apiLevelControl"><a href="<?cs var:toroot ?>guide/appendix/api-levels.html">Filter by API Level</a>: </label>
<select id="apiLevelControl">
<!-- option elements added by buildApiLevelToggle() -->
</select>
</div>
<script>
var SINCE_DATA = [ <?cs
each:since = since ?>'<?cs
var:since.name ?>'<?cs
if:!last(since) ?>, <?cs /if ?><?cs
/each
?> ];
buildApiLevelToggle();
</script><?cs
/if ?>
</div><!-- headerRight -->
<script type="text/javascript">
<!--
changeTabLang(getLangPref());
changeTabLang(getLangPref());
//-->
</script>
</div><!-- header --><?cs

View File

@ -58,8 +58,16 @@
<?cs /if ?>
</a></li>
<li id="videos-link"><a href="<?cs var:toroot ?>videos/index.html" onClick="return loadLast('videos')">
<?cs if:!sdk.redirect ?>
<span class="en">Videos</span>
<span class="ja"></span>
<span class="de"></span>
<span class="es"></span>
<span class="fr"></span>
<span class="it"></span>
<span class="ja"></span>
<span class="zh-CN"></span>
<span class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li id="community-link"><a href="<?cs var:toroot ?>community/index.html">
<?cs if:!sdk.redirect ?>

View File

@ -5,8 +5,8 @@
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?>"<?cs
else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>"
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>">
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
</head>
<?cs else ?>
@ -24,8 +24,10 @@
<div id="jd-content">
<p>Redirecting to
<a href="<?cs var:toroot ?>sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?>">/sdk/<?cs var:sdk.redirect.path ?><?cs
else ?><?cs var:sdk.current ?>/index.html">/sdk/<?cs var:sdk.current ?>/index.html<?cs /if ?>
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>">sdk/<?cs
if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>
</a> ...</p>
<?cs else ?>
<div class="g-unit" id="doc-content" >
@ -50,7 +52,7 @@
</div>
<?cs /if ?>
<?cs if:android.whichdoc != "online" ?>
<?cs if:android.whichdoc != "online" && !android.preview ?>
<p>The sections below provide an overview of the SDK package. </p>
@ -101,7 +103,20 @@ computer. </p>
</tr>
</table>
<?cs else ?>
<?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 1.6 platform includes a variety of improvements and new
features for users and developers. Additionally, the SDK itself introduces
several new capabilities that enable you to develop applications more
efficiently. See the <a href="features.html">Android 1.6 Highlights</a>
document for a list of highlights.</p>
<?cs /if ?>
<p>Before downloading, please read the <a href="requirements.html">
System Requirements</a> document. As you start the download, you will also need to review and agree to
the Terms and Conditions that govern the use of the Android SDK. </p>
@ -137,9 +152,32 @@ the Terms and Conditions that govern the use of the Android SDK. </p>
<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="<?cs var:toroot ?>sdk/download.html?v=<?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>
<?cs /if ?>
<?cs /if ?>
<?cs /if ?>
<?cs /if ?>
<?cs if:android.whichdoc != "online" && sdk.preview ?>
<p>Welcome developers! The next release of the Android platform will be
Android 1.6 and we are pleased to announce the availability of an early look SDK
to give you a head-start on developing applications for it. </p>
<p>The Android 1.6 platform includes a variety of improvements and new features
for users and developers. Additionally, the SDK itself introduces several new
capabilities that enable you to develop applications more efficiently.
See the <a href="http://developer.android.com/sdk/preview/features.html">
Android 1.6 Highlights</a> document for a list of highlights.</p>
<?cs /if ?>
<?cs call:tag_list(root.descr) ?>

View File

@ -49,6 +49,8 @@ a:visited code {
input, select,
textarea, option {
font-family:inherit;
font-size:inherit;
padding:0;
margin:0;
}
@ -131,13 +133,17 @@ dd pre, dd table, dd img {
}
li ul,
li ol {
margin:.5em 0 0 0;
li ol,
dd ul,
dd ol {
margin:0;
padding: 0 0 0 2em;
}
dl li {
padding:.5em 0 0 0;
li li,
dd li {
margin:0;
padding:.5em 0 0;
}
dl dl,
@ -177,6 +183,8 @@ hr.blue {
/* LAYOUT */
#body-content {
/* "Preliminary" watermark for preview releases and interim builds.
background:transparent url(images/preliminary.png) repeat scroll 0 0; */
margin:0;
position:relative;
width:100%;
@ -777,7 +785,7 @@ td.gsc-search-button {
}
#carouselMain {
background: url('/assets/images/home/bg_home_carousel_board.png') 0 0 no-repeat;
background: url(images/home/bg_home_carousel_board.png) 0 0 no-repeat;
height:auto;
padding: 25px 21px 0;
overflow:hidden;
@ -800,7 +808,7 @@ td.gsc-search-button {
}
#carouselWheel {
background: url('/assets/images/home/bg_home_carousel_wheel.png') 0 0 no-repeat;
background: url(images/home/bg_home_carousel_wheel.png) 0 0 no-repeat;
padding-top:40px;
height:150px;
}
@ -1154,12 +1162,12 @@ ul.videoPreviews p.full {
ul.videoPreviews span.more {
padding:0 0 0 12px;
background:url('/assets/images/arrow_bluelink_down.png') 0 2px no-repeat;
background:url(images/arrow_bluelink_down.png) 0 2px no-repeat;
}
ul.videoPreviews span.less {
padding:0 0 0 12px;
background:url('/assets/images/arrow_bluelink_up.png') 0 2px no-repeat;
background:url(images/arrow_bluelink_up.png) 0 2px no-repeat;
display:none;
}

View File

@ -276,9 +276,9 @@
/* summary tables for reference pages */
.jd-sumtable {
margin: .5em 1em 1em 1em;
width:99%;
font-size:.9em;
margin: .5em 1em 1em 1em;
width:95%; /* consistent table widths; within IE's quirks */
font-size:.9em;
}
.jd-sumtable a {
@ -330,8 +330,7 @@ font-size:.9em;
links to summary tables) */
#api-info-block {
font-size:.8em;
margin:0;
padding:6px;
padding:6px 10px;
font-weight:normal;
float:right;
text-align:right;
@ -346,20 +345,56 @@ links to summary tables) */
color:#999;
}
h4.jd-details-title .api-level,
div#jd-header .api-level {
font-size:12px;
div.api-level {
font-size:.8em;
font-weight:normal;
color:#999;
position:absolute;
top:5px;
right:5px;
float:right;
padding:0 7px 0;
margin-top:-25px;
}
div#jd-header .api-level {
position:relative;
float:right;
margin-top:-1.7em;
#api-info-block div.api-level {
font-size:1.3em;
font-weight:bold;
float:none;
color:#444;
padding:0;
margin:0;
}
/* Force link colors for IE6 */
div.api-level a {
color:#999;
}
#api-info-block div.api-level a:link {
color:#444;
}
#api-level-toggle a {
color:#999;
}
div#naMessage {
display:none;
width:555px;
height:0;
margin:0 auto;
}
div#naMessage div {
width:450px;
position:fixed;
margin:50px 0;
padding:4em 4em 3em;
background:#FFF;
background:rgba(255,255,255,0.7);
border:1px solid #dddd00;
}
/* IE6 can't position fixed */
* html div#naMessage div { position:absolute; }
div#naMessage strong {
font-size:1.1em;
}
.absent,
@ -367,25 +402,53 @@ div#jd-header .api-level {
.absent a:visited,
.absent a:hover,
.absent * {
color:#aaa !important;
background-color:#f6f6f6 !important;
color:#bbb !important;
cursor:default !important;
text-decoration:none !important;
}
#side-nav li.absent,
#side-nav li.absent * {
background-color:#fff !important;
#api-level-toggle a,
.api-level a {
color:inherit;
text-decoration:none;
}
#api-level-toggle a:hover,
.api-level a:hover {
color:inherit;
text-decoration:underline !important;
cursor:pointer !important;
}
#side-nav li.absent.selected,
#side-nav li.absent.selected * {
background-color:#eee !important;
#side-nav li.absent.selected *,
#side-nav div.label.absent.selected,
#side-nav div.label.absent.selected * {
background-color:#eaeaea !important;
}
/* IE6 quirk (won't chain classes, so just keep background blue) */
* html #side-nav li.selected,
* html #side-nav li.selected *,
* html #side-nav div.label.selected,
* html #side-nav div.label.selected * {
background-color: #435a6e !important;
}
.absent h4.jd-details-title,
.absent h4.jd-details-title * {
background-color:#f6f6f6 !important;
}
.absent img {
opacity: .3;
filter: alpha(opacity=30);
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
}
/* applies to a div containing links to summary tables */
.sum-details-links {
margin:0 .5em;
padding:0;
font-weight:normal;
}
@ -554,8 +617,7 @@ h4.jd-details-title {
font-size:1.15em;
background-color: #E2E2E2;
margin:1.5em 0 .6em;
padding:3px;
position:relative; /* so the api level can be absolute */
padding:3px 95px 3px 3px; /* room for api-level */
}
h4.jd-tagtitle {
@ -1122,21 +1184,16 @@ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body
padding:0;
}
#headerLeft .guide {
display:none;
}
#headerRight {
#header-tabs,
#headerRight,
#side-nav,
#api-info-block {
display:none;
}
#body-content {
position:inherit;
}
#side-nav {
display:none;
}
#doc-content {
margin-left:0 !important;

View File

@ -31,16 +31,9 @@ if ((agent.indexOf("Mobile") != -1) ||
addLoadEvent(mobileSetup);
}
/* loads the lists.js file to the page.
Loading this in the head was slowing page load time */
addLoadEvent( function() {
var lists = document.createElement("script");
lists.setAttribute("type","text/javascript");
lists.setAttribute("src", toRoot+"reference/lists.js");
$("head").append($(lists));
} );
addLoadEvent(function() {
window.onresize = resizeAll;
});
function mobileSetup() {
$("body").css({'overflow':'auto'});
@ -51,6 +44,15 @@ function mobileSetup() {
$("#nav-tree").css({'overflow-y': 'auto'});
}
/* loads the lists.js file to the page.
Loading this in the head was slowing page load time */
addLoadEvent( function() {
var lists = document.createElement("script");
lists.setAttribute("type","text/javascript");
lists.setAttribute("src", toRoot+"reference/lists.js");
$("head").append($(lists));
} );
function setToRoot(root) {
toRoot = root;
// note: toRoot also used by carousel.js

View File

@ -1,5 +1,69 @@
function new_node(me, mom, text, link, children_data)
/* API LEVEL TOGGLE */
addLoadEvent(changeApiLevel);
var API_LEVEL_COOKIE = "api_level";
var minLevel = 1;
function buildApiLevelToggle() {
var maxLevel = SINCE_DATA.length;
var userApiLevel = readCookie(API_LEVEL_COOKIE);
if (userApiLevel != 0) {
selectedLevel = userApiLevel;
} else {
selectedLevel = maxLevel;
}
minLevel = $("body").attr("class");
var select = $("#apiLevelControl").html("").change(changeApiLevel);
for (var i = maxLevel-1; i >= 0; i--) {
var option = $("<option />").attr("value",""+SINCE_DATA[i]).append(""+SINCE_DATA[i]);
// if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
select.append(option);
}
// get the DOM element and use setAttribute cuz IE6 fails when using jquery .attr('selected',true)
var selectedLevelItem = $("#apiLevelControl option[value='"+selectedLevel+"']").get(0);
selectedLevelItem.setAttribute('selected',true);
}
function changeApiLevel() {
var selectedLevel = $("#apiLevelControl option:selected").val();
toggleVisisbleApis(selectedLevel, "body");
var date = new Date();
date.setTime(date.getTime()+(50*365*24*60*60*1000)); // keep this for 50 years
writeCookie(API_LEVEL_COOKIE, selectedLevel, null, date);
if (selectedLevel < minLevel) {
var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
$("#naMessage").show().html("<div><p><strong>This " + thing + " is not available with API Level " + selectedLevel + ".</strong></p>"
+ "<p>To use this " + thing + ", your application must specify API Level " + minLevel + " or higher in its manifest "
+ "and be compiled against a version of the Android library that supports an equal or higher API Level. To reveal this "
+ "document, change the value of the API Level filter above.</p>"
+ "<p><a href='" +toRoot+ "guide/appendix/api-levels.html'>What is the API Level?</a></p></div>");
} else {
$("#naMessage").hide();
}
}
function toggleVisisbleApis(selectedLevel, context) {
var apis = $(".api",context);
apis.each(function(i) {
var obj = $(this);
var className = obj.attr("class");
var apiLevelIndex = className.lastIndexOf("-")+1;
var apiLevelEndIndex = className.indexOf(" ", apiLevelIndex);
apiLevelEndIndex = apiLevelEndIndex != -1 ? apiLevelEndIndex : className.length;
var apiLevel = className.substring(apiLevelIndex, apiLevelEndIndex);
if (apiLevel > selectedLevel) obj.addClass("absent").attr("title","Requires API Level "+apiLevel+" or higher");
else obj.removeClass("absent").removeAttr("title");
});
}
/* NAVTREE */
function new_node(me, mom, text, link, children_data, api_level)
{
var node = new Object();
node.children = Array();
@ -10,9 +74,13 @@ function new_node(me, mom, text, link, children_data)
mom.get_children_ul().appendChild(node.li);
node.label_div = document.createElement("div");
node.label_div.className = "label";
if (api_level != null) {
$(node.label_div).addClass("api");
$(node.label_div).addClass("api-level-"+api_level);
}
node.li.appendChild(node.label_div);
node.label_div.style.paddingLeft = 10*node.depth + "px";
node.label_div.className = "label";
if (children_data == null) {
// 12 is the width of the triangle and padding extra space
@ -81,10 +149,15 @@ function expand_node(me, node)
$(node.get_children_ul()).slideDown("fast");
} else {
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";
node.expanded = true;
// perform api level toggling because new nodes are new to the DOM
var selectedLevel = $("#apiLevelControl option:selected").val();
toggleVisisbleApis(selectedLevel, "#side-nav");
}
}
@ -94,7 +167,7 @@ function get_node(me, mom)
for (var i in mom.children_data) {
var node_data = mom.children_data[i];
mom.children[i] = new_node(me, mom, node_data[0], node_data[1],
node_data[2]);
node_data[2], node_data[3]);
}
}
@ -104,8 +177,7 @@ function this_page_relative(toroot)
var file = "";
if (toroot.substr(0, 1) == "/") {
if (full.substr(0, toroot.length) == toroot) {
var basePath = getBaseUri(full);
return basePath.substring(toroot.length);
return full.substr(toroot.length);
} else {
// the file isn't under toroot. Fail.
return null;
@ -150,15 +222,18 @@ function load_navtree_data(toroot) {
navtreeData.setAttribute("type","text/javascript");
navtreeData.setAttribute("src", toroot+"navtree_data.js");
$("head").append($(navtreeData));
}
}
function init_default_navtree(toroot) {
load_navtree_data(toroot);
init_navtree("nav-tree", toroot, NAVTREE_DATA);
// perform api level toggling because because the whole tree is new to the DOM
var selectedLevel = $("#apiLevelControl option:selected").val();
toggleVisisbleApis(selectedLevel, "#side-nav");
}
function init_navtree(navtree_id, toroot, root_nodes)
{
{
var me = new Object();
me.toroot = toroot;
me.node = new Object();
@ -189,4 +264,3 @@ function init_navtree(navtree_id, toroot, root_nodes)
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
tools/droiddoc/templates/assets/images/preliminary.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -2,7 +2,7 @@
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
<body>
<body class="<?cs var:class.since ?>">
<script type="text/javascript">
function toggleInherited(linkObj, expand) {
var base = linkObj.getAttribute("id");
@ -26,7 +26,6 @@ function toggleInherited(linkObj, expand) {
return false;
}
</script>
<?cs include:"header.cs" ?>
<div class="g-unit" id="doc-content">
@ -106,7 +105,9 @@ Summary:
&#124; <a href="#" onclick="return toggleAllSummaryInherited(this)">[Expand All]</a>
<?cs /if ?>
</div><!-- end sum-details-links -->
<div class="api-level">
<?cs call:since_tags(class) ?>
</div>
</div><!-- end api-info-block -->
<?cs # this next line must be exactly like this to be parsed by eclipse ?>
@ -134,12 +135,11 @@ Summary:
<?cs set:colspan = colspan-1 ?>
<?cs /each ?>
<div class="api-level"><?cs call:since_tags(class) ?></div>
</div><!-- end header -->
<div id="naMessage"></div>
<div id="jd-content" class="apilevel-<?cs var:class.since ?>">
<div id="jd-content" class="api apilevel-<?cs var:class.since ?>">
<table class="jd-inheritance-table">
<?cs set:colspan = subcount(class.inheritance) ?>
<?cs each:supr = class.inheritance ?>
@ -215,7 +215,7 @@ Summary:
<?cs def:write_field_summary(fields) ?>
<?cs set:count = #1 ?>
<?cs each:field=fields ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
<td class="jd-typecol"><nobr>
<?cs var:field.scope ?>
<?cs var:field.static ?>
@ -231,7 +231,7 @@ Summary:
<?cs def:write_constant_summary(fields) ?>
<?cs set:count = #1 ?>
<?cs each:field=fields ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
<td class="jd-typecol"><?cs call:type_link(field.type) ?></td>
<td class="jd-linkcol"><a href="<?cs var:toroot ?><?cs var:field.href ?>"><?cs var:field.name ?></a></td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?></td>
@ -248,7 +248,7 @@ Summary:
<td><nobr><em>Description</em></nobr></td>
</tr>
<?cs each:attr=attrs ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:attr.since ?>" >
<td class="jd-linkcol"><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></td>
<td class="jd-linkcol"><?cs each:m=attr.methods ?>
<a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a>
@ -263,13 +263,13 @@ Summary:
<?cs def:write_inners_summary(classes) ?>
<?cs set:count = #1 ?>
<?cs each:cl=class.inners ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
<td class="jd-typecol"><nobr>
<?cs var:class.scope ?>
<?cs var:class.static ?>
<?cs var:class.final ?>
<?cs var:class.abstract ?>
<?cs var:class.kind ?></nobr></td>
<?cs var:cl.scope ?>
<?cs var:cl.static ?>
<?cs var:cl.final ?>
<?cs var:cl.abstract ?>
<?cs var:cl.kind ?></nobr></td>
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?>&nbsp;</td>
</tr>
@ -305,7 +305,8 @@ Summary:
<div style="clear:left;">Inherited XML Attributes</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.attrs) ?>
<tr><td colspan="12">
<tr class="api apilevel-<?cs var:cl.since ?>" >
<td colspan="12">
<?cs call:expando_trigger("inherited-attrs-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
<a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
<div id="inherited-attrs-<?cs var:cl.qualified ?>">
@ -329,7 +330,7 @@ Summary:
<table id="enumconstants" class="jd-sumtable"><tr><th colspan="12">Enum Values</th></tr>
<?cs set:count = #1 ?>
<?cs each:field=class.enumConstants ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
<td class="jd-descrcol"><?cs call:type_link(field.type) ?>&nbsp;</td>
<td class="jd-linkcol"><a href="<?cs var:toroot ?><?cs var:field.href ?>"><?cs var:field.name ?></a>&nbsp;</td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?>&nbsp;</td>
@ -355,7 +356,8 @@ Summary:
<div style="clear:left;">Inherited Constants</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.constants) ?>
<tr><td colspan="12">
<tr class="api apilevel-<?cs var:cl.since ?>" >
<td colspan="12">
<?cs call:expando_trigger("inherited-constants-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
<a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
<div id="inherited-constants-<?cs var:cl.qualified ?>">
@ -390,7 +392,8 @@ Summary:
<div style="clear:left;">Inherited Fields</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.fields) ?>
<tr><td colspan="12">
<tr class="api apilevel-<?cs var:cl.since ?>" >
<td colspan="12">
<?cs call:expando_trigger("inherited-fields-"+cl.qualified, "closed") ?>From <?cs var:cl.kind ?>
<a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
<div id="inherited-fields-<?cs var:cl.qualified ?>">
@ -449,7 +452,8 @@ Summary:
<div style="clear:left;">Inherited Methods</div></th></tr>
<?cs each:cl=class.inherited ?>
<?cs if:subcount(cl.methods) ?>
<tr><td colspan="12"><?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>
<tr class="api apilevel-<?cs var:cl.since ?>" >
<td colspan="12"><?cs call:expando_trigger("inherited-methods-"+cl.qualified, "closed") ?>
From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs var:cl.qualified ?></a>
<div id="inherited-methods-<?cs var:cl.qualified ?>">
<div id="inherited-methods-<?cs var:cl.qualified ?>-list"
@ -485,11 +489,12 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs call:type_link(field.type) ?>
</span>
<?cs var:field.name ?>
<span class="api-level">
<?cs call:since_tags(field) ?>
</span>
</h4>
<div class="jd-details-descr"><?cs call:description(field) ?>
<div class="api-level">
<?cs call:since_tags(field) ?>
</div>
<div class="jd-details-descr">
<?cs call:description(field) ?>
<?cs if:subcount(field.constantValue) ?>
<div class="jd-tagdata">
<span class="jd-tagtitle">Constant Value: </span>
@ -525,11 +530,13 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
</span>
<span class="sympad"><?cs var:method.name ?></span>
<span class="normal">(<?cs call:parameter_list(method.params) ?>)</span>
<span class="api-level">
<?cs call:since_tags(method) ?>
</span>
</h4>
<div class="jd-details-descr"><?cs call:description(method) ?></div>
<div class="api-level">
<?cs call:since_tags(method) ?>
</div>
<div class="jd-details-descr">
<?cs call:description(method) ?>
</div>
</div>
<?cs /each ?>
<?cs /def ?>
@ -541,10 +548,10 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va
<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
<div class="jd-details api apilevel-<?cs var:attr.since ?>">
<h4 class="jd-details-title"><?cs var:attr.name ?>
<span class="api-level">
<?cs call:since_tags(attr) ?>
</span>
</h4>
<div class="api-level">
<?cs call:since_tags(attr) ?>
</div>
<div class="jd-details-descr">
<?cs call:description(attr) ?>

View File

@ -22,7 +22,7 @@
<table class="jd-sumtable">
<?cs set:cur_row = #0 ?>
<?cs each:cl = letter ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?>&nbsp;</td>
</tr>

View File

@ -17,7 +17,8 @@ else ?>
setToRoot("<?cs var:toroot ?>");
</script><?cs
if:reference ?>
<script src="<?cs var:toroot ?>assets/navtree.js" type="text/javascript"></script><?cs
<script src="<?cs var:toroot ?>assets/android-developer-reference.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>navtree_data.js" type="text/javascript"></script><?cs
/if ?>
<noscript>
<style type="text/css">

View File

@ -117,7 +117,7 @@ def:see_also_tags(also) ?><?cs
<?cs # print the API Level ?><?cs
def:since_tags(obj) ?>
Since: API Level <?cs var:obj.since ?>
Since: <a href="<?cs var:toroot ?>guide/appendix/api-levels.html#level<?cs var:obj.since ?>">API Level <?cs var:obj.since ?></a>
<?cs /def ?>
<?cs # Print the long-form description for something.
@ -203,7 +203,7 @@ def:list(label, classes) ?><?cs
<li><h2><?cs var:label ?></h2>
<ul><?cs
each:cl=classes ?>
<li class="<?cs if:class.name == cl.label?>selected<?cs /if ?> api apilevel-<?cs var:cl.since ?>"><?cs call:type_link(cl) ?></li><?cs
<li class="<?cs if:class.name == cl.label?>selected <?cs /if ?>api apilevel-<?cs var:cl.since ?>"><?cs call:type_link(cl) ?></li><?cs
/each ?>
</ul>
</li><?cs
@ -213,7 +213,7 @@ def:list(label, classes) ?><?cs
<?cs # A list of links to packages, for use in the side navigation of packages (panel nav) ?><?cs
def:package_link_list(packages) ?><?cs
each:pkg=packages ?>
<li class="<?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?>selected<?cs /if ?> api apilevel-<?cs var:pkg.since ?>"><?cs call:package_link(pkg) ?></li><?cs
<li class="<?cs if:(class.package.name == pkg.name) || (package.name == pkg.name)?>selected <?cs /if ?>api apilevel-<?cs var:pkg.since ?>"><?cs call:package_link(pkg) ?></li><?cs
/each ?><?cs
/def ?>

View File

@ -2,26 +2,31 @@
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
<body class="<?cs var:package.since ?>">
<?cs include:"header.cs" ?>
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">
<?cs call:since_tags(package) ?>
</div>
</div>
<div id="jd-header">
<strong>
<div class="jd-page_title-prefix">package</div>
</strong>
package
<h1><?cs var:package.name ?></b></h1>
<div class="jd-nav">
<a class="jd-navlink" href="package-summary.html">Classes</a> |
Description
<a class="jd-navlink" href="package-summary.html">Classes</a> | Description
</div>
</div><!-- end header -->
<div id="jd-content">
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
<div class="jd-descr">
<p><?cs call:tag_list(package.descr) ?></p>
</div>
<?cs call:since_tags(package) ?>
<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->

View File

@ -2,25 +2,30 @@
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
<body class="<?cs var:package.since ?>">
<?cs include:"header.cs" ?>
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">
<?cs call:since_tags(package) ?>
</div>
</div>
<div id="jd-header">
package
<h1><?cs var:package.name ?></h1>
<div class="jd-nav">
<?cs if:subcount(package.shortDescr) ?>
Classes |
<a class="jd-navlink" href="package-descr.html">Description</a>
Classes | <a class="jd-navlink" href="package-descr.html">Description</a>
<?cs /if ?>
</div>
<span class="api-level">
<?cs call:since_tags(package) ?>
</span>
</div>
</div><!-- end header -->
<div id="jd-content">
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
<?cs if:subcount(package.shortDescr) ?>
<div class="jd-descr">

View File

@ -20,7 +20,7 @@
<?cs set:count = #1 ?>
<table class="jd-sumtable">
<?cs each:pkg = docs.packages ?>
<tr <?cs if:count % #2 ?>class="alt-color"<?cs /if ?> >
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:pkg.since ?>" >
<td class="jd-linkcol"><?cs call:package_link(pkg) ?></td>
<td class="jd-descrcol" width="100%"><?cs call:tag_list(pkg.shortDescr) ?>&nbsp;</td>
</tr>

View File

@ -180,6 +180,7 @@ class AmendGenerator(object):
def MakeSymlinks(self, symlink_list):
"""Create symlinks, given a list of (dest, link) pairs."""
self.DeleteFiles([i[1] for i in symlink_list])
self.script.extend(["symlink %s %s" % (i[0], self._FileRoot(i[1]))
for i in sorted(symlink_list)])

View File

@ -46,18 +46,20 @@ def Run(args, **kwargs):
return subprocess.Popen(args, **kwargs)
def LoadBoardConfig(fn):
"""Parse a board_config.mk file looking for lines that specify the
maximum size of various images, and parse them into the
OPTIONS.max_image_size dict."""
def LoadMaxSizes():
"""Load the maximum allowable images sizes from the input
target_files size."""
OPTIONS.max_image_size = {}
for line in open(fn):
line = line.strip()
m = re.match(r"BOARD_(BOOT|RECOVERY|SYSTEM|USERDATA)IMAGE_MAX_SIZE"
r"\s*:=\s*(\d+)", line)
if not m: continue
OPTIONS.max_image_size[m.group(1).lower() + ".img"] = int(m.group(2))
try:
for line in open(os.path.join(OPTIONS.input_tmp, "META", "imagesizes.txt")):
pieces = line.split()
if len(pieces) != 2: continue
image = pieces[0]
size = int(pieces[1])
OPTIONS.max_image_size[image + ".img"] = size
except IOError, e:
if e.errno == errno.ENOENT:
pass
def BuildAndAddBootableImage(sourcedir, targetname, output_zip):
@ -142,7 +144,7 @@ def UnzipTemp(filename):
tmp = tempfile.mkdtemp(prefix="targetfiles-")
OPTIONS.tempfiles.append(tmp)
p = Run(["unzip", "-q", filename, "-d", tmp], stdout=subprocess.PIPE)
p = Run(["unzip", "-o", "-q", filename, "-d", tmp], stdout=subprocess.PIPE)
p.communicate()
if p.returncode != 0:
raise ExternalError("failed to unzip input target-files \"%s\"" %

View File

@ -21,8 +21,7 @@ use with 'fastboot update'.
Usage: img_from_target_files [flags] input_target_files output_image_zip
-b (--board_config) <file>
Specifies a BoardConfig.mk file containing image max sizes
against which the generated image files are checked.
Deprecated.
"""
@ -109,10 +108,10 @@ def main(argv):
def option_handler(o, a):
if o in ("-b", "--board_config"):
common.LoadBoardConfig(a)
return True
pass # deprecated
else:
return False
return True
args = common.ParseOptions(argv, __doc__,
extra_opts="b:",
@ -123,15 +122,15 @@ def main(argv):
common.Usage(__doc__)
sys.exit(1)
OPTIONS.input_tmp = common.UnzipTemp(args[0])
common.LoadMaxSizes()
if not OPTIONS.max_image_size:
print
print " WARNING: No board config specified; will not check image"
print " sizes against limits. Use -b to make sure the generated"
print " images don't exceed partition sizes."
print " WARNING: Failed to load max image sizes; will not enforce"
print " image size limits."
print
OPTIONS.input_tmp = common.UnzipTemp(args[0])
output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
common.AddBoot(output_zip)

View File

@ -22,8 +22,7 @@ a full OTA is produced.
Usage: ota_from_target_files [flags] input_target_files output_ota_package
-b (--board_config) <file>
Specifies a BoardConfig.mk file containing image max sizes
against which the generated image files are checked.
Deprecated.
-k (--package_key) <key>
Key to use to sign the package (default is
@ -619,7 +618,8 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
script.Print("Removing unneeded files...")
script.DeleteFiles(["/"+i[0] for i in verbatim_targets] +
["/"+i for i in sorted(source_data)
if i not in target_data])
if i not in target_data] +
["/system/recovery.img"])
if updating_boot:
# Produce the boot image by applying a patch to the current
@ -736,7 +736,7 @@ def main(argv):
def option_handler(o, a):
if o in ("-b", "--board_config"):
common.LoadBoardConfig(a)
pass # deprecated
elif o in ("-k", "--package_key"):
OPTIONS.package_key = a
elif o in ("-i", "--incremental_from"):
@ -768,13 +768,6 @@ def main(argv):
common.Usage(__doc__)
sys.exit(1)
if not OPTIONS.max_image_size:
print
print " WARNING: No board config specified; will not check image"
print " sizes against limits. Use -b to make sure the generated"
print " images don't exceed partition sizes."
print
if OPTIONS.script_mode not in ("amend", "edify", "auto"):
raise ValueError('unknown script mode "%s"' % (OPTIONS.script_mode,))
@ -783,6 +776,14 @@ def main(argv):
print "unzipping target target-files..."
OPTIONS.input_tmp = common.UnzipTemp(args[0])
common.LoadMaxSizes()
if not OPTIONS.max_image_size:
print
print " WARNING: Failed to load max image sizes; will not enforce"
print " image size limits."
print
OPTIONS.target_tmp = OPTIONS.input_tmp
input_zip = zipfile.ZipFile(args[0], "r")
if OPTIONS.package_key:

View File

@ -272,8 +272,13 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip):
k = m.group(1)
mapped_keys.append(OPTIONS.key_map.get(k, k) + ".x509.pem")
print "using:\n ", "\n ".join(mapped_keys)
print "for OTA package verification"
if mapped_keys:
print "using:\n ", "\n ".join(mapped_keys)
print "for OTA package verification"
else:
mapped_keys.append(
OPTIONS.key_map["build/target/product/security/testkey"] + ".x509.pem")
print "META/otakeys.txt has no keys; using", mapped_keys[0]
# recovery uses a version of the key that has been slightly
# predigested (by DumpPublicKey.java) and put in res/keys.