diff --git a/cleanspec.mk b/cleanspec.mk index f7a215b382..75f83bfb02 100644 --- a/cleanspec.mk +++ b/cleanspec.mk @@ -58,6 +58,8 @@ INTERNAL_CLEAN_BUILD_VERSION := 2 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/NOTICE.html) # Remove generated java files after CL 126153 $(call add-clean-step, find $(OUT_DIR) -type f -name "*.java" -print0 | xargs -0 rm -f) +$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates) +$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sapphire/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/led) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST diff --git a/core/Makefile b/core/Makefile index 0d82299ee4..a87f606fbf 100644 --- a/core/Makefile +++ b/core/Makefile @@ -809,6 +809,11 @@ define package_files-copy-root fi endef +built_ota_tools := \ + $(hide) $(ACP) $(call intermediates-dir-for,EXECUTABLES,applypatch)/applypatch \ + $(hide) $(ACP) $(call intermediates-dir-for,EXECUTABLES,check_prereq)/check_prereq +$(BUILT_TARGET_FILES_PACKAGE): PRIVATE_OTA_TOOLS := $(built_ota_tools) + # Depending on the various images guarantees that the underlying # directories are up-to-date. $(BUILT_TARGET_FILES_PACKAGE): \ @@ -820,6 +825,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \ $(INSTALLED_USERDATAIMAGE_TARGET) \ $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ $(INTERNAL_OTA_SCRIPT_TARGET) \ + $(built_ota_tools) \ $(APKCERTS_FILE) \ | $(ACP) @echo "Package target files: $@" @@ -865,10 +871,11 @@ endif $(hide) $(call package_files-copy-root, \ $(TARGET_OUT_DATA),$(zip_root)/DATA) @# Extra contents of the OTA package - $(hide) mkdir -p $(zip_root)/OTA + $(hide) mkdir -p $(zip_root)/OTA/bin $(hide) $(call package_files-copy-root, \ $(INTERNAL_OTA_INTERMEDIATES_DIR),$(zip_root)/OTA) $(hide) $(ACP) $(INSTALLED_ANDROID_INFO_TXT_TARGET) $(zip_root)/OTA/ + $(hide) $(ACP) $(PRIVATE_OTA_TOOLS) $(zip_root)/OTA/bin/ @# Files that don't end up in any images, but are necessary to @# build them. $(hide) mkdir -p $(zip_root)/META diff --git a/core/definitions.mk b/core/definitions.mk index 780d8fbdc6..67f7166fb3 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -243,15 +243,9 @@ endef ########################################################### define find-subdir-assets -$(if $(1),\ - $(patsubst ./%,%, $(foreach dir,$(1),\ - $(shell if [ -d $(dir) ] ; then\ - cd $(dir) ; find ./ -type f -and -not -type l ;\ - fi \ - ) \ - )) \ -, \ - $(warning Empty argument supplied to find-subdir-assets) \ +$(if $(1),$(patsubst ./%,%, \ + $(shell if [ -d $(1) ] ; then cd $(1) ; find ./ -type f -and -not -type l ; fi)), \ + $(warning Empty argument supplied to find-subdir-assets) \ ) endef diff --git a/core/package.mk b/core/package.mk index ba41495acd..32f394f55a 100644 --- a/core/package.mk +++ b/core/package.mk @@ -65,9 +65,11 @@ LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets endif ifeq (,$(LOCAL_RESOURCE_DIR)) -LOCAL_RESOURCE_DIR := $(wildcard $(addsuffix /$(LOCAL_PATH)/res, $(PRODUCT_PACKAGE_OVERLAYS))) \ - $(LOCAL_PATH)/res + LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res endif +LOCAL_RESOURCE_DIR := \ + $(wildcard $(addsuffix /$(LOCAL_RESOURCE_DIR), $(PRODUCT_PACKAGE_OVERLAYS))) \ + $(LOCAL_RESOURCE_DIR) # this is an app, so add the system libraries to the search path LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) @@ -77,8 +79,14 @@ LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) all_assets := $(call find-subdir-assets,$(LOCAL_ASSET_DIR)) all_assets := $(addprefix $(LOCAL_ASSET_DIR)/,$(patsubst assets/%,%,$(all_assets))) -all_resources := $(call find-subdir-assets,$(LOCAL_RESOURCE_DIR)) -all_resources := $(addprefix $(LOCAL_RESOURCE_DIR)/,$(patsubst res/%,%,$(all_resources))) +all_resources := $(strip \ + $(foreach dir, $(LOCAL_RESOURCE_DIR), \ + $(addprefix $(dir)/, \ + $(patsubst res/%,%, \ + $(call find-subdir-assets,$(dir)) \ + ) \ + ) \ + )) all_res_assets := $(strip $(all_assets) $(all_resources)) diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index 71c2b8a5fc..1bf3c3f6cb 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -27,6 +27,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/generic.mk \ + $(LOCAL_DIR)/min_dev.mk \ $(LOCAL_DIR)/sdk.mk \ $(LOCAL_DIR)/sim.mk \ $(LOCAL_DIR)/generic_with_google.mk diff --git a/target/product/core.mk b/target/product/core.mk index 534925fe88..117bb1123e 100644 --- a/target/product/core.mk +++ b/target/product/core.mk @@ -18,5 +18,6 @@ PRODUCT_PACKAGES := \ MediaProvider \ SettingsProvider \ TelephonyProvider \ + UserDictionaryProvider \ PackageInstaller \ Bugreport diff --git a/target/product/min_dev.mk b/target/product/min_dev.mk new file mode 100644 index 0000000000..34096a3bba --- /dev/null +++ b/target/product/min_dev.mk @@ -0,0 +1,18 @@ + +PRODUCT_POLICY := android.policy_phone +PRODUCT_PROPERTY_OVERRIDES := \ + ro.config.notification_sound=F1_New_SMS.ogg +PRODUCT_BRAND := generic +PRODUCT_NAME := min_dev +PRODUCT_DEVICE := generic + +PRODUCT_PACKAGES := \ + DownloadProvider \ + MediaProvider \ + SettingsProvider \ + PackageInstaller \ + Bugreport \ + Launcher \ + Settings \ + sqlite3 + diff --git a/tools/applypatch/Android.mk b/tools/applypatch/Android.mk index 725c21fc3d..09f9862453 100644 --- a/tools/applypatch/Android.mk +++ b/tools/applypatch/Android.mk @@ -17,12 +17,12 @@ include $(CLEAR_VARS) ifneq ($(TARGET_SIMULATOR),true) -LOCAL_SRC_FILES := applypatch.c xdelta3.c bsdiff.c freecache.c +LOCAL_SRC_FILES := applypatch.c bsdiff.c freecache.c LOCAL_MODULE := applypatch LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_MODULE_TAGS := eng -LOCAL_C_INCLUDES += external/xdelta3 external/bzip2 -LOCAL_STATIC_LIBRARIES += libxdelta3 libmincrypt libbz libc +LOCAL_C_INCLUDES += external/bzip2 +LOCAL_STATIC_LIBRARIES += libmincrypt libbz libc include $(BUILD_EXECUTABLE) diff --git a/tools/applypatch/applypatch.c b/tools/applypatch/applypatch.c index 23ed715bda..9954869c7e 100644 --- a/tools/applypatch/applypatch.c +++ b/tools/applypatch/applypatch.c @@ -1,20 +1,17 @@ /* * Copyright (C) 2008 The Android Open Source Project * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -209,24 +206,6 @@ int CheckMode(int argc, char** argv) { } int ShowLicenses() { - puts("\nCopyright (C) 2008 The Android Open Source Project\n" - "\n" - "This program is free software; you can redistribute it and/or\n" - "modify it under the terms of the GNU General Public License\n" - "as published by the Free Software Foundation; either version 2\n" - "of the License, or (at your option) any later version.\n" - "\n" - "This program is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License\n" - "along with this program; if not, write to the Free Software\n" - "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n" - "02110-1301, USA.\n" - "\n------------------\n" - ); ShowBSDiffLicense(); return 0; } @@ -251,10 +230,10 @@ size_t FreeSpaceForFile(const char* filename) { // successfully. // // - otherwise, if the sha1 hash of is , applies the -// xdelta3 or bsdiff to to produce a new file (the -// type of patch is automatically detected from the file header). -// If that new file has sha1 hash , moves it to replace -// , and exits successfully. +// bsdiff to to produce a new file (the type of patch +// is automatically detected from the file header). If that new +// file has sha1 hash , moves it to replace , and +// exits successfully. // // - otherwise, or if any error is encountered, exits with non-zero // status. @@ -426,12 +405,8 @@ int main(int argc, char** argv) { header[2] == 0xc4 && header[3] == 0) { // xdelta3 patches begin "VCD" (with the high bits set) followed // by a zero byte (the version number). - int result = ApplyXDelta3Patch(source_to_use->data, source_to_use->size, - patch_filename, output, &ctx); - if (result != 0) { - fprintf(stderr, "ApplyXDelta3Patch failed\n"); - return result; - } + fprintf(stderr, "error: xdelta3 patches no longer supported\n"); + return 1; } else if (header_bytes_read >= 8 && memcmp(header, "BSDIFF40", 8) == 0) { int result = ApplyBSDiffPatch(source_to_use->data, source_to_use->size, diff --git a/tools/applypatch/applypatch.h b/tools/applypatch/applypatch.h index 3059e22a99..76fc80aa9e 100644 --- a/tools/applypatch/applypatch.h +++ b/tools/applypatch/applypatch.h @@ -1,20 +1,17 @@ /* * Copyright (C) 2008 The Android Open Source Project * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef _APPLYPATCH_H @@ -44,11 +41,6 @@ typedef struct _FileContents { // applypatch.c size_t FreeSpaceForFile(const char* filename); -// xdelta3.c -int ApplyXDelta3Patch(const unsigned char* old_data, ssize_t old_size, - const char* patch_filename, - FILE* output, SHA_CTX* ctx); - // bsdiff.c void ShowBSDiffLicense(); int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size, diff --git a/tools/applypatch/applypatch.sh b/tools/applypatch/applypatch.sh index 193e7fdee0..181cd5c481 100755 --- a/tools/applypatch/applypatch.sh +++ b/tools/applypatch/applypatch.sh @@ -128,7 +128,7 @@ run_command $WORK_DIR/applypatch -c $WORK_DIR/old.file $BAD2_SHA1 $BAD1_SHA1 && # --------------- apply patch ---------------------- $ADB push $DATA_DIR/old.file $WORK_DIR -$ADB push $DATA_DIR/patch.xdelta3 $WORK_DIR +$ADB push $DATA_DIR/patch.bsdiff $WORK_DIR # Check that the partition has enough space to apply the patch without # copying. If it doesn't, we'll be testing the low-space condition @@ -145,19 +145,6 @@ if (( free_kb * 1024 < NEW_SIZE * 3 / 2 )); then exit 1 fi -testname "apply xdelta3 patch" -run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.xdelta3 || fail -$ADB pull $WORK_DIR/old.file $tmpdir/patched -diff -q $DATA_DIR/new.file $tmpdir/patched || fail - -testname "reapply xdelta3 patch" -run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.xdelta3 || fail -$ADB pull $WORK_DIR/old.file $tmpdir/patched -diff -q $DATA_DIR/new.file $tmpdir/patched || fail - -$ADB push $DATA_DIR/old.file $WORK_DIR -$ADB push $DATA_DIR/patch.bsdiff $WORK_DIR - testname "apply bsdiff patch" run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail $ADB pull $WORK_DIR/old.file $tmpdir/patched @@ -172,7 +159,6 @@ diff -q $DATA_DIR/new.file $tmpdir/patched || fail # --------------- apply patch with low space on /system ---------------------- $ADB push $DATA_DIR/old.file $WORK_DIR -$ADB push $DATA_DIR/patch.xdelta3 $WORK_DIR $ADB push $DATA_DIR/patch.bsdiff $WORK_DIR free_kb=$(free_space $WORK_FS) @@ -182,18 +168,6 @@ run_command dd if=/dev/zero of=$WORK_DIR/bloat.dat count=$((free_kb-512)) bs=102 free_kb=$(free_space $WORK_FS) echo "${free_kb}kb free on /$WORK_FS now." -testname "apply xdelta3 patch with low space" -run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.xdelta3 || fail -$ADB pull $WORK_DIR/old.file $tmpdir/patched -diff -q $DATA_DIR/new.file $tmpdir/patched || fail - -testname "reapply xdelta3 patch with low space" -run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.xdelta3 || fail -$ADB pull $WORK_DIR/old.file $tmpdir/patched -diff -q $DATA_DIR/new.file $tmpdir/patched || fail - -$ADB push $DATA_DIR/old.file $WORK_DIR - testname "apply bsdiff patch with low space" run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail $ADB pull $WORK_DIR/old.file $tmpdir/patched @@ -207,7 +181,6 @@ diff -q $DATA_DIR/new.file $tmpdir/patched || fail # --------------- apply patch with low space on /system and /cache ---------------------- $ADB push $DATA_DIR/old.file $WORK_DIR -$ADB push $DATA_DIR/patch.xdelta3 $WORK_DIR $ADB push $DATA_DIR/patch.bsdiff $WORK_DIR free_kb=$(free_space $WORK_FS) @@ -216,7 +189,7 @@ echo "${free_kb}kb free on /$WORK_FS" run_command mkdir /cache/subdir run_command 'echo > /cache/subdir/a.file' run_command 'echo > /cache/a.file' -run_command mkdir -p /cache/recovery/otatest +run_command mkdir /cache/recovery /cache/recovery/otatest run_command 'echo > /cache/recovery/otatest/b.file' run_command "echo > $CACHE_TEMP_SOURCE" free_kb=$(free_space cache) @@ -268,8 +241,8 @@ $ADB push $DATA_DIR/old.file $CACHE_TEMP_SOURCE # put some junk in the old file run_command dd if=/dev/urandom of=$WORK_DIR/old.file count=100 bs=1024 || fail -testname "apply xdelta3 patch from cache (corrupted source) with low space" -run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.xdelta3 || fail +testname "apply bsdiff patch from cache (corrupted source) with low space" +run_command $WORK_DIR/applypatch $WORK_DIR/old.file $NEW_SHA1 $NEW_SIZE $BAD1_SHA1:$WORK_DIR/foo $OLD_SHA1:$WORK_DIR/patch.bsdiff || fail $ADB pull $WORK_DIR/old.file $tmpdir/patched diff -q $DATA_DIR/new.file $tmpdir/patched || fail diff --git a/tools/applypatch/bsdiff.c b/tools/applypatch/bsdiff.c index f502a6b31e..a2851f9529 100644 --- a/tools/applypatch/bsdiff.c +++ b/tools/applypatch/bsdiff.c @@ -1,20 +1,17 @@ /* * Copyright (C) 2008 The Android Open Source Project * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // This file is a nearly line-for-line copy of bspatch.c from the diff --git a/tools/applypatch/testdata/patch.xdelta3 b/tools/applypatch/testdata/patch.xdelta3 deleted file mode 100644 index 2af3ede5e8..0000000000 Binary files a/tools/applypatch/testdata/patch.xdelta3 and /dev/null differ diff --git a/tools/applypatch/xdelta3.c b/tools/applypatch/xdelta3.c deleted file mode 100644 index c9a0f738cb..0000000000 --- a/tools/applypatch/xdelta3.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include -#include -#include - -#include "xdelta3.h" -#include "mincrypt/sha.h" - -int ApplyXDelta3Patch(const unsigned char* old_data, ssize_t old_size, - const char* patch_filename, - FILE* output, SHA_CTX* ctx) { -#define WINDOW_SIZE 32768 - - int ret; - xd3_stream stream; - xd3_config config; - - xd3_init_config(&config, 0); - config.winsize = WINDOW_SIZE; - ret = xd3_config_stream(&stream, &config); - if (ret != 0) { - fprintf(stderr, "xd3_config_stream error: %s\n", xd3_strerror(ret)); - return 1; - } - - // In xdelta3 terms, the "input" is the patch file: it contains a - // sequence of instruction codes and data that will be executed to - // produce the output file. The "source" is the original data file; - // it is a blob of data to which instructions in the input may refer - // (eg, an instruction may say "copy such-and-such range of bytes - // from the source to the output"). - - // For simplicity, we provide the entire source to xdelta as a - // single block. This means it should never have to ask us to load - // blocks of the source file. - xd3_source source; - source.name = "old name"; - source.size = old_size; - source.ioh = NULL; - source.blksize = old_size; - source.curblkno = 0; - source.curblk = old_data; - source.onblk = old_size; - - ret = xd3_set_source(&stream, &source); - if (ret != 0) { - fprintf(stderr, "xd3_set_source error: %s\n", xd3_strerror(ret)); - return 1; - } - - unsigned char buffer[WINDOW_SIZE]; - FILE* input = fopen(patch_filename, "rb"); - if (input == NULL) { - fprintf(stderr, "failed to open patch file %s: %d (%s)\n", - patch_filename, errno, strerror(errno)); - return 1; - } - - size_t bytes_read; - - do { - bytes_read = fread(buffer, 1, WINDOW_SIZE, input); - if (feof(input)) { - xd3_set_flags(&stream, XD3_FLUSH); - } - xd3_avail_input(&stream, buffer, bytes_read); - process: - ret = xd3_decode_input(&stream); - switch (ret) { - case XD3_INPUT: - continue; - case XD3_OUTPUT: - SHA_update(ctx, stream.next_out, stream.avail_out); - if (fwrite(stream.next_out, 1, stream.avail_out, output) != - stream.avail_out) { - fprintf(stderr, "short write of output file: %d (%s)\n", - errno, strerror(errno)); - return 1; - } - xd3_consume_output(&stream); - goto process; - case XD3_GETSRCBLK: - // We provided the entire source file already; it should never - // have to ask us for a block. - fprintf(stderr, "xd3_decode_input: unexpected GETSRCBLK\n"); - return 1; - case XD3_GOTHEADER: - case XD3_WINSTART: - case XD3_WINFINISH: - // These are informational events we don't care about. - goto process; - default: - fprintf(stderr, "xd3_decode_input: unknown error %s (%s)\n", - xd3_strerror(ret), stream.msg); - return 1; - } - } while (!feof(input)); - - fclose(input); - return 0; - -#undef WINDOW_SIZE -} diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates/assets/android-developer-docs.css index cfbcc7554b..44b5a4d616 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.css +++ b/tools/droiddoc/templates/assets/android-developer-docs.css @@ -207,7 +207,7 @@ } #jd-header { - background-color: #E9E9E9; + background-color: #E2E2E2; padding: 7px 20px; } @@ -253,6 +253,86 @@ position:relative; } +/* summary tables for reference pages */ +.jd-sumtable { +margin: .5em 1em 1em 1em; +width:99%; +font-size:.9em; +} + +.jd-sumtable a { + text-decoration:none; +} + +.jd-sumtable a:hover { + text-decoration:underline; +} + +/* a div inside a sumtable th holding "Expand All" */ +.expandall { +float:right; +font-weight:normal; +} + +/* adjustments for in/direct subclasses tables */ +.jd-sumtable-subclasses { + margin: 1em 0 0 0; + max-width:968px; +} + +/* extra space between end of method name and open-paren */ +.sympad { + margin-right: 2px; +} + +/* right alignment for the return type in sumtable */ +.jd-sumtable .jd-typecol { + text-align:right; +} + +/* adjustments for the expando table-in-table */ +.jd-sumtable-expando { + margin:.5em 0; + padding:0; +} + +/* a div that holds a short description */ +.jd-descrdiv { + width:100%; + padding:3px 1em 0 1em; + margin:0; + border:0; +} + +/* page-top-right container for reference pages (holds +links to summary tables) */ +#api-info-block { + font-size:.8em; + margin:0; + padding:6px; + font-weight:normal; + float:right; + text-align:right; + color:#999; + max-width:70%; +} + +/* applies to a div containing links to summary tables */ +.sum-details-links { + margin:0 .5em; + padding:0; + font-weight:normal; +} + +.sum-details-links a { + text-decoration:none; +} + +.sum-details-links a:hover { + text-decoration:underline; +} + + /* inheritance table */ .jd-inheritance-table { border-spacing:0; @@ -295,7 +375,7 @@ hr { color:#111; border-top:2px solid #ccc; padding: .5em 0 0; - margin: 1.75em 0 1em 0; + margin: 1.5em 0 1em 0; max-width:968px; } @@ -334,7 +414,12 @@ hr { .nolist { list-style:none; padding:0; - margin:0 0 1em 1em; + margin:0 0 0 1em; +} + +.nolist li { + padding:0; + margin:0; } h4 .normal { @@ -348,18 +433,57 @@ h4 .normal { margin:0 0 1em; } -.jd-tagdata { - margin:.6em 0; +/* API reference: a container for the +.tagdata blocks that make up the detailed +description */ +.jd-details-descr { + padding:0; + margin:.5em .25em; } -.jd-tagdata ul { +/* API reference: a block containing +a detailed description, a params table, +seealso list, etc */ +.jd-tagdata { + margin:.5em 1em; +} + +/* API reference: adjustments to +the detailed description block */ +.jd-tagdescr { + margin:.25em 0 .75em 0; + line-height:1em; +} + +.jd-tagdescr p { + margin:.5em 0; + padding:0; + +} + +.jd-tagdescr ol, +.jd-tagdescr ul { + margin:0 2.5em; padding:0; } +.jd-tagdescr table, +.jd-tagdescr img { + margin:.25em 1em; +} + +.jd-tagdescr li { +margin:0 0 .25em 0; +padding:0; +} + +/* API reference: heading marking +the details section for constants, +attrs, methods, etc. */ h4.jd-details-title { font-size:1.15em; - background-color: #d6d6d6; - margin:0 0 .6em; + background-color: #E2E2E2; + margin:1.5em 0 .6em; padding:3px; } @@ -367,8 +491,11 @@ h4.jd-tagtitle { margin:0; } -.jd-details-descr { - padding:3px; +/* API reference: heading for "Parameters", "See Also", etc., +in details sections */ +h5.jd-tagtitle { + margin:0 0 .25em 0; + font-size:1em; } .jd-tagtable { @@ -398,13 +525,13 @@ h4.jd-tagtitle { } div.special { - padding: 15px 20px 3px; + padding: .5em 1em 1em 1em; margin: 0 0 1em; background-color: #ddf0f2; } div.special p { - margin: .25em 0; + margin: .5em 0 0 0; } div.special ol { @@ -529,6 +656,7 @@ pre.classic { margin-top:0px; width:295; float:right; + font-size:.9em; } #qv ol { @@ -725,7 +853,7 @@ table ol.toc { } tr.alt-color { - background-color: #e6e6e6; + background-color: #f6f6f6; } /* expando trigger */ diff --git a/tools/droiddoc/templates/class.cs b/tools/droiddoc/templates/class.cs index 1fd4369639..005ed6a661 100644 --- a/tools/droiddoc/templates/class.cs +++ b/tools/droiddoc/templates/class.cs @@ -23,6 +23,84 @@ function toggle_inherited(base) {
+
+ + + + + + + + + + + + + + + + + + +
+ @@ -58,7 +136,7 @@ function toggle_inherited(base) {    ↳ - + + + + +
+Known Direct Subclasses + +
+ + + +
+Known Indirect Subclasses + +
+
@@ -78,33 +171,15 @@ function toggle_inherited(base) {

- - - -

Nested Classes

- - - - -

Known Direct Subclasses

- - - - -

Known Indirect Subclasses

- - -
- + -class="alt-color" > - - - - class="alt-color" > - - - + -
@@ -115,71 +190,80 @@ function toggle_inherited(base) { ()
+ + () + +
+
-class="alt-color" > - - - - - - + + + -
       + + + +
- - class="alt-color" > - - - + + + -
   
- - - - + + + class="alt-color" > - -
Attribute nameRelated methods Attribute NameRelated MethodDescription

-   +
+ +  
+ + + + + + class="alt-color" > + + + + + + + +   + + + @@ -187,39 +271,50 @@ function toggle_inherited(base) {

Summary

+ + + + + + + - -

XML Attributes

+ +
Nested Classes
+ + +
XML Attributes
-

XML Attributes inherited - from - -

+ - - +
+ +
Inherited XML Attributes
+From +
- +
+ -

Enum Values

+ -
Enum Values
class="alt-color" > @@ -228,109 +323,129 @@ function toggle_inherited(base) { -
 
-

Constants

+ +
Constants
+ + + -

Constants inherited - from - -

+ - +
+ +
Inherited Constants
+From +
- - +
+ +
+ -

Fields

+ +
Fields
+ + + -

Fields inherited - from - -

+ - +
+ +
Inherited Fields
+From +
- - +
+ +
+ -

Public Constructors

+ +
Public Constructors
-

Protected Constructors

+ +
Protected Constructors
-

Public Methods

+ +
Public Methods
-

Protected Methods

+ +
Protected Methods
+ + + -

Methods inherited - from - -

+ +
+ +
Inherited Methods
+From
- - +
+ +
+
@@ -381,7 +496,8 @@ function toggle_inherited(base) { - () + + ()
diff --git a/tools/droiddoc/templates/classes.cs b/tools/droiddoc/templates/classes.cs index 44aefbd378..f8494e512f 100644 --- a/tools/droiddoc/templates/classes.cs +++ b/tools/droiddoc/templates/classes.cs @@ -18,10 +18,10 @@

- +
- + class="alt-color" > diff --git a/tools/droiddoc/templates/macros.cs b/tools/droiddoc/templates/macros.cs index 1325496e4e..8f5fa8ed3b 100644 --- a/tools/droiddoc/templates/macros.cs +++ b/tools/droiddoc/templates/macros.cs @@ -103,7 +103,7 @@ This is deprecated.
-

See Also

+
See Also
  • is deprecated. else ?>[ERROR: Unknown @see kind]
  • -
 
-
    +
@@ -127,11 +126,12 @@ This is deprecated. - +

+
-

Related XML Attributes

+
Related XML Attributes
  • @@ -142,7 +142,7 @@ This is deprecated.
    -

    Parameters

    +
    Parameters
    @@ -158,14 +158,14 @@ This is deprecated.
    -

    Returns

    +
    Returns
    -

    Throws

    +
    Throws
    @@ -185,7 +185,7 @@ This is deprecated. -
    class="alt-color" > diff --git a/tools/droiddoc/templates/package.cs b/tools/droiddoc/templates/package.cs index 65f0278700..becf48245d 100644 --- a/tools/droiddoc/templates/package.cs +++ b/tools/droiddoc/templates/package.cs @@ -29,7 +29,9 @@

    +
    +
    diff --git a/tools/droiddoc/templates/packages.cs b/tools/droiddoc/templates/packages.cs index 14f724675a..3ef85b87cc 100644 --- a/tools/droiddoc/templates/packages.cs +++ b/tools/droiddoc/templates/packages.cs @@ -17,9 +17,9 @@ -
    +
    - + class="alt-color" >