#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.google.android.datamessaging_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/pvasflocal.cfg)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/ringtones/Silence.ogg)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/ringtones/notifications/Silence.ogg)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/passion/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.google.android.datamessaging_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libcrypto_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libssl_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/openssl_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/bugreport)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/obj/target/common/obj/APPS/VoiceSearch_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/VoiceSearch_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgps-rpc_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/pdsm_atl_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libgps_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/system/app/Launcher.apk)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/bluetooth/)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/com.amazon.mp3_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/com.amazon.mp3.apk)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
+ TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
bash $(BUILDINFO_SH) > $@
$(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \
cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \
$(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/NOTICE.txt && \
cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/tools/NOTICE.txt && \
HOST_OUT_EXECUTABLES=$(HOST_OUT_EXECUTABLES) HOST_OS=$(HOST_OS) \
- development/tools/scripts/sdk_clean.sh $(PRIVATE_DIR) && \
+ development/build/tools/sdk_clean.sh $(PRIVATE_DIR) && \
chmod -R ug+rwX $(PRIVATE_DIR) && \
cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME) \
) || ( rm -rf $(PRIVATE_DIR) $@ && exit 44 )
+
#
# Copyright (C) 2008 The Android Open Source Project
#
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
-#
-# Defines branch-specific values.
-#
-
# BUILD_ID is usually used to specify the branch name
# (like "MAIN") or a branch name and a release candidate
-# (like "TC1-RC5"). It must be a single word, and is
+# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-#
-BUILD_ID := ECLAIR
-# 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
+export BUILD_ID=ERD79
ifeq ($(TARGET_CPU_ABI),)
$(error No TARGET_CPU_ABI defined by board config: $(board_config_mk))
endif
+TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
# $(1): os/arch
define select-android-config-h
LOCAL_JAVA_LIBRARIES := core ext framework $(LOCAL_JAVA_LIBRARIES)
endif
endif
+LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM))
ifeq ($(LOCAL_BUILT_MODULE_STEM),)
dalvik/libdex \
dalvik/tools/dmtracedump \
dalvik/tools/hprof-conv \
- development/emulator/mksdcard \
development/tools/line_endings \
- development/tools/sdklauncher \
+ sdk/emulator/mksdcard \
+ sdk/sdklauncher \
development/host \
external/expat \
external/libpng \
build/tools/signapk \
dalvik/dx \
dalvik/libcore \
+ sdk/archquery \
+ sdk/androidprefs \
+ sdk/apkbuilder \
+ sdk/jarutils \
+ sdk/layoutlib_utils \
+ sdk/ninepatch \
+ sdk/sdkstats \
+ sdk/sdkmanager \
+ sdk/layoutopt \
development/apps \
- development/tools/archquery \
- development/tools/androidprefs \
- development/tools/apkbuilder \
- development/tools/jarutils \
- development/tools/layoutlib_utils \
- development/tools/ninepatch \
- development/tools/sdkstats \
- development/tools/sdkmanager \
development/tools/mkstubs \
- development/tools/layoutopt \
- frameworks/base \
frameworks/base/tools/layoutlib \
external/googleclient \
packages
all_res_assets := $(strip $(all_assets) $(all_resources))
+package_expected_intermediates_COMMON := $(call local-intermediates-dir,COMMON)
# If no assets or resources were found, clear the directory variables so
# we don't try to build them.
ifeq (,$(all_assets))
# Make sure that R_file_stamp inherits the proper PRIVATE vars.
# If R.stamp moves, be sure to update the framework makefile,
# which has intimate knowledge of its location.
-package_expected_intermediates_COMMON := $(call local-intermediates-dir,COMMON)
R_file_stamp := $(package_expected_intermediates_COMMON)/src/R.stamp
LOCAL_INTERMEDIATE_TARGETS += $(R_file_stamp)
endif
$(PRODUCT_LOCALES) \
$(if $(filter %dpi,$(PRODUCT_LOCALES)),,mdpi))
+# Everyone gets nodpi assets which are density-independent.
+PRODUCT_LOCALES += nodpi
+
# Assemble the list of options.
PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES)
CtsUsePermissionDiffCert
CTS_CASE_LIST := \
- DeviceInfoCollector \
+ TestDeviceSetup \
CtsTestStubs \
+ CtsAccountManagerTestCases \
CtsAppTestCases \
+ CtsBluetoothTestCases \
CtsContentTestCases \
CtsDatabaseTestCases \
CtsDpiTestCases \
CtsDpiTestCases2 \
- CtsGestureTestCases \
+ CtsExampleTestCases \
+ CtsGestureTestCases \
CtsGraphicsTestCases \
CtsHardwareTestCases \
+ CtsJniTestCases \
CtsLocationTestCases \
CtsMediaTestCases \
CtsOsTestCases \
# 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 := Eclair
+ PLATFORM_VERSION := 2.1
endif
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 := 5
+ PLATFORM_SDK_VERSION := 7
endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# This is the current development code-name, if the build is not a final
# release build. If this is a final release build, it is simply "REL".
- PLATFORM_VERSION_CODENAME := Eclair
+ PLATFORM_VERSION_CODENAME := REL
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
echo $TOP
else
if [ -f $TOPFILE ] ; then
- echo $PWD
+ # The following circumlocution (repeated below as well) ensures
+ # that we record the true directory name and not one that is
+ # faked up with symlink names.
+ PWD= /bin/pwd
else
# We redirect cd to /dev/null in case it's aliased to
# a command that prints something as a side-effect
T=
while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
cd .. > /dev/null
- T=$PWD
+ T=`PWD= /bin/pwd`
done
cd $HERE > /dev/null
if [ -f "$T/$TOPFILE" ]; then
fi
}
+# systemstack - dump the current stack trace of all threads in the system process
+# to the usual ANR traces file
+function systemstack()
+{
+ adb shell echo '""' '>>' /data/anr/traces.txt && adb shell chmod 776 /data/anr/traces.txt && adb shell kill -3 $(pid system_server)
+}
+
function gdbclient()
{
local OUT_ROOT=$(get_abs_build_var PRODUCT_OUT)
board_info_txt := $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt)
$(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt)
$(call pretty,"Generated: ($@)")
- $(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@
ifdef board_info_txt
- $(hide) cat $< >> $@
+ $(hide) cat $< > $@
+else
+ $(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@
endif
DrmProvider \
Email \
Fallback \
+ Gallery \
GPSEnable \
Launcher \
Music \
LiveWallpapersPicker \
ApiDemos \
GestureBuilder \
- SoftKeyboard
+ SoftKeyboard \
+ CubeLiveWallpapers
+
+PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay
PRODUCT_COPY_FILES := \
development/data/etc/vold.conf:system/etc/vold.conf \
echo "ro.product.device=$TARGET_DEVICE"
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
echo "ro.product.cpu.abi=$TARGET_CPU_ABI"
+if [ -n "$TARGET_CPU_ABI2" ] ; then
+ echo "ro.product.cpu.abi2=$TARGET_CPU_ABI2"
+fi
echo "ro.product.manufacturer=$PRODUCT_MANUFACTURER"
echo "ro.product.locale.language=$PRODUCT_DEFAULT_LANGUAGE"
echo "ro.product.locale.region=$PRODUCT_DEFAULT_REGION"
} else if (outfile.indexOf("guide/") != -1) {
hdf.setValue("guide", "true");
ClearPage.write(hdf, "docpage.cs", outfile);
+ } else if (outfile.indexOf("resources/") != -1) {
+ hdf.setValue("resources", "true");
+ ClearPage.write(hdf, "resourcespage.cs", outfile);
} else {
ClearPage.write(hdf, "nosidenavpage.cs", outfile);
}
private static final String SDK_CONSTANT_TYPE_BROADCAST_ACTION = "android.annotation.SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION";
private static final String SDK_CONSTANT_TYPE_SERVICE_ACTION = "android.annotation.SdkConstant.SdkConstantType.SERVICE_INTENT_ACTION";
private static final String SDK_CONSTANT_TYPE_CATEGORY = "android.annotation.SdkConstant.SdkConstantType.INTENT_CATEGORY";
+ private static final String SDK_CONSTANT_TYPE_FEATURE = "android.annotation.SdkConstant.SdkConstantType.FEATURE";
private static final String SDK_WIDGET_ANNOTATION = "android.annotation.Widget";
private static final String SDK_LAYOUT_ANNOTATION = "android.annotation.Layout";
//Create the dependency graph for the stubs directory
boolean apiXML = false;
boolean noDocs = false;
+ boolean offlineMode = false;
String apiFile = null;
String debugStubsFile = "";
HashSet<String> stubPackages = null;
else if (a[0].equals("-since")) {
sinceTagger.addVersion(a[1], a[2]);
}
+ else if (a[0].equals("-offlinemode")) {
+ offlineMode = true;
+ }
}
// read some prefs from the template
// Sample Code
for (SampleCode sc: sampleCodes) {
- sc.write();
+ sc.write(offlineMode);
}
// Index page
if (option.equals("-since")) {
return 3;
}
+ if (option.equals("-offlinemode")) {
+ return 1;
+ }
return 0;
}
ArrayList<String> broadcastActions = new ArrayList<String>();
ArrayList<String> serviceActions = new ArrayList<String>();
ArrayList<String> categories = new ArrayList<String>();
+ ArrayList<String> features = new ArrayList<String>();
ArrayList<ClassInfo> layouts = new ArrayList<ClassInfo>();
ArrayList<ClassInfo> widgets = new ArrayList<ClassInfo>();
serviceActions.add(cValue.toString());
} else if (SDK_CONSTANT_TYPE_CATEGORY.equals(type)) {
categories.add(cValue.toString());
+ } else if (SDK_CONSTANT_TYPE_FEATURE.equals(type)) {
+ features.add(cValue.toString());
}
}
break;
Collections.sort(categories);
writeValues(output + "/categories.txt", categories);
+ Collections.sort(features);
+ writeValues(output + "/features.txt", features);
+
// before writing the list of classes, we do some checks, to make sure the layout params
// are enclosed by a layout class (and not one that has been declared as a widget)
for (int i = 0 ; i < layoutParams.size();) {
}
}
- public void write() {
+ public void write(boolean offlineMode) {
File f = new File(mSource);
if (!f.isDirectory()) {
System.out.println("-samplecode not a directory: " + mSource);
return;
}
- writeDirectory(f, mDest);
+ if (offlineMode) writeIndexOnly(f, mDest, offlineMode);
+ else writeDirectory(f, mDest);
}
public static String convertExtension(String s, String ext) {
// write the index page
int i;
- HDF hdf = DroidDoc.makeHDF();
- hdf.setValue("page.title", dir.getName() + " - " + mTitle);
- hdf.setValue("projectTitle", mTitle);
+ HDF hdf = writeIndex(dir);
hdf.setValue("subdir", subdir);
i=0;
for (String d: dirs) {
hdf.setValue("files." + i + ".href", convertExtension(f, ".html"));
i++;
}
+
+ ClearPage.write(hdf, "sampleindex.cs", relative + "/index" + DroidDoc.htmlExtension);
+ }
+
+ public void writeIndexOnly(File dir, String relative, Boolean offline) {
+ HDF hdf = writeIndex(dir);
+ if (!offline) relative = "/" + relative;
+ ClearPage.write(hdf, "sampleindex.cs", relative + "index" +
+ DroidDoc.htmlExtension);
+ }
+
+ public HDF writeIndex(File dir) {
+ HDF hdf = DroidDoc.makeHDF();
+
+ hdf.setValue("page.title", dir.getName() + " - " + mTitle);
+ hdf.setValue("projectTitle", mTitle);
+
String filename = dir.getPath() + "/_index.html";
- String summary = SampleTagInfo.readFile(new SourcePositionInfo(filename, -1,-1), filename,
- "sample code", true, false, true);
+ String summary = SampleTagInfo.readFile(new SourcePositionInfo(filename,
+ -1,-1), filename, "sample code", true, false, true);
+
if (summary == null) {
summary = "";
}
hdf.setValue("summary", summary);
-
- ClearPage.write(hdf, "sampleindex.cs", relative + "/index" + DroidDoc.htmlExtension);
+
+ return hdf;
}
public void writePage(File f, String out, String subdir) {
<?cs /def ?>
<?cs
+def:resources_tab_nav() ?>
+ <div class="g-section g-tpl-240" id="body-content">
+ <div class="g-unit g-first side-nav-resizable" id="side-nav">
+ <div id="devdoc-nav"><?cs
+ include:"../../../../frameworks/base/docs/html/resources/resources_toc.cs" ?>
+ </div>
+ </div> <!-- end side-nav -->
+ <script>
+ addLoadEvent(function() {
+ scrollIntoView("devdoc-nav");
+ });
+ </script>
+<?cs /def ?>
+
+<?cs
def:guide_nav() ?>
<div class="g-section g-tpl-240" id="body-content">
<div class="g-unit g-first side-nav-resizable" id="side-nav">
def:custom_left_nav() ?><?cs
if:guide ?><?cs
call:guide_nav() ?><?cs
+ elif:resources ?><?cs
+ call:resources_tab_nav() ?><?cs
elif:sdk ?><?cs
call:sdk_nav() ?><?cs
else ?><?cs
elif:guide ?>guide<?cs
elif:sdk ?>sdk<?cs
elif:home ?>home<?cs
- elif:community ?>community<?cs
+ elif:resources ?>resources<?cs
elif:videos ?>videos<?cs /if ?>">
<li id="home-link"><a href="<?cs var:toroot ?><?cs
<span style="display:none" class="es"></span>
<span style="display:none" class="fr"></span>
<span style="display:none" class="it"></span>
- <span style="display:none" class="ja">ホーム</span>
+ <span style="display:none" class="ja">ホーム</span>
<span style="display:none" class="zh-CN">主页</span>
<span style="display:none" class="zh-TW">首頁</span>
<?cs /if ?>
<span style="display:none" class="es">Guía</span>
<span style="display:none" class="fr">Guide</span>
<span style="display:none" class="it">Guida</span>
- <span style="display:none" class="ja">開発ガイド</span>
+ <span style="display:none" class="ja">開発ガイド</span>
<span style="display:none" class="zh-CN">开发人员指南</span>
<span style="display:none" class="zh-TW">開發指南</span>
<?cs /if ?>
<span style="display:none" class="es">Referencia</span>
<span style="display:none" class="fr">Référence</span>
<span style="display:none" class="it">Riferimento</span>
- <span style="display:none" class="ja">リファレンス</span>
+ <span style="display:none" class="ja">リファレンス</span>
<span style="display:none" class="zh-CN">参考</span>
<span style="display:none" class="zh-TW">參考資料</span>
<?cs /if ?>
</a></li>
- <li><a href="http://android-developers.blogspot.com" onClick="return requestAppendHL(this.href)">
+ <li id="resources-link"><a href="<?cs var:toroot ?>resources/index.html" onClick="return loadLast('resources')">
<?cs if:!sdk.redirect ?>
- <span class="en">Blog</span>
+ <span class="en">Resources</span>
<span style="display:none" class="de"></span>
<span style="display:none" class="es"></span>
<span style="display:none" class="fr"></span>
<span style="display:none" class="it"></span>
- <span style="display:none" class="ja">ブログ</span>
- <span style="display:none" class="zh-CN">博客</span>
- <span style="display:none" class="zh-TW">網誌</span>
+ <span style="display:none" class="ja"></span>
+ <span style="display:none" class="zh-CN"></span>
+ <span style="display:none" class="zh-TW"></span>
<?cs /if ?>
</a></li>
<li id="videos-link"><a href="<?cs var:toroot ?>videos/index.html" onClick="return loadLast('videos')">
<span style="display:none" class="es"></span>
<span style="display:none" class="fr"></span>
<span style="display:none" class="it"></span>
- <span style="display:none" class="ja">ビデオ</span>
+ <span style="display:none" class="ja">ビデオ</span>
<span style="display:none" class="zh-CN"></span>
<span style="display:none" class="zh-TW"></span>
<?cs /if ?>
</a></li>
- <li id="community-link"><a href="<?cs var:toroot ?>community/index.html">
+ <li><a href="http://android-developers.blogspot.com" onClick="return requestAppendHL(this.href)">
<?cs if:!sdk.redirect ?>
- <span class="en">Community</span>
+ <span class="en">Blog</span>
<span style="display:none" class="de"></span>
- <span style="display:none" class="es">Comunidad</span>
- <span style="display:none" class="fr">Communauté</span>
+ <span style="display:none" class="es"></span>
+ <span style="display:none" class="fr"></span>
<span style="display:none" class="it"></span>
- <span style="display:none" class="ja">コミュニティ</span>
- <span style="display:none" class="zh-CN">社区</span>
- <span style="display:none" class="zh-TW">社群</span>
+ <span style="display:none" class="ja">ブログ</span>
+ <span style="display:none" class="zh-CN">博客</span>
+ <span style="display:none" class="zh-TW">網èª\8c</span>
<?cs /if ?>
</a></li>
+
+
</ul>
--- /dev/null
+<?cs include:"doctype.cs" ?>
+<?cs include:"macros.cs" ?>
+
+<html>
+<?cs include:"head_tag.cs" ?>
+
+<body class="gc-documentation">
+<?cs call:custom_masthead() ?>
+<?cs call:resources_tab_nav() ?>
+<a name="top"></a>
+<div class="g-unit" id="doc-content" >
+ <div id="jd-header" class="guide-header">
+ <span class="crumb">
+ <?cs if:parent.link ?>
+ <a href="<?cs var:parent.link ?>"><?cs var:parent.title ?></a> >
+ <?cs else ?>
+ <?cs /if ?>
+ </span>
+ <h1><?cs var:page.title ?></h1>
+ </div>
+
+ <div id="jd-content">
+
+ <?cs call:tag_list(root.descr) ?>
+
+<?cs include:"footer.cs" ?>
+
+</div><!-- end doc-content -->
+
+<?cs include:"trailer.cs" ?>
+
+</body>
+</html>
+
+
+
<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, for example, you can just download the Android 2.0 platform (and
+ 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, a code {
color:#006699;
-}
-
+}
a:active,
a:active code {
}
/* LAYOUT */
+
#body-content {
/* "Preliminary" watermark for preview releases and interim builds.
background:transparent url(images/preliminary.png) repeat scroll 0 0; */
}
/* Tabs in the header */
+
#header ul {
list-style: none;
margin: 7px 0 0;
display:none;
}
-/* TAB HIGHLIGHTING */
+/* tab highlighting */
+
.home #home-link a,
.guide #guide-link a,
.reference #reference-link a,
.sdk #sdk-link a,
-.community #community-link a,
+.resources #resources-link a,
.videos #videos-link a {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
.guide #guide-link a:hover,
.reference #reference-link a:hover,
.sdk #sdk-link a:hover,
-.community #community-link a:hover,
+.resources #resources-link a:hover,
.videos #videos-link a:hover {
background-image: url(images/bg_images_sprite.png);
background-position: 0 0;
margin:15px 10px 0 0;
}
-/* main */
+/* MAIN BODY */
#mainBodyFluid {
margin: 20px 10px;
clear: both;
}
-/* Footer */
+/* FOOTER */
+
#footer {
float: left;
width:90%;
color:#006699;
}
-#homeBottom td {
- border:0px solid #666;
- padding: 8px 18px 8px 18px;
-}
-
-#homeBottom table {
- width: 100%;
-}
-
-
-#homeBottom {
- padding: 0px 0px 0px 0px;
- float: left;
- width: 585px;
- height: 165px;
- background-image:url(images/home/bg_home_bottom.jpg);
- background-repeat: no-repeat;
-}
-
-.groupTable {
- width: 100%;
-}
-
-.groupTable th {
- padding: 10px;
- color: #ffffff;
- background-color: #6D8293;
- border: 2px solid #fff;
-}
-
-.groupTable td {
- padding: 10px;
- color: #333333;
- background-color: #d9d9d9;
- border: 2px solid #fff;
-}
-
-.groupTable .evenRow td {
- background-color: #ededed;
-}
-
-span.BigBlue {
- color:#336666;
- font-size:1.25em;
- margin: 0em 0em 0em 0em;
- padding-bottom:.5em;
- font-weight: bold;
-}
-
-span.emBlue {
- color: #336666;
- font-style:italic;
-}
-
-.pageTable {
- width: 95%;
- border: none;
-}
-
-.pageTable img {
-vertical-align: bottom;
-}
-
-.pageTable td {
- border: none;
-}
-
-.pageTable td.leftNav {
- width: 100px;
-}
-
-.greenBox {
- margin: 10px 30px 10px 30px;
- padding: 10px 20px 10px 20px;
- background-color: #EBF3DB;
- width: 75%;
-}
-
-.blueBox {
- margin: 10px 30px 10px 30px;
- padding: 10px 20px 10px 20px;
- background-color: #DDF0F2;
- width: 75%;
-}
-
-.blueHR {
- margin: 10px 30px 10px 30px;
- height: 5px;
- background-color: #DDF0F2;
- width: 75%;
-}
-
/* SEARCH FILTER */
+
#search_autocomplete {
color:#aaa;
}
#mainBodyRight ul.videoPreviews img {
margin-top:5px;
}
+
+/* Pretty printing styles. Used with prettify.js. */
+
+.str { color: #080; }
+.kwd { color: #008; }
+.com { color: #800; }
+.typ { color: #606; }
+.lit { color: #066; }
+.pun { color: #660; }
+.pln { color: #000; }
+.tag { color: #008; }
+.atn { color: #606; }
+.atv { color: #080; }
+.dec { color: #606; }
+
+@media print {
+ .str { color: #060; }
+ .kwd { color: #006; font-weight: bold; }
+ .com { color: #600; font-style: italic; }
+ .typ { color: #404; font-weight: bold; }
+ .lit { color: #044; }
+ .pun { color: #440; }
+ .pln { color: #000; }
+ .tag { color: #006; font-weight: bold; }
+ .atn { color: #404; }
+ .atv { color: #060; }
+}
.listhead li {
font-weight: bold;
}
-
+
.listhead li *, /*ie*/.listhead li li {
font-weight: normal;
}
padding:0;
}
+div.figure {
+ float:right;
+ padding:0 0 20px 20px;
+ /* width must be defined w/ an inline style matching the image width */
+}
+
+#jd-content div.figure img {
+ display:block;
+ margin:0 0 10px 0;
+}
/* BEGIN quickview sidebar element styles */
var isMobile = false; // true if mobile, so we can adjust some layout
var isIE6 = false; // true if IE6
+// TODO: use $(document).ready instead
function addLoadEvent(newfun) {
var current = window.onload;
if (typeof window.onload != 'function') {
}
}
-var agent = navigator['userAgent'];
+var agent = navigator['userAgent'].toLowerCase();
// If a mobile phone, set flag and do mobile setup
-if ((agent.indexOf("Mobile") != -1) ||
- (agent.indexOf("BlackBerry") != -1) ||
- (agent.indexOf("Mini") != -1)) {
+if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
+ (agent.indexOf("blackberry") != -1) ||
+ (agent.indexOf("webos") != -1) ||
+ (agent.indexOf("mini") != -1)) { // opera mini browsers
isMobile = true;
addLoadEvent(mobileSetup);
// If not a mobile browser, set the onresize event for IE6, and others
-} else if (agent.indexOf("MSIE 6.0") != -1) {
+} else if (agent.indexOf("msie 6") != -1) {
isIE6 = true;
addLoadEvent(function() {
window.onresize = resizeAll;
document.getElementsByTagName("head")[0].appendChild(lists);
} );
+addLoadEvent( function() {
+ $("pre").addClass("prettyprint");
+ prettyPrint();
+} );
+
function setToRoot(root) {
toRoot = root;
// note: toRoot also used by carousel.js
var cookiePath = "reference_";
} else if (location.href.indexOf("/guide/") != -1) {
var cookiePath = "guide_";
+ } else if (location.href.indexOf("/resources/") != -1) {
+ var cookiePath = "resources_";
}
if (!isMobile) {
function highlightNav(fullPageName) {
var lastSlashPos = fullPageName.lastIndexOf("/");
- var firstSlashPos = (fullPageName.indexOf("/guide/") != -1) ?
- fullPageName.indexOf("/guide/") :
- fullPageName.indexOf("/sdk/"); // first slash after /guide or /sdk
+ var firstSlashPos;
+ if (fullPageName.indexOf("/guide/") != -1) {
+ firstSlashPos = fullPageName.indexOf("/guide/");
+ } else if (fullPageName.indexOf("/sdk/") != -1) {
+ firstSlashPos = fullPageName.indexOf("/sdk/");
+ } else {
+ firstSlashPos = fullPageName.indexOf("/resources/");
+ }
if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html')
fullPageName = fullPageName + "index.html";
}
var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length);
var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5);
var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
- if ((link.length == 0) && (fullPageName.indexOf("/guide/") != -1)) {
+ if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/resources/") != -1))) {
// if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide)
lastBackstep = pathPageName.lastIndexOf("/");
while (link.length == 0) {
// If in the dev guide docs, also resize the "devdoc-nav" div
} else if (href.indexOf("/guide/") != -1) {
$("#devdoc-nav").css({height:sidenav.css("height")});
+ } else if (href.indexOf("/resources/") != -1) {
+ $("#devdoc-nav").css({height:sidenav.css("height")});
}
}
writeCookie("lastpage", path, "reference", null);
} else if (path.indexOf("/guide/") != -1) {
writeCookie("lastpage", path, "guide", null);
+ } else if (path.indexOf("/resources/") != -1) {
+ writeCookie("lastpage", path, "resources", null);
}
});
--- /dev/null
+(function(){
+var o=true,r=null,z=false;window.PR_SHOULD_USE_CONTINUATION=o;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var N=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);window._pr_isIE6=function(){return N};return N};
+var aa="!",ba="!=",ca="!==",F="#",da="%",ea="%=",G="&",fa="&&",ja="&&=",ka="&=",H="(",la="*",ma="*=",na="+=",oa=",",pa="-=",qa="->",ra="/",sa="/=",ta=":",ua="::",va=";",I="<",wa="<<",xa="<<=",ya="<=",za="=",Aa="==",Ba="===",J=">",Ca=">=",Da=">>",Ea=">>=",Fa=">>>",Ga=">>>=",Ha="?",Ia="@",L="[",M="^",Ta="^=",Ua="^^",Va="^^=",Wa="{",O="|",Xa="|=",Ya="||",Za="||=",$a="~",ab="break",bb="case",cb="continue",db="delete",eb="do",fb="else",gb="finally",hb="instanceof",ib="return",jb="throw",kb="try",lb="typeof",
+mb="(?:^^|[+-]",nb="\\$1",ob=")\\s*",pb="&",qb="<",rb=">",sb=""",tb="&#",ub="x",vb="'",wb='"',xb=" ",yb="XMP",zb="</",Ab='="',P="",Q="\\",Bb="b",Cb="t",Db="n",Eb="v",Fb="f",Gb="r",Hb="u",Ib="0",Jb="1",Kb="2",Lb="3",Mb="4",Nb="5",Ob="6",Pb="7",Qb="\\x0",Rb="\\x",Sb="-",Tb="]",Ub="\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]",R="g",Vb="\\B",Wb="\\b",Xb="\\D",Yb="\\d",Zb="\\S",$b="\\s",ac="\\W",bc="\\w",cc="(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
+dc="(?:",ec=")",fc="gi",gc="PRE",hc='<!DOCTYPE foo PUBLIC "foo bar">\n<foo />',ic="\t",jc="\n",kc="[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z][^>]*>|<",lc="nocode",mc=' $1="$2$3$4"',S="pln",nc="string",T="lang-",oc="src",U="str",pc="'\"",qc="'\"`",rc="\"'",V="com",sc="lang-regex",tc="(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)",uc="kwd",vc="^(?:",wc=")\\b",xc=" \r\n\t\u00a0",yc="lit",zc="typ",Ac="0123456789",Y="pun",Bc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
+Cc="</span>",Dc='<span class="',Ec='">',Fc="$1 ",Gc=" <br />",Hc="<br />",Ic="console",Jc="cannot override language handler %s",Kc="default-markup",Lc="default-code",Mc="dec",Z="lang-js",$="lang-css",Nc="lang-in.tag",Oc="htm",Pc="html",Qc="mxml",Rc="xhtml",Sc="xml",Tc="xsl",Uc=" \t\r\n",Vc="atv",Wc="tag",Xc="atn",Yc="lang-uq.val",Zc="in.tag",$c="uq.val",ad="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",
+bd="c",cd="cc",dd="cpp",ed="cxx",fd="cyc",gd="m",hd="null true false",id="json",jd="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
+kd="cs",ld="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",md="java",nd="break continue do else for if return while case done elif esac eval fi function in local set then until ",
+od="bsh",pd="csh",qd="sh",rd="break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",sd="cv",td="py",ud="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",vd="perl",wd="pl",xd="pm",yd="break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
+zd="rb",Ad="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN ",Bd="js",Cd="regex",Dd="pre",Ed="code",Fd="xmp",Gd="prettyprint",Hd="class",Id="br",Jd="\r";
+(function(){var N=function(){for(var a=[aa,ba,ca,F,da,ea,G,fa,ja,ka,H,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,I,wa,xa,ya,za,Aa,Ba,J,Ca,Da,Ea,Fa,Ga,Ha,Ia,L,M,Ta,Ua,Va,Wa,O,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb],b=mb,c=0;c<a.length;++c)b+=O+a[c].replace(/([^=<>:&a-z])/g,nb);b+=ob;return b}(),Ja=/&/g,Ka=/</g,La=/>/g,Kd=/\"/g;function Ld(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb).replace(Kd,sb)}function ga(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb)}var Md=/</g,Nd=/>/g,
+Od=/'/g,Pd=/"/g,Qd=/&/g,Rd=/ /g;function Sd(a){var b=a.indexOf(G);if(b<0)return a;for(--b;(b=a.indexOf(tb,b+1))>=0;){var c=a.indexOf(va,b);if(c>=0){var d=a.substring(b+3,c),g=10;if(d&&d.charAt(0)===ub){d=d.substring(1);g=16}var i=parseInt(d,g);isNaN(i)||(a=a.substring(0,b)+String.fromCharCode(i)+a.substring(c+1))}}return a.replace(Md,I).replace(Nd,J).replace(Od,vb).replace(Pd,wb).replace(Qd,G).replace(Rd,xb)}function Ma(a){return yb===a.tagName}function W(a,b){switch(a.nodeType){case 1:var c=
+a.tagName.toLowerCase();b.push(I,c);for(var d=0;d<a.attributes.length;++d){var g=a.attributes[d];if(g.specified){b.push(xb);W(g,b)}}b.push(J);for(var i=a.firstChild;i;i=i.nextSibling)W(i,b);if(a.firstChild||!/^(?:br|link|img)$/.test(c))b.push(zb,c,J);break;case 2:b.push(a.name.toLowerCase(),Ab,Ld(a.value),wb);break;case 3:case 4:b.push(ga(a.nodeValue));break}}function Na(a){for(var b=0,c=z,d=z,g=0,i=a.length;g<i;++g){var m=a[g];if(m.ignoreCase)d=o;else if(/[a-z]/i.test(m.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
+P))){c=o;d=z;break}}function l(j){if(j.charAt(0)!==Q)return j.charCodeAt(0);switch(j.charAt(1)){case Bb:return 8;case Cb:return 9;case Db:return 10;case Eb:return 11;case Fb:return 12;case Gb:return 13;case Hb:case ub:return parseInt(j.substring(2),16)||j.charCodeAt(1);case Ib:case Jb:case Kb:case Lb:case Mb:case Nb:case Ob:case Pb:return parseInt(j.substring(1),8);default:return j.charCodeAt(1)}}function n(j){if(j<32)return(j<16?Qb:Rb)+j.toString(16);var f=String.fromCharCode(j);if(f===Q||f===Sb||
+f===L||f===Tb)f=Q+f;return f}function q(j){for(var f=j.substring(1,j.length-1).match(new RegExp(Ub,R)),s=[],k=[],h=f[0]===M,e=h?1:0,p=f.length;e<p;++e){var t=f[e];switch(t){case Vb:case Wb:case Xb:case Yb:case Zb:case $b:case ac:case bc:s.push(t);continue}var u=l(t),x;if(e+2<p&&Sb===f[e+1]){x=l(f[e+2]);e+=2}else x=u;k.push([u,x]);if(!(x<65||u>122)){x<65||u>90||k.push([Math.max(65,u)|32,Math.min(x,90)|32]);x<97||u>122||k.push([Math.max(97,u)&-33,Math.min(x,122)&-33])}}k.sort(function(Oa,Pa){return Oa[0]-
+Pa[0]||Pa[1]-Oa[1]});var B=[],E=[NaN,NaN];for(e=0;e<k.length;++e){var A=k[e];if(A[0]<=E[1]+1)E[1]=Math.max(E[1],A[1]);else B.push(E=A)}var D=[L];h&&D.push(M);D.push.apply(D,s);for(e=0;e<B.length;++e){A=B[e];D.push(n(A[0]));if(A[1]>A[0]){A[1]+1>A[0]&&D.push(Sb);D.push(n(A[1]))}}D.push(Tb);return D.join(P)}function v(j){var f=j.source.match(new RegExp(cc,R)),s=f.length,k=[],h,e=0;for(h=0;e<s;++e){var p=f[e];if(p===H)++h;else if(Q===p.charAt(0)){var t=+p.substring(1);if(t&&t<=h)k[t]=-1}}for(e=1;e<k.length;++e)if(-1===
+k[e])k[e]=++b;for(h=e=0;e<s;++e){p=f[e];if(p===H){++h;if(k[h]===undefined)f[e]=dc}else if(Q===p.charAt(0))if((t=+p.substring(1))&&t<=h)f[e]=Q+k[h]}for(h=e=0;e<s;++e)if(M===f[e]&&M!==f[e+1])f[e]=P;if(j.ignoreCase&&c)for(e=0;e<s;++e){p=f[e];var u=p.charAt(0);if(p.length>=2&&u===L)f[e]=q(p);else if(u!==Q)f[e]=p.replace(/[a-zA-Z]/g,function(x){var B=x.charCodeAt(0);return L+String.fromCharCode(B&-33,B|32)+Tb})}return f.join(P)}var w=[];g=0;for(i=a.length;g<i;++g){m=a[g];if(m.global||m.multiline)throw new Error(P+
+m);w.push(dc+v(m)+ec)}return new RegExp(w.join(O),d?fc:R)}var ha=r;function Td(a){if(r===ha){var b=document.createElement(gc);b.appendChild(document.createTextNode(hc));ha=!/</.test(b.innerHTML)}if(ha){var c=a.innerHTML;if(Ma(a))c=ga(c);return c}for(var d=[],g=a.firstChild;g;g=g.nextSibling)W(g,d);return d.join(P)}function Ud(a){var b=0;return function(c){for(var d=r,g=0,i=0,m=c.length;i<m;++i){var l=c.charAt(i);switch(l){case ic:d||(d=[]);d.push(c.substring(g,i));var n=a-b%a;for(b+=n;n>=0;n-=" ".length)d.push(" ".substring(0,
+n));g=i+1;break;case jc:b=0;break;default:++b}}if(!d)return c;d.push(c.substring(g));return d.join(P)}}var Vd=new RegExp(kc,R),Wd=/^<\!--/,Xd=/^<\[CDATA\[/,Yd=/^<br\b/i,Qa=/^<(\/?)([a-zA-Z]+)/;function Zd(a){var b=a.match(Vd),c=[],d=0,g=[];if(b)for(var i=0,m=b.length;i<m;++i){var l=b[i];if(l.length>1&&l.charAt(0)===I){if(!Wd.test(l))if(Xd.test(l)){c.push(l.substring(9,l.length-3));d+=l.length-12}else if(Yd.test(l)){c.push(jc);++d}else if(l.indexOf(lc)>=0&&$d(l)){var n=l.match(Qa)[2],q=1,v;v=i+1;a:for(;v<
+m;++v){var w=b[v].match(Qa);if(w&&w[2]===n)if(w[1]===ra){if(--q===0)break a}else++q}if(v<m){g.push(d,b.slice(i,v+1).join(P));i=v}else g.push(d,l)}else g.push(d,l)}else{var j=Sd(l);c.push(j);d+=j.length}}return{source:c.join(P),tags:g}}function $d(a){return!!a.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,mc).match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function ia(a,b,c,d){if(b){var g={source:b,b:a};c(g);d.push.apply(d,g.c)}}function K(a,b){var c={},d;(function(){for(var m=a.concat(b),
+l=[],n={},q=0,v=m.length;q<v;++q){var w=m[q],j=w[3];if(j)for(var f=j.length;--f>=0;)c[j.charAt(f)]=w;var s=w[1],k=P+s;if(!n.hasOwnProperty(k)){l.push(s);n[k]=r}}l.push(/[\0-\uffff]/);d=Na(l)})();var g=b.length,i=function(m){for(var l=m.source,n=m.b,q=[n,S],v=0,w=l.match(d)||[],j={},f=0,s=w.length;f<s;++f){var k=w[f],h=j[k],e,p;if(typeof h===nc)p=z;else{var t=c[k.charAt(0)];if(t){e=k.match(t[1]);h=t[0]}else{for(var u=0;u<g;++u){t=b[u];if(e=k.match(t[1])){h=t[0];break}}e||(h=S)}if((p=h.length>=5&&T===
+h.substring(0,5))&&!(e&&e[1])){p=z;h=oc}p||(j[k]=h)}var x=v;v+=k.length;if(p){var B=e[1],E=k.indexOf(B),A=E+B.length,D=h.substring(5);ia(n+x,k.substring(0,E),i,q);ia(n+x+E,B,Ra(D,B),q);ia(n+x+A,k.substring(A),i,q)}else q.push(n+x,h)}m.c=q};return i}function C(a){var b=[],c=[];if(a.tripleQuotedStrings)b.push([U,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,r,pc]);
+else a.multiLineStrings?b.push([U,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,r,qc]):b.push([U,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,r,rc]);if(a.hashComments)a.cStyleComments?b.push([V,/^#(?:[^\r\n\/]|\/(?!\*)|\/\*[^\r\n]*?\*\/)*/,r,F]):b.push([V,/^#[^\r\n]*/,r,F]);if(a.cStyleComments){c.push([V,/^\/\/[^\r\n]*/,r]);c.push([V,/^\/\*[\s\S]*?(?:\*\/|$)/,r])}a.regexLiterals&&c.push([sc,new RegExp(M+N+tc)]);var d=
+a.keywords.replace(/^\s+|\s+$/g,P);d.length&&c.push([uc,new RegExp(vc+d.replace(/\s+/g,O)+wc),r]);b.push([S,/^\s+/,r,xc]);c.push([yc,/^@[a-z_$][a-z_$@0-9]*/i,r,Ia],[zc,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,r],[S,/^[a-z_$][a-z_$@0-9]*/i,r],[yc,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,r,Ac],[Y,/^.[^\s\w\.$@\'\"\`\/\#]*/,r]);return K(b,c)}var ae=C({keywords:Bc,hashComments:o,cStyleComments:o,multiLineStrings:o,regexLiterals:o});function be(a){var b=a.source,c=a.f,d=a.c,
+g=[],i=0,m=r,l=r,n=0,q=0,v=Ud(window.PR_TAB_WIDTH),w=/([\r\n ]) /g,j=/(^| ) /gm,f=/\r\n?|\n/g,s=/[ \r\n]$/,k=o;function h(p){if(p>i){if(m&&m!==l){g.push(Cc);m=r}if(!m&&l){m=l;g.push(Dc,m,Ec)}var t=ga(v(b.substring(i,p))).replace(k?j:w,Fc);k=s.test(t);var u=window._pr_isIE6()?Gc:Hc;g.push(t.replace(f,u));i=p}}for(;1;){var e;if(e=n<c.length?q<d.length?c[n]<=d[q]:o:z){h(c[n]);if(m){g.push(Cc);m=r}g.push(c[n+1]);n+=2}else if(q<d.length){h(d[q]);l=d[q+1];q+=2}else break}h(b.length);m&&g.push(Cc);a.a=g.join(P)}
+var X={};function y(a,b){for(var c=b.length;--c>=0;){var d=b[c];if(X.hasOwnProperty(d))Ic in window&&console.i(Jc,d);else X[d]=a}}function Ra(a,b){a&&X.hasOwnProperty(a)||(a=/^\s*</.test(b)?Kc:Lc);return X[a]}y(ae,[Lc]);y(K([],[[S,/^[^<?]+/],[Mc,/^<!\w[^>]*(?:>|$)/],[V,/^<\!--[\s\S]*?(?:-\->|$)/],[T,/^<\?([\s\S]+?)(?:\?>|$)/],[T,/^<%([\s\S]+?)(?:%>|$)/],[Y,/^(?:<[%?]|[%?]>)/],[T,/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],[Z,/^<script\b[^>]*>([\s\S]+?)<\/script\b[^>]*>/i],[$,/^<style\b[^>]*>([\s\S]+?)<\/style\b[^>]*>/i],
+[Nc,/^(<\/?[a-z][^<>]*>)/i]]),[Kc,Oc,Pc,Qc,Rc,Sc,Tc]);y(K([[S,/^[\s]+/,r,Uc],[Vc,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,r,rc]],[[Wc,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Xc,/^(?!style\b|on)[a-z](?:[\w:-]*\w)?/],[Yc,/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Y,/^[=<>\/]+/],[Z,/^on\w+\s*=\s*\"([^\"]+)\"/i],[Z,/^on\w+\s*=\s*\'([^\']+)\'/i],[Z,/^on\w+\s*=\s*([^\"\'>\s]+)/i],[$,/^sty\w+\s*=\s*\"([^\"]+)\"/i],[$,/^sty\w+\s*=\s*\'([^\']+)\'/i],[$,/^sty\w+\s*=\s*([^\"\'>\s]+)/i]]),[Zc]);y(K([],[[Vc,/^[\s\S]+/]]),
+[$c]);y(C({keywords:ad,hashComments:o,cStyleComments:o}),[bd,cd,dd,ed,fd,gd]);y(C({keywords:hd}),[id]);y(C({keywords:jd,hashComments:o,cStyleComments:o}),[kd]);y(C({keywords:ld,cStyleComments:o}),[md]);y(C({keywords:nd,hashComments:o,multiLineStrings:o}),[od,pd,qd]);y(C({keywords:rd,hashComments:o,multiLineStrings:o,tripleQuotedStrings:o}),[sd,td]);y(C({keywords:ud,hashComments:o,multiLineStrings:o,regexLiterals:o}),[vd,wd,xd]);y(C({keywords:yd,hashComments:o,multiLineStrings:o,regexLiterals:o}),
+[zd]);y(C({keywords:Ad,cStyleComments:o,regexLiterals:o}),[Bd]);y(K([],[[U,/^[\s\S]+/]]),[Cd]);function Sa(a){var b=a.e,c=a.d;a.a=b;try{var d=Zd(b),g=d.source;a.source=g;a.b=0;a.f=d.tags;Ra(c,g)(a);be(a)}catch(i){if(Ic in window){console.log(i);console.h()}}}function ce(a,b){var c={e:a,d:b};Sa(c);return c.a}function de(a){for(var b=window._pr_isIE6(),c=[document.getElementsByTagName(Dd),document.getElementsByTagName(Ed),document.getElementsByTagName(Fd)],d=[],g=0;g<c.length;++g)for(var i=0,m=c[g].length;i<
+m;++i)d.push(c[g][i]);c=r;var l=Date;l.now||(l={now:function(){return(new Date).getTime()}});var n=0,q;function v(){for(var j=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;n<d.length&&l.now()<j;n++){var f=d[n];if(f.className&&f.className.indexOf(Gd)>=0){var s=f.className.match(/\blang-(\w+)\b/);if(s)s=s[1];for(var k=z,h=f.parentNode;h;h=h.parentNode)if((h.tagName===Dd||h.tagName===Ed||h.tagName===Fd)&&h.className&&h.className.indexOf(Gd)>=0){k=o;break}if(!k){var e=Td(f);e=e.replace(/(?:\r\n?|\n)$/,
+P);q={e:e,d:s,g:f};Sa(q);w()}}}if(n<d.length)setTimeout(v,250);else a&&a()}function w(){var j=q.a;if(j){var f=q.g;if(Ma(f)){for(var s=document.createElement(gc),k=0;k<f.attributes.length;++k){var h=f.attributes[k];if(h.specified){var e=h.name.toLowerCase();if(e===Hd)s.className=h.value;else s.setAttribute(h.name,h.value)}}s.innerHTML=j;f.parentNode.replaceChild(s,f);f=s}else f.innerHTML=j;if(b&&f.tagName===gc)for(var p=f.getElementsByTagName(Id),t=p.length;--t>=0;){var u=p[t];u.parentNode.replaceChild(document.createTextNode(Jd),
+u)}}}v()}window.PR_normalizedHtml=W;window.prettyPrintOne=ce;window.prettyPrint=de;window.PR={combinePrefixPatterns:Na,createSimpleLexer:K,registerLangHandler:y,sourceDecorator:C,PR_ATTRIB_NAME:Xc,PR_ATTRIB_VALUE:Vc,PR_COMMENT:V,PR_DECLARATION:Mc,PR_KEYWORD:uc,PR_LITERAL:yc,PR_NOCODE:lc,PR_PLAIN:S,PR_PUNCTUATION:Y,PR_SOURCE:oc,PR_STRING:U,PR_TAG:Wc,PR_TYPE:zc}})();
+})()
<div id="jd-content">
-
<div class="jd-descr">
<?cs call:tag_list(root.descr) ?>
</div>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
\ No newline at end of file
+<!DOCTYPE html>
\ No newline at end of file
if:page.title ?><?cs
var:page.title ?> | <?cs
/if ?>Android Developers</title><?cs
-if:guide||sdk ?>
+if:guide||sdk||resources ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" /><?cs
else ?>
<link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /><?cs
<script src="<?cs var:toroot ?>assets/search_autocomplete.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>assets/jquery-resizable.min.js" type="text/javascript"></script>
<script src="<?cs var:toroot ?>assets/android-developer-docs.js" type="text/javascript"></script>
+<script src="<?cs var:toroot ?>assets/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
setToRoot("<?cs var:toroot ?>");
</script><?cs
each:tag = tags ?><?cs
if:tag.name == "Text" ?><?cs var:tag.text?><?cs
elif:tag.kind == "@more" ?><p><?cs
- elif:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
+ elif:tag.kind == "@see" ?><code><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a></code><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
- elif:tag.kind == "@code" ?><code class="Code prettyprint"><?cs var:tag.text ?></code><?cs
- elif:tag.kind == "@samplecode" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
- elif:tag.name == "@sample" ?><pre class="Code prettyprint"><?cs var:tag.text ?></pre><?cs
+ elif:tag.kind == "@code" ?><code><?cs var:tag.text ?></code><?cs
+ elif:tag.kind == "@samplecode" ?><pre><?cs var:tag.text ?></pre><?cs
+ elif:tag.name == "@sample" ?><pre><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@include" ?><?cs var:tag.text ?><?cs
elif:tag.kind == "@docRoot" ?><?cs var:toroot ?><?cs
elif:tag.kind == "@sdkCurrent" ?><?cs var:sdk.current ?><?cs
<h5 class="jd-tagtitle">See Also</h5>
<ul class="nolist"><?cs
each:tag=also ?><li><?cs
- if:tag.kind == "@see" ?><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs
- var:tag.label ?></a><?cs
+ if:tag.kind == "@see" ?><code><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs
+ var:tag.label ?></a></code><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
else ?>[ERROR: Unknown @see kind]<?cs
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
-<?cs set:guide="true" ?>
+<?cs set:resources="true" ?>
<html>
<?cs include:"head_tag.cs" ?>
<?cs include:"header.cs" ?>
+<body class="gc-documentation">
-<div class="g-unit" id="doc-content"><a name="top"></a>
-<div id="jd-header" class="guide-header">
-
- <span class="crumb">
- <a href="<?cs var:toroot ?>guide/samples/index.html">Sample Code ></a>
-
- </span>
-<h1><?cs var:page.title ?></h1>
-</div>
+<a name="top"></a>
+<div class="g-unit" id="doc-content">
+ <div id="jd-header" class="guide-header">
+ <span class="crumb"> </span>
+ <h1><?cs var:page.title ?></h1>
+ </div>
<div id="jd-content">
<p>The file containing the source code shown below is located in the corresponding directory in <code><sdk>/platforms/android-<version>/samples/...</code></p>
<!-- begin file contents -->
-<pre class="Code prettyprint"><?cs var:fileContents ?></pre>
+<pre><?cs var:fileContents ?></pre>
<!-- end file contents -->
<?cs include:"footer.cs" ?>
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
-<?cs set:guide="true" ?>
+<?cs set:resources="true" ?>
<html>
<?cs include:"head_tag.cs" ?>
<?cs include:"header.cs" ?>
+<body class="gc-documentation">
-<div class="g-unit" id="doc-content"><a name="top"></a>
-<div id="jd-header" class="guide-header">
-
- <span class="crumb">
- <a href="<?cs var:toroot ?>guide/samples/index.html">Sample Code ></a>
-
- </span>
-<h1><?cs var:page.title ?></h1>
-</div>
+<a name="top"></a>
+<div class="g-unit" id="doc-content">
+ <div id="jd-header" class="guide-header">
+ <span class="crumb"> </span>
+ <h1><?cs var:page.title ?></h1>
+ </div>
<div id="jd-content">
<?cs var:summary ?>
-<?cs if:subcount(subdirs) ?>
- <h2>Subdirectories</h2>
- <ul class="nolist">
- <?cs each:dir=subdirs ?>
- <li><a href="<?cs var:dir.name ?>/index.html"><?cs var:dir.name ?>/</a></li>
- <?cs /each ?>
- </ul>
-<?cs /if ?>
-
-<?cs if:subcount(files) ?>
- <h2>Files</h2>
- <ul class="nolist">
- <?cs each:file=files ?>
- <li><a href="<?cs var:file.href ?>"><?cs var:file.name ?></a></li>
- <?cs /each ?>
- </ul>
-<?cs /if ?>
+<?cs if:android.whichdoc == "online" ?><?cs
+ # If this is the online docs, build the src code navigation links ?>
+
+ <?cs if:subcount(subdirs) ?>
+ <h2>Subdirectories</h2>
+ <ul class="nolist">
+ <?cs each:dir=subdirs ?>
+ <li><a href="<?cs var:dir.name ?>/index.html"><?cs
+ var:dir.name ?>/</a></li>
+ <?cs /each ?>
+ </ul>
+ <?cs /if ?>
+
+ <?cs if:subcount(files) ?>
+ <h2>Files</h2>
+ <ul class="nolist">
+ <?cs each:file=files ?>
+ <li><a href="<?cs var:file.href ?>"><?cs
+ var:file.name ?></a></li>
+ <?cs /each ?>
+ </ul>
+ <?cs /if ?>
+
+<?cs else ?><?cs
+ # else, this means it's offline docs,
+ so don't show src links (we don't have the pages!) ?>
+
+<p>You can find the source code for this sample in your SDK at:</p>
+<p style="margin-left:2em">
+<code><em><sdk></em>/platforms/android-<em><version></em>/samples/</code>
+</p>
+
+<?cs /if ?><?cs # end if/else online docs ?>
-<?cs include:"footer.cs" ?>
</div><!-- end jd-content -->
+
+<?cs include:"footer.cs" ?>
+
</div><!-- end doc-content -->
<?cs include:"trailer.cs" ?>
OPTIONS.verbose = False
OPTIONS.tempfiles = []
OPTIONS.device_specific = None
+OPTIONS.extras = {}
class ExternalError(RuntimeError): pass
Path to the python module containing device-specific
releasetools code.
+ -x (--extra) <key=value>
+ Add a key/value pair to the 'extras' dict, which device-specific
+ extension code may look at.
+
-v (--verbose)
Show command lines being executed.
try:
opts, args = getopt.getopt(
- argv, "hvp:s:" + extra_opts,
- ["help", "verbose", "path=", "device_specific="] +
+ argv, "hvp:s:x:" + extra_opts,
+ ["help", "verbose", "path=", "device_specific=", "extra="] +
list(extra_long_opts))
except getopt.GetoptError, err:
Usage(docstring)
OPTIONS.search_path = a
elif o in ("-s", "--device_specific"):
OPTIONS.device_specific = a
+ elif o in ("-x", "--extra"):
+ key, value = a.split("=", 1)
+ OPTIONS.extras[key] = value
else:
if extra_option_handler is None or not extra_option_handler(o, a):
assert False, "unknown option \"%s\"" % (o,)
module."""
for k, v in kwargs.iteritems():
setattr(self, k, v)
+ self.extras = OPTIONS.extras
if self.module is None:
path = OPTIONS.device_specific
the last component of the build fingerprint). Prefix each with
'+' or '-' to indicate whether that tag should be added or
removed. Changes are processed in the order they appear.
- Default value is "-test-keys,+ota-rel-keys,+release-keys".
+ Default value is "-test-keys,+release-keys".
"""
OPTIONS.extra_apks = {}
OPTIONS.key_map = {}
OPTIONS.replace_ota_keys = False
-OPTIONS.tag_changes = ("-test-keys", "+ota-rel-keys", "+release-keys")
+OPTIONS.tag_changes = ("-test-keys", "+release-keys")
def GetApkCerts(tf_zip):
certmap = {}