diff --git a/CleanSpec.mk b/CleanSpec.mk
index 2663780..7b028ec 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -44,13 +44,40 @@
 #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
 #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
 
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system)
+
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmediaplayerservice_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmedia_jni_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_omx_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/android-info.txt)
 $(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/app/*)
+$(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/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/*/LINKED)
+$(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/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
 
+# ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
diff --git a/buildspec.mk.default b/buildspec.mk.default
index c568a82..46aee69 100644
--- a/buildspec.mk.default
+++ b/buildspec.mk.default
@@ -106,9 +106,9 @@
 #WEBCORE_INSTRUMENTATION:=true
 endif
 
-# To enable SVG in webcore define ENABLE_SVG:=true
+# To disable SVG in webcore define ENABLE_SVG:=false
 ifndef ENABLE_SVG
-#ENABLE_SVG:=true
+#ENABLE_SVG:=false
 endif
 
 # when the build system changes such that this file must be updated, this
diff --git a/core/Makefile b/core/Makefile
index 08ca785..7ebcbfe 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -98,6 +98,14 @@
   BUILD_DISPLAY_ID := $(build_desc)
 endif
 
+# Whether there is default locale set in PRODUCT_PROPERTY_OVERRIDES
+product_property_override_locale_language := $(strip \
+    $(patsubst ro.product.locale.language=%,%,\
+    $(filter ro.product.locale.language=%,$(PRODUCT_PROPERTY_OVERRIDES))))
+product_property_overrides_locale_region := $(strip \
+    $(patsubst ro.product.locale.region=%,%,\
+    $(filter ro.product.locale.region=%,$(PRODUCT_PROPERTY_OVERRIDES))))
+
 # Selects the first locale in the list given as the argument,
 # and splits it into language and region, which each may be
 # empty.
@@ -106,12 +114,13 @@
 endef
 
 # Selects the first locale in the list given as the argument
-# and returns the language (or the region)
+# and returns the language (or the region), if it's not set in PRODUCT_PROPERTY_OVERRIDES;
+# Return empty string if it's already set in PRODUCT_PROPERTY_OVERRIDES.
 define default-locale-language
-$(word 2, 2, $(call default-locale, $(1)))
+$(if $(product_property_override_locale_language),,$(word 1, $(call default-locale, $(1))))
 endef
 define default-locale-region
-$(word 3, 3, $(call default-locale, $(1)))
+$(if $(product_property_overrides_locale_region),,$(word 2, $(call default-locale, $(1))))
 endef
 
 BUILDINFO_SH := build/tools/buildinfo.sh
@@ -140,6 +149,7 @@
 			TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
 			TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
 			TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
+			TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
 	        bash $(BUILDINFO_SH) > $@
 	$(hide) if [ -f $(TARGET_DEVICE_DIR)/system.prop ]; then \
 	          cat $(TARGET_DEVICE_DIR)/system.prop >> $@; \
@@ -205,16 +215,9 @@
 intermediates := \
 	$(call intermediates-dir-for,PACKAGING,apkcerts)
 APKCERTS_FILE := $(intermediates)/$(name).txt
-# Depending on the built packages isn't exactly right,
-# but it should guarantee that the apkcerts file is rebuilt
-# if any packages change which certs they're signed with.
-all_built_packages := $(foreach p,$(PACKAGES),$(ALL_MODULES.$(p).BUILT))
-ifneq ($(TARGET_BUILD_APPS),)
-# We don't need to really build all the modules for apps_only build.
+# We don't need to really build all the modules.
+# TODO: rebuild APKCERTS_FILE if any app change its cert.
 $(APKCERTS_FILE):
-else
-$(APKCERTS_FILE): $(all_built_packages)
-endif
 	@echo APK certs list: $@
 	@mkdir -p $(dir $@)
 	@rm -f $@
@@ -228,7 +231,9 @@
 .PHONY: apkcerts-list
 apkcerts-list: $(APKCERTS_FILE)
 
-$(call dist-for-goals, apps_only, $(APKCERTS_FILE):apkcerts.txt)
+ifneq (,$(TARGET_BUILD_APPS))
+  $(call dist-for-goals, apps_only, $(APKCERTS_FILE):apkcerts.txt)
+endif
 
 # -----------------------------------------------------------------
 # module info file
@@ -587,7 +592,7 @@
 # $(5): size of the partition
 define build-userimage-ext-target
   @mkdir -p $(dir $(2))
-  $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$(PATH) \
+  $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
 	  $(MKEXTUSERIMG) $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG) $(1) $(2) $(4) $(3) $(5)
 endef
 else
@@ -649,11 +654,12 @@
 	$(call intermediates-dir-for,PACKAGING,ota_keys)/keys
 DUMPKEY_JAR := $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar
 $(RECOVERY_INSTALL_OTA_KEYS): PRIVATE_OTA_PUBLIC_KEYS := $(OTA_PUBLIC_KEYS)
-$(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR)
-	@echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS)"
+$(RECOVERY_INSTALL_OTA_KEYS): extra_keys := $(patsubst %,%.x509.pem,$(PRODUCT_EXTRA_RECOVERY_KEYS))
+$(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR) $(extra_keys)
+	@echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys)"
 	@rm -rf $@
 	@mkdir -p $(dir $@)
-	java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) > $@
+	java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys) > $@
 
 $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
 		$(INSTALLED_RAMDISK_TARGET) \
@@ -723,7 +729,7 @@
 	$(ALL_DEFAULT_INSTALLED_MODULES))
 
 ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
-## generate an ext2 image
+## generate an ext image
 # $(1): output file
 define build-systemimage-target
     @echo "Target system fs image: $(1)"
@@ -841,7 +847,7 @@
 	$(filter $(TARGET_OUT_DATA)/%,$(ALL_DEFAULT_INSTALLED_MODULES))
 
 ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
-## Generate an ext image
+## Generate an ext2 image
 define build-userdataimage-target
     $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
     @mkdir -p $(TARGET_OUT_DATA)
@@ -869,7 +875,7 @@
 	$(build-userdataimage-target)
 
 .PHONY: userdataimage-nodeps
-userdataimage-nodeps: $(INTERNAL_USERIMAGES_DEPS)
+userdataimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
 	$(build-userdataimage-target)
 
 #######
@@ -914,6 +920,9 @@
 	  $(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar \
 	  $(HOST_OUT_JAVA_LIBRARIES)/signapk.jar \
 	  $(HOST_OUT_EXECUTABLES)/mkuserimg.sh \
+	  $(HOST_OUT_EXECUTABLES)/genext2fs \
+	  $(HOST_OUT_EXECUTABLES)/tune2fs \
+	  $(HOST_OUT_EXECUTABLES)/e2fsck \
 	  $(HOST_OUT_EXECUTABLES)/make_ext4fs
 
 .PHONY: otatools
@@ -1059,6 +1068,9 @@
 ifdef INTERNAL_USERIMAGES_SPARSE_EXT_FLAG
 	$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(zip_root)/META/misc_info.txt
 endif
+ifdef PRODUCT_EXTRA_RECOVERY_KEYS
+	$(hide) echo "extra_recovery_keys=$(PRODUCT_EXTRA_RECOVERY_KEYS)" >> $(zip_root)/META/misc_info.txt
+endif
 	@# Zip everything up, preserving symlinks
 	$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
 	@# Run fs_config on all the system files in the zip, and save the output
@@ -1071,7 +1083,7 @@
 
 ifneq ($(TARGET_SIMULATOR),true)
 ifneq ($(TARGET_PRODUCT),sdk)
-ifneq ($(TARGET_DEVICE),generic)
+ifeq ($(filter generic%,$(TARGET_DEVICE)),)
 ifneq ($(TARGET_NO_KERNEL),true)
 ifneq ($(recovery_fstab),)
 
@@ -1128,7 +1140,7 @@
 
 endif    # recovery_fstab is defined
 endif    # TARGET_NO_KERNEL != true
-endif    # TARGET_DEVICE != generic
+endif    # TARGET_DEVICE != generic*
 endif    # TARGET_PRODUCT != sdk
 endif    # TARGET_SIMULATOR != true
 
@@ -1413,9 +1425,10 @@
 		cp -f $(target_notice_file_txt) \
 				$(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/$(TARGET_CPU_ABI)/NOTICE.txt && \
 		cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/tools/NOTICE.txt && \
-		if [ -f $(PRIVATE_DIR)/platform-tools/llvm-rs-cc ]; then \
-			$(HOST_STRIP_SDK_LLVM) $(PRIVATE_DIR)/platform-tools/llvm-rs-cc; \
-		fi && \
+		cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/platform-tools/NOTICE.txt && \
+		for f in $(PRIVATE_DIR)/platform-tools/llvm-rs-cc-* ; do \
+			if [ -f "$$f" ]; then $(HOST_STRIP_SDK_LLVM) "$$f"; fi; \
+		done && \
 		HOST_OUT_EXECUTABLES=$(HOST_OUT_EXECUTABLES) HOST_OS=$(HOST_OS) \
 			development/build/tools/sdk_clean.sh $(PRIVATE_DIR) && \
 		chmod -R ug+rwX $(PRIVATE_DIR) && \
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 54bbb68..25564b2 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -106,11 +106,11 @@
 # Add implicit tags.
 #
 # If the local directory or one of its parents contains a MODULE_LICENSE_GPL
-# file, tag the module as "gnu".  Search for "*_GNU*" so that we can also
+# file, tag the module as "gnu".  Search for "*_GPL*" and "*_MPL*" so that we can also
 # find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like
 # MODULE_LICENSE_LGPL.
 #
-ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL*),)
+ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*),)
   LOCAL_MODULE_TAGS += gnu
 endif
 
@@ -220,6 +220,9 @@
 aidl_java_sources := $(patsubst %.aidl,%.java,$(addprefix $(intermediates.COMMON)/src/, $(aidl_sources)))
 aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources))
 
+ifeq (,$(TARGET_BUILD_APPS))
+LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
+endif
 aidl_preprocess_import :=
 LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION))
 ifdef LOCAL_SDK_VERSION
@@ -413,12 +416,14 @@
 #                 to guarantee that the files in full_java_libs will
 #                 be up-to-date.
 ifdef LOCAL_IS_HOST_MODULE
-# TODO: make prebuilt java libraries use the same
-#       intermediates path pattern as target java libraries.
 ifeq ($(LOCAL_BUILD_HOST_DEX),true)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-hostdex,$(LOCAL_IS_HOST_MODULE))
+
 full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
 else
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH :=
+
 full_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,$(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES)))
 full_java_lib_deps := $(full_java_libs)
 endif # LOCAL_BUILD_HOST_DEX
@@ -449,8 +454,10 @@
   full_java_lib_deps += $(link_instr_intermediates_dir.COMMON)/classes.jar
 endif
 
+jar_manifest_file :=
 ifneq ($(strip $(LOCAL_JAR_MANIFEST)),)
-$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := $(LOCAL_PATH)/$(LOCAL_JAR_MANIFEST)
+jar_manifest_file := $(LOCAL_PATH)/$(LOCAL_JAR_MANIFEST)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := $(jar_manifest_file)
 else
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST :=
 endif
@@ -515,7 +522,7 @@
 ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
 	@echo "Install: $@"
-	$(copy-file-to-target)
+	$(copy-file-to-new-target)
 else
 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
 	@echo "Install: $@"
@@ -529,7 +536,7 @@
 	@echo "Install: $@"
 	$(copy-file-to-target)
 
-$(LOCAL_INSTALLED_MODULE) : | $(installed_odex)
+$(LOCAL_INSTALLED_MODULE) : $(installed_odex)
 endif
 
 endif # !LOCAL_UNINSTALLABLE_MODULE
diff --git a/core/binary.mk b/core/binary.mk
index dcac435..f81cc5e 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -28,10 +28,43 @@
   ifndef LOCAL_SDK_VERSION
     $(error $(LOCAL_PATH): LOCAL_NDK_VERSION must be defined with LOCAL_SDK_VERSION)
   endif
+  my_ndk_source_root := $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r$(LOCAL_NDK_VERSION)/sources
   my_ndk_version_root := $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r$(LOCAL_NDK_VERSION)/platforms/android-$(LOCAL_SDK_VERSION)/arch-$(TARGET_ARCH)
   ifeq ($(wildcard $(my_ndk_version_root)),)
     $(error $(LOCAL_PATH): ndk version root does not exist: $(my_ndk_version_root))
   endif
+
+  # Set up the NDK stl variant. Starting from NDK-r5 the c++ stl resides in a separate location.
+  # See ndk/docs/CPLUSPLUS-SUPPORT.html
+  my_ndk_stl_include_path :=
+  my_ndk_stl_shared_lib_fullpath :=
+  my_ndk_stl_shared_lib :=
+  my_ndk_stl_static_lib :=
+  ifeq (,$(LOCAL_NDK_STL_VARIANT))
+    LOCAL_NDK_STL_VARIANT := system
+  endif
+  ifneq (1,$(words $(filter system stlport_static stlport_shared gnustl_static, $(LOCAL_NDK_STL_VARIANT))))
+    $(error $(LOCAL_PATH): Unkown LOCAL_NDK_STL_VARIANT $(LOCAL_NDK_STL_VARIANT))
+  endif
+  ifeq (system,$(LOCAL_NDK_STL_VARIANT))
+    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/system/include
+    # for "system" variant, the shared library exists in the system library and -lstdc++ is added by default.
+  else # LOCAL_NDK_STL_VARIANT is not system
+  ifneq (,$(filter stlport_%, $(LOCAL_NDK_STL_VARIANT)))
+    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/stlport/stlport
+    ifeq (stlport_static,$(LOCAL_NDK_STL_VARIANT))
+      my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(TARGET_CPU_ABI)/libstlport_static.a
+    else
+      my_ndk_stl_shared_lib_fullpath := $(my_ndk_source_root)/cxx-stl/stlport/libs/$(TARGET_CPU_ABI)/libstlport_shared.so
+      my_ndk_stl_shared_lib := -lstlport_shared
+    endif
+  else
+    # LOCAL_NDK_STL_VARIANT is gnustl_static
+    my_ndk_stl_include_path := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/include
+    my_ndk_stl_static_lib := $(my_ndk_source_root)/cxx-stl/gnu-libstdc++/libs/$(TARGET_CPU_ABI)/libstdc++.a
+  endif
+  endif
+
 endif
 
 #######################################
@@ -58,7 +91,7 @@
 ###########################################################
 ifdef LOCAL_NDK_VERSION
 my_target_project_includes :=
-my_target_c_inclues := $(my_ndk_version_root)/usr/include
+my_target_c_inclues := $(my_ndk_stl_include_path) $(my_ndk_version_root)/usr/include
 # TODO: more reliable way to remove platform stuff.
 my_target_global_cflags := $(filter-out -include -I system/%, $(TARGET_GLOBAL_CFLAGS))
 my_target_global_cppflags := $(filter-out -include -I system/%, $(TARGET_GLOBAL_CPPFLAGS))
@@ -493,8 +526,10 @@
     $(addprefix $($(my_prefix)OUT_SHARED_LIBRARIES)/, \
       $(notdir $(built_shared_libraries)))
 
-my_system_shared_libraries_fullpath := $(addprefix $(my_ndk_version_root)/usr/lib/, \
-    $(addsuffix $(so_suffix), $(LOCAL_SYSTEM_SHARED_LIBRARIES)))
+my_system_shared_libraries_fullpath := \
+    $(my_ndk_stl_shared_lib_fullpath) \
+    $(addprefix $(my_ndk_version_root)/usr/lib/, \
+        $(addsuffix $(so_suffix), $(LOCAL_SYSTEM_SHARED_LIBRARIES)))
 
 built_shared_libraries += $(my_system_shared_libraries_fullpath)
 LOCAL_SHARED_LIBRARIES += $(LOCAL_SYSTEM_SHARED_LIBRARIES)
@@ -515,6 +550,10 @@
       $(call intermediates-dir-for, \
         STATIC_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/$(lib)$(a_suffix))
 
+ifdef LOCAL_NDK_VERSION
+built_static_libraries += $(my_ndk_stl_static_lib)
+endif
+
 built_whole_libraries := \
     $(foreach lib,$(LOCAL_WHOLE_STATIC_LIBRARIES), \
       $(call intermediates-dir-for, \
diff --git a/core/build_id.mk b/core/build_id.mk
index e954794..40bb35d 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -23,7 +23,7 @@
 # (like "TC1-RC5").  It must be a single word, and is
 # capitalized by convention.
 #
-BUILD_ID := OPENMASTER
+BUILD_ID := MASTER
 
 # DISPLAY_BUILD_NUMBER should only be set for development branches,
 # If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 792bd56..2d8c15a 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -44,6 +44,7 @@
 LOCAL_LDFLAGS:=
 LOCAL_LDLIBS:=
 LOCAL_AAPT_FLAGS:=
+LOCAL_AAPT_INCLUDE_ALL_RESOURCES:=
 LOCAL_SYSTEM_SHARED_LIBRARIES:=none
 LOCAL_PREBUILT_LIBS:=
 LOCAL_PREBUILT_EXECUTABLES:=
@@ -79,6 +80,7 @@
 LOCAL_STRIP_MODULE:=
 LOCAL_POST_PROCESS_COMMAND:=true
 LOCAL_JNI_SHARED_LIBRARIES:=
+LOCAL_JNI_SHARED_LIBRARIES_ABI:=
 LOCAL_JAR_MANIFEST:=
 LOCAL_INSTRUMENTATION_FOR:=
 LOCAL_MANIFEST_INSTRUMENTATION_FOR:=
@@ -90,14 +92,17 @@
 LOCAL_CERTIFICATE:=
 LOCAL_SDK_VERSION:=
 LOCAL_NDK_VERSION:=
+LOCAL_NDK_STL_VARIANT:=
 LOCAL_NO_EMMA_INSTRUMENT:=
 LOCAL_NO_EMMA_COMPILE:=
-LOCAL_PROGUARD_ENABLED:= # '',optonly,full,custom
+LOCAL_PROGUARD_ENABLED:= # '',optonly,full,custom,disabled
 LOCAL_PROGUARD_FLAGS:=
 LOCAL_PROGUARD_FLAG_FILES:=
 LOCAL_EMMA_COVERAGE_FILTER:=
 LOCAL_WARNINGS_ENABLE:=
 LOCAL_MANIFEST_FILE:=
+LOCAL_RENDERSCRIPT_INCLUDES:=
+LOCAL_RENDERSCRIPT_CC:=
 LOCAL_BUILD_HOST_DEX:=
 LOCAL_DEX_PREOPT:=
 LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,full
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 121f89b..b829108 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -59,14 +59,14 @@
 HOST_CUSTOM_LD_COMMAND := true
 
 define transform-host-o-to-shared-lib-inner
-    $(HOST_CXX) \
+$(hide) $(PRIVATE_CXX) \
         -dynamiclib -single_module -read_only_relocs suppress \
         $(HOST_GLOBAL_LD_DIRS) \
         $(HOST_GLOBAL_LDFLAGS) \
         $(PRIVATE_ALL_OBJECTS) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
         $(PRIVATE_LDLIBS) \
         -o $@ \
         $(PRIVATE_LDFLAGS) \
@@ -74,15 +74,15 @@
 endef
 
 define transform-host-o-to-executable-inner
-$(HOST_CXX) \
+$(hide) $(PRIVATE_CXX) \
         -o $@ \
         -Wl,-dynamic -headerpad_max_install_names \
         $(HOST_GLOBAL_LD_DIRS) \
         $(HOST_GLOBAL_LDFLAGS) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
         $(PRIVATE_ALL_OBJECTS) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
-        $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+        $(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
         $(PRIVATE_LDFLAGS) \
         $(PRIVATE_LDLIBS) \
         $(HOST_LIBGCC)
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 67844c8..c332b41 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -44,7 +44,7 @@
 # You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
 ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
 TARGET_TOOLS_PREFIX := \
-	prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
+	prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-
 endif
 
 # Only define these if there's actually a gcc in there.
@@ -64,8 +64,7 @@
 TARGET_arm_CFLAGS :=    -O2 \
                         -fomit-frame-pointer \
                         -fstrict-aliasing    \
-                        -funswitch-loops     \
-                        -finline-limit=300
+                        -funswitch-loops
 
 # Modules can choose to compile some source as thumb. As
 # non-thumb enabled targets are supported, this is treated
@@ -75,8 +74,7 @@
 TARGET_thumb_CFLAGS :=  -mthumb \
                         -Os \
                         -fomit-frame-pointer \
-                        -fno-strict-aliasing \
-                        -finline-limit=64
+                        -fno-strict-aliasing
 else
 TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS)
 endif
@@ -101,6 +99,7 @@
 TARGET_GLOBAL_CFLAGS += \
 			-msoft-float -fpic \
 			-ffunction-sections \
+			-fdata-sections \
 			-funwind-tables \
 			-fstack-protector \
 			-Wa,--noexecstack \
@@ -122,6 +121,7 @@
 
 TARGET_GLOBAL_LDFLAGS += \
 			-Wl,-z,noexecstack \
+			-Wl,--icf=safe \
 			$(arch_variant_ldflags)
 
 # We only need thumb interworking in cases where thumb support
@@ -136,12 +136,11 @@
 
 TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden
 
+# More flags/options can be added here
 TARGET_RELEASE_CFLAGS := \
 			-DNDEBUG \
 			-g \
 			-Wstrict-aliasing=2 \
-			-finline-functions \
-			-fno-inline-functions-called-once \
 			-fgcse-after-reload \
 			-frerun-cse-after-loop \
 			-frename-registers
@@ -210,7 +209,7 @@
 	$(libstdc++_root)/include \
 	$(KERNEL_HEADERS) \
 	$(libm_root)/include \
-	$(libm_root)/include/arch/arm \
+	$(libm_root)/include/arm \
 	$(libthread_db_root)/include
 
 TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
@@ -232,7 +231,7 @@
 endif
 
 define transform-o-to-shared-lib-inner
-$(TARGET_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	-nostdlib -Wl,-soname,$(notdir $@) -Wl,-T,$(BUILD_SYSTEM)/armelf.xsc \
 	-Wl,--gc-sections \
 	-Wl,-shared,-Bsymbolic \
@@ -240,7 +239,7 @@
 	$(PRIVATE_ALL_OBJECTS) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
 	-Wl,--whole-archive \
-	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
@@ -253,7 +252,7 @@
 endef
 
 define transform-o-to-executable-inner
-$(TARGET_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
 	-Wl,-dynamic-linker,/system/bin/linker \
     -Wl,--gc-sections \
 	-Wl,-z,nocopyreloc \
@@ -272,7 +271,7 @@
 endef
 
 define transform-o-to-static-executable-inner
-$(TARGET_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
     -Wl,--gc-sections \
 	-o $@ \
 	$(TARGET_GLOBAL_LD_DIRS) \
@@ -280,8 +279,12 @@
 	$(TARGET_GLOBAL_LDFLAGS) \
 	$(PRIVATE_LDFLAGS) \
 	$(PRIVATE_ALL_OBJECTS) \
-	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(call normalize-target-libraries,$(filter-out %libc_nomalloc.a,$(filter-out %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES)))) \
+	-Wl,--start-group \
+	$(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
+	$(call normalize-target-libraries,$(filter %libc_nomalloc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
 	$(TARGET_FDO_LIB) \
 	$(TARGET_LIBGCC) \
+	-Wl,--end-group \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
 endef
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
index 1fac6a0..654539c 100644
--- a/core/combo/TARGET_linux-sh.mk
+++ b/core/combo/TARGET_linux-sh.mk
@@ -99,7 +99,7 @@
 	$(libstdc++_root)/include \
 	$(KERNEL_HEADERS) \
 	$(libm_root)/include \
-	$(libm_root)/include/arch/sh \
+	$(libm_root)/include/sh \
 	$(libthread_db_root)/include
 
 TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
@@ -115,7 +115,7 @@
 
 TARGET_CUSTOM_LD_COMMAND := true
 define transform-o-to-shared-lib-inner
-$(TARGET_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	-nostdlib -Wl,-soname,$(notdir $@) -Wl,-T,$(BUILD_SYSTEM)/shlelf.xsc \
 	-Wl,--gc-sections -Wl,-z,norelro \
 	-Wl,-shared,-Bsymbolic \
@@ -123,7 +123,7 @@
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
 	$(PRIVATE_ALL_OBJECTS) \
 	-Wl,--whole-archive \
-	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
@@ -135,7 +135,7 @@
 endef
 
 define transform-o-to-executable-inner
-$(TARGET_CXX) -nostdlib -Bdynamic  -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic  -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
 	-Wl,-dynamic-linker,/system/bin/linker \
 	-Wl,--gc-sections -Wl,-z,norelro \
 	-Wl,-z,nocopyreloc \
@@ -153,7 +153,7 @@
 endef
 
 define transform-o-to-static-executable-inner
-$(TARGET_CXX) -nostdlib -Bstatic  -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic  -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
 	-Wl,--gc-sections -Wl,-z,norelro \
 	-o $@ \
 	$(TARGET_GLOBAL_LD_DIRS) \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 989f7e3..98a5f2b 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -139,7 +139,7 @@
 
 TARGET_CUSTOM_LD_COMMAND := true
 define transform-o-to-shared-lib-inner
-$(TARGET_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
 	 -nostdlib -Wl,-soname,$(notdir $@) \
 	 -shared -Bsymbolic \
@@ -148,7 +148,7 @@
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
 	$(PRIVATE_ALL_OBJECTS) \
 	-Wl,--whole-archive \
-	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
@@ -160,7 +160,7 @@
 
 
 define transform-o-to-executable-inner
-$(TARGET_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	$(TARGET_GLOBAL_LDFLAGS) \
 	-nostdlib -Bdynamic \
 	-Wl,-dynamic-linker,/system/bin/linker \
@@ -178,7 +178,7 @@
 endef
 
 define transform-o-to-static-executable-inner
-$(TARGET_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	$(TARGET_GLOBAL_LDFLAGS) \
 	-nostdlib -Bstatic \
 	-o $@ \
diff --git a/core/combo/javac.mk b/core/combo/javac.mk
index d4c04e7..f8c99fb 100644
--- a/core/combo/javac.mk
+++ b/core/combo/javac.mk
@@ -8,7 +8,7 @@
 #   COMMON_JAVAC -- Java compiler command with common arguments
 
 # Whatever compiler is on this system.
-ifeq ($(HOST_OS), windows)
+ifeq ($(BUILD_OS), windows)
     COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
         -target 1.5 -Xmaxerrs 9999999
 else
diff --git a/core/config.mk b/core/config.mk
index d953b1a..2a8a05b 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -61,6 +61,7 @@
 BUILD_RAW_EXECUTABLE:= $(BUILD_SYSTEM)/raw_executable.mk
 BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk
 BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk
+BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk
 BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk
 BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk
 BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk
@@ -69,7 +70,8 @@
 BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk
 BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk
 BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
-BUILD_KEY_CHAR_MAP := $(BUILD_SYSTEM)/key_char_map.mk
+BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
+BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
 
 # ###############################################################
 # Parse out any modifier targets.
@@ -214,11 +216,13 @@
 MKEXTUSERIMG := $(HOST_OUT_EXECUTABLES)/mkuserimg.sh
 MKEXT2BOOTIMG := external/genext2fs/mkbootimg_ext2.sh
 MKTARBALL := build/tools/mktarball.sh
-TUNE2FS := tune2fs
-E2FSCK := e2fsck
+TUNE2FS := $(HOST_OUT_EXECUTABLES)/tune2fs$(HOST_EXECUTABLE_SUFFIX)
+E2FSCK := $(HOST_OUT_EXECUTABLES)/e2fsck$(HOST_EXECUTABLE_SUFFIX)
 JARJAR := $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar
 PROGUARD := external/proguard/bin/proguard.sh
 JAVATAGS := build/tools/java-event-log-tags.py
+LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc$(HOST_EXECUTABLE_SUFFIX)
+LLVM_RS_LINK := $(HOST_OUT_EXECUTABLES)/llvm-rs-link$(HOST_EXECUTABLE_SUFFIX)
 DEXOPT := $(HOST_OUT_EXECUTABLES)/dexopt$(HOST_EXECUTABLE_SUFFIX)
 DEXPREOPT := dalvik/tools/dex-preopt
 
@@ -227,7 +231,6 @@
 
 # dx is java behind a shell script; no .exe necessary.
 DX := $(HOST_OUT_EXECUTABLES)/dx
-KCM := $(HOST_OUT_EXECUTABLES)/kcm$(HOST_EXECUTABLE_SUFFIX)
 ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign$(HOST_EXECUTABLE_SUFFIX)
 FINDBUGS := prebuilt/common/findbugs/bin/findbugs
 LOCALIZE := $(HOST_OUT_EXECUTABLES)/localize$(HOST_EXECUTABLE_SUFFIX)
@@ -268,6 +271,10 @@
 HOST_JDK_TOOLS_JAR :=
 else
 HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
+ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
+$(error Error: could not find jdk tools.jar, please install JDK6, \
+    which you can download from java.sun.com)
+endif
 endif
 
 # Is the host JDK 64-bit version?
diff --git a/core/definitions.mk b/core/definitions.mk
index 6e7a5ad..48c4aed 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -249,6 +249,19 @@
 endef
 
 ###########################################################
+## Find all of the RenderScript files under the named directories.
+##  Meant to be used like:
+##    SRC_FILES := $(call all-renderscript-files-under,src)
+###########################################################
+
+define all-renderscript-files-under
+$(patsubst ./%,%, \
+  $(shell cd $(LOCAL_PATH) ; \
+          find $(1) -name "*.rs" -and -not -name ".*") \
+  )
+endef
+
+###########################################################
 ## Find all of the html files under the named directories.
 ## Meant to be used like:
 ##    SRC_FILES := $(call all-html-files-under,src tests)
@@ -326,7 +339,7 @@
 
 define find-parent-file
 $(strip \
-  $(eval _fpf := $(wildcard $(strip $(1))/$(strip $(2)))) \
+  $(eval _fpf := $(wildcard $(foreach f, $(2), $(strip $(1))/$(f)))) \
   $(if $(_fpf),$(_fpf), \
        $(if $(filter-out ./ .,$(1)), \
              $(call find-parent-file,$(patsubst %/,%,$(dir $(1))),$(2)) \
@@ -523,6 +536,30 @@
 endef
 
 ###########################################################
+## Run rot13 on a string
+## $(1): the string.  Must be one line.
+###########################################################
+define rot13
+$(shell echo $(1) | tr 'a-zA-Z' 'n-za-mN-ZA-M')
+endef
+
+
+###########################################################
+## Returns true if $(1) and $(2) are equal.  Returns
+## the empty string if they are not equal.
+###########################################################
+define streq
+$(strip $(if $(strip $(1)),\
+  $(if $(strip $(2)),\
+    $(if $(filter-out __,_$(subst $(strip $(1)),,$(strip $(2)))$(subst $(strip $(2)),,$(strip $(1)))_),,true), \
+    ),\
+  $(if $(strip $(2)),\
+    ,\
+    true)\
+ ))
+endef
+
+###########################################################
 ## Convert "a b c" into "a:b:c"
 ###########################################################
 
@@ -699,7 +736,7 @@
 ###########################################################
 
 define transform-d-to-p
-@cp $(@:%.o=%.d) $(@:%.o=%.P); \
+$(hide) cp $(@:%.o=%.d) $(@:%.o=%.P); \
 	sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
 		-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
 	rm -f $(@:%.o=%.d)
@@ -735,6 +772,28 @@
 rm -f $(@:$1=$(YACC_HEADER_SUFFIX))
 endef
 
+###########################################################
+## Commands to compile RenderScript
+###########################################################
+
+define transform-renderscripts-to-java-and-bc
+@echo "RenderScript: $(PRIVATE_MODULE) <= $(PRIVATE_RS_SOURCE_FILES)"
+$(hide) rm -rf $(PRIVATE_RS_OUTPUT_DIR)
+$(hide) mkdir -p $(PRIVATE_RS_OUTPUT_DIR)/res/raw
+$(hide) mkdir -p $(PRIVATE_RS_OUTPUT_DIR)/src
+$(hide) $(PRIVATE_RS_CC) \
+  -o $(PRIVATE_RS_OUTPUT_DIR)/res/raw \
+  -p $(PRIVATE_RS_OUTPUT_DIR)/src \
+  -d $(PRIVATE_RS_OUTPUT_DIR) \
+  -a $@ -MD \
+  $(foreach inc,$(PRIVATE_RS_INCLUDES),$(addprefix -I , $(inc))) \
+  $(PRIVATE_RS_SOURCE_FILES)
+#$(hide) $(LLVM_RS_LINK) \
+#  $(PRIVATE_RS_OUTPUT_DIR)/res/raw/*.bc
+$(hide) mkdir -p $(dir $@)
+$(hide) touch $@
+endef
+
 
 ###########################################################
 ## Commands for running aidl
@@ -817,7 +876,7 @@
 	$(PRIVATE_CPPFLAGS) \
 	$(PRIVATE_DEBUG_CFLAGS) \
 	-MD -o $@ $<
-$(hide) $(transform-d-to-p)
+$(transform-d-to-p)
 endef
 
 
@@ -861,12 +920,12 @@
 
 define transform-c-to-o
 $(transform-c-to-o-no-deps)
-$(hide) $(transform-d-to-p)
+$(transform-d-to-p)
 endef
 
 define transform-s-to-o
 $(transform-s-to-o-no-deps)
-$(hide) $(transform-d-to-p)
+$(transform-d-to-p)
 endef
 
 ###########################################################
@@ -882,7 +941,7 @@
 
 define transform-m-to-o
 $(transform-m-to-o-no-deps)
-$(hide) $(transform-d-to-p)
+$(transform-d-to-p)
 endef
 
 ###########################################################
@@ -998,19 +1057,24 @@
 $(call _concat-if-arg2-not-empty,$(1),$(wordlist 3001,99999,$(2)))
 endef
 
+# $(1): the full path of the source static library.
+define _extract-and-include-single-target-whole-static-lib
+@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
+$(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
+    rm -rf $$ldir; \
+    mkdir -p $$ldir; \
+    filelist=; \
+    for f in `$(TARGET_AR) t $(1)`; do \
+        $(TARGET_AR) p $(1) $$f > $$ldir/$$f; \
+        filelist="$$filelist $$ldir/$$f"; \
+    done ; \
+    $(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist
+
+endef
+
 define extract-and-include-target-whole-static-libs
 $(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
-	$(hide) echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
-	ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
-	rm -rf $$ldir; \
-	mkdir -p $$ldir; \
-	filelist=; \
-	for f in `$(TARGET_AR) t $(lib)`; do \
-	    $(TARGET_AR) p $(lib) $$f > $$ldir/$$f; \
-	    filelist="$$filelist $$ldir/$$f"; \
-	done ; \
-	$(TARGET_AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist;\
-)
+    $(call _extract-and-include-single-target-whole-static-lib, $(lib)))
 endef
 
 # Explicitly delete the archive first so that ar doesn't
@@ -1027,19 +1091,24 @@
 ## Commands for running host ar
 ###########################################################
 
+# $(1): the full path of the source static library.
+define _extract-and-include-single-host-whole-static-lib
+@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
+$(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
+    rm -rf $$ldir; \
+    mkdir -p $$ldir; \
+    filelist=; \
+    for f in `$(HOST_AR) t $(1) | grep '\.o$$'`; do \
+        $(HOST_AR) p $(1) $$f > $$ldir/$$f; \
+        filelist="$$filelist $$ldir/$$f"; \
+    done ; \
+    $(HOST_AR) $(HOST_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist
+
+endef
+
 define extract-and-include-host-whole-static-libs
 $(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
-	$(hide) echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(lib)]"; \
-	ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(lib)))_objs;\
-	rm -rf $$ldir; \
-	mkdir -p $$ldir; \
-	filelist=; \
-	for f in `$(HOST_AR) t $(lib) | grep '\.o$$'`; do \
-	    $(HOST_AR) p $(lib) $$f > $$ldir/$$f; \
-	    filelist="$$filelist $$ldir/$$f"; \
-	done ; \
-	$(HOST_AR) $(HOST_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $$filelist;\
-)
+    $(call _extract-and-include-single-host-whole-static-lib, $(lib)))
 endef
 
 # Explicitly delete the archive first so that ar doesn't
@@ -1061,8 +1130,8 @@
 # it to be overriden en-masse see combo/linux-arm.make for an example.
 ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
 define transform-host-o-to-shared-lib-inner
-$(PRIVATE_CXX) \
-	-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
+$(hide) $(PRIVATE_CXX) \
+	-Wl,-rpath-link=$(HOST_OUT_INTERMEDIATE_LIBRARIES) \
 	-Wl,-rpath,\$$ORIGIN/../lib \
 	-shared -Wl,-soname,$(notdir $@) \
 	$(PRIVATE_LDFLAGS) \
@@ -1084,13 +1153,13 @@
 define transform-host-o-to-shared-lib
 @mkdir -p $(dir $@)
 @echo "host SharedLib: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-host-o-to-shared-lib-inner)
+$(transform-host-o-to-shared-lib-inner)
 endef
 
 define transform-host-o-to-package
 @mkdir -p $(dir $@)
 @echo "host Package: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-host-o-to-shared-lib-inner)
+$(transform-host-o-to-shared-lib-inner)
 endef
 
 
@@ -1111,7 +1180,7 @@
 # it to be overriden en-masse see combo/linux-arm.make for an example.
 ifneq ($(TARGET_CUSTOM_LD_COMMAND),true)
 define transform-o-to-shared-lib-inner
-$(PRIVATE_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
 	-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
 	-Wl,-rpath,\$$ORIGIN/../lib \
@@ -1120,7 +1189,7 @@
 	$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
 	$(PRIVATE_ALL_OBJECTS) \
 	-Wl,--whole-archive \
-	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
@@ -1132,13 +1201,13 @@
 define transform-o-to-shared-lib
 @mkdir -p $(dir $@)
 @echo "target SharedLib: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-o-to-shared-lib-inner)
+$(transform-o-to-shared-lib-inner)
 endef
 
 define transform-o-to-package
 @mkdir -p $(dir $@)
 @echo "target Package: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-o-to-shared-lib-inner)
+$(transform-o-to-shared-lib-inner)
 endef
 
 
@@ -1170,7 +1239,7 @@
 
 ifneq ($(TARGET_CUSTOM_LD_COMMAND),true)
 define transform-o-to-executable-inner
-$(PRIVATE_CXX) \
+$(hide) $(PRIVATE_CXX) \
 	$(TARGET_GLOBAL_LDFLAGS) \
 	-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
 	$(TARGET_GLOBAL_LD_DIRS) \
@@ -1192,7 +1261,7 @@
 define transform-o-to-executable
 @mkdir -p $(dir $@)
 @echo "target Executable: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-o-to-executable-inner)
+$(transform-o-to-executable-inner)
 endef
 
 
@@ -1211,7 +1280,7 @@
 define transform-o-to-static-executable
 @mkdir -p $(dir $@)
 @echo "target StaticExecutable: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-o-to-static-executable-inner)
+$(transform-o-to-static-executable-inner)
 endef
 
 
@@ -1221,8 +1290,8 @@
 
 ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
 define transform-host-o-to-executable-inner
-$(PRIVATE_CXX) \
-	-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
+$(hide) $(PRIVATE_CXX) \
+	-Wl,-rpath-link=$(HOST_OUT_INTERMEDIATE_LIBRARIES) \
 	-Wl,-rpath,\$$ORIGIN/../lib \
 	$(HOST_GLOBAL_LD_DIRS) \
 	$(PRIVATE_LDFLAGS) \
@@ -1243,7 +1312,7 @@
 define transform-host-o-to-executable
 @mkdir -p $(dir $@)
 @echo "host Executable: $(PRIVATE_MODULE) ($@)"
-$(hide) $(transform-host-o-to-executable-inner)
+$(transform-host-o-to-executable-inner)
 endef
 
 
@@ -1280,7 +1349,7 @@
     $(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
     $(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
     $(if $(filter --version-code,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-code , $(PLATFORM_SDK_VERSION))) \
-    $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION))) \
+    $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION)-$(BUILD_NUMBER))) \
     $(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \
     $(addprefix --rename-instrumentation-target-package , $(PRIVATE_MANIFEST_INSTRUMENTATION_FOR))
 endef
@@ -1319,7 +1388,12 @@
         @$(call emit-line,$(wordlist 3401,3600,$(1)),$(2))
         @$(call emit-line,$(wordlist 3601,3800,$(1)),$(2))
         @$(call emit-line,$(wordlist 3801,4000,$(1)),$(2))
-        @$(if $(wordlist 4001,4002,$(1)),$(error Too many words ($(words $(1)))))
+        @$(call emit-line,$(wordlist 4001,4200,$(1)),$(2))
+        @$(call emit-line,$(wordlist 4201,4400,$(1)),$(2))
+        @$(call emit-line,$(wordlist 4401,4600,$(1)),$(2))
+        @$(call emit-line,$(wordlist 4601,4800,$(1)),$(2))
+        @$(call emit-line,$(wordlist 4801,5000,$(1)),$(2))
+        @$(if $(wordlist 5001,5002,$(1)),$(error Too many words ($(words $(1)))))
 endef
 
 # For a list of jar files, unzip them to a specified directory,
@@ -1339,38 +1413,96 @@
   done
 endef
 
-# below we write the list of java files to java-source-list to avoid argument
-# list length problems with Cygwin we filter out duplicate java file names
-# because eclipse's compiler doesn't like them.
-define transform-java-to-classes.jar
-@echo "target Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
+# Common definition to invoke javac on the host and target.
+#
+# Some historical notes:
+# - below we write the list of java files to java-source-list to avoid argument
+#   list length problems with Cygwin
+# - we filter out duplicate java file names because eclipse's compiler
+#   doesn't like them.
+#
+# $(1): javac
+# $(2): bootclasspath
+define compile-java
 $(hide) rm -f $@
 $(hide) rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR)
+$(hide) mkdir -p $(dir $@)
 $(hide) mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
-$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES), \
-    $(PRIVATE_CLASS_INTERMEDIATES_DIR))
-$(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list)
+$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES),$(PRIVATE_CLASS_INTERMEDIATES_DIR))
+$(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list)
 $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
-	    find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list; \
+	    find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \
 fi
-$(hide) tr ' ' '\n' < $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list \
-    | sort -u > $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list-uniq
-$(hide) $(TARGET_JAVAC) -encoding ascii $(PRIVATE_BOOTCLASSPATH) \
+$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
+    | sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+$(hide) $(1) -encoding ascii \
+    $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
+    $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
+    $(2) \
     $(addprefix -classpath ,$(strip \
         $(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
-    $(PRIVATE_JAVACFLAGS) $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
-	$(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
+    $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
     -extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
-    \@$(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list-uniq \
+    $(PRIVATE_JAVACFLAGS) \
+    \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
     || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
-$(hide) rm -f $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list
-$(hide) rm -f $(dir $(PRIVATE_CLASS_INTERMEDIATES_DIR))/java-source-list-uniq
-$(hide) mkdir -p $(dir $@)
+$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
+$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
 $(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
     $@ $(PRIVATE_JAR_MANIFEST) -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
+endef
+
+define transform-java-to-classes.jar
+@echo "target Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
+$(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH))
 $(hide) rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR)
 endef
 
+# Override the above definitions if we want to do incremetal javac
+ifeq (true, $(ENABLE_INCREMENTALJAVAC))
+define compile-java
+$(hide) mkdir -p $(dir $@)
+$(hide) mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
+$(hide) touch $(PRIVATE_CLASS_INTERMEDIATES_DIR)/newstamp
+$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES),$(PRIVATE_CLASS_INTERMEDIATES_DIR))
+$(hide) if [ -e $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp ] ; then \
+        newerFlag=$$(echo -n "-newer $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp") ; \
+    fi ; \
+    find $(PRIVATE_JAVA_SOURCES) $$newerFlag > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list ; \
+    if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
+        find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' $$newerFlag >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \
+    fi
+$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
+    | sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+@echo "(Incremental) build source files:"
+@cat $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+$(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \
+    $(1) -encoding ascii \
+    $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
+    $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
+    $(2) \
+    $(addprefix -classpath ,$(strip \
+        $(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES) $(PRIVATE_CLASS_INTERMEDIATES_DIR)))) \
+    $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
+    -extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
+    $(PRIVATE_JAVACFLAGS) \
+    \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
+    || ( exit 41 ) \
+fi
+$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
+$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+$(hide) rm -f $@
+$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
+    $@ $(PRIVATE_JAR_MANIFEST) -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
+$(hide) mv $(PRIVATE_CLASS_INTERMEDIATES_DIR)/newstamp $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp
+endef
+
+define transform-java-to-classes.jar
+@echo "target Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
+$(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH))
+endef
+endif # ENABLE_INCREMENTALJAVAC
+
 define transform-classes.jar-to-emma
 $(hide) java -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
     $(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR) \
@@ -1427,7 +1559,7 @@
     $(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
     $(addprefix --product , $(TARGET_AAPT_CHARACTERISTICS)) \
     $(if $(filter --version-code,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-code , $(PLATFORM_SDK_VERSION))) \
-    $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION))) \
+    $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION)-$(BUILD_NUMBER))) \
     $(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \
     $(addprefix --rename-instrumentation-target-package , $(PRIVATE_MANIFEST_INSTRUMENTATION_FOR)) \
     -F $@
@@ -1435,8 +1567,8 @@
 
 define add-jni-shared-libs-to-package
 $(hide) rm -rf $(dir $@)lib
-$(hide) mkdir -p $(dir $@)lib/$(TARGET_CPU_ABI)
-$(hide) cp $(PRIVATE_JNI_SHARED_LIBRARIES) $(dir $@)lib/$(TARGET_CPU_ABI)
+$(hide) mkdir -p $(dir $@)lib/$(PRIVATE_JNI_SHARED_LIBRARIES_ABI)
+$(hide) cp $(PRIVATE_JNI_SHARED_LIBRARIES) $(dir $@)lib/$(PRIVATE_JNI_SHARED_LIBRARIES_ABI)
 $(hide) (cd $(dir $@) && zip -r $(notdir $@) lib)
 $(hide) rm -rf $(dir $@)lib
 endef
@@ -1490,31 +1622,12 @@
 # new prebuilt rules to work, we should change this to copy the
 # resources to the out directory and then copy the resources.
 
-# Note: not using aapt tool for this because we aren't making
-# an android package for the host.
+# Note: we intentionally don't clean PRIVATE_CLASS_INTERMEDIATES_DIR
+# in transform-java-to-classes for the sake of vm-tests.
 define transform-host-java-to-package
 @echo "host Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
-@rm -f $@
-@rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR)
-@mkdir -p $(dir $@)
-@mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
-$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES), \
-    $(PRIVATE_CLASS_INTERMEDIATES_DIR))
-$(call dump-words-to-file,$(sort\
-	$(PRIVATE_JAVA_SOURCES)),\
-	$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq)
-$(hide) $(HOST_JAVAC) -encoding ascii -g \
-	$(PRIVATE_JAVACFLAGS) $(xlint_unchecked) \
-	$(addprefix -classpath ,$(strip \
-		$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES)))) \
-	-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR)\
-        \@$(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq || \
-	( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
-$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list
-$(hide) rm -f $(PRIVATE_INTERMEDIATES_DIR)/java-source-list-uniq
-$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
-    $@ $(PRIVATE_JAR_MANIFEST) $(PRIVATE_EXTRA_JAR_ARGS) \
-    -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
+$(call compile-java,$(HOST_JAVAC),$(PRIVATE_BOOTCLASSPATH))
+$(hide) if [ ! -z "$(PRIVATE_EXTRA_JAR_ARGS)" ]; then jar uf $@ $(PRIVATE_EXTRA_JAR_ARGS); fi
 endef
 
 ###########################################################
@@ -1577,9 +1690,12 @@
 # Copy a single file from one place to another,
 # preserving permissions and overwriting any existing
 # file.
+# We disable the "-t" option for acp can not handle
+# high resolution timestamp correctly on file systems like ext4.
+# Therefore copy-file-to-target is the same as copy-file-to-new-target.
 define copy-file-to-target
 @mkdir -p $(dir $@)
-$(hide) $(ACP) -fpt $< $@
+$(hide) $(ACP) -fp $< $@
 endef
 
 # The same as copy-file-to-target, but use the local
@@ -1646,7 +1762,7 @@
 endef
 else
 define transform-host-ranlib-copy-hack
-true
+@true
 endef
 endif
 
@@ -1656,7 +1772,7 @@
 endef
 else
 define transform-ranlib-copy-hack
-true
+@true
 endef
 endif
 
@@ -1668,7 +1784,7 @@
 # Command to copy the file with acp, if proguard is disabled.
 define proguard-disabled-commands
 @echo Copying: $@
-$(hide) $(ACP) $< $@
+$(hide) $(ACP) -fp $< $@
 endef
 
 # Command to call Proguard
@@ -1717,8 +1833,10 @@
 # spare area for each page).
 # $(1): the partition data size
 define image-size-from-data-size
-$(shell echo $$(($(1) / $(BOARD_NAND_PAGE_SIZE) * \
-  ($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE)))))
+$(strip $(eval _isfds_value := $$(shell echo $$$$(($(1) / $(BOARD_NAND_PAGE_SIZE) * \
+  ($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE))))))\
+$(if $(filter 0, $(_isfds_value)),$(shell echo $$(($(BOARD_NAND_PAGE_SIZE)+$(BOARD_NAND_SPARE_SIZE)))),$(_isfds_value))\
+$(eval _isfds_value :=))
 endef
 
 # $(1): The file(s) to check (often $@)
@@ -1783,7 +1901,6 @@
 endef
 define add-radio-file-internal
 INSTALLED_RADIOIMAGE_TARGET += $$(PRODUCT_OUT)/$(2)
-ALL_PREBUILT += $$(PRODUCT_OUT)/$(2)
 $$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1) | $$(ACP)
 	$$(transform-prebuilt-to-target)
 endef
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 6e0b093..9f44c32 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -4,7 +4,7 @@
 ####################################
 
 # TODO: replace it with device's BOOTCLASSPATH
-DEXPREOPT_BOOT_JARS := core:bouncycastle:ext:framework:android.policy:services:core-junit
+DEXPREOPT_BOOT_JARS := core:apache-xml:bouncycastle:ext:framework:android.policy:services:core-junit
 DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
 
 DEXPREOPT_BUILD_DIR := $(OUT_DIR)
@@ -51,7 +51,7 @@
 	@echo "Dexpreopt Boot Jar: $$@"
 	$(hide) rm -f $$@
 	$(hide) mkdir -p $$(dir $$@)
-	$(hide) $(ACP) -fpt $$< $$(PRIVATE_DBJ_JAR)
+	$(hide) $(ACP) -fp $$< $$(PRIVATE_DBJ_JAR)
 	$$(call dexpreopt-one-file,$$(PRIVATE_DBJ_JAR),$$@)
 
 $(_dbj_jar_no_dex) : $(_dbj_src_jar) | $(ACP) $(AAPT)
@@ -60,6 +60,7 @@
 
 $(eval _dbj_jar :=)
 $(eval _dbj_odex :=)
+$(eval _dbj_jar_no_dex :=)
 $(eval _dbj_src_jar :=)
 endef
 
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 60b9c83..051c16a 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -40,11 +40,8 @@
 LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)
 endif
 
-ifeq ($(LOCAL_DROIDDOC_TEMPLATE_DIR),)
-LOCAL_DROIDDOC_TEMPLATE_DIR := $(SRC_DROIDDOC_DIR)/templates
-endif
 ifeq ($(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR),)
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := $(SRC_DROIDDOC_DIR)/templates
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := $(SRC_DROIDDOC_DIR)/$(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)
 endif
 
 ifeq ($(LOCAL_DROIDDOC_ASSET_DIR),)
@@ -125,26 +122,21 @@
 ##
 
 droiddoc_templates := \
-    $(shell find $(LOCAL_DROIDDOC_TEMPLATE_DIR) -type f) \
     $(shell find $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR) -type f)
 
 droiddoc := \
 	$(HOST_JDK_TOOLS_JAR) \
-	$(HOST_OUT_JAVA_LIBRARIES)/droiddoc$(COMMON_JAVA_PACKAGE_SUFFIX) \
-	$(HOST_OUT_JAVA_LIBRARIES)/clearsilver$(COMMON_JAVA_PACKAGE_SUFFIX) \
-	$(HOST_OUT_SHARED_LIBRARIES)/libclearsilver-jni$(HOST_JNILIB_SUFFIX)
+	$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
 
-$(full_target): PRIVATE_DOCLETPATH := $(HOST_OUT_JAVA_LIBRARIES)/clearsilver$(COMMON_JAVA_PACKAGE_SUFFIX):$(HOST_OUT_JAVA_LIBRARIES)/droiddoc$(COMMON_JAVA_PACKAGE_SUFFIX):$(HOST_OUT_JAVA_LIBRARIES)/apicheck$(COMMON_JAVA_PACKAGE_SUFFIX)
+$(full_target): PRIVATE_DOCLETPATH := $(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
 $(full_target): PRIVATE_CURRENT_BUILD := -hdf page.build $(BUILD_ID)-$(BUILD_NUMBER)
 $(full_target): PRIVATE_CURRENT_TIME :=  -hdf page.now "$(shell date "+%d %b %Y %k:%M")"
-$(full_target): PRIVATE_TEMPLATE_DIR := $(LOCAL_DROIDDOC_TEMPLATE_DIR)
 $(full_target): PRIVATE_CUSTOM_TEMPLATE_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)
-$(full_target): PRIVATE_IN_ASSET_DIR := $(LOCAL_DROIDDOC_TEMPLATE_DIR)/$(LOCAL_DROIDDOC_ASSET_DIR)
 $(full_target): PRIVATE_IN_CUSTOM_ASSET_DIR := $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR)/$(LOCAL_DROIDDOC_CUSTOM_ASSET_DIR)
 $(full_target): PRIVATE_OUT_ASSET_DIR := $(out_dir)/$(LOCAL_DROIDDOC_ASSET_DIR)
 $(full_target): PRIVATE_OUT_CUSTOM_ASSET_DIR := $(out_dir)/$(LOCAL_DROIDDOC_CUSTOM_ASSET_DIR)
 ifneq ($(strip $(LOCAL_DROIDDOC_HTML_DIR)),)
-$(full_target): PRIVATE_DROIDDOC_HTML_DIR := $(foreach dir,$(LOCAL_DROIDDOC_HTML_DIR),-htmldir $(dir))
+$(full_target): PRIVATE_DROIDDOC_HTML_DIR := -htmldir $(LOCAL_PATH)/$(LOCAL_DROIDDOC_HTML_DIR)
 else
 $(full_target): PRIVATE_DROIDDOC_HTML_DIR := 
 endif
@@ -160,17 +152,14 @@
 	$(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
 			$(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
 	$(hide) ( \
-		LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
 		javadoc \
                 \@$(PRIVATE_SRC_LIST_FILE) \
                 -J-Xmx1280m \
-                -J-Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) \
                 $(PRIVATE_PROFILING_OPTIONS) \
                 -quiet \
-                -doclet DroidDoc \
+                -doclet com.google.doclava.Doclava \
                 -docletpath $(PRIVATE_DOCLETPATH) \
                 -templatedir $(PRIVATE_CUSTOM_TEMPLATE_DIR) \
-                -templatedir $(PRIVATE_TEMPLATE_DIR) \
                 $(PRIVATE_DROIDDOC_HTML_DIR) \
                 $(addprefix -bootclasspath ,$(PRIVATE_BOOTCLASSPATH)) \
                 $(addprefix -classpath ,$(PRIVATE_CLASSPATH)) \
@@ -178,12 +167,6 @@
                 -d $(PRIVATE_OUT_DIR) \
                 $(PRIVATE_CURRENT_BUILD) $(PRIVATE_CURRENT_TIME) \
                 $(PRIVATE_DROIDDOC_OPTIONS) \
-        && rm -rf $(PRIVATE_OUT_ASSET_DIR) \
-        && rm -rf $(PRIVATE_OUT_CUSTOM_ASSET_DIR) \
-        && mkdir -p $(PRIVATE_OUT_ASSET_DIR) \
-        && mkdir -p $(PRIVATE_OUT_CUSTOM_ASSET_DIR) \
-        && cp -fr $(PRIVATE_IN_ASSET_DIR)/* $(PRIVATE_OUT_ASSET_DIR)/ \
-        && cp -fr $(PRIVATE_IN_CUSTOM_ASSET_DIR)/* $(PRIVATE_OUT_CUSTOM_ASSET_DIR)/ \
         && touch -f $@ \
     ) || (rm -rf $(PRIVATE_OUT_DIR) $(PRIVATE_SRC_LIST_FILE); exit 45)
 
@@ -204,7 +187,7 @@
 		javadoc \
                 $(PRIVATE_DROIDDOC_OPTIONS) \
                 \@$(PRIVATE_SRC_LIST_FILE) \
-                -J-Xmx768m \
+                -J-Xmx1024m \
                 $(PRIVATE_PROFILING_OPTIONS) \
                 $(addprefix -classpath ,$(PRIVATE_CLASSPATH)) \
                 -sourcepath $(PRIVATE_SOURCE_PATH)$(addprefix :,$(PRIVATE_CLASSPATH)) \
@@ -227,6 +210,8 @@
 .PHONY: $(LOCAL_MODULE)-docs
 $(LOCAL_MODULE)-docs : $(full_target)
 
+ifeq ($(strip $(LOCAL_UNINSTALLABLE_MODULE)),)
+
 # Define a rule to create a zip of these docs.
 out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
 $(out_zip): PRIVATE_DOCS_DIR := $(out_dir)
@@ -237,3 +222,5 @@
 	$(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_DOCS_DIR) && zip -rq $$F * )
 
 $(call dist-for-goals,docs,$(out_zip))
+
+endif
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 58cdc6d..831ed97 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -9,9 +9,9 @@
 	ABP:=$(ABP):$(TARGET_OUT_EXECUTABLES)
 else
 	# Add the toolchain bin dir if it actually exists
-	ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin),)
+	ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),)
 		# this should be copied to HOST_OUT_EXECUTABLES instead
-		ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin
+		ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin
 	endif
 endif
 ANDROID_BUILD_PATHS := $(ABP)
diff --git a/core/envsetup.mk b/core/envsetup.mk
index e4c99d5..800a9bf 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -230,6 +230,7 @@
 TARGET_OUT_ETC := $(TARGET_OUT)/etc
 TARGET_OUT_STATIC_LIBRARIES:= $(TARGET_OUT_INTERMEDIATES)/lib
 TARGET_OUT_NOTICE_FILES:=$(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
+TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
 
 TARGET_OUT_DATA := $(PRODUCT_OUT)/data
 TARGET_OUT_DATA_EXECUTABLES:= $(TARGET_OUT_EXECUTABLES)
@@ -240,6 +241,7 @@
 TARGET_OUT_DATA_KEYCHARS := $(TARGET_OUT_KEYCHARS)
 TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
 TARGET_OUT_DATA_STATIC_LIBRARIES:= $(TARGET_OUT_STATIC_LIBRARIES)
+TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
 
 TARGET_OUT_UNSTRIPPED := $(PRODUCT_OUT)/symbols
 TARGET_OUT_EXECUTABLES_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/system/bin
diff --git a/core/find-jdk-tools-jar.sh b/core/find-jdk-tools-jar.sh
index 20d7d4d..e1278c3 100755
--- a/core/find-jdk-tools-jar.sh
+++ b/core/find-jdk-tools-jar.sh
@@ -3,8 +3,7 @@
 else
     JAVAC=$(which javac)
     if [ -z "$JAVAC" ] ; then
-	echo "Please-install-JDK-6,-which-you-can-download-from-java.sun.com"
-	exit 1
+        exit 1
     fi
     while [ -L "$JAVAC" ] ; do
         LSLINE=$(ls -l "$JAVAC")
diff --git a/core/help.mk b/core/help.mk
new file mode 100644
index 0000000..9e37f82
--- /dev/null
+++ b/core/help.mk
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# 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
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+
+ifeq ($(MAKECMDGOALS),help)
+dont_bother := true
+endif
+ifeq ($(MAKECMDGOALS),out)
+dont_bother := true
+endif
+
+.PHONY: help
+help:
+	@echo
+	@echo "Common make targets:"
+	@echo "----------------------------------------------------------------------------------"
+	@echo "droid                   Default target"
+	@echo "clean                   (aka clobber) equivalent to rm -rf out/"
+	@echo "snod                    Quickly rebuild the system image from built packages"
+	@echo "offline-sdk-docs        Generate the HTML for the developer SDK docs"
+	@echo "doc-comment-check-docs  Check HTML doc links & validity, without generating HTML"
+	@echo "libandroid_runtime      All the JNI framework stuff"
+	@echo "framework               All the java framework stuff"
+	@echo "services                The system server (Java) and friends"
+	@echo "help                    You're reading it right now"
+
+.PHONY: out
+out:
+	@echo "I'm sure you're nice and all, but no thanks."
+
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index 27174f2..322d10f 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -27,10 +27,14 @@
 intermediates := $(call local-intermediates-dir)
 intermediates.COMMON := $(call local-intermediates-dir,COMMON)
 
+full_classes_compiled_jar := $(intermediates.COMMON)/classes-full-debug.jar
+full_classes_jarjar_jar := $(intermediates.COMMON)/classes-jarjar.jar
 full_classes_jar := $(intermediates.COMMON)/classes.jar
 built_dex := $(intermediates.COMMON)/classes.dex
 
 LOCAL_INTERMEDIATE_TARGETS += \
+    $(full_classes_compiled_jar) \
+    $(full_classes_jarjar_jar) \
     $(full_classes_jar) \
     $(built_dex)
 
@@ -47,10 +51,26 @@
 
 $(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
 
-$(full_classes_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
-$(full_classes_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
+$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
 	$(transform-host-java-to-package)
 
+# Run jarjar if necessary, otherwise just copy the file.
+ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
+$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
+$(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(JARJAR)
+	@echo JarJar: $@
+	$(hide) java -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
+else
+$(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(ACP)
+	@echo Copying: $@
+	$(hide) $(ACP) -fp $< $@
+endif
+
+$(full_classes_jar): $(full_classes_jarjar_jar) | $(ACP)
+	@echo Copying: $@
+	$(hide) $(ACP) -fp $< $@
+
 $(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
 $(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
 $(built_dex): $(full_classes_jar) $(DX)
diff --git a/core/host_native_test.mk b/core/host_native_test.mk
new file mode 100644
index 0000000..2a77f1e
--- /dev/null
+++ b/core/host_native_test.mk
@@ -0,0 +1,14 @@
+################################################
+## A thin wrapper around BUILD_HOST_EXECUTABLE
+## Common flags for host native tests are added.
+################################################
+
+LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
+LOCAL_C_INCLUDES +=  \
+                    bionic/libstdc++/include \
+                    external/gtest/include \
+                    external/astl/include
+LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host libastl_host
+LOCAL_SHARED_LIBRARIES +=
+
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/core/java.mk b/core/java.mk
index 35b0343..464f772 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -88,7 +88,7 @@
 ifdef LOCAL_PROGUARD_ENABLED
 proguard_jar_leaf := proguard.classes.jar
 built_dex_intermediate_leaf := proguard.$(built_dex_intermediate_leaf)
-built_dex_leaf := progaurd.classes.dex
+built_dex_leaf := proguard.classes.dex
 else
 proguard_jar_leaf := noproguard.classes.jar
 built_dex_intermediate_leaf := noproguard.$(built_dex_intermediate_leaf)
@@ -123,6 +123,54 @@
 
 LOCAL_INTERMEDIATE_SOURCE_DIR := $(intermediates.COMMON)/src
 
+###############################################################
+## .rs files: RenderScript sources to .java files and .bc files
+###############################################################
+renderscript_sources := $(filter %.rs,$(LOCAL_SRC_FILES))
+# Because names of the java files from RenderScript are unknown until the
+# .rs file(s) are compiled, we have to depend on a timestamp file.
+RenderScript_file_stamp :=
+ifneq ($(renderscript_sources),)
+renderscript_sources_fullpath := $(addprefix $(LOCAL_PATH)/, $(renderscript_sources))
+RenderScript_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/RenderScript.stamp
+renderscript_intermediate := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript
+
+# prepend the RenderScript system include path
+ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
+LOCAL_RENDERSCRIPT_INCLUDES := \
+    $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/renderscript/clang-include \
+    $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/renderscript/include \
+    $(LOCAL_RENDERSCRIPT_INCLUDES)
+else
+LOCAL_RENDERSCRIPT_INCLUDES := \
+     $(TOPDIR)external/clang/lib/Headers \
+     $(TOPDIR)frameworks/base/libs/rs/scriptc \
+     $(LOCAL_RENDERSCRIPT_INCLUDES)
+endif
+
+ifeq ($(LOCAL_RENDERSCRIPT_CC),)
+LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC)
+endif
+
+$(RenderScript_file_stamp): PRIVATE_RS_INCLUDES := $(LOCAL_RENDERSCRIPT_INCLUDES)
+$(RenderScript_file_stamp): PRIVATE_RS_CC := $(LOCAL_RENDERSCRIPT_CC)
+$(RenderScript_file_stamp): PRIVATE_RS_SOURCE_FILES := $(renderscript_sources_fullpath)
+# By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be
+# automatically found by the java compiling function transform-java-to-classes.jar.
+$(RenderScript_file_stamp): PRIVATE_RS_OUTPUT_DIR := $(renderscript_intermediate)
+$(RenderScript_file_stamp): $(renderscript_sources_fullpath) $(LOCAL_RENDERSCRIPT_CC)
+	$(transform-renderscripts-to-java-and-bc)
+
+# include the dependency files (.d) generated by llvm-rs-cc.
+renderscript_generated_dep_files := $(addprefix $(renderscript_intermediate)/, \
+    $(patsubst %.rs,%.d, $(notdir $(renderscript_sources))))
+-include $(renderscript_generated_dep_files)
+
+LOCAL_INTERMEDIATE_TARGETS += $(RenderScript_file_stamp)
+# Make sure the generated resource will be added to the apk.
+LOCAL_RESOURCE_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript/res $(LOCAL_RESOURCE_DIR)
+endif
+
 # TODO: It looks like the only thing we need from base_rules is
 # all_java_sources.  See if we can get that by adding a
 # common_java.mk, and moving the include of base_rules.mk to
@@ -201,7 +249,7 @@
 else
 $(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 endif
 
 ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
@@ -239,7 +287,7 @@
 # Keep a copy of the jar just before proguard processing.
 $(full_classes_jar): $(full_classes_emma_jar) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 
 # Run proguard if necessary, otherwise just copy the file.
 proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary
@@ -301,7 +349,7 @@
 	$(transform-classes.jar-to-dex)
 $(built_dex): $(built_dex_intermediate) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 ifneq ($(GENERATE_DEX_DEBUG),)
 	$(install-dex-debug)
 endif
diff --git a/core/key_char_map.mk b/core/key_char_map.mk
deleted file mode 100644
index 0f112f2..0000000
--- a/core/key_char_map.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-###########################################################
-## Standard rules for building an executable file.
-##
-## Additional inputs from base_rules.make:
-## None.
-###########################################################
-
-ifeq ($(strip $(LOCAL_MODULE_CLASS)),)
-LOCAL_MODULE_CLASS := KEYCHARS
-endif
-ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
-LOCAL_MODULE_SUFFIX := .bin
-endif
-
-LOCAL_MODULE := $(LOCAL_SRC_FILES)
-
-include $(BUILD_SYSTEM)/base_rules.mk
-
-full_src_files := $(addprefix $(LOCAL_PATH)/,$(LOCAL_SRC_FILES))
-
-$(LOCAL_BUILT_MODULE) : PRIVATE_SRC_FILES := $(full_src_files)
-
-$(LOCAL_BUILT_MODULE) : $(full_src_files) $(KCM)
-	@echo KeyCharMap: $@
-	@mkdir -p $(dir $@)
-	$(hide) $(KCM) $(PRIVATE_SRC_FILES) $@
-    
diff --git a/core/legacy_prebuilts.mk b/core/legacy_prebuilts.mk
new file mode 100644
index 0000000..6a999c1
--- /dev/null
+++ b/core/legacy_prebuilts.mk
@@ -0,0 +1,127 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# 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
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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 is the list of modules grandfathered to use ALL_PREBUILT
+
+# DO NOT ADD ANY NEW MODULE TO THIS FILE
+#
+# ALL_PREBUILT modules are hard to control and audit and we don't want
+# to add any new such module in the system
+
+GRANDFATHERED_ALL_PREBUILT := \
+	akmd2 \
+	am \
+	ap_gain.bin \
+	audio.conf \
+	auto_pairing.conf \
+	AVRCP.kl \
+	baseline11k.par \
+	baseline8k.par \
+	baseline.par \
+	basic.ok \
+	batch \
+	bitmap_size.txt \
+	blacklist.conf \
+	bmgr \
+	boolean.g2g \
+	bp.img \
+	brcm_guci_drv \
+	bypassfactory \
+	cacerts.bks \
+	cdt.bin \
+	chat-ril \
+	cmu6plus.ok.zip \
+	cpcap-key.kl \
+	data \
+	dbus.conf \
+	dev \
+	egl.cfg \
+	enroll.ok \
+	en-US-ttp.data \
+	firmware_error.565 \
+	firmware_install.565 \
+	ftmipcd \
+	generic11_f.swimdl \
+	generic11.lda \
+	generic11_m.swimdl \
+	generic8_f.swimdl \
+	generic8.lda \
+	generic8_m.swimdl \
+	generic.swiarb \
+	gps.conf \
+	gpsconfig.xml \
+	gps.stingray.so \
+	gralloc.omap3.so \
+	gralloc.tegra.so \
+	hosts \
+	hwcomposer.tegra.so \
+	ime \
+	init.goldfish.rc \
+	init.goldfish.sh \
+	init.olympus.rc \
+	init.rc \
+	init.sholes.rc \
+	init.stingray.rc \
+	input \
+	input.conf \
+	kernel \
+	lbl \
+	libEGL_POWERVR_SGX530_121.so \
+	libEGL_tegra.so \
+	libGLESv1_CM_POWERVR_SGX530_121.so \
+	libGLESv1_CM_tegra.so \
+	libGLESv2_POWERVR_SGX530_121.so \
+	libGLESv2_tegra.so \
+	libmdmctrl.a \
+	libmoto_ril.so \
+	libpppd_plugin-ril.so \
+	libril_rds.so \
+	location \
+	location.cfg \
+	main.conf \
+	mbm.bin \
+	mbm_consumer.bin \
+	mdm_panicd \
+	monkey \
+	network.conf \
+	phone_type_choice.g2g \
+	pm \
+	pppd-ril \
+	pppd-ril.options \
+	proc \
+	qwerty.kl \
+	radio.img \
+	rdl.bin \
+	RFFspeed_501.bmd \
+	RFFstd_501.bmd \
+	savebpver \
+	sbin \
+	sholes-keypad.kl \
+	suplcerts.bks \
+	svc \
+	sys \
+	system \
+	tcmd \
+	ueventd.goldfish.rc \
+	ueventd.olympus.rc \
+	ueventd.rc \
+	ueventd.stingray.rc \
+	VoiceDialer.g2g \
+	vold.fstab \
+	wl1271.bin \
+	zoneinfo.dat \
+	zoneinfo.idx \
+	zoneinfo.version
diff --git a/core/main.mk b/core/main.mk
index b4282ee..6750baa 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -61,6 +61,9 @@
 .PHONY: FORCE
 FORCE:
 
+# Targets that provide quick help on the build system.
+include $(BUILD_SYSTEM)/help.mk
+
 # Set up various standard variables based on configuration
 # and host information.
 include $(BUILD_SYSTEM)/config.mk
@@ -148,7 +151,23 @@
 # These are the modifier targets that don't do anything themselves, but
 # change the behavior of the build.
 # (must be defined before including definitions.make)
-INTERNAL_MODIFIER_TARGETS := showcommands checkbuild all
+INTERNAL_MODIFIER_TARGETS := showcommands checkbuild all incrementaljavac
+
+.PHONY: incrementaljavac
+incrementaljavac: ;
+
+# WARNING:
+# ENABLE_INCREMENTALJAVAC should NOT be enabled by default, because change of
+# a Java source file won't trigger rebuild of its dependent Java files.
+# You can only enable it by adding "incrementaljavac" to your make command line.
+# You are responsible for the correctness of the incremental build.
+# This may decrease incremental build time dramatically for large Java libraries,
+# such as core.jar, framework.jar, etc.
+ENABLE_INCREMENTALJAVAC :=
+ifneq (,$(filter incrementaljavac, $(MAKECMDGOALS)))
+ENABLE_INCREMENTALJAVAC := true
+MAKECMDGOALS := $(filter-out incrementaljavac, $(MAKECMDGOALS))
+endif
 
 # Bring in standard build system definitions.
 include $(BUILD_SYSTEM)/definitions.mk
@@ -291,6 +310,7 @@
   ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
 endif
 
+ifneq ($(BUILD_TINY_ANDROID),true)
 # Install an apns-conf.xml file if one's not already being installed.
 ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
   PRODUCT_COPY_FILES += \
@@ -299,17 +319,6 @@
     $(warning implicitly installing apns-conf_sdk.xml)
   endif
 endif
-# If we're on an eng or tests build, but not on the sdk, and we have
-# a better one, use that instead.
-ifneq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
-  ifndef is_sdk_build
-    apns_to_use := $(wildcard vendor/google/etc/apns-conf.xml)
-    ifneq ($(strip $(apns_to_use)),)
-      PRODUCT_COPY_FILES := \
-            $(filter-out %:system/etc/apns-conf.xml,$(PRODUCT_COPY_FILES)) \
-            $(strip $(apns_to_use)):system/etc/apns-conf.xml
-    endif
-  endif
 endif
 
 ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
@@ -390,13 +399,16 @@
 	development/host \
 	development/tools/etc1tool \
 	development/tools/line_endings \
+	external/clang \
 	external/easymock \
 	external/expat \
 	external/libpng \
+	external/llvm \
 	external/qemu \
 	external/sqlite/dist \
 	external/zlib \
 	frameworks/base \
+	frameworks/compile \
 	sdk/emulator/mksdcard \
 	sdk/sdklauncher \
 	system/core/adb \
@@ -455,7 +467,6 @@
 	build/target \
 	build/tools/acp \
 	build/tools/apriori \
-	build/tools/kcm \
 	build/tools/soslim \
 	external/elfcopy \
 	external/elfutils \
@@ -474,6 +485,13 @@
 
 endif	# !SDK_ONLY
 
+# Before we go and include all of the module makefiles, stash away
+# the PRODUCT_* values so that later we can verify they are not modified.
+stash_product_vars:=true
+ifeq ($(stash_product_vars),true)
+  $(call stash-product-vars, __STASHED)
+endif
+
 ifneq ($(ONE_SHOT_MAKEFILE),)
 # We've probably been invoked by the "mm" shell function
 # with a subdirectory's makefile.
@@ -504,6 +522,26 @@
 include $(subdir_makefiles)
 endif # ONE_SHOT_MAKEFILE
 
+ifeq ($(stash_product_vars),true)
+  $(call assert-product-vars, __STASHED)
+endif
+
+include $(BUILD_SYSTEM)/legacy_prebuilts.mk
+ifneq ($(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),)
+  $(warning *** Some files have been added to ALL_PREBUILT.)
+  $(warning *)
+  $(warning * ALL_PREBUILT is a deprecated mechanism that)
+  $(warning * should not be used for new files.)
+  $(warning * As an alternative, use PRODUCT_COPY_FILES in)
+  $(warning * the appropriate product definition.)
+  $(warning * build/target/product/core.mk is the product)
+  $(warning * definition used in all products.)
+  $(warning *)
+  $(foreach bad_prebuilt,$(filter-out $(GRANDFATHERED_ALL_PREBUILT),$(strip $(notdir $(ALL_PREBUILT)))),$(warning * unexpected $(bad_prebuilt) in ALL_PREBUILT))
+  $(warning *)
+  $(error ALL_PREBUILT contains unexpected files)
+endif
+
 # -------------------------------------------------------------------
 # All module makefiles have been included at this point.
 # -------------------------------------------------------------------
@@ -550,6 +588,7 @@
  )
 m :=
 r :=
+i :=
 add-required-deps :=
 
 # -------------------------------------------------------------------
@@ -687,6 +726,10 @@
 .PHONY: userdataimage
 userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET)
 
+ifneq (,$(filter userdataimage, $(MAKECMDGOALS)))
+$(call dist-for-goals, userdataimage, $(BUILT_USERDATAIMAGE_TARGET))
+endif
+
 .PHONY: userdatatarball
 userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET)
 
@@ -706,12 +749,15 @@
 	$(INSTALLED_USERDATAIMAGE_TARGET) \
 	$(INSTALLED_FILES_FILE)
 
+# dist_files only for putting your library into the dist directory with a full build.
+.PHONY: dist_files
+
 ifeq ($(EMMA_INSTRUMENT),true)
-  $(call dist-for-goals, droid, $(EMMA_META_ZIP))
+  $(call dist-for-goals, dist_files, $(EMMA_META_ZIP))
 endif
 
-# dist_libraries only for putting your library into the dist directory with a full build.
-.PHONY: dist_libraries
+# Dist for droid if droid is among the cmd goals, or no cmd goal is given.
+ifneq ($(filter droid,$(MAKECMDGOALS))$(filter ||,|$(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))|),)
 
 ifneq ($(TARGET_BUILD_APPS),)
   # If this build is just for apps, only build apps and not the full system by default.
@@ -750,9 +796,10 @@
    )
 
 # Building a full system-- the default is to build droidcore
-droid: droidcore dist_libraries
+droid: droidcore dist_files
 
-endif
+endif # TARGET_BUILD_APPS
+endif # droid in $(MAKECMDGOALS)
 
 
 .PHONY: droid tests
@@ -770,12 +817,26 @@
 sdk: $(ALL_SDK_TARGETS)
 ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
 $(call dist-for-goals,sdk win_sdk, \
-	$(ALL_SDK_TARGETS) \
-	$(SYMBOLS_ZIP) \
-	$(INSTALLED_BUILD_PROP_TARGET) \
- )
+    $(ALL_SDK_TARGETS) \
+    $(SYMBOLS_ZIP) \
+    $(INSTALLED_BUILD_PROP_TARGET) \
+)
 endif
 
+.PHONY: samplecode
+sample_MODULES := $(sort $(call get-tagged-modules,samples))
+sample_APKS_DEST_PATH := $(TARGET_COMMON_OUT_ROOT)/samples
+sample_APKS_COLLECTION := \
+        $(foreach module,$(sample_MODULES),$(sample_APKS_DEST_PATH)/$(notdir $(module)))
+$(foreach module,$(sample_MODULES),$(eval $(call \
+        copy-one-file,$(module),$(sample_APKS_DEST_PATH)/$(notdir $(module)))))
+sample_ADDITIONAL_INSTALLED := \
+        $(filter-out $(modules_to_install) $(modules_to_check) $(ALL_PREBUILT),$(sample_MODULES))
+samplecode: $(sample_APKS_COLLECTION)
+	@echo "Collect sample code apks: $^"
+	# remove apks that are not intended to be installed.
+	rm -f $(sample_ADDITIONAL_INSTALLED)
+
 .PHONY: findbugs
 findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET)
 
diff --git a/core/native_test.mk b/core/native_test.mk
new file mode 100644
index 0000000..3253a5e
--- /dev/null
+++ b/core/native_test.mk
@@ -0,0 +1,18 @@
+###########################################
+## A thin wrapper around BUILD_EXECUTABLE
+## Common flags for native tests are added.
+###########################################
+
+LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
+LOCAL_C_INCLUDES += bionic \
+                    bionic/libstdc++/include \
+                    external/gtest/include \
+                    external/stlport/stlport
+LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
+LOCAL_SHARED_LIBRARIES += libstlport
+
+ifndef LOCAL_MODULE_PATH
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
+endif
+
+include $(BUILD_EXECUTABLE)
diff --git a/core/package.mk b/core/package.mk
index 34792d9..8ca9033 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -76,8 +76,6 @@
 LOCAL_MODULE_TAGS := optional
 endif
 
-#$(warning $(LOCAL_PATH) $(LOCAL_PACKAGE_NAME) $(sort $(LOCAL_MODULE_TAGS)))
-
 ifeq ($(filter tests, $(LOCAL_MODULE_TAGS)),)
 # Force localization check if it's not tagged as tests.
 LOCAL_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) -z
@@ -97,11 +95,6 @@
     $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \
   $(LOCAL_RESOURCE_DIR)
 
-# this is an app, so add the system libraries to the search path
-LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
-
-#$(warning Finding assets for $(LOCAL_ASSET_DIR))
-
 all_assets := $(call find-subdir-assets,$(LOCAL_ASSET_DIR))
 all_assets := $(addprefix $(LOCAL_ASSET_DIR)/,$(patsubst assets/%,%,$(all_assets)))
 
@@ -164,15 +157,9 @@
 endif
 endif
 
-# The dex files go in the package, so we don't
-# want to install them separately for this module.
-old_DONT_INSTALL_DEX_FILES := $(DONT_INSTALL_DEX_FILES)
-DONT_INSTALL_DEX_FILES := true
 #################################
 include $(BUILD_SYSTEM)/java.mk
 #################################
-DONT_INSTALL_DEX_FILES := $(old_DONT_INSTALL_DEX_FILES)
-old_DONT_INSTALL_DEX_FILES =
 
 full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
 $(LOCAL_INTERMEDIATE_TARGETS): \
@@ -197,21 +184,19 @@
 $(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := \
 			$(intermediates.COMMON)/public_resources.xml
 $(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file)
-$(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(AAPT) | $(ACP)
+$(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT) | $(ACP)
 	@echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
 	@rm -f $@
 	$(create-resource-java-files)
 	$(hide) for GENERATED_MANIFEST_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \
 					-name Manifest.java 2> /dev/null`; do \
-		dir=`grep package $$GENERATED_MANIFEST_FILE | head -n1 | \
-			awk '{print $$2}' | tr -d ";" | tr . /`; \
+		dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_MANIFEST_FILE`; \
 		mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
 		$(ACP) -fpt $$GENERATED_MANIFEST_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
 	done;
 	$(hide) for GENERATED_R_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \
 					-name R.java 2> /dev/null`; do \
-		dir=`grep package $$GENERATED_R_FILE | head -n1 | \
-			awk '{print $$2}' | tr -d ";" | tr . /`; \
+		dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_R_FILE`; \
 		mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
 		$(ACP) -fpt $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \
 			|| exit 31; \
@@ -230,7 +215,7 @@
 # add-assets-to-package looks at PRODUCT_AAPT_CONFIG, but this target
 # can't know anything about PRODUCT.  Clear it out just for this target.
 $(resource_export_package): PRODUCT_AAPT_CONFIG :=
-$(resource_export_package): $(all_res_assets) $(full_android_manifest) $(AAPT)
+$(resource_export_package): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT)
 	@echo "target Export Resources: $(PRIVATE_MODULE) ($@)"
 	$(create-empty-package)
 	$(add-assets-to-package)
@@ -292,6 +277,16 @@
       $(addsuffix $(so_suffix), \
         $(LOCAL_JNI_SHARED_LIBRARIES)))
 
+# Set the abi directory used by the local JNI shared libraries.
+# (Doesn't change how the local shared libraries are compiled, just
+# sets where they are stored in the apk.)
+
+ifeq ($(LOCAL_JNI_SHARED_LIBRARIES_ABI),)
+    jni_shared_libraries_abi := $(TARGET_CPU_ABI)
+else
+    jni_shared_libraries_abi := $(LOCAL_JNI_SHARED_LIBRARIES_ABI)
+endif
+
 # Pick a key to sign the package with.  If this package hasn't specified
 # an explicit certificate, use the default.
 # Secure release builds will have their packages signed after the fact,
@@ -329,8 +324,12 @@
 $(LOCAL_BUILT_MODULE): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT)
 endif
 $(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries)
+$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES_ABI := $(jni_shared_libraries_abi)
 ifneq ($(TARGET_BUILD_APPS),)
     # Include all resources for unbundled apps.
+    LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
+endif
+ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true)
     $(LOCAL_BUILT_MODULE): PRODUCT_AAPT_CONFIG :=
 endif
 $(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
diff --git a/core/pathmap.mk b/core/pathmap.mk
index fe7ba1a..428594f 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -89,6 +89,7 @@
 	    wifi \
 	    vpn \
 	    keystore \
+	    icu4j \
 	    voip \
 	 )
 
diff --git a/core/phony_package.mk b/core/phony_package.mk
new file mode 100644
index 0000000..3644db8
--- /dev/null
+++ b/core/phony_package.mk
@@ -0,0 +1,17 @@
+ifneq ($(strip $(LOCAL_SRC_FILES)),)
+$(error LOCAL_SRC_FILES are not allowed for phony packages)
+endif
+
+ifeq ($(strip $(LOCAL_REQUIRED_MODULES)),)
+$(error LOCAL_REQUIRED_MODULES is required for phony packages)
+endif
+
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_MODULE_SUFFIX := -timestamp
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE):
+	$(hide) echo "Fake: $@"
+	$(hide) mkdir -p $(dir $@)
+	$(hide) touch $@
diff --git a/core/prelink-linux-arm.map b/core/prelink-linux-arm.map
index 97462d4..41cd8cd 100644
--- a/core/prelink-linux-arm.map
+++ b/core/prelink-linux-arm.map
@@ -19,27 +19,29 @@
 #
 # note: look at the LOAD sections in the library header:
 #
-#   arm-eabi-objdump -x <lib>
+#   arm-linux-androideabi-objdump -x <lib>
 #
 
 # core system libraries
-libdl.so                0xAFF00000 # [<64K]
-libc.so                 0xAFD00000 # [~2M]
-libstdc++.so            0xAFC00000 # [<64K]
-libm.so                 0xAFB00000 # [~1M]
-liblog.so               0xAFA00000 # [<64K]
-libcutils.so            0xAF900000 # [~1M]
-libthread_db.so         0xAF800000 # [<64K]
-libz.so                 0xAF700000 # [~1M]
-libevent.so             0xAF600000 # [???]
-libssl.so               0xAF400000 # [~2M]
-libcrypto.so            0xAF000000 # [~4M]
-libsysutils.so          0xAEF00000 # [~1M]
+libdl.so                0xB0100000 # [<64K]
+libc.so                 0xAFF00000 # [~2M]
+libstdc++.so            0xAFE00000 # [<64K]
+libm.so                 0xAFD00000 # [~1M]
+liblog.so               0xAFC00000 # [<64K]
+libcutils.so            0xAFB00000 # [~1M]
+libthread_db.so         0xAFA00000 # [<64K]
+libz.so                 0xAF900000 # [~1M]
+libevent.so             0xAF800000 # [???]
+libssl.so               0xAF600000 # [~2M]
+libcrypto.so            0xAF200000 # [~4M]
+libsysutils.so          0xAF100000 # [~1M]
 
 # bluetooth
-liba2dp.so              0xAEE00000 # [~1M]
-audio.so                0xAED00000 # [~1M]
-input.so                0xAEC00000 # [~1M]
+liba2dp.so              0xAF000000 # [~1M]
+input.so                0xAEF00000 # [~1M]
+audio.so                0xAEE00000 # [~1M]
+libglib.so              0xAED00000 # [~1M]
+network.so              0xAEC00000 # [~1M]
 libbluetoothd.so        0xAEA00000 # [~2M]
 libbluedroid.so         0xAE900000 # [<64K]
 libbluetooth.so         0xAE800000 # [~1M]
@@ -91,7 +93,6 @@
 libskiagl.so            0xA9C00000 # [~1M]
 
 # audio
-libFLAC.so              0xA9B00000 # [???]
 libaudiopolicy.so       0xA9A00000 # [~1M]
 libeffects.so           0xA9980000 # [<64K]
 libaudioeffect_jni.so   0xA9900000 # [<64K]
@@ -108,77 +109,79 @@
 libaudioflinger.so      0xA8D00000 # [~1M]
 
 # assorted system libraries
-libsqlite.so            0xA8B80000 # [~1.5M]
-libexpat.so             0xA8B00000 # [~0.5M]
-libwebcore.so           0xA8300000 # [~8M]
-libbinder.so            0xA8200000 # [~1M]
-libutils.so             0xA8100000 # [~1M]
-libcameraservice.so     0xA8000000 # [~1M]
-libhardware.so          0xA7F00000 # [<64K]
-libhardware_legacy.so   0xA7E00000 # [~1M]
-libapp_process.so       0xA7D00000 # [???]
-libsystem_server.so     0xA7C00000 # [~1M]
-libime.so               0xA7B00000 # [???]
-libgps.so               0xA7A00000 # [~1M]
-libcamera.so            0xA7900000 # [~1M]
-liboemcamera.so         0xA7700000 # [~2M]
-libdiskconfig.so        0xA7600000 # [<64K]
-libemoji.so             0xA7500000 # [<64K]
-libjni_latinime.so      0xA7400000 # [~1M]
-libjni_pinyinime.so     0xA7300000 # [~1M]
-libttssynthproxy.so     0xA7200000 # [~1M] for frameworks/base
-libttspico.so           0xA7000000 # [~2M] for external/svox
+libsqlite.so            0xA8B00000 # [~2M]
+libexpat.so             0xA8A00000 # [~1M]
+libwebcore.so           0xA8200000 # [~8M]
+libbinder.so            0xA8100000 # [~1M]
+libutils.so             0xA8000000 # [~1M]
+libcameraservice.so     0xA7F00000 # [~1M]
+libhardware.so          0xA7E00000 # [<64K]
+libhardware_legacy.so   0xA7D00000 # [~1M]
+libapp_process.so       0xA7C00000 # [???]
+libsystem_server.so     0xA7B00000 # [~1M]
+libime.so               0xA7A00000 # [???]
+libgps.so               0xA7900000 # [~1M]
+libcamera.so            0xA7800000 # [~1M]
+liboemcamera.so         0xA7600000 # [~2M]
+libdiskconfig.so        0xA7500000 # [<64K]
+libemoji.so             0xA7400000 # [<64K]
+libjni_latinime.so      0xA7300000 # [~1M]
+libjni_pinyinime.so     0xA7200000 # [~1M]
+libttssynthproxy.so     0xA7100000 # [~1M] for frameworks/base
+libttspico.so           0xA6F00000 # [~2M] for external/svox
+libmtp.so               0xA6E00000 # [~1M]
+libusbhost.so           0xA6D00000 # [<64K]
+libinput.so             0xA6C00000 # [~1M]
 
 # pv libraries
-libpvasf.so                    0xA6F00000 # [???]
-libpvasfreg.so                 0xA6E00000 # [???]
-libomx_sharedlibrary.so        0xA6D00000 # [~1M]
-libopencore_download.so        0xA6C00000 # [~1M]
-libopencore_downloadreg.so     0xA6B00000 # [~1M]
-libopencore_net_support.so     0xA6800000 # [~3M]
-libopencore_rtsp.so            0xA6200000 # [~6M]
-libopencore_rtspreg.so         0xA6100000 # [~1M]
-libopencore_author.so          0xA5D00000 # [~4M]
-libomx_aacdec_sharedlibrary.so 0xA5B00000 # [~2M]
-libomx_amrdec_sharedlibrary.so 0xA5A00000 # [~1M]
-libomx_amrenc_sharedlibrary.so 0xA5900000 # [~1M]
-libomx_avcdec_sharedlibrary.so 0xA5800000 # [~1M]
-libomx_avcenc_sharedlibrary.so 0xA5700000 # [???]
-libomx_m4vdec_sharedlibrary.so 0xA5600000 # [~1M]
-libomx_m4venc_sharedlibrary.so 0xA5500000 # [???]
-libomx_mp3dec_sharedlibrary.so 0xA5400000 # [~1M]
-libopencore_mp4local.so        0xA5200000 # [~2M]
-libopencore_mp4localreg.so     0xA5100000 # [~1M]
-libopencore_player.so          0xA4800000 # [~9M]
+libpvasf.so                    0xA6B00000 # [???]
+libpvasfreg.so                 0xA6A00000 # [???]
+libomx_sharedlibrary.so        0xA6900000 # [~1M]
+libopencore_download.so        0xA6800000 # [~1M]
+libopencore_downloadreg.so     0xA6700000 # [~1M]
+libopencore_net_support.so     0xA6400000 # [~3M]
+libopencore_rtsp.so            0xA5E00000 # [~6M]
+libopencore_rtspreg.so         0xA5D00000 # [~1M]
+libopencore_author.so          0xA5900000 # [~4M]
+libomx_aacdec_sharedlibrary.so 0xA5700000 # [~2M]
+libomx_amrdec_sharedlibrary.so 0xA5600000 # [~1M]
+libomx_amrenc_sharedlibrary.so 0xA5500000 # [~1M]
+libomx_avcdec_sharedlibrary.so 0xA5400000 # [~1M]
+libomx_avcenc_sharedlibrary.so 0xA5300000 # [???]
+libomx_m4vdec_sharedlibrary.so 0xA5200000 # [~1M]
+libomx_m4venc_sharedlibrary.so 0xA5100000 # [???]
+libomx_mp3dec_sharedlibrary.so 0xA5000000 # [~1M]
+libopencore_mp4local.so        0xA4E00000 # [~2M]
+libopencore_mp4localreg.so     0xA4D00000 # [~1M]
+libopencore_player.so          0xA4400000 # [~9M]
 
 # opencore hardware support
-libmm-adspsvc.so              0xA4700000 # [<64K]
-libOmxCore.so                 0xA4600000 # [<64K]
-libOmxMpeg4Dec.so             0xA4500000 # [~1M]
-libOmxH264Dec.so              0xA4400000 # [~1M]
-libOmxVidEnc.so               0xA4300000 # [~1M]
-libopencorehw.so              0xA4200000 # [~1M]
-libOmxVdec.so                 0xA4100000 # [~1M]
-libmm-omxcore.so              0xA4000000 # [<64K]
+libmm-adspsvc.so              0xA4300000 # [<64K]
+libOmxCore.so                 0xA4200000 # [<64K]
+libOmxMpeg4Dec.so             0xA4100000 # [~1M]
+libOmxH264Dec.so              0xA4000000 # [~1M]
+libOmxVidEnc.so               0xA3F00000 # [~1M]
+libopencorehw.so              0xA3E00000 # [~1M]
+libOmxVdec.so                 0xA3D00000 # [~1M]
+libmm-omxcore.so              0xA3C00000 # [<64K]
 
 # pv libraries
-libopencore_common.so         0xA3900000 # [~7M]
-libqcomm_omx.so               0xA3800000 # [<64K]
+libopencore_common.so         0xA3500000 # [~7M]
+libqcomm_omx.so               0xA3400000 # [<64K]
 
 # stagefright libraries
-libstagefright_amrnb_common.so     0xA3700000 # [~1M]
-libstagefright_avc_common.so       0xA3600000 # [~1M]
-libstagefright_color_conversion.so 0xA3500000 # [<64K]
-libstagefright_omx.so              0xA3400000 # [~1M]
-libstagefrighthw.so                0xA3300000 # [~1M]
-libstagefright.so                  0xA2F00000 # [~4M]
+libstagefright_amrnb_common.so     0xA3300000 # [~1M]
+libstagefright_avc_common.so       0xA3200000 # [~1M]
+libstagefright_color_conversion.so 0xA3100000 # [<64K]
+libstagefright_omx.so              0xA3000000 # [~1M]
+libstagefrighthw.so                0xA2F00000 # [~1M]
+libstagefright.so                  0xA2B00000 # [~4M]
 
 # libraries for specific hardware
-libgsl.so               0xA2E00000 # [~1M]
-libhtc_acoustic.so      0xA2D00000 # [<64K]
-libhtc_ril.so           0xA2C00000 # [~1M]
-liblvmxipc.so           0xA2B00000 # [~1M] for vendor/nxp
-libreference-cdma-sms.so 0xA2A00000 # [<64K] for hardware/ril
+libgsl.so               0xA2A00000 # [~1M]
+libhtc_acoustic.so      0xA2900000 # [<64K]
+libhtc_ril.so           0xA2800000 # [~1M]
+libreference-cdma-sms.so 0xA2600000 # [<64K] for hardware/ril
 
 # libraries for specific apps or temporary libraries
 libcam_ipl.so           0x9F000000 # [???]
@@ -211,7 +214,5 @@
 libzxing.so             0x9D000000 # [<64K] for goggles
 libinterstitial.so      0x9CF00000 # [<64K] for goggles
 liblept.so              0x9CA00000 # [~5M] for external/leptonica
-network.so              0x9C9C0000 # [~256K]
-bluetooth-health.so     0x9C980000 # [~256K]
-libglib.so              0x9C900000 # [~512K]
-libbtio.so              0x9C8E0000 # [~128K]
+libbcc.so               0x9C600000 # [~4M] for external/llvm
+libchromium_net.so      0x9C400000 # [~2M] for exteral/webkit
diff --git a/core/product.mk b/core/product.mk
index 4a0ee01..c2b398e 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -71,6 +71,7 @@
     PRODUCT_CHARACTERISTICS \
     PRODUCT_COPY_FILES \
     PRODUCT_OTA_PUBLIC_KEYS \
+    PRODUCT_EXTRA_RECOVERY_KEYS \
     PRODUCT_PACKAGE_OVERLAYS \
     DEVICE_PACKAGE_OVERLAYS \
     PRODUCT_CONTRIBUTORS_FILE \
@@ -187,3 +188,73 @@
 define resolve-short-product-name
 $(strip $(call _resolve-short-product-name,$(1)))
 endef
+
+
+_product_stash_var_list := $(_product_var_list) \
+	TARGET_ARCH \
+	TARGET_ARCH_VARIANT \
+	TARGET_BOARD_PLATFORM \
+	TARGET_BOARD_PLATFORM_GPU \
+	TARGET_BOOTLOADER_BOARD_NAME \
+	TARGET_COMPRESS_MODULE_SYMBOLS \
+	TARGET_PRELINK_MODULE \
+	TARGET_NO_BOOTLOADER \
+	TARGET_NO_KERNEL \
+	TARGET_NO_RECOVERY \
+	TARGET_NO_RADIOIMAGE \
+	TARGET_HARDWARE_3D \
+	TARGET_PROVIDES_INIT_RC \
+	TARGET_CPU_ABI \
+	TARGET_CPU_ABI2 \
+	TARGET_CPU_SMP \
+
+
+_product_stash_var_list += \
+	BOARD_WPA_SUPPLICANT_DRIVER \
+	BOARD_WLAN_DEVICE \
+	BOARD_USES_GENERIC_AUDIO \
+	BOARD_KERNEL_CMDLINE \
+	BOARD_KERNEL_BASE \
+	BOARD_HAVE_BLUETOOTH \
+	BOARD_HAVE_BLUETOOTH_BCM \
+	BOARD_VENDOR_QCOM_AMSS_VERSION \
+	BOARD_VENDOR_USE_AKMD \
+	BOARD_EGL_CFG \
+	BOARD_BOOTIMAGE_PARTITION_SIZE \
+	BOARD_RECOVERYIMAGE_PARTITION_SIZE \
+	BOARD_SYSTEMIMAGE_PARTITION_SIZE \
+	BOARD_USERDATAIMAGE_PARTITION_SIZE \
+	BOARD_FLASH_BLOCK_SIZE \
+	BOARD_SYSTEMIMAGE_PARTITION_SIZE \
+	BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE \
+	BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION \
+	BOARD_INSTALLER_CMDLINE \
+
+
+#
+# Stash vaues of the variables in _product_stash_var_list.
+# $(1): Renamed prefix
+#
+define stash-product-vars
+$(foreach v,$(_product_stash_var_list), \
+        $(eval $(strip $(1))_$(call rot13,$(v)):=$$($$(v))) \
+ )
+endef
+
+#
+# Assert that the the variable stashed by stash-product-vars remains untouched.
+# $(1): The prefix as supplied to stash-product-vars
+#
+define assert-product-vars
+$(strip \
+  $(eval changed_variables:=)
+  $(foreach v,$(_product_stash_var_list), \
+    $(if $(call streq,$($(v)),$($(strip $(1))_$(call rot13,$(v)))),, \
+        $(eval $(warning $(v) has been modified: $($(v)))) \
+        $(eval $(warning previous value: $($(strip $(1))_$(call rot13,$(v))))) \
+        $(eval changed_variables := $(changed_variables) $(v))) \
+   ) \
+  $(if $(changed_variables),\
+    $(eval $(error The following variables have been changed: $(changed_variables))),)
+)
+endef
diff --git a/core/product_config.mk b/core/product_config.mk
index 70ac894..4f4f97d 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -194,8 +194,11 @@
   $(call import-products, $(get-all-product-makefiles))
 endif # TARGET_BUILD_APPS
 $(check-all-products)
-#$(dump-products)
-#$(error done)
+
+ifneq ($(filter dump-products, $(MAKECMDGOALS)),)
+$(dump-products)
+$(error done)
+endif
 
 # Convert a short name like "sooner" into the path to the product
 # file defining that product.
@@ -300,6 +303,10 @@
 PRODUCT_OTA_PUBLIC_KEYS := $(sort \
     $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_PUBLIC_KEYS))
 
+PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
+    $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
+
+
 # ---------------------------------------------------------------
 # Simulator overrides
 ifeq ($(TARGET_PRODUCT),sim)
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 0393d17..940fe61 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -34,7 +34,9 @@
 my_target_crtbegin_so_o := $(TARGET_CRTBEGIN_SO_O)
 my_target_crtend_so_o := $(TARGET_CRTEND_SO_O)
 ifdef LOCAL_NDK_VERSION
-my_target_global_ld_dirs += -L$(my_ndk_version_root)/usr/lib
+my_target_global_ld_dirs += $(addprefix -L, $(patsubst %/,%,$(dir $(my_ndk_stl_shared_lib_fullpath))) \
+   $(my_ndk_version_root)/usr/lib)
+my_target_global_ldflags := $(my_ndk_stl_shared_lib) $(my_target_global_ldflags)
 my_target_crtbegin_so_o := $(wildcard $(my_ndk_version_root)/usr/lib/crtbegin_so.o)
 my_target_crtend_so_o := $(wildcard $(my_ndk_version_root)/usr/lib/crtend_so.o)
 endif
diff --git a/core/tasks/apicheck.mk b/core/tasks/apicheck.mk
index 740668c..99a3227 100644
--- a/core/tasks/apicheck.mk
+++ b/core/tasks/apicheck.mk
@@ -19,6 +19,10 @@
 
 ifneq ($(BUILD_TINY_ANDROID), true)
 
+APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR)
+APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
+APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX)
+
 .PHONY: checkapi
 
 # eval this to define a rule that runs apicheck.
@@ -32,7 +36,7 @@
 define check-api
 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp: $(2) $(3) $(APICHECK)
 	@echo "Checking API:" $(1)
-	$(hide) ( $(APICHECK) $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
+	$(hide) ( $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)" $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
 	$(hide) mkdir -p $$(dir $$@)
 	$(hide) touch $$@
 checkapi: $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 8c36ef6..8d7667b 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -28,6 +28,10 @@
 DDMLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/ddmlib-prebuilt.jar
 junit_host_jar := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar
 HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar
+TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
+CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar
+CTS_TF_EXEC_PATH := $(HOST_OUT_EXECUTABLES)/cts-tradefed
+CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
 
 CTS_CORE_CASE_LIST := \
 	android.core.tests.dom \
@@ -41,21 +45,21 @@
 -include cts/CtsTestCaseList.mk
 CTS_CASE_LIST := $(CTS_CORE_CASE_LIST) $(CTS_TEST_CASE_LIST)
 
-DEFAULT_TEST_PLAN := $(PRIVATE_DIR)/resource/plans
+DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
 
 $(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar)
 
 -include cts/CtsHostLibraryList.mk
-$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(ACP)
+$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP)
 # Make necessary directory for CTS
-	@rm -rf $(PRIVATE_CTS_DIR)
-	@mkdir -p $(TMP_DIR)
-	@mkdir -p $(PRIVATE_DIR)/docs
-	@mkdir -p $(PRIVATE_DIR)/tools
-	@mkdir -p $(PRIVATE_DIR)/repository/testcases
-	@mkdir -p $(PRIVATE_DIR)/repository/plans
+	$(hide) rm -rf $(PRIVATE_CTS_DIR)
+	$(hide) mkdir -p $(TMP_DIR)
+	$(hide) mkdir -p $(PRIVATE_DIR)/docs
+	$(hide) mkdir -p $(PRIVATE_DIR)/tools
+	$(hide) mkdir -p $(PRIVATE_DIR)/repository/testcases
+	$(hide) mkdir -p $(PRIVATE_DIR)/repository/plans
 # Copy executable and JARs to CTS directory
-	$(hide) $(ACP) -fp $(CTS_HOST_JAR) $(CTS_EXECUTABLE_PATH) $(DDMLIB_JAR) $(PRIVATE_JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(PRIVATE_DIR)/tools
+	$(hide) $(ACP) -fp $(CTS_HOST_JAR) $(CTS_EXECUTABLE_PATH) $(DDMLIB_JAR) $(PRIVATE_JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools
 # Change mode of the executables
 	$(hide) chmod ug+rwX $(PRIVATE_DIR)/tools/$(notdir $(CTS_EXECUTABLE_PATH))
 	$(foreach apk,$(CTS_CASE_LIST), \
@@ -165,7 +169,7 @@
 $(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
 $(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
 $(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) $(CORE_VM_TEST_DESC)
-	@echo "Package CTS: $@"
+	$(hide) echo "Package CTS: $@"
 	$(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
 
 .PHONY: cts
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index 2641a31..abbf999 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -95,15 +95,19 @@
 .PHONY: sdk_addon
 sdk_addon: $(full_target)
 
-# Keep the name of the addon final zip around for sdk_repo.
-# This is used by development/build/tools/sdk_repo.mk.
+ifneq ($(sdk_repo_goal),)
+# If we're building the sdk_repo, keep the name of the addon zip
+# around so that development/build/tools/sdk_repo.mk can dist it
+# at the appropriate location.
 ADDON_SDK_ZIP := $(full_target)
-
+else
+# When not building an sdk_repo, just dist the addon zip file
+# as-is.
 $(call dist-for-goals, sdk_addon, $(full_target))
+endif
 
 else # addon_name
 ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)
 $(error Trying to build sdk_addon, but product '$(INTERNAL_PRODUCT)' does not define one)
 endif
 endif # addon_name
-
diff --git a/core/user_tags.mk b/core/user_tags.mk
index 3eade8a..120a502 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -38,6 +38,7 @@
 	am \
 	android \
 	android-common \
+	android-common-carousel \
 	android.policy \
 	androidprefs \
 	android.test.runner \
@@ -58,6 +59,7 @@
 	bb2sym \
 	bb_dump \
 	bbprof \
+	bcc \
 	bison \
 	bluetoothd \
 	bmgr \
@@ -67,12 +69,13 @@
 	cfassembler \
 	check_stack \
 	check_trace \
-	clearsilver \
 	cmu2nuance \
 	com.android.inputmethod.pinyin.lib \
 	com.android.phone.common \
+	com.android.vcard \
 	commons-compress-1.0 \
 	copybit.qsd8k \
+	copybit.s5pc110 \
 	coverage \
 	cpufeatures \
 	cts \
@@ -81,12 +84,13 @@
 	dasm \
 	dbus-daemon \
 	ddmlib \
-	ddmlibTests \
 	ddmlib-prebuilt \
+	ddmlibTests \
 	ddms \
 	ddmuilib \
 	debuggerd \
 	descGen \
+	dexgen \
 	dexpreopt \
 	dex-tools \
 	dhcpcd \
@@ -94,8 +98,8 @@
 	dhcpcd-run-hooks \
 	dictTest \
 	dnsmasq \
+	doclava \
 	draw9patch \
-	droiddoc \
 	dumpeventlog \
 	dumpkey \
 	dump_regions \
@@ -105,7 +109,9 @@
 	e2fsck \
 	e2fsck_host \
 	easymock \
+	easymocklib \
 	edify \
+	elftree \
 	emmalib \
 	emulator \
 	emulator-arm \
@@ -147,9 +153,7 @@
 	ime \
 	init \
 	input \
-	installd \
-	iptables \
-	ip-up-vpn \
+	ip \
 	iself \
 	isprelinked \
 	jarjar \
@@ -164,7 +168,6 @@
 	jsr305lib \
 	junit \
 	jython \
-	kcm \
 	keystore \
 	kxml2-2.3.0 \
 	launch-wrapper \
@@ -175,7 +178,6 @@
 	layoutopt \
 	liba2dp \
 	libabi \
-	libacc \
 	libandroid \
 	libandroid_runtime \
 	libandroid_servers \
@@ -224,14 +226,14 @@
 	libETC1 \
 	libexif \
 	libext \
-	libext2fs \
-	libext2fs_host \
 	libext2_blkid \
 	libext2_blkid_host \
 	libext2_com_err \
 	libext2_com_err_host \
 	libext2_e2p \
 	libext2_e2p_host \
+	libext2fs \
+	libext2fs_host \
 	libext2_profile \
 	libext2_profile_host \
 	libext2_uuid \
@@ -247,7 +249,6 @@
 	libGLESv1_CM \
 	libGLESv2 \
 	libglib \
-	libglib_static \
 	libgui \
 	libhardware \
 	libhardware_legacy \
@@ -268,9 +269,11 @@
 	libmedia_jni \
 	libmediaplayerservice \
 	libmincrypt \
+	libminelf \
 	libminui \
 	libminzip \
 	libmtdutils \
+	libmtp \
 	libmusicbundle \
 	libneo_cgi \
 	libneo_cs \
@@ -283,17 +286,20 @@
 	libOpenSLESUT \
 	libpcap \
 	libpixelflinger \
-	libpixelflinger_armv6 \
 	libpixelflinger_static \
 	libpng \
 	libpopt \
 	libpower \
+	libprotobuf-cpp-2.3.0-full \
+	libprotobuf-cpp-2.3.0-lite \
+	libprotobuf-java-2.3.0-lite \
+	libprotobuf-java-2.3.0-micro \
 	librecovery_ui_htc \
-	libreference-cdma-sms \
 	libreference-ril \
 	libreverb \
 	libreverbwrapper \
 	libril \
+	librilproto-java \
 	librpc \
 	librtp_jni \
 	libsafe_iop \
@@ -347,6 +353,7 @@
 	libstagefright_rtsp \
 	libstagefright_vorbisdec \
 	libstagefright_vpxdec \
+	libstagefright_yuv \
 	libstdc++ \
 	libstlport \
 	libstlport_static \
@@ -364,6 +371,7 @@
 	libttssynthproxy \
 	libui \
 	libunz \
+	libusbhost \
 	libutil \
 	libutils \
 	libv8 \
@@ -380,11 +388,11 @@
 	lights.qsd8k \
 	line_endings \
 	linker \
+	llvm-rs-link \
 	localize \
 	logcat \
 	logwrapper \
 	lsd \
-	mahimahi-keypad.kcm \
 	make_cfst \
 	makedict \
 	make_ext4fs \
@@ -402,9 +410,11 @@
 	mkstubs \
 	mkuserimg.sh \
 	mkyaffs2image \
+	mockrilcontroller \
 	monkey \
 	monkeyrunner \
 	MonkeyRunnerTest \
+	mtp \
 	mtpd \
 	ndc \
 	netcfg \
@@ -433,8 +443,6 @@
 	q2dm \
 	q2g \
 	qemu-android \
-	qwerty2.kcm \
-	qwerty.kcm \
 	racoon \
 	read_addr \
 	read_method \
@@ -448,6 +456,7 @@
 	run-as \
 	runtime \
 	schedtest \
+	screenshot \
 	screenshot2 \
 	sdcard \
 	sdklauncher \
@@ -464,7 +473,6 @@
 	service \
 	servicemanager \
 	services \
-	sh \
 	sig \
 	sig-check \
 	sig-create \
@@ -482,6 +490,7 @@
 	swing-worker-1.1 \
 	swt \
 	system_server \
+	tblgen \
 	tc \
 	temp_layoutlib \
 	test_g2g \
@@ -493,16 +502,13 @@
 	traceview \
 	tune2fs \
 	tune2fs_host \
-	tuttle2.kcm \
 	uix \
 	usbtest \
 	vdc \
 	vm-tests \
 	vold \
 	wdsclient \
+	whisperd \
 	wpa_supplicant \
-	wpa_supplicant.conf \
-	xmlwriter \
 	yuv420sp2rgb \
 	zipalign
-
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index b38efe3..6216463 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -53,7 +53,7 @@
   # intermediate builds).  During development, this number remains at the
   # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
   # the code-name of the new development work.
-  PLATFORM_SDK_VERSION := 10
+  PLATFORM_SDK_VERSION := 13
 endif
 
 ifeq "" "$(PLATFORM_VERSION_CODENAME)"
@@ -96,3 +96,4 @@
   # anyone trying to parse it as an integer will probably get "0".
   BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)
 endif
+
diff --git a/envsetup.sh b/envsetup.sh
index f5aee90..4c62e8e 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -29,8 +29,8 @@
         echo "Couldn't locate the top of the tree.  Try setting TOP." >&2
         return
     fi
-    CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
-      make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1
+    (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
+      make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1)
 }
 
 # Get the exact value of a build variable.
@@ -109,16 +109,23 @@
     # and in with the new
     CODE_REVIEWS=
     prebuiltdir=$(getprebuilt)
-    toolchaindir=toolchain/arm-eabi-4.4.3/bin
+
     # The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
+    export ANDROID_EABI_TOOLCHAIN=
+    toolchaindir=toolchain/arm-linux-androideabi-4.4.x/bin
     if [ -d "$prebuiltdir/$toolchaindir" ]; then
         export ANDROID_EABI_TOOLCHAIN=$prebuiltdir/$toolchaindir
-    else
-        export ANDROID_EABI_TOOLCHAIN=
     fi
+
+    export ARM_EABI_TOOLCHAIN=
+    toolchaindir=toolchain/arm-eabi-4.4.3/bin
+    if [ -d "$prebuiltdir/$toolchaindir" ]; then
+        export ARM_EABI_TOOLCHAIN=$prebuiltdir/$toolchaindir
+    fi
+
     export ANDROID_TOOLCHAIN=$ANDROID_EABI_TOOLCHAIN
     export ANDROID_QTOOLS=$T/development/emulator/qtools
-    export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_EABI_TOOLCHAIN$CODE_REVIEWS
+    export ANDROID_BUILD_PATHS=:$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ARM_EABI_TOOLCHAIN$CODE_REVIEWS
     export PATH=$PATH$ANDROID_BUILD_PATHS
 
     unset ANDROID_JAVA_TOOLCHAIN
@@ -573,6 +580,19 @@
     printconfig
 }
 
+# Tab completion for lunch.
+function _lunch()
+{
+    local cur prev opts
+    COMPREPLY=()
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+    COMPREPLY=( $(compgen -W "${LUNCH_MENU_CHOICES[*]}" -- ${cur}) )
+    return 0
+}
+complete -F _lunch lunch
+
 # Configures the build to build unbundled apps.
 # Run tapas with one ore more app names (from LOCAL_PACKAGE_NAME)
 function tapas()
@@ -711,6 +731,8 @@
                     ARGS="$ARGS showcommands"
                 elif [ "$DIR" = dist ]; then
                     ARGS="$ARGS dist"
+                elif [ "$DIR" = incrementaljavac ]; then
+                    ARGS="$ARGS incrementaljavac"
                 else
                     echo "No Android.mk in $DIR."
                     return 1
@@ -814,7 +836,7 @@
        echo >>"$OUT_ROOT/gdbclient.cmds" "target remote $PORT"
        echo >>"$OUT_ROOT/gdbclient.cmds" ""
 
-       arm-eabi-gdb -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
+       arm-linux-androideabi-gdb -x "$OUT_ROOT/gdbclient.cmds" "$OUT_EXE_SYMBOLS/$EXE"
   else
        echo "Unable to determine build system output dir."
    fi
@@ -948,10 +970,9 @@
 
     # runhat options
     local targetPid=$1
-    local outputFile=$2
 
     if [ "$targetPid" = "" ]; then
-        echo "Usage: runhat [ -d | -e | -s serial ] target-pid [output-file]"
+        echo "Usage: runhat [ -d | -e | -s serial ] target-pid"
         return
     fi
 
@@ -961,18 +982,14 @@
         return
     fi
 
-    adb ${adbOptions} shell >/dev/null mkdir /data/misc
-    adb ${adbOptions} shell chmod 777 /data/misc
-
-    # send a SIGUSR1 to cause the hprof dump
+    # issue "am" command to cause the hprof dump
+    local devFile=/sdcard/hprof-$targetPid
     echo "Poking $targetPid and waiting for data..."
-    adb ${adbOptions} shell kill -10 $targetPid
+    adb ${adbOptions} shell am dumpheap $targetPid $devFile
     echo "Press enter when logcat shows \"hprof: heap dump completed\""
     echo -n "> "
     read
 
-    local availFiles=( $(adb ${adbOptions} shell ls /data/misc | grep '^heap-dump' | sed -e 's/.*heap-dump-/heap-dump-/' | sort -r | tr '[:space:][:cntrl:]' ' ') )
-    local devFile=/data/misc/${availFiles[0]}
     local localFile=/tmp/$$-hprof
 
     echo "Retrieving file $devFile..."
@@ -1023,6 +1040,21 @@
     adb shell service call window 3
 }
 
+function key_home()
+{
+    adb shell input keyevent 3
+}
+
+function key_back()
+{
+    adb shell input keyevent 4
+}
+
+function key_menu()
+{
+    adb shell input keyevent 82
+}
+
 function smoketest()
 {
     if [ ! "$ANDROID_PRODUCT_OUT" ]; then
diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c
index 3cbe34a..23f1260 100644
--- a/libs/host/CopyFile.c
+++ b/libs/host/CopyFile.c
@@ -64,18 +64,19 @@
 
 /*
  * Returns true if the source file has high resolution modification
- * date.  Cygwin doesn't support st_mtim in normal build, so always
- * return false.
+ * date. Cygwin/Mingw doesn't support st_mtim and always returns false.
  */
 static bool isHiresMtime(const struct stat* pSrcStat)
 {
-#if defined(WIN32) || defined(USE_MINGW)
-    return 0;
-#elif defined(MACOSX_RSRC)
+#if HAVE_STAT_ST_MTIM
+#if defined(MACOSX_RSRC)
     return pSrcStat->st_mtimespec.tv_nsec > 0;
 #else
     return pSrcStat->st_mtim.tv_nsec > 0;
 #endif
+#else
+    return 0;
+#endif
 }
 
 /*
diff --git a/target/board/Android.mk b/target/board/Android.mk
index 82dee3c..54ee9e7 100644
--- a/target/board/Android.mk
+++ b/target/board/Android.mk
@@ -20,9 +20,6 @@
   INSTALLED_KERNEL_TARGET :=
 endif
 
-# Use the add-radio-file function to add values to this variable.
-INSTALLED_RADIOIMAGE_TARGET :=
-
 -include $(TARGET_DEVICE_DIR)/AndroidBoard.mk
 
 # Generate a file that contains various information about the
diff --git a/target/board/emulator/AndroidBoard.mk b/target/board/emulator/AndroidBoard.mk
index 09badee..7911f61 100644
--- a/target/board/emulator/AndroidBoard.mk
+++ b/target/board/emulator/AndroidBoard.mk
@@ -1,10 +1 @@
 LOCAL_PATH := $(call my-dir)
-
-file := $(TARGET_OUT_KEYLAYOUT)/tuttle2.kl
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/tuttle2.kl | $(ACP)
-	$(transform-prebuilt-to-target)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := tuttle2.kcm
-include $(BUILD_KEY_CHAR_MAP)
diff --git a/target/board/emulator/tuttle2.kcm b/target/board/emulator/tuttle2.kcm
deleted file mode 100644
index 0a2dd8c..0000000
--- a/target/board/emulator/tuttle2.kcm
+++ /dev/null
@@ -1,66 +0,0 @@
-[type=QWERTY]                                           
-                                                        
-# keycode       display number  base    caps    fn      caps_fn
-                                                        
-A               'A'     '%'     'a'     'A'     '%'     0x00
-B               'B'     '='     'b'     'B'     '='     0x00
-C               'C'     '8'     'c'     'C'     '8'     0x00E7
-D               'D'     '5'     'd'     'D'     '5'     0x00
-E               'E'     '2'     'e'     'E'     '2'     0x0301
-F               'F'     '6'     'f'     'F'     '6'     0x00A5
-G               'G'     '-'     'g'     'G'     '-'     '_'
-H               'H'     '['     'h'     'H'     '['     '{'
-I               'I'     '$'     'i'     'I'     '$'     0x0302
-J               'J'     ']'     'j'     'J'     ']'     '}'
-K               'K'     '"'     'k'     'K'     '"'     '~'
-L               'L'     '''     'l'     'L'     '''     '`'
-M               'M'     '>'     'm'     'M'     '>'     0x00
-N               'N'     '<'     'n'     'N'     '<'     0x0303
-O               'O'     '('     'o'     'O'     '('     0x00
-P               'P'     ')'     'p'     'P'     ')'     0x00
-Q               'Q'     '*'     'q'     'Q'     '*'     0x0300
-R               'R'     '3'     'r'     'R'     '3'     0x20AC
-S               'S'     '4'     's'     'S'     '4'     0x00DF
-T               'T'     '+'     't'     'T'     '+'     0x00A3
-U               'U'     '&'     'u'     'U'     '&'     0x0308
-V               'V'     '9'     'v'     'V'     '9'     '^'
-W               'W'     '1'     'w'     'W'     '1'     0x00
-X               'X'     '7'     'x'     'X'     '7'     0xEF00
-Y               'Y'     '!'     'y'     'Y'     '!'     0x00A1
-Z               'Z'     '#'     'z'     'Z'     '#'     0x00
-                                                        
-COMMA           ','     ','     ','     ';'     ';'     '|'
-PERIOD          '.'     '.'     '.'     ':'     ':'     0x2026
-AT              '@'     '0'     '@'     '0'     '0'     0x2022
-SLASH           '/'     '/'     '/'     '?'     '?'     '\'
-                                                        
-SPACE           0x20    0x20    0x20    0x20    0xEF01  0xEF01
-ENTER         0xa     0xa     0xa     0xa     0xa     0xa
-                                                        
-# on pc keyboards
-TAB             0x9     0x9     0x9     0x9     0x9     0x9
-0               '0'     '0'     '0'     ')'     ')'     ')'
-1               '1'     '1'     '1'     '!'     '!'     '!'
-2               '2'     '2'     '2'     '@'     '@'     '@'
-3               '3'     '3'     '3'     '#'     '#'     '#'
-4               '4'     '4'     '4'     '$'     '$'     '$'
-5               '5'     '5'     '5'     '%'     '%'     '%'
-6               '6'     '6'     '6'     '^'     '^'     '^'
-7               '7'     '7'     '7'     '&'     '&'     '&'
-8               '8'     '8'     '8'     '*'     '*'     '*'
-9               '9'     '9'     '9'     '('     '('     '('
-                                                        
-GRAVE           '`'     '`'     '`'     '~'     '`'     '~'
-MINUS           '-'     '-'     '-'     '_'     '-'     '_'
-EQUALS          '='     '='     '='     '+'     '='     '+'
-LEFT_BRACKET    '['     '['     '['     '{'     '['     '{'
-RIGHT_BRACKET   ']'     ']'     ']'     '}'     ']'     '}'
-BACKSLASH       '\'     '\'     '\'     '|'     '\'     '|'
-SEMICOLON       ';'     ';'     ';'     ':'     ';'     ':'
-APOSTROPHE      '''     '''     '''     '"'     '''     '"'
-STAR            '*'     '*'     '*'     '*'     '*'     '*'
-POUND           '#'     '#'     '#'     '#'     '#'     '#'
-PLUS            '+'     '+'     '+'     '+'     '+'     '+'
-                                                        
-                                                        
-                                                        
diff --git a/target/board/emulator/tuttle2.kl b/target/board/emulator/tuttle2.kl
deleted file mode 100644
index a48a5ab..0000000
--- a/target/board/emulator/tuttle2.kl
+++ /dev/null
@@ -1,74 +0,0 @@
-key 2     1
-key 3     2
-key 4     3
-key 5     4
-key 6     5
-key 7     6
-key 8     7
-key 9     8
-key 10    9
-key 11    0
-key 158   BACK              WAKE_DROPPED
-key 230   SOFT_RIGHT        WAKE
-key 60    SOFT_RIGHT        WAKE
-key 107   ENDCALL           WAKE_DROPPED
-key 62    ENDCALL           WAKE_DROPPED
-key 229   MENU         WAKE_DROPPED
-key 59    MENU         WAKE_DROPPED
-key 228   POUND
-key 227   STAR
-key 231   CALL              WAKE_DROPPED
-key 61    CALL              WAKE_DROPPED
-key 232   DPAD_CENTER       WAKE_DROPPED
-key 108   DPAD_DOWN         WAKE_DROPPED
-key 103   DPAD_UP           WAKE_DROPPED
-key 102   HOME              WAKE
-key 105   DPAD_LEFT         WAKE_DROPPED
-key 106   DPAD_RIGHT        WAKE_DROPPED
-key 115   VOLUME_UP
-key 114   VOLUME_DOWN
-key 116   POWER             WAKE
-key 212   SLASH
-
-key 16    Q
-key 17    W
-key 18    E
-key 19    R
-key 20    T
-key 21    Y
-key 22    U
-key 23    I
-key 24    O
-key 25    P
-
-key 30    A
-key 31    S
-key 32    D
-key 33    F
-key 34    G
-key 35    H
-key 36    J
-key 37    K
-key 38    L
-key 14    DEL
-        
-key 44    Z
-key 45    X
-key 46    C
-key 47    V
-key 48    B
-key 49    N
-key 50    M
-key 51    COMMA
-key 52    PERIOD
-key 28    ENTER
-        
-key 56    ALT_LEFT
-key 42    SHIFT_LEFT
-key 215   AT
-key 57    SPACE
-key 53    SLASH
-key 127   SYM
-key 100   ALT_RIGHT
-
-key 399   GRAVE
diff --git a/target/board/generic/AndroidBoard.mk b/target/board/generic/AndroidBoard.mk
index 09badee..7911f61 100644
--- a/target/board/generic/AndroidBoard.mk
+++ b/target/board/generic/AndroidBoard.mk
@@ -1,10 +1 @@
 LOCAL_PATH := $(call my-dir)
-
-file := $(TARGET_OUT_KEYLAYOUT)/tuttle2.kl
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/tuttle2.kl | $(ACP)
-	$(transform-prebuilt-to-target)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := tuttle2.kcm
-include $(BUILD_KEY_CHAR_MAP)
diff --git a/target/board/generic/tuttle2.kcm b/target/board/generic/tuttle2.kcm
deleted file mode 100644
index 0a2dd8c..0000000
--- a/target/board/generic/tuttle2.kcm
+++ /dev/null
@@ -1,66 +0,0 @@
-[type=QWERTY]                                           
-                                                        
-# keycode       display number  base    caps    fn      caps_fn
-                                                        
-A               'A'     '%'     'a'     'A'     '%'     0x00
-B               'B'     '='     'b'     'B'     '='     0x00
-C               'C'     '8'     'c'     'C'     '8'     0x00E7
-D               'D'     '5'     'd'     'D'     '5'     0x00
-E               'E'     '2'     'e'     'E'     '2'     0x0301
-F               'F'     '6'     'f'     'F'     '6'     0x00A5
-G               'G'     '-'     'g'     'G'     '-'     '_'
-H               'H'     '['     'h'     'H'     '['     '{'
-I               'I'     '$'     'i'     'I'     '$'     0x0302
-J               'J'     ']'     'j'     'J'     ']'     '}'
-K               'K'     '"'     'k'     'K'     '"'     '~'
-L               'L'     '''     'l'     'L'     '''     '`'
-M               'M'     '>'     'm'     'M'     '>'     0x00
-N               'N'     '<'     'n'     'N'     '<'     0x0303
-O               'O'     '('     'o'     'O'     '('     0x00
-P               'P'     ')'     'p'     'P'     ')'     0x00
-Q               'Q'     '*'     'q'     'Q'     '*'     0x0300
-R               'R'     '3'     'r'     'R'     '3'     0x20AC
-S               'S'     '4'     's'     'S'     '4'     0x00DF
-T               'T'     '+'     't'     'T'     '+'     0x00A3
-U               'U'     '&'     'u'     'U'     '&'     0x0308
-V               'V'     '9'     'v'     'V'     '9'     '^'
-W               'W'     '1'     'w'     'W'     '1'     0x00
-X               'X'     '7'     'x'     'X'     '7'     0xEF00
-Y               'Y'     '!'     'y'     'Y'     '!'     0x00A1
-Z               'Z'     '#'     'z'     'Z'     '#'     0x00
-                                                        
-COMMA           ','     ','     ','     ';'     ';'     '|'
-PERIOD          '.'     '.'     '.'     ':'     ':'     0x2026
-AT              '@'     '0'     '@'     '0'     '0'     0x2022
-SLASH           '/'     '/'     '/'     '?'     '?'     '\'
-                                                        
-SPACE           0x20    0x20    0x20    0x20    0xEF01  0xEF01
-ENTER         0xa     0xa     0xa     0xa     0xa     0xa
-                                                        
-# on pc keyboards
-TAB             0x9     0x9     0x9     0x9     0x9     0x9
-0               '0'     '0'     '0'     ')'     ')'     ')'
-1               '1'     '1'     '1'     '!'     '!'     '!'
-2               '2'     '2'     '2'     '@'     '@'     '@'
-3               '3'     '3'     '3'     '#'     '#'     '#'
-4               '4'     '4'     '4'     '$'     '$'     '$'
-5               '5'     '5'     '5'     '%'     '%'     '%'
-6               '6'     '6'     '6'     '^'     '^'     '^'
-7               '7'     '7'     '7'     '&'     '&'     '&'
-8               '8'     '8'     '8'     '*'     '*'     '*'
-9               '9'     '9'     '9'     '('     '('     '('
-                                                        
-GRAVE           '`'     '`'     '`'     '~'     '`'     '~'
-MINUS           '-'     '-'     '-'     '_'     '-'     '_'
-EQUALS          '='     '='     '='     '+'     '='     '+'
-LEFT_BRACKET    '['     '['     '['     '{'     '['     '{'
-RIGHT_BRACKET   ']'     ']'     ']'     '}'     ']'     '}'
-BACKSLASH       '\'     '\'     '\'     '|'     '\'     '|'
-SEMICOLON       ';'     ';'     ';'     ':'     ';'     ':'
-APOSTROPHE      '''     '''     '''     '"'     '''     '"'
-STAR            '*'     '*'     '*'     '*'     '*'     '*'
-POUND           '#'     '#'     '#'     '#'     '#'     '#'
-PLUS            '+'     '+'     '+'     '+'     '+'     '+'
-                                                        
-                                                        
-                                                        
diff --git a/target/board/generic/tuttle2.kl b/target/board/generic/tuttle2.kl
deleted file mode 100644
index a78a6eb..0000000
--- a/target/board/generic/tuttle2.kl
+++ /dev/null
@@ -1,74 +0,0 @@
-key 2     1
-key 3     2
-key 4     3
-key 5     4
-key 6     5
-key 7     6
-key 8     7
-key 9     8
-key 10    9
-key 11    0
-key 158   BACK              WAKE_DROPPED
-key 230   SOFT_RIGHT        WAKE
-key 60    SOFT_RIGHT        WAKE
-key 107   ENDCALL           WAKE_DROPPED
-key 62    ENDCALL           WAKE_DROPPED
-key 229   MENU         WAKE_DROPPED
-key 59    MENU         WAKE_DROPPED
-key 228   POUND
-key 227   STAR
-key 231   CALL              WAKE_DROPPED
-key 61    CALL              WAKE_DROPPED
-key 232   DPAD_CENTER       WAKE_DROPPED
-key 108   DPAD_DOWN         WAKE_DROPPED
-key 103   DPAD_UP           WAKE_DROPPED
-key 102   HOME              WAKE
-key 105   DPAD_LEFT         WAKE_DROPPED
-key 106   DPAD_RIGHT        WAKE_DROPPED
-key 115   VOLUME_UP
-key 114   VOLUME_DOWN
-key 116   POWER             WAKE
-key 212   SLASH
-
-key 16    Q
-key 17    W
-key 18    E
-key 19    R
-key 20    T
-key 21    Y
-key 22    U
-key 23    I
-key 24    O
-key 25    P
-
-key 30    A
-key 31    S
-key 32    D
-key 33    F
-key 34    G
-key 35    H
-key 36    J
-key 37    K
-key 38    L
-key 14    DEL
-        
-key 44    Z
-key 45    X
-key 46    C
-key 47    V
-key 48    B
-key 49    N
-key 50    M
-key 51    COMMA
-key 52    PERIOD
-key 28    ENTER
-        
-key 56    ALT_LEFT
-key 42    SHIFT_LEFT
-key 215   AT
-key 57    SPACE
-key 53    SLASH
-key 127   SYM
-key 100   ALT_LEFT
-
-key 399   GRAVE
diff --git a/target/board/generic_x86/AndroidBoard.mk b/target/board/generic_x86/AndroidBoard.mk
deleted file mode 100644
index 8fb68f8..0000000
--- a/target/board/generic_x86/AndroidBoard.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-#
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index 6096a89..fafd222 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -41,5 +41,6 @@
     $(LOCAL_DIR)/vbox_x86.mk \
     $(LOCAL_DIR)/sdk.mk \
     $(LOCAL_DIR)/sdk_x86.mk \
-    $(LOCAL_DIR)/sim.mk
+    $(LOCAL_DIR)/sim.mk \
+    $(LOCAL_DIR)/large_emu_hw.mk
 endif
diff --git a/target/product/core.mk b/target/product/core.mk
index 55d6c26..fb46516 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -23,27 +23,48 @@
     ro.config.alarm_alert=Alarm_Classic.ogg
 
 PRODUCT_PACKAGES := \
+    ApplicationsProvider \
+    Browser \
+    Bugreport \
+    Contacts \
+    ContactsProvider \
+    DefaultContainerService \
+    DownloadProvider \
+    DownloadProviderUi \
+    HTMLViewer \
+    Home \
+    MediaProvider \
+    PackageInstaller \
+    PicoTts \
+    SettingsProvider \
+    TelephonyProvider \
+    TtsService \
+    UserDictionaryProvider \
+    VpnServices \
+    apache-xml \
     bouncycastle \
     com.android.location.provider \
     com.android.location.provider.xml \
     core \
     core-junit \
-    create_test_dmtrace \
     dalvikvm \
     dexdeps \
     dexdump \
     dexlist \
     dexopt \
     dmtracedump \
-    dvz \
     dx \
     ext \
     framework-res \
     hprof-conv \
     icu.dat \
+    installd \
+    ip \
     ip-up-vpn \
-    jasmin \
-    jasmin.jar \
+    ip6tables \
+    iptables \
+    libOpenMAXAL \
+    libOpenSLES \
     libcrypto \
     libdex \
     libdvm \
@@ -55,27 +76,11 @@
     libnfc_ndef \
     libsqlite_jni \
     libssl \
+    libwilhelm \
     libz \
+    screencap \
     sqlite-jdbc \
-    Browser \
-    Contacts \
-    Home \
-    HTMLViewer \
-    Phone \
-    ApplicationsProvider \
-    ContactsProvider \
-    DownloadProvider \
-    DownloadProviderUi \
-    MediaProvider \
-    PicoTts \
-    SettingsProvider \
-    TelephonyProvider \
-    TtsService \
-    VpnServices \
-    UserDictionaryProvider \
-    PackageInstaller \
-    DefaultContainerService \
-    Bugreport
+    wpa_supplicant.conf
 
 # host-only dependencies
 ifeq ($(WITH_HOST_DALVIK),true)
@@ -84,4 +89,3 @@
         core-hostdex \
         libjavacore-host
 endif
-
diff --git a/target/product/full.mk b/target/product/full.mk
index c563bcc..8231e99 100644
--- a/target/product/full.mk
+++ b/target/product/full.mk
@@ -19,7 +19,7 @@
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/board/generic/device.mk)
 
 # Overrides
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index 8715e44..19f94ee 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -15,8 +15,9 @@
 #
 
 # This is a build configuration for a full-featured build of the
-# Open-Source part of the tree. This is a base configuration to
-# bes used for AOSP builds on various target devices.
+# Open-Source part of the tree. It's geared toward a US-centric
+# build of the emulator, but all those aspects can be overridden
+# in inherited configurations.
 
 PRODUCT_PACKAGES := \
     OpenWnn \
@@ -29,13 +30,11 @@
 
 # Additional settings used in all AOSP builds
 PRODUCT_PROPERTY_OVERRIDES := \
-    keyguard.no_require_sim=true \
     ro.com.android.dateformat=MM-dd-yyyy \
-    ro.com.android.dataroaming=true \
     ro.config.ringtone=Ring_Synth_04.ogg \
     ro.config.notification_sound=pixiedust.ogg
 
-# Put en_US first in the list, to make it default.
+# Put en_US first in the list, so make it default.
 PRODUCT_LOCALES := en_US
 
 # Get some sounds
@@ -44,7 +43,9 @@
 # Get the TTS language packs
 $(call inherit-product-if-exists, external/svox/pico/lang/all_pico_languages.mk)
 
-# Get the list of languages.
+# Get a list of languages.
 $(call inherit-product, $(SRC_TARGET_DIR)/product/locales_full.mk)
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
+# Get everything else from the parent package
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
+
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
new file mode 100644
index 0000000..932ba95
--- /dev/null
+++ b/target/product/full_base_telephony.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# 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
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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 is a build configuration for a full-featured build of the
+# Open-Source part of the tree. It's geared toward a US-centric
+# build quite specifically for the emulator, and might not be
+# entirely appropriate to inherit from for on-device configurations.
+
+PRODUCT_PROPERTY_OVERRIDES := \
+    keyguard.no_require_sim=true \
+    ro.com.android.dataroaming=true
+
+PRODUCT_COPY_FILES := \
+    development/data/etc/apns-conf.xml:system/etc/apns-conf.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
diff --git a/target/product/full_x86.mk b/target/product/full_x86.mk
index f23e988..d6a169a 100644
--- a/target/product/full_x86.mk
+++ b/target/product/full_x86.mk
@@ -19,8 +19,15 @@
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
+# If running on an emulator or some other device that has a LAN connection
+# that isn't a wifi connection. This will instruct init.rc to enable the
+# network connection so that you can use it with ADB
+ifdef NET_ETH0_STARTONBOOT
+  PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
+endif
+
 $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/board/generic/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
 
 # Ensure we package the BIOS files too.
 PRODUCT_PACKAGES += \
diff --git a/target/product/generic.mk b/target/product/generic.mk
index eed354a..dd0d663 100644
--- a/target/product/generic.mk
+++ b/target/product/generic.mk
@@ -14,36 +14,11 @@
 # limitations under the License.
 #
 
-# This is a generic product that isn't specialized for a specific device.
+# This is a generic phone product that isn't specialized for a specific device.
 # It includes the base Android platform.
 
-PRODUCT_PACKAGES := \
-    AccountAndSyncSettings \
-    DeskClock \
-    AlarmProvider \
-    Bluetooth \
-    Calculator \
-    Calendar \
-    Camera \
-    CertInstaller \
-    DrmProvider \
-    Email \
-    Gallery3D \
-    LatinIME \
-    Launcher2 \
-    Mms \
-    Music \
-    Provision \
-    Protips \
-    QuickSearchBox \
-    Settings \
-    Sync \
-    SystemUI \
-    Updater \
-    CalendarProvider \
-    SyncProvider
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
 
 # Overrides
 PRODUCT_BRAND := generic
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
new file mode 100644
index 0000000..2a3aae7
--- /dev/null
+++ b/target/product/generic_no_telephony.mk
@@ -0,0 +1,74 @@
+#
+# Copyright (C) 2007 The Android Open Source Project
+#
+# 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
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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 is a generic phone product that isn't specialized for a specific device.
+# It includes the base Android platform.
+
+PRODUCT_POLICY := android.policy_phone
+
+PRODUCT_PACKAGES := \
+    AccountAndSyncSettings \
+    DeskClock \
+    AlarmProvider \
+    Bluetooth \
+    Calculator \
+    Calendar \
+    Camera \
+    CertInstaller \
+    DrmProvider \
+    Email \
+    Exchange \
+    Gallery3D \
+    LatinIME \
+    Launcher2 \
+    Music \
+    Provision \
+    Phone \
+    QuickSearchBox \
+    Settings \
+    Sync \
+    SystemUI \
+    Updater \
+    CalendarProvider \
+    SyncProvider \
+    CryptKeeper
+
+PRODUCT_PACKAGES += \
+    icu.dat
+
+PRODUCT_PACKAGES += \
+    librs_jni \
+    libvideoeditor_jni \
+    libvideoeditorplayer \
+    libvideoeditor_core
+
+
+PRODUCT_COPY_FILES := \
+        system/bluetooth/data/audio.conf:system/etc/bluetooth/audio.conf \
+        system/bluetooth/data/auto_pairing.conf:system/etc/bluetooth/auto_pairing.conf \
+        system/bluetooth/data/blacklist.conf:system/etc/bluetooth/blacklist.conf \
+        system/bluetooth/data/input.conf:system/etc/bluetooth/input.conf \
+        system/bluetooth/data/main.nonsmartphone.conf:system/etc/bluetooth/main.conf \
+        system/bluetooth/data/network.conf:system/etc/bluetooth/network.conf
+
+$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
+$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
+
+# Overrides
+PRODUCT_BRAND := generic
+PRODUCT_DEVICE := generic
+PRODUCT_NAME := generic_no_telephony
diff --git a/target/product/large_emu_hw.mk b/target/product/large_emu_hw.mk
new file mode 100644
index 0000000..139a9da
--- /dev/null
+++ b/target/product/large_emu_hw.mk
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2007 The Android Open Source Project
+#
+# 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
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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 is a generic product for devices with large display but not specialized
+# for a specific device. It includes the base Android platform.
+
+PRODUCT_POLICY := android.policy_mid
+
+PRODUCT_PACKAGES := \
+    AccountAndSyncSettings \
+    CarHome \
+    DeskClock \
+    AlarmProvider \
+    Bluetooth \
+    Calculator \
+    Calendar \
+    Camera \
+    CertInstaller \
+    DrmProvider \
+    Email \
+    Exchange \
+    Gallery3D \
+    LatinIME \
+    Launcher2 \
+    Music \
+    Provision \
+    QuickSearchBox \
+    Settings \
+    Sync \
+    Updater \
+    CalendarProvider \
+    SyncProvider
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
+
+# Overrides
+PRODUCT_BRAND := generic
+PRODUCT_DEVICE := generic
+PRODUCT_NAME := large_emu_hw
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index e6b8bd0..92de1b2 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -14,47 +14,53 @@
 # limitations under the License.
 #
 
+PRODUCT_POLICY := android.policy_phone
 PRODUCT_PROPERTY_OVERRIDES :=
 
 PRODUCT_PACKAGES := \
-	SystemUI \
-	AccountAndSyncSettings \
-	Camera \
 	Calculator \
+	Camera \
 	DeskClock \
-	Development \
-	DrmProvider \
 	Email \
-	Fallback \
+	Exchange \
 	Gallery \
-	GPSEnable \
-	Launcher2 \
-	Protips \
 	Music \
 	Mms \
+	OpenWnn \
+	libWnnEngDic \
+	libWnnJpnDic \
+	libwnndict \
+        Phone \
+	PinyinIME \
+	Protips \
+	SoftKeyboard \
+	SystemUI \
+	Launcher2 \
+	AccountAndSyncSettings \
+	Development \
+	DrmProvider \
+	Fallback \
+	GPSEnable \
 	Settings \
 	SdkSetup \
 	CustomLocale \
 	gpstest \
 	sqlite3 \
 	LatinIME \
-	PinyinIME \
-	OpenWnn \
-	libWnnEngDic \
-	libWnnJpnDic \
-	libwnndict \
 	CertInstaller \
 	LiveWallpapersPicker \
 	ApiDemos \
 	GestureBuilder \
-	SoftKeyboard \
 	CubeLiveWallpapers \
 	QuickSearchBox \
+	WidgetPreview \
 	monkeyrunner \
 	guavalib \
 	jsr305lib \
 	jython \
-	jsilver
+	jsilver \
+	librs_jni
+
 
 # Host tools that are parts of the SDK.
 # See development/build/sdk.atree
@@ -85,8 +91,8 @@
 	ddms \
 	ddmlib \
 	ddmuilib \
-	hierarchyviewer \
 	draw9patch \
+	hierarchyviewer \
 	layoutopt \
 	uix \
 	traceview \
@@ -99,8 +105,6 @@
 	groovy-all-1.7.0 \
 	commons-compress-1.0 \
 	emmalib \
-	org-netbeans-api-visual \
-	org-openide-util \
 	jcommon-1.0.12 \
 	jfreechart-1.0.9 \
 	jfreechart-1.0.9-swt \
@@ -119,7 +123,6 @@
 	sdklib-tests \
 	sdkuilib-tests
 
-
 PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay
 
 PRODUCT_COPY_FILES := \
@@ -128,16 +131,22 @@
 	frameworks/base/data/sounds/effects/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg \
 	frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml
 
+$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
+$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
 
 # Overrides
 PRODUCT_BRAND := generic
 PRODUCT_NAME := sdk
 PRODUCT_DEVICE := generic
-PRODUCT_LOCALES := \
+
+# locale + densities. en_US is both first and in alphabetical order to
+# ensure this is the default locale.
+PRODUCT_LOCALES = \
 	ldpi \
 	hdpi \
 	mdpi \
+	en_US \
 	ar_EG \
 	ar_IL \
 	bg_BG \
@@ -197,9 +206,9 @@
 	zh_TW
 
 # include available languages for TTS in the system image
-include external/svox/pico/lang/PicoLangDeDeInSystem.mk
-include external/svox/pico/lang/PicoLangEnGBInSystem.mk
-include external/svox/pico/lang/PicoLangEnUsInSystem.mk
-include external/svox/pico/lang/PicoLangEsEsInSystem.mk
-include external/svox/pico/lang/PicoLangFrFrInSystem.mk
-include external/svox/pico/lang/PicoLangItItInSystem.mk
+-include external/svox/pico/lang/PicoLangDeDeInSystem.mk
+-include external/svox/pico/lang/PicoLangEnGBInSystem.mk
+-include external/svox/pico/lang/PicoLangEnUsInSystem.mk
+-include external/svox/pico/lang/PicoLangEsEsInSystem.mk
+-include external/svox/pico/lang/PicoLangFrFrInSystem.mk
+-include external/svox/pico/lang/PicoLangItItInSystem.mk
diff --git a/tools/apicheck/src/Android.mk b/target/product/telephony.mk
similarity index 61%
rename from tools/apicheck/src/Android.mk
rename to target/product/telephony.mk
index c4e7c6e..d557887 100644
--- a/tools/apicheck/src/Android.mk
+++ b/target/product/telephony.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2008 The Android Open Source Project
+#
+# Copyright (C) 2007 The Android Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,18 +12,13 @@
 # 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.
+#
 
-LOCAL_PATH := $(call my-dir)
+# This is the list of product-level settings that are specific
+# to products that have telephony hardware.
 
+PRODUCT_PACKAGES := \
+    Mms
 
-# apicheck java library
-# ============================================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-LOCAL_JAR_MANIFEST := MANIFEST.mf
-
-LOCAL_MODULE:= apicheck
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-
+PRODUCT_COPY_FILES := \
+	system/bluetooth/data/main.conf:system/etc/bluetooth/main.conf
diff --git a/tools/adbs b/tools/adbs
index 8277790..b571d48 100755
--- a/tools/adbs
+++ b/tools/adbs
@@ -113,7 +113,7 @@
     path = os.environ['ANDROID_PRODUCT_OUT'] + "/symbols"
   except:
     cmd = "CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core " \
-      + "SRC_TARGET_DIR=build/target make -f build/core/envsetup.mk " \
+      + "SRC_TARGET_DIR=build/target make -f build/core/config.mk " \
       + "dumpvar-abs-TARGET_OUT_UNSTRIPPED"
     stream = os.popen(cmd)
     str = stream.read()
@@ -144,23 +144,23 @@
       uname = "darwin-ppc"
   elif uname == "Linux":
     uname = "linux-x86"
-  prefix = "./prebuilt/" + uname + "/toolchain/arm-eabi-4.4.3/bin/"
-  addr2line_cmd = prefix + "arm-eabi-addr2line"
+  prefix = "./prebuilt/" + uname + "/toolchain/arm-linux-androideabi-4.4.x/bin/"
+  addr2line_cmd = prefix + "arm-linux-androideabi-addr2line"
 
   if (not os.path.exists(addr2line_cmd)):
     try:
       prefix = os.environ['ANDROID_BUILD_TOP'] + "/prebuilt/" + uname + \
-               "/toolchain/arm-eabi-4.4.3/bin/"
+               "/toolchain/arm-linux-androideabi-4.4.x/bin/"
     except:
       prefix = "";
 
-    addr2line_cmd = prefix + "arm-eabi-addr2line"
+    addr2line_cmd = prefix + "arm-linux-androideabi-addr2line"
     if (not os.path.exists(addr2line_cmd)):
       print addr2line_cmd + " not found!"
       sys.exit(1)
 
-  objdump_cmd = prefix + "arm-eabi-objdump"
-  cppfilt_cmd = prefix + "arm-eabi-c++filt"
+  objdump_cmd = prefix + "arm-linux-androideabi-objdump"
+  cppfilt_cmd = prefix + "arm-linux-androideabi-c++filt"
 
 ###############################################################################
 # look up the function and file/line number for a raw stack trace line
diff --git a/tools/apicheck/Android.mk b/tools/apicheck/Android.mk
index a2ff8a2..24f697c 100644
--- a/tools/apicheck/Android.mk
+++ b/tools/apicheck/Android.mk
@@ -29,16 +29,10 @@
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
-$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/apicheck$(COMMON_JAVA_PACKAGE_SUFFIX)
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
 $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/apicheck | $(ACP)
 	@echo "Copy: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-new-target)
 	$(hide) chmod 755 $@
 
-# the other stuff
-# ============================================================
-subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
-		src \
-	))
-
-include $(subdirs)
+# Apicheck is now part of Doclava -- See external/doclava.
diff --git a/tools/apicheck/etc/apicheck b/tools/apicheck/etc/apicheck
index 5d0480c..c710c46 100644
--- a/tools/apicheck/etc/apicheck
+++ b/tools/apicheck/etc/apicheck
@@ -16,6 +16,10 @@
 
 # Set up prog to be the path of this script, including following symlinks,
 # and set up progdir to be the fully-qualified pathname of its directory.
+#
+# The classpath and other java options used in apicheck are specified in
+# build/core/tasks/apicheck.mk.
+
 prog="$0"
 while [ -h "${prog}" ]; do
     newProg=`/bin/ls -ld "${prog}"`
@@ -34,8 +38,6 @@
 prog="${progdir}"/`basename "${prog}"`
 cd "${oldwd}"
 
-libdir=`dirname $progdir`/framework
-
 javaOpts=""
 while expr "x$1" : 'x-J' >/dev/null; do
     opt=`expr "x$1" : 'x-J\(.*\)'`
@@ -43,4 +45,4 @@
     shift
 done
 
-exec java $javaOpts -jar $libdir/apicheck.jar "$@"
+exec java $javaOpts com.google.doclava.apicheck.ApiCheck "$@"
diff --git a/tools/apicheck/src/MANIFEST.mf b/tools/apicheck/src/MANIFEST.mf
deleted file mode 100644
index e6dc263..0000000
--- a/tools/apicheck/src/MANIFEST.mf
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: com.android.apicheck.ApiCheck
diff --git a/tools/apicheck/src/com/android/apicheck/AbstractMethodInfo.java b/tools/apicheck/src/com/android/apicheck/AbstractMethodInfo.java
deleted file mode 100644
index ca90820..0000000
--- a/tools/apicheck/src/com/android/apicheck/AbstractMethodInfo.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-public interface AbstractMethodInfo {
-  
-    public void addException(String exec);
-    public void addParameter(ParameterInfo p);
-
-}
diff --git a/tools/apicheck/src/com/android/apicheck/ApiCheck.java b/tools/apicheck/src/com/android/apicheck/ApiCheck.java
deleted file mode 100644
index c8272dd..0000000
--- a/tools/apicheck/src/com/android/apicheck/ApiCheck.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Stack;
-
-public class ApiCheck {
-        // parse out and consume the -whatever command line flags
-        private static ArrayList<String[]> parseFlags(ArrayList<String> allArgs) {
-            ArrayList<String[]> ret = new ArrayList<String[]>();
-
-            int i;
-            for (i = 0; i < allArgs.size(); i++) {
-                // flags with one value attached
-                String flag = allArgs.get(i);
-                if (flag.equals("-error")
-                        || flag.equals("-warning")
-                        || flag.equals("-hide")) {
-                    String[] arg = new String[2];
-                    arg[0] = flag;
-                    arg[1] = allArgs.get(++i);
-                    ret.add(arg);
-                } else {
-                    // we've consumed all of the -whatever args, so we're done
-                    break;
-                }
-            }
-
-            // i now points to the first non-flag arg; strip what came before
-            for (; i > 0; i--) {
-                allArgs.remove(0);
-            }
-            return ret;
-        }
-
-        public static void main(String[] originalArgs) {
-            // translate to an ArrayList<String> for munging
-            ArrayList<String> args = new ArrayList<String>(originalArgs.length);
-            for (String a: originalArgs) {
-                args.add(a);
-            }
-
-            ArrayList<String[]> flags = ApiCheck.parseFlags(args);
-            for (String[] a: flags) {
-                if (a[0].equals("-error") || a[0].equals("-warning")
-                        || a[0].equals("-hide")) {
-                    try {
-                        int level = -1;
-                        if (a[0].equals("-error")) {
-                            level = Errors.ERROR;
-                        }
-                        else if (a[0].equals("-warning")) {
-                            level = Errors.WARNING;
-                        }
-                        else if (a[0].equals("-hide")) {
-                            level = Errors.HIDDEN;
-                        }
-                        Errors.setErrorLevel(Integer.parseInt(a[1]), level);
-                    }
-                    catch (NumberFormatException e) {
-                        System.err.println("Bad argument: " + a[0] + " " + a[1]);
-                        System.exit(2);
-                    }
-                }
-            }
-
-            ApiCheck acheck = new ApiCheck();
-
-            ApiInfo oldApi = acheck.parseApi(args.get(0));
-            ApiInfo newApi = acheck.parseApi(args.get(1));
-
-            // only run the consistency check if we haven't had XML parse errors
-            if (!Errors.hadError) {
-                oldApi.isConsistent(newApi);
-            }
-
-            Errors.printErrors();
-            System.exit(Errors.hadError ? 1 : 0);
-        }
-
-    public ApiInfo parseApi(String xmlFile) {
-        FileReader fileReader = null;
-        try {
-            XMLReader xmlreader = XMLReaderFactory.createXMLReader();
-            MakeHandler handler = new MakeHandler();
-            xmlreader.setContentHandler(handler);
-            xmlreader.setErrorHandler(handler);
-            fileReader = new FileReader(xmlFile);
-            xmlreader.parse(new InputSource(fileReader));
-            ApiInfo apiInfo = handler.getApi();
-            apiInfo.resolveSuperclasses();
-            return apiInfo;
-        } catch (SAXParseException e) {
-            Errors.error(Errors.PARSE_ERROR,
-                    new SourcePositionInfo(xmlFile, e.getLineNumber(), 0),
-                    e.getMessage());
-        } catch (Exception e) {
-            e.printStackTrace();
-            Errors.error(Errors.PARSE_ERROR,
-                    new SourcePositionInfo(xmlFile, 0, 0), e.getMessage());
-        } finally {
-            if (fileReader != null) {
-                try {
-                    fileReader.close();
-                } catch (IOException ignored) {}
-            }
-        }
-        return null;
-    }
-
-    private static class MakeHandler extends DefaultHandler {
-
-            private ApiInfo mApi;
-            private PackageInfo mCurrentPackage;
-            private ClassInfo mCurrentClass;
-            private AbstractMethodInfo mCurrentMethod;
-            private Stack<ClassInfo> mClassScope = new Stack<ClassInfo>();
-
-
-            public MakeHandler() {
-                super();
-                mApi = new ApiInfo();
-            }
-
-            @Override
-            public void startElement(String uri, String localName, String qName,
-                                     Attributes attributes) {
-                if (qName.equals("package")) {
-                    mCurrentPackage = new PackageInfo(attributes.getValue("name"),
-                            SourcePositionInfo.fromXml(attributes.getValue("source")));
-                } else if (qName.equals("class")
-                        || qName.equals("interface")) {
-                    // push the old outer scope for later recovery, then set
-                    // up the new current class object
-                    mClassScope.push(mCurrentClass);
-                    mCurrentClass = new ClassInfo(attributes.getValue("name"),
-                                                  mCurrentPackage,
-                                                  attributes.getValue("extends") ,
-                                                  qName.equals("interface"),
-                                                  Boolean.valueOf(
-                                                      attributes.getValue("abstract")),
-                                                  Boolean.valueOf(
-                                                      attributes.getValue("static")),
-                                                  Boolean.valueOf(
-                                                      attributes.getValue("final")),
-                                                  attributes.getValue("deprecated"),
-                                                  attributes.getValue("visibility"),
-                                                  SourcePositionInfo.fromXml(attributes.getValue("source")),
-                                                  mCurrentClass);
-                } else if (qName.equals("method")) {
-                    mCurrentMethod = new MethodInfo(attributes.getValue("name"),
-                                                    attributes.getValue("return") ,
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("abstract")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("native")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("synchronized")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("static")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("final")),
-                                                    attributes.getValue("deprecated"),
-                                                    attributes.getValue("visibility"),
-                                                    SourcePositionInfo.fromXml(attributes.getValue("source")),
-                                                    mCurrentClass);
-                } else if (qName.equals("constructor")) {
-                    mCurrentMethod = new ConstructorInfo(attributes.getValue("name"),
-                                                         attributes.getValue("type") ,
-                                                         Boolean.valueOf(
-                                                             attributes.getValue("static")),
-                                                         Boolean.valueOf(
-                                                             attributes.getValue("final")),
-                                                         attributes.getValue("deprecated"),
-                                                         attributes.getValue("visibility"),
-                                                         SourcePositionInfo.fromXml(attributes.getValue("source")),
-                                                         mCurrentClass);
-                } else if (qName.equals("field")) {
-                    FieldInfo fInfo = new FieldInfo(attributes.getValue("name"),
-                                                    attributes.getValue("type") ,
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("transient")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("volatile")),
-                                                    attributes.getValue("value"),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("static")),
-                                                    Boolean.valueOf(
-                                                        attributes.getValue("final")),
-                                                    attributes.getValue("deprecated"),
-                                                    attributes.getValue("visibility"),
-                                                    SourcePositionInfo.fromXml(attributes.getValue("source")),
-                                                    mCurrentClass);
-                    mCurrentClass.addField(fInfo);
-                } else if (qName.equals("parameter")) {
-                    mCurrentMethod.addParameter(new ParameterInfo(attributes.getValue("type"),
-                                                                  attributes.getValue("name")));
-                } else if (qName.equals("exception")) {
-                    mCurrentMethod.addException(attributes.getValue("type"));
-                } else if (qName.equals("implements")) {
-                    mCurrentClass.addInterface(attributes.getValue("name"));
-                }
-            }
-
-            @Override
-            public void endElement(String uri, String localName, String qName) {
-                if (qName.equals("method")) {
-                    mCurrentClass.addMethod((MethodInfo) mCurrentMethod);
-                } else if (qName.equals("constructor")) {
-                    mCurrentClass.addConstructor((ConstructorInfo) mCurrentMethod);
-                } else if (qName.equals("class")
-                        || qName.equals("interface")) {
-                    mCurrentPackage.addClass(mCurrentClass);
-                    mCurrentClass = mClassScope.pop();
-                } else if (qName.equals("package")){
-                    mApi.addPackage(mCurrentPackage);
-                }
-            }
-            public ApiInfo getApi() {
-                return mApi;
-            }
-        }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/ApiInfo.java b/tools/apicheck/src/com/android/apicheck/ApiInfo.java
deleted file mode 100644
index c237814..0000000
--- a/tools/apicheck/src/com/android/apicheck/ApiInfo.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-import java.util.*;
-
-public class ApiInfo {
-  
-    private HashMap<String, PackageInfo> mPackages;
-    private HashMap<String, ClassInfo> mAllClasses;
-    
-    public ApiInfo() {
-        mPackages = new HashMap<String, PackageInfo>();
-        mAllClasses = new HashMap<String, ClassInfo>();
-    }
-
-    public ClassInfo findClass(String name) {
-        return mAllClasses.get(name);
-    }
-
-    private void resolveInterfaces() {
-        for (ClassInfo c : mAllClasses.values()) {
-            c.resolveInterfaces(this);
-        }
-    }
-    
-    public boolean isConsistent(ApiInfo otherApi) {
-        resolveInterfaces();
-        boolean consistent = true;
-        for (PackageInfo pInfo : mPackages.values()) {
-            if (otherApi.getPackages().containsKey(pInfo.name())) {
-                if (!pInfo.isConsistent(otherApi.getPackages().get(pInfo.name()))) {
-                    consistent = false;
-                }
-            } else {
-                Errors.error(Errors.REMOVED_PACKAGE, pInfo.position(),
-                        "Removed package " + pInfo.name());
-                consistent = false;
-            }
-        }
-        for (PackageInfo pInfo : otherApi.mPackages.values()) {
-            if (!pInfo.isInBoth()) {
-                Errors.error(Errors.ADDED_PACKAGE, pInfo.position(),
-                        "Added package " + pInfo.name());
-                consistent = false;
-            }
-        }
-        return consistent;
-    }
-    
-    public HashMap<String, PackageInfo> getPackages() {
-        return mPackages;
-    }
-    
-    public void addPackage(PackageInfo pInfo) {
-        // track the set of organized packages in the API
-        mPackages.put(pInfo.name(), pInfo);
-        
-        // accumulate a direct map of all the classes in the API
-        for (ClassInfo cl: pInfo.allClasses().values()) {
-            mAllClasses.put(cl.qualifiedName(), cl);
-        }
-    }
-
-    public void resolveSuperclasses() {
-        for (ClassInfo cl: mAllClasses.values()) {
-            // java.lang.Object has no superclass
-            if (!cl.qualifiedName().equals("java.lang.Object")) {
-                String scName = cl.superclassName();
-                if (scName == null) {
-                    scName = "java.lang.Object";
-                }
-
-                ClassInfo superclass = mAllClasses.get(scName);
-                cl.setSuperClass(superclass);
-            }
-        }
-    }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/ClassInfo.java b/tools/apicheck/src/com/android/apicheck/ClassInfo.java
deleted file mode 100644
index e62a3d0..0000000
--- a/tools/apicheck/src/com/android/apicheck/ClassInfo.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-import java.util.*;
-
-public class ClassInfo {
-    private String mName;
-    private String mSuperClassName;
-    private boolean mIsInterface;
-    private boolean mIsAbstract;
-    private boolean mIsStatic;
-    private boolean mIsFinal;
-    private String mDeprecated;
-    private String mScope;
-    private List<String> mInterfaceNames;
-    private List<ClassInfo> mInterfaces;
-    private HashMap<String, MethodInfo> mMethods;
-    private HashMap<String, FieldInfo> mFields;
-    private HashMap<String, ConstructorInfo> mConstructors;
-    private boolean mExistsInBoth;
-    private PackageInfo mPackage;
-    private SourcePositionInfo mSourcePosition;
-    private ClassInfo mSuperClass;
-    private ClassInfo mParentClass;
-
-    public ClassInfo(String name, PackageInfo pack, String superClass, boolean isInterface,
-                     boolean isAbstract, boolean isStatic, boolean isFinal, String deprecated,
-                     String visibility, SourcePositionInfo source, ClassInfo parent) {
-        mName = name;
-        mPackage = pack;
-        mSuperClassName = superClass;
-        mIsInterface = isInterface;
-        mIsAbstract = isAbstract;
-        mIsStatic = isStatic;
-        mIsFinal = isFinal;
-        mDeprecated = deprecated;
-        mScope = visibility;
-        mInterfaceNames = new ArrayList<String>();
-        mInterfaces = new ArrayList<ClassInfo>();
-        mMethods = new HashMap<String, MethodInfo>();
-        mFields = new HashMap<String, FieldInfo>();
-        mConstructors = new HashMap<String, ConstructorInfo>();
-        mExistsInBoth = false;
-        mSourcePosition = source;
-        mParentClass = parent;
-    }
-
-    public String name() {
-        return mName;
-    }
-
-    public String qualifiedName() {
-        String parentQName = (mParentClass != null)
-                ? (mParentClass.qualifiedName() + ".")
-                : "";
-        return mPackage.name() + "." + parentQName + name();
-    }
-
-    public String superclassName() {
-        return mSuperClassName;
-    }
-    
-    public SourcePositionInfo position() {
-        return mSourcePosition;
-    }
-
-    public boolean isInterface() {
-        return mIsInterface;
-    }
-
-    public boolean isFinal() {
-        return mIsFinal;
-    }
-    
-    // Find a superclass implementation of the given method.  Looking at our superclass
-    // instead of at 'this' is unusual, but it fits the point-of-call demands well.
-    public MethodInfo overriddenMethod(MethodInfo candidate) {
-        if (mSuperClass == null) {
-            return null;
-        }
-        
-        // does our immediate superclass have it?
-        ClassInfo sup = mSuperClass;
-        for (MethodInfo mi : sup.mMethods.values()) {
-            if (mi.matches(candidate)) {
-                // found it
-                return mi;
-            }
-        }
-
-        // no, so recurse
-        if (sup.mSuperClass != null) {
-            return mSuperClass.overriddenMethod(candidate);
-        }
-        
-        // no parent, so we just don't have it
-        return null;
-    }
-    
-    // Find a superinterface declaration of the given method.
-    public MethodInfo interfaceMethod(MethodInfo candidate) {
-        for (ClassInfo interfaceInfo : mInterfaces) {
-            for (MethodInfo mi : interfaceInfo.mMethods.values()) {
-                if (mi.matches(candidate)) {
-                    return mi;
-                }
-            }
-        }
-        return (mSuperClass != null) ? mSuperClass.interfaceMethod(candidate) : null;
-    }
-
-    public boolean isConsistent(ClassInfo cl) {
-        cl.mExistsInBoth = true;
-        mExistsInBoth = true;
-        boolean consistent = true;
-
-        if (isInterface() != cl.isInterface()) {
-            Errors.error(Errors.CHANGED_CLASS, cl.position(),
-                    "Class " + cl.qualifiedName()
-                    + " changed class/interface declaration");
-            consistent = false;
-        }
-        for (String iface : mInterfaceNames) {
-            boolean found = false;
-            for (ClassInfo c = cl; c != null && !found; c = c.mSuperClass) {
-                found = c.mInterfaceNames.contains(iface);
-            }
-            if (!found) {
-                Errors.error(Errors.REMOVED_INTERFACE, cl.position(),
-                        "Class " + qualifiedName() + " no longer implements " + iface);
-            }
-        }
-        for (String iface : cl.mInterfaceNames) {
-          if (!mInterfaceNames.contains(iface)) {
-              Errors.error(Errors.ADDED_INTERFACE, cl.position(),
-                      "Added interface " + iface + " to class "
-                      + qualifiedName());
-              consistent = false;
-            }
-        }
-        
-        for (MethodInfo mInfo : mMethods.values()) {
-            if (cl.mMethods.containsKey(mInfo.getHashableName())) {
-                if (!mInfo.isConsistent(cl.mMethods.get(mInfo.getHashableName()))) {
-                    consistent = false;
-                }
-            } else {
-                /* This class formerly provided this method directly, and now does not.
-                 * Check our ancestry to see if there's an inherited version that still
-                 * fulfills the API requirement.
-                 */
-                MethodInfo mi = mInfo.containingClass().overriddenMethod(mInfo);
-                if (mi == null) {
-                    mi = mInfo.containingClass().interfaceMethod(mInfo);
-                }
-                if (mi == null) {
-                    Errors.error(Errors.REMOVED_METHOD, mInfo.position(),
-                            "Removed public method " + mInfo.qualifiedName());
-                    consistent = false;
-                }
-            }
-        }
-        for (MethodInfo mInfo : cl.mMethods.values()) {
-            if (!mInfo.isInBoth()) {
-                /* Similarly to the above, do not fail if this "new" method is
-                 * really an override of an existing superclass method.
-                 */
-                MethodInfo mi = mInfo.containingClass().overriddenMethod(mInfo);
-                if (mi == null) {
-                    Errors.error(Errors.ADDED_METHOD, mInfo.position(),
-                            "Added public method " + mInfo.qualifiedName());
-                    consistent = false;
-                }
-            }
-        }
-        
-        for (ConstructorInfo mInfo : mConstructors.values()) {
-          if (cl.mConstructors.containsKey(mInfo.getHashableName())) {
-              if (!mInfo.isConsistent(cl.mConstructors.get(mInfo.getHashableName()))) {
-                  consistent = false;
-              }
-          } else {
-              Errors.error(Errors.REMOVED_METHOD, mInfo.position(),
-                      "Removed public constructor " + mInfo.prettySignature());
-              consistent = false;
-          }
-        }
-        for (ConstructorInfo mInfo : cl.mConstructors.values()) {
-            if (!mInfo.isInBoth()) {
-                Errors.error(Errors.ADDED_METHOD, mInfo.position(),
-                        "Added public constructor " + mInfo.prettySignature());
-                consistent = false;
-            }
-        }
-        
-        for (FieldInfo mInfo : mFields.values()) {
-          if (cl.mFields.containsKey(mInfo.name())) {
-              if (!mInfo.isConsistent(cl.mFields.get(mInfo.name()))) {
-                  consistent = false;
-              }
-          } else {
-              Errors.error(Errors.REMOVED_FIELD, mInfo.position(),
-                      "Removed field " + mInfo.qualifiedName());
-              consistent = false;
-          }
-        }
-        for (FieldInfo mInfo : cl.mFields.values()) {
-            if (!mInfo.isInBoth()) {
-                Errors.error(Errors.ADDED_FIELD, mInfo.position(),
-                        "Added public field " + mInfo.qualifiedName());
-                consistent = false;
-            }
-        }
-        
-        if (mIsAbstract != cl.mIsAbstract) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_ABSTRACT, cl.position(),
-                    "Class " + cl.qualifiedName() + " changed abstract qualifier");
-        }
-      
-        if (mIsFinal != cl.mIsFinal) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_FINAL, cl.position(),
-                    "Class " + cl.qualifiedName() + " changed final qualifier");
-        }
-      
-        if (mIsStatic != cl.mIsStatic) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_STATIC, cl.position(),
-                    "Class " + cl.qualifiedName() + " changed static qualifier");
-        }
-     
-        if (!mScope.equals(cl.mScope)) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_SCOPE, cl.position(),
-                    "Class " + cl.qualifiedName() + " scope changed from "
-                    + mScope + " to " + cl.mScope);
-        }
-        
-        if (!mDeprecated.equals(cl.mDeprecated)) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_DEPRECATED, cl.position(),
-                    "Class " + cl.qualifiedName() + " has changed deprecation state");
-        }
-        
-        if (mSuperClassName != null) {
-            if (cl.mSuperClassName == null || !mSuperClassName.equals(cl.mSuperClassName)) {
-                consistent = false;
-                Errors.error(Errors.CHANGED_SUPERCLASS, cl.position(),
-                        "Class " + qualifiedName() + " superclass changed from "
-                        + mSuperClassName + " to " + cl.mSuperClassName);
-            }
-        } else if (cl.mSuperClassName != null) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_SUPERCLASS, cl.position(),
-                    "Class " + qualifiedName() + " superclass changed from "
-                    + "null to " + cl.mSuperClassName);
-        }
-        
-        return consistent;
-    }
-
-    public void resolveInterfaces(ApiInfo apiInfo) {
-        for (String interfaceName : mInterfaceNames) {
-            mInterfaces.add(apiInfo.findClass(interfaceName));
-        }
-    }
-    
-    public void addInterface(String name) {
-        mInterfaceNames.add(name);
-    }
-    
-    public void addMethod(MethodInfo mInfo) {
-        mMethods.put(mInfo.getHashableName(), mInfo);
-    }
-    
-    public void addConstructor(ConstructorInfo cInfo) {
-        mConstructors.put(cInfo.getHashableName(), cInfo);
-        
-    }
-    
-    public void addField(FieldInfo fInfo) {
-        mFields.put(fInfo.name(), fInfo);
-      
-    }
-    
-    public void setSuperClass(ClassInfo superclass) {
-        mSuperClass = superclass;
-    }
-    
-    public boolean isInBoth() {
-        return mExistsInBoth;
-    }
-
-    public Map<String, ConstructorInfo> allConstructors() {
-        return mConstructors;
-    }
-
-    public Map<String, FieldInfo> allFields() {
-        return mFields;
-    }
-
-    public Map<String, MethodInfo> allMethods() {
-        return mMethods;
-    }
-
-    /**
-     * Returns the class hierarchy for this class, starting with this class.
-     */
-    public Iterable<ClassInfo> hierarchy() {
-        List<ClassInfo> result = new ArrayList<ClassInfo>(4);
-        for (ClassInfo c  = this; c != null; c = c.mSuperClass) {
-            result.add(c);
-        }
-        return result;
-    }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/ConstructorInfo.java b/tools/apicheck/src/com/android/apicheck/ConstructorInfo.java
deleted file mode 100644
index f36c7cd..0000000
--- a/tools/apicheck/src/com/android/apicheck/ConstructorInfo.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-import java.util.*;
-
-public class ConstructorInfo implements AbstractMethodInfo {
-    
-    private String mName;
-    private String mType;
-    private boolean mIsStatic;
-    private boolean mIsFinal;
-    private String mDeprecated;
-    private String mScope;
-    private List<String> mExceptions;
-    private List<ParameterInfo> mParameters;
-    private boolean mExistsInBoth;
-    private SourcePositionInfo mSourcePosition;
-    private ClassInfo mClass;
-    
-    public ConstructorInfo(String name, String type, boolean isStatic, boolean isFinal,
-                           String deprecated, String scope, SourcePositionInfo pos, ClassInfo clazz) {
-        mName = name;
-        mType = type;
-        mIsStatic = isStatic;
-        mIsFinal = isFinal;
-        mDeprecated= deprecated;
-        mScope = scope;
-        mExistsInBoth = false;
-        mExceptions = new ArrayList<String>();
-        mParameters = new ArrayList<ParameterInfo>();
-        mSourcePosition = pos;
-        mClass = clazz;
-    }
-    
-    public void addParameter(ParameterInfo pInfo) {
-        mParameters.add(pInfo);
-    }
-    
-    public void addException(String exec) {
-        mExceptions.add(exec);
-    }
-    
-    public String getHashableName() {
-      StringBuilder result = new StringBuilder();
-      result.append(name());
-      for (ParameterInfo pInfo : mParameters) {
-          result.append(":").append(pInfo.getType());
-      }
-      return result.toString();
-    }
-    
-    public boolean isInBoth() {
-        return mExistsInBoth;
-    }
-    
-    public SourcePositionInfo position() {
-        return mSourcePosition;
-    }
-    
-    public String name() {
-        return mName;
-    }
-    
-    public String qualifiedName() {
-        String baseName = (mClass != null)
-                ? (mClass.qualifiedName() + ".")
-                : "";
-        return baseName + name();
-    }
-    
-    public String prettySignature() {
-        String params = "";
-        for (ParameterInfo pInfo : mParameters) {
-            if (params.length() > 0) {
-                params += ", ";
-            }
-            params += pInfo.getType();
-        }
-        return qualifiedName() + '(' + params + ')';
-    }
-    
-    public boolean isConsistent(ConstructorInfo mInfo) {
-      mInfo.mExistsInBoth = true;
-      mExistsInBoth = true;
-      boolean consistent = true;
-      
-      if (mIsFinal != mInfo.mIsFinal) {
-          consistent = false;
-          Errors.error(Errors.CHANGED_FINAL, mInfo.position(),
-                  "Constructor " + mInfo.qualifiedName() + " has changed 'final' qualifier");
-      }
-      
-      if (mIsStatic != mInfo.mIsStatic) {
-          consistent = false;
-          Errors.error(Errors.CHANGED_FINAL, mInfo.position(),
-                  "Constructor " + mInfo.qualifiedName() + " has changed 'static' qualifier");
-      }
-     
-      if (!mScope.equals(mInfo.mScope)) {
-          consistent = false;
-          Errors.error(Errors.CHANGED_SCOPE, mInfo.position(),
-                  "Constructor " + mInfo.qualifiedName() + " changed scope from "
-                  + mScope + " to " + mInfo.mScope);
-      }
-      
-      if (!mDeprecated.equals(mInfo.mDeprecated)) {
-          consistent = false;
-          Errors.error(Errors.CHANGED_DEPRECATED, mInfo.position(),
-                  "Constructor " + mInfo.qualifiedName() + " has changed deprecation state");
-      }
-      
-      for (String exec : mExceptions) {
-          if (!mInfo.mExceptions.contains(exec)) {
-              Errors.error(Errors.CHANGED_THROWS, mInfo.position(),
-                      "Constructor " + mInfo.qualifiedName() + " no longer throws exception "
-                      + exec);
-              consistent = false;
-          }
-      }
-      
-      for (String exec : mInfo.mExceptions) {
-          if (!mExceptions.contains(exec)) {
-              Errors.error(Errors.CHANGED_THROWS, mInfo.position(),
-                      "Constructor " + mInfo.qualifiedName() + " added thrown exception "
-                      + exec);
-            consistent = false;
-          }
-      }
-      
-      return consistent;
-  }
-    
-
-}
diff --git a/tools/apicheck/src/com/android/apicheck/Errors.java b/tools/apicheck/src/com/android/apicheck/Errors.java
deleted file mode 100644
index b0b620e..0000000
--- a/tools/apicheck/src/com/android/apicheck/Errors.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-import java.lang.Comparable;
-import java.util.TreeSet;
-
-public class Errors
-{
-    public static boolean hadError = false;
-    private static boolean warningsAreErrors = false;
-    private static TreeSet<Message> allErrors = new TreeSet<Message>();
-
-    private static class Message implements Comparable {
-        SourcePositionInfo pos;
-        String msg;
-
-        Message(SourcePositionInfo p, String m) {
-            pos = p;
-            msg = m;
-        }
-
-        public int compareTo(Object o) {
-            Message that = (Message)o;
-            int r = this.pos.compareTo(that.pos);
-            if (r != 0) return r;
-            return this.msg.compareTo(that.msg);
-        }
-
-        @Override
-        public String toString() {
-            return this.pos.toString() + this.msg;
-        }
-    }
-
-    public static void error(Error error, SourcePositionInfo where, String text) {
-        if (error.level == HIDDEN) {
-            return;
-        }
-
-        String which = (!warningsAreErrors && error.level == WARNING) ? " warning " : " error ";
-        String message = which + error.code + ": " + text;
-
-        if (where == null) {
-            where = new SourcePositionInfo("unknown", 0, 0);
-        }
-
-        allErrors.add(new Message(where, message));
-
-        if (error.level == ERROR || (warningsAreErrors && error.level == WARNING)) {
-            hadError = true;
-        }
-    }
-
-    public static void printErrors() {
-        for (Message m: allErrors) {
-            System.err.println(m.toString());
-        }
-    }
-
-    public static int HIDDEN = 0;
-    public static int WARNING = 1;
-    public static int ERROR = 2;
-
-    public static void setWarningsAreErrors(boolean val) {
-        warningsAreErrors = val;
-    }
-
-    public static class Error {
-        public int code;
-        public int level;
-
-        public Error(int code, int level)
-        {
-            this.code = code;
-            this.level = level;
-        }
-    }
-
-    public static Error PARSE_ERROR = new Error(1, ERROR);
-    public static Error ADDED_PACKAGE = new Error(2, WARNING);
-    public static Error ADDED_CLASS = new Error(3, WARNING);
-    public static Error ADDED_METHOD = new Error(4, WARNING);
-    public static Error ADDED_FIELD = new Error(5, WARNING);
-    public static Error ADDED_INTERFACE = new Error(6, WARNING);
-    public static Error REMOVED_PACKAGE = new Error(7, WARNING);
-    public static Error REMOVED_CLASS = new Error(8, WARNING);
-    public static Error REMOVED_METHOD = new Error(9, WARNING);
-    public static Error REMOVED_FIELD = new Error(10, WARNING);
-    public static Error REMOVED_INTERFACE = new Error(11, WARNING);
-    public static Error CHANGED_STATIC = new Error(12, WARNING);
-    public static Error CHANGED_FINAL = new Error(13, WARNING);
-    public static Error CHANGED_TRANSIENT = new Error(14, WARNING);
-    public static Error CHANGED_VOLATILE = new Error(15, WARNING);
-    public static Error CHANGED_TYPE = new Error(16, WARNING);
-    public static Error CHANGED_VALUE = new Error(17, WARNING);
-    public static Error CHANGED_SUPERCLASS = new Error(18, WARNING);
-    public static Error CHANGED_SCOPE = new Error(19, WARNING);
-    public static Error CHANGED_ABSTRACT = new Error(20, WARNING);
-    public static Error CHANGED_THROWS = new Error(21, WARNING);
-    public static Error CHANGED_NATIVE = new Error(22, HIDDEN);
-    public static Error CHANGED_CLASS = new Error(23, WARNING);
-    public static Error CHANGED_DEPRECATED = new Error(24, WARNING);
-    public static Error CHANGED_SYNCHRONIZED = new Error(25, ERROR);
-
-    public static Error[] ERRORS = {
-        PARSE_ERROR,
-        ADDED_PACKAGE,
-        ADDED_CLASS,
-        ADDED_METHOD,
-        ADDED_FIELD,
-        ADDED_INTERFACE,
-        REMOVED_PACKAGE,
-        REMOVED_CLASS,
-        REMOVED_METHOD,
-        REMOVED_FIELD,
-        REMOVED_INTERFACE,
-        CHANGED_STATIC,
-        CHANGED_FINAL,
-        CHANGED_TRANSIENT,
-        CHANGED_VOLATILE,
-        CHANGED_TYPE,
-        CHANGED_VALUE,
-        CHANGED_SUPERCLASS,
-        CHANGED_SCOPE,
-        CHANGED_ABSTRACT,
-        CHANGED_THROWS,
-        CHANGED_NATIVE,
-        CHANGED_CLASS,
-        CHANGED_DEPRECATED,
-        CHANGED_SYNCHRONIZED,
-        };
-
-    public static boolean setErrorLevel(int code, int level) {
-        for (Error e: ERRORS) {
-            if (e.code == code) {
-                e.level = level;
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/FieldInfo.java b/tools/apicheck/src/com/android/apicheck/FieldInfo.java
deleted file mode 100644
index d80d9f6..0000000
--- a/tools/apicheck/src/com/android/apicheck/FieldInfo.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-public class FieldInfo {
-  
-    private String mName;
-    private String mType;
-    private boolean mIsTransient;
-    private boolean mIsVolatile;
-    private String mValue;
-    private boolean mIsStatic;
-    private boolean mIsFinal;
-    private String mDeprecated;
-    private String mScope;
-    private boolean mExistsInBoth;
-    private SourcePositionInfo mSourcePosition;
-    private ClassInfo mClass;
-    
-    public FieldInfo (String name, String type, boolean isTransient, boolean isVolatile,
-                       String value, boolean isStatic, boolean isFinal, String deprecated,
-                       String scope, SourcePositionInfo source, ClassInfo parent) {
-        mName = name;
-        mType = type;
-        mIsTransient = isTransient;
-        mIsVolatile = isVolatile;
-        mValue = value;
-        mIsStatic = isStatic;
-        mIsFinal = isFinal;
-        mDeprecated = deprecated;
-        mScope = scope;
-        mExistsInBoth = false;
-        mSourcePosition = source;
-        mClass = parent;
-    }
-    
-    public boolean isInBoth() {
-        return mExistsInBoth;
-    }
-    public SourcePositionInfo position() {
-        return mSourcePosition;
-    }
-    
-    public String name() {
-        return mName;
-    }
-    
-    public String qualifiedName() {
-        String parentQName = (mClass != null)
-                ? (mClass.qualifiedName() + ".")
-                : "";
-        return parentQName + name();
-    }
-    
-    // Check the declared value with a typed comparison, not a string comparison,
-    // to accommodate toolchains with different fp -> string conversions.
-    public boolean valueEquals(FieldInfo other) {
-        // Type mismatch means nonequal, as does a null/non-null mismatch
-        if (!mType.equals(other.mType)
-                || ((mValue == null) != (other.mValue == null))) {
-            return false;
-        }
-
-        // Null values are considered equal
-        if (mValue == null) {
-            return true;
-        }
-
-        // Floating point gets an implementation-type comparison; all others just use the string
-        // If float/double parse fails, fall back to string comparison -- it means that it's a
-        // canonical droiddoc-generated constant expression that represents a NaN.
-        try {
-            if (mType.equals("float")) {
-                float val = Float.parseFloat(mValue);
-                float otherVal = Float.parseFloat(other.mValue);
-                return (val == otherVal);
-            } else if (mType.equals("double")) {
-                double val = Double.parseDouble(mValue);
-                double otherVal = Double.parseDouble(other.mValue);
-                return (val == otherVal);
-            }
-        } catch (NumberFormatException e) {
-            // fall through
-        }
-        
-        return mValue.equals(other.mValue);
-    }
-
-    public boolean isConsistent(FieldInfo fInfo) {
-      fInfo.mExistsInBoth = true;
-      mExistsInBoth = true;
-      boolean consistent = true;
-      if (!mType.equals(fInfo.mType)) {
-          Errors.error(Errors.CHANGED_TYPE, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed type");
-          consistent = false;
-      }
-
-      if (!this.valueEquals(fInfo)) {
-          Errors.error(Errors.CHANGED_VALUE, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed value from "
-                  + mValue + " to " + fInfo.mValue);
-          consistent = false;
-      }
-      
-      if (!mScope.equals(fInfo.mScope)) {
-          Errors.error(Errors.CHANGED_SCOPE, fInfo.position(),
-                  "Method " + fInfo.qualifiedName() + " changed scope from "
-                  + mScope + " to " + fInfo.mScope);
-          consistent = false;
-      }
-      
-      if (mIsStatic != fInfo.mIsStatic) {
-          Errors.error(Errors.CHANGED_STATIC, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed 'static' qualifier");
-          consistent = false;
-      }
-      
-      if (mIsFinal != fInfo.mIsFinal) {
-          Errors.error(Errors.CHANGED_FINAL, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed 'final' qualifier");
-          consistent = false;
-      }
-      
-      if (mIsTransient != fInfo.mIsTransient) {
-          Errors.error(Errors.CHANGED_TRANSIENT, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed 'transient' qualifier");
-          consistent = false;
-      }
-      
-      if (mIsVolatile != fInfo.mIsVolatile) {
-          Errors.error(Errors.CHANGED_VOLATILE, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed 'volatile' qualifier");
-          consistent = false;
-      }
-      
-      if (!mDeprecated.equals(fInfo.mDeprecated)) {
-          Errors.error(Errors.CHANGED_DEPRECATED, fInfo.position(),
-                  "Field " + fInfo.qualifiedName() + " has changed deprecation state");
-          consistent = false;
-      }
-      
-      return consistent;
-    }
-
-}
diff --git a/tools/apicheck/src/com/android/apicheck/MethodInfo.java b/tools/apicheck/src/com/android/apicheck/MethodInfo.java
deleted file mode 100644
index e4e4537..0000000
--- a/tools/apicheck/src/com/android/apicheck/MethodInfo.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-import java.util.*;
-
-public class MethodInfo implements AbstractMethodInfo {
-  
-    private String mName;
-    private String mReturn;
-    private boolean mIsAbstract;
-    private boolean mIsNative;
-    private boolean mIsSynchronized;
-    private boolean mIsStatic;
-    private boolean mIsFinal;
-    private String mDeprecated;
-    private String mScope;
-    private boolean mExistsInBoth;
-    private List<ParameterInfo> mParameters;
-    private List<String> mExceptions;
-    private SourcePositionInfo mSourcePosition;
-    private ClassInfo mClass;
-    
-    public MethodInfo (String name, String returnType, boolean isAbstract, boolean isNative,
-                        boolean isSynchronized, boolean isStatic, boolean isFinal, String deprecated
-                        , String scope, SourcePositionInfo source, ClassInfo parent) {
-        
-        mName = name;
-        mReturn = returnType;
-        mIsAbstract = isAbstract;
-        mIsNative = isNative;
-        mIsSynchronized = isSynchronized;
-        mIsStatic = isStatic;
-        mIsFinal = isFinal;
-        mDeprecated = deprecated;
-        mScope = scope;
-        mParameters = new ArrayList<ParameterInfo>();
-        mExceptions = new ArrayList<String>();
-        mExistsInBoth = false;
-        mSourcePosition = source;
-        mClass = parent;
-    }
-    
-    
-    public String name() {
-        return mName;
-    }
-    
-    public String qualifiedName() {
-        String parentQName = (mClass != null)
-                ? (mClass.qualifiedName() + ".")
-                : "";
-        return parentQName + name();
-    }
-    
-    public String prettySignature() {
-        String params = "";
-        for (ParameterInfo pInfo : mParameters) {
-            if (params.length() > 0) {
-                params += ", ";
-            }
-            params += pInfo.getType();
-        }
-        return qualifiedName() + '(' + params + ')';
-    }
-    
-    public SourcePositionInfo position() {
-        return mSourcePosition;
-    }
-    
-    public ClassInfo containingClass() {
-        return mClass;
-    }
-
-    public boolean matches(MethodInfo other) {
-        return getSignature().equals(other.getSignature());
-    }
-    
-    public boolean isConsistent(MethodInfo mInfo) {
-        mInfo.mExistsInBoth = true;
-        mExistsInBoth = true;
-        boolean consistent = true;
-        if (!mReturn.equals(mInfo.mReturn)) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_TYPE, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed return type from "
-                    + mReturn + " to " + mInfo.mReturn);
-        }
-        
-        if (mIsAbstract != mInfo.mIsAbstract) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_ABSTRACT, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed 'abstract' qualifier");
-        }
-        
-        if (mIsNative != mInfo.mIsNative) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_NATIVE, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed 'native' qualifier");
-        }
-        
-        if (mIsFinal != mInfo.mIsFinal) {
-            // Compiler-generated methods vary in their 'final' qual between versions of
-            // the compiler, so this check needs to be quite narrow.  A change in 'final'
-            // status of a method is only relevant if (a) the method is not declared 'static'
-            // and (b) the method's class is not itself 'final'.
-            if (!mIsStatic) {
-                if ((mClass == null) || (!mClass.isFinal())) {
-                    consistent = false;
-                    Errors.error(Errors.CHANGED_FINAL, mInfo.position(),
-                            "Method " + mInfo.qualifiedName() + " has changed 'final' qualifier");
-                }
-            }
-        }
-        
-        if (mIsStatic != mInfo.mIsStatic) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_STATIC, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed 'static' qualifier");
-        }
-       
-        if (!mScope.equals(mInfo.mScope)) {
-            consistent = false;
-            Errors.error(Errors.CHANGED_SCOPE, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " changed scope from "
-                    + mScope + " to " + mInfo.mScope);
-        }
-        
-        if (!mDeprecated.equals(mInfo.mDeprecated)) {
-            Errors.error(Errors.CHANGED_DEPRECATED, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed deprecation state");
-            consistent = false;
-        }
-        
-        if (mIsSynchronized != mInfo.mIsSynchronized) {
-            Errors.error(Errors.CHANGED_SYNCHRONIZED, mInfo.position(),
-                    "Method " + mInfo.qualifiedName() + " has changed 'synchronized' qualifier from " + mIsSynchronized + " to " + mInfo.mIsSynchronized);
-            consistent = false;
-        }
-        
-        for (String exec : mExceptions) {
-            if (!mInfo.mExceptions.contains(exec)) {
-                // exclude 'throws' changes to finalize() overrides with no arguments
-                if (!name().equals("finalize") || (mParameters.size() > 0)) {
-                    Errors.error(Errors.CHANGED_THROWS, mInfo.position(),
-                            "Method " + mInfo.qualifiedName() + " no longer throws exception "
-                            + exec);
-                    consistent = false;
-                }
-            }
-        }
-        
-        for (String exec : mInfo.mExceptions) {
-            // exclude 'throws' changes to finalize() overrides with no arguments
-            if (!mExceptions.contains(exec)) {
-                if (!name().equals("finalize") || (mParameters.size() > 0)) {
-                    Errors.error(Errors.CHANGED_THROWS, mInfo.position(),
-                            "Method " + mInfo.qualifiedName() + " added thrown exception "
-                            + exec);
-                    consistent = false;
-                }
-            }
-        }
-        
-        return consistent;
-    }
-    
-    public void addParameter(ParameterInfo pInfo) {
-        mParameters.add(pInfo);
-    }
-    
-    public void addException(String exc) {
-        mExceptions.add(exc);
-    }
-    
-    public String getParameterHash() {
-        String hash = "";
-        for (ParameterInfo pInfo : mParameters) {
-            hash += ":" + pInfo.getType();
-        }
-        return hash;
-    }
-    
-    public String getHashableName() {
-        return name() + getParameterHash();
-    }
-    
-    public String getSignature() {
-        return name() + getParameterHash();
-    }
-    
-    public boolean isInBoth() {
-        return mExistsInBoth;
-    }
-
-}
diff --git a/tools/apicheck/src/com/android/apicheck/PackageInfo.java b/tools/apicheck/src/com/android/apicheck/PackageInfo.java
deleted file mode 100644
index 2262f21..0000000
--- a/tools/apicheck/src/com/android/apicheck/PackageInfo.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-import java.util.*;
-
-public class PackageInfo {
-    private String mName;
-    private HashMap<String, ClassInfo> mClasses;
-    private boolean mExistsInBoth;
-    private SourcePositionInfo mPosition;
-    
-    public PackageInfo(String name, SourcePositionInfo position) {
-        mName = name;
-        mClasses = new HashMap<String, ClassInfo>();
-        mExistsInBoth = false;
-        mPosition = position;
-    }
-    
-    public void addClass(ClassInfo cl) {
-        mClasses.put(cl.name() , cl);
-    }
-    
-    public HashMap<String, ClassInfo> allClasses() {
-        return mClasses;
-    }
-    
-    public String name() {
-        return mName;
-    }
-    
-    public SourcePositionInfo position() {
-        return mPosition;
-    }
-    
-    public boolean isConsistent(PackageInfo pInfo) {
-        mExistsInBoth = true;
-        pInfo.mExistsInBoth = true;
-        boolean consistent = true;
-        for (ClassInfo cInfo : mClasses.values()) {
-            if (pInfo.mClasses.containsKey(cInfo.name())) {
-                if (!cInfo.isConsistent(pInfo.mClasses.get(cInfo.name()))) {
-                    consistent = false;
-                }
-            } else {
-                Errors.error(Errors.REMOVED_CLASS, cInfo.position(),
-                        "Removed public class " + cInfo.qualifiedName());
-                consistent = false;
-            }
-        }
-        for (ClassInfo cInfo : pInfo.mClasses.values()) {
-            if (!cInfo.isInBoth()) {
-                Errors.error(Errors.ADDED_CLASS, cInfo.position(),
-                        "Added class " + cInfo.name() + " to package "
-                        + pInfo.name());
-                consistent = false;
-            }
-        }
-        return consistent;
-    }
-    
-    public boolean isInBoth() {
-        return mExistsInBoth;
-    }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/ParameterInfo.java b/tools/apicheck/src/com/android/apicheck/ParameterInfo.java
deleted file mode 100644
index 5788814..0000000
--- a/tools/apicheck/src/com/android/apicheck/ParameterInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-public class ParameterInfo {
-    private String mType;
-    private String mName;
-    
-    public ParameterInfo(String type, String name) {
-        mType = type;
-        mName = name;
-    }
-    
-    public String getType() {
-        return mType;
-    }
-    
-    public String getName() {
-        return mName;
-    }
-}
diff --git a/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java b/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java
deleted file mode 100644
index 276771b..0000000
--- a/tools/apicheck/src/com/android/apicheck/SourcePositionInfo.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package com.android.apicheck;
-
-import java.lang.Comparable;
-
-public class SourcePositionInfo implements Comparable
-{
-    public SourcePositionInfo() {
-        this.file = "<unknown>";
-        this.line = 0;
-        this.column = 0;
-    }
-
-    public SourcePositionInfo(String file, int line, int column)
-    {
-        this.file = file;
-        this.line = line;
-        this.column = column;
-    }
-
-    public SourcePositionInfo(SourcePositionInfo that)
-    {
-        this.file = that.file;
-        this.line = that.line;
-        this.column = that.column;
-    }
-
-    /**
-     * Given this position and str which occurs at that position, as well as str an index into str,
-     * find the SourcePositionInfo.
-     *
-     * @throw StringIndexOutOfBoundsException if index &gt; str.length()
-     */
-    public static SourcePositionInfo add(SourcePositionInfo that, String str, int index)
-    {
-        if (that == null) {
-            return null;
-        }
-        int line = that.line;
-        char prev = 0;
-        for (int i=0; i<index; i++) {
-            char c = str.charAt(i);
-            if (c == '\r' || (c == '\n' && prev != '\r')) {
-                line++;
-            }
-            prev = c;
-        }
-        return new SourcePositionInfo(that.file, line, 0);
-    }
-
-    public static SourcePositionInfo findBeginning(SourcePositionInfo that, String str)
-    {
-        if (that == null) {
-            return null;
-        }
-        int line = that.line-1; // -1 because, well, it seems to work
-        int prev = 0;
-        for (int i=str.length()-1; i>=0; i--) {
-            char c = str.charAt(i);
-            if ((c == '\r' && prev != '\n') || (c == '\n')) {
-                line--;
-            }
-            prev = c;
-        }
-        return new SourcePositionInfo(that.file, line, 0);
-    }
-
-    @Override
-    public String toString()
-    {
-        if (this.file == null) {
-            return "(unknown)";
-        } else {
-            if (this.line == 0) {
-                return this.file + ':';
-            } else {
-                return this.file + ':' + this.line + ':';
-            }
-        }
-    }
-
-    public int compareTo(Object o) {
-        SourcePositionInfo that = (SourcePositionInfo)o;
-        int r = this.file.compareTo(that.file);
-        if (r != 0) return r;
-        return this.line - that.line;
-    }
-
-    /**
-     * Build a SourcePositionInfo from the XML source= notation
-     */
-    public static SourcePositionInfo fromXml(String source) {
-        if (source != null) {
-            for (int i = 0; i < source.length(); i++) {
-                if (source.charAt(i) == ':') {
-                    return new SourcePositionInfo(source.substring(0, i),
-                            Integer.parseInt(source.substring(i+1)), 0);
-                }
-            }
-        }
-
-        return new SourcePositionInfo("(unknown)", 0, 0);
-    }
-
-    public String file;
-    public int line;
-    public int column;
-}
diff --git a/tools/apriori/apriori.c b/tools/apriori/apriori.c
index d1807b3..b827375 100644
--- a/tools/apriori/apriori.c
+++ b/tools/apriori/apriori.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <common.h>
 #include <debug.h>
 #include <libelf.h>
@@ -54,6 +55,154 @@
 
 static source_t *sources = NULL;
 
+/* Retouch data is a very concise representation of the resolved relocations.
+   This data is used to randomize the location of prelinked libraries at
+   update time, on the device.
+ */
+
+// We will store retouch entries into this buffer, then dump them at the
+// end of the .so file before setup_prelink_info().
+#define RETOUCH_MAX_SIZE 600000
+static char *retouch_buf;
+static unsigned int retouch_byte_cnt;
+// Compression state.
+static int32_t offs_prev;
+static uint32_t cont_prev;
+
+#define false 0
+#define true 1
+
+void retouch_init(void) {
+    offs_prev = 0;
+    cont_prev = 0;
+    retouch_byte_cnt = 0;
+    retouch_buf = malloc(RETOUCH_MAX_SIZE+12);
+    FAILIF(retouch_buf == NULL,
+           "Could not allocate %d bytes.\n", RETOUCH_MAX_SIZE+12);
+}
+
+//
+// We use three encoding schemes; this takes care of much of the redundancy
+// inherent in lists of relocations:
+//
+//   * two bytes, leading 1, 2b for d_offset ("s"), 13b for d_contents ("c")
+//
+//     76543210 76543210
+//     1ssccccc cccccccc
+//
+//   * three bytes, leading 01, 2b for delta offset, 20b for delta contents
+//
+//     76543210 76543210 76543210
+//     01sscccc cccccccc cccccccc
+//
+//   * eigth bytes, leading 00, 30b for offset, 32b for contents
+//
+//     76543210 76543210 76543210 76543210
+//     00ssssss ssssssss ssssssss ssssssss + 4 bytes contents
+//
+// NOTE 1: All deltas are w.r.t. the previous line in the list.
+// NOTE 2: Two-bit ("ss") offsets mean: "00"=4, "01"=8, "10"=12, and "11"=16.
+// NOTE 3: Delta contents are signed. To map back to a int32 we refill with 1s.
+// NOTE 4: Special encoding for -1 offset. Extended back to 32b when decoded.
+//
+
+void retouch_encode(int32_t offset, uint32_t contents) {
+    int64_t d_offs = offset-offs_prev;
+    int64_t d_cont = (int64_t)contents-(int64_t)cont_prev;
+
+    uint8_t output[8];
+    uint32_t output_size;
+
+    if ((d_offs > 3) &&
+        (d_offs % 4) == 0 &&
+        (d_offs / 4) < 5 &&
+        (d_cont < 4000) &&
+        (d_cont > -4000)) {
+        // we can fit in 2 bytes
+        output[0] =
+          0x80 |
+          (((d_offs/4)-1) << 5) |
+          (((uint64_t)d_cont & 0x1f00) >> 8);
+        output[1] =
+          ((uint64_t)d_cont & 0xff);
+        output_size = 2;
+    } else if ((d_offs > 3) &&
+               (d_offs % 4) == 0 &&
+               (d_offs / 4) < 5 &&
+               (d_cont < 510000) &&
+               (d_cont > -510000)) {
+        // fit in 3 bytes
+        output[0] =
+          0x40 |
+          (((d_offs/4)-1) << 4) |
+          (((uint64_t)d_cont & 0xf0000) >> 16);
+        output[1] =
+          ((uint64_t)d_cont & 0xff00) >> 8;
+        output[2] =
+          ((uint64_t)d_cont & 0xff);
+        output_size = 3;
+    } else {
+        // fit in 8 bytes; we can't support files bigger than (1GB-1)
+        // with this encoding: no library is that big anyway..
+        FAILIF(offset < -1 || offset > 0x3ffffffe, "Offset out of range.\n");
+        output[0] = (offset & 0x3f000000) >> 24;
+        output[1] = (offset & 0xff0000) >> 16;
+        output[2] = (offset & 0xff00) >> 8;
+        output[3] = (offset & 0xff);
+        output[4] = (contents & 0xff000000) >> 24;
+        output[5] = (contents & 0xff0000) >> 16;
+        output[6] = (contents & 0xff00) >> 8;
+        output[7] = (contents & 0xff);
+        output_size = 8;
+    }
+
+    // If this happens, the retouch buffer size can be bumped up.
+    // Currently, the largest case is libwebcore, at about 250K.
+    FAILIF((retouch_byte_cnt+output_size) > RETOUCH_MAX_SIZE,
+           "About to overflow retouch buffer.\n");
+
+    memcpy(retouch_buf+retouch_byte_cnt, output, output_size);
+    retouch_byte_cnt += output_size;
+
+    offs_prev = offset;
+    cont_prev = contents;
+}
+
+void retouch_dump(const char *fname, int elf_little,
+                  unsigned int retouch_byte_cnt, char *retouch_buf) {
+    int fd = open(fname, O_WRONLY);
+    FAILIF(fd < 0,
+           "open(%s, O_WRONLY): %s (%d)\n" ,
+           fname, strerror(errno), errno);
+    off_t sz = lseek(fd, 0, SEEK_END);
+    FAILIF(sz == (off_t)-1,
+           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
+           fd, strerror(errno), errno);
+
+    // The retouch blob ends with "RETOUCH XXXX", where XXXX is the 4-byte
+    // size of the retouch blob, in target endianness.
+    strncpy(retouch_buf+retouch_byte_cnt, "RETOUCH ", 8);
+    if (elf_little ^ is_host_little()) {
+        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
+          switch_endianness(retouch_byte_cnt);
+    } else {
+        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
+          retouch_byte_cnt;
+    }
+
+    int num_written = write(fd, retouch_buf, retouch_byte_cnt+12);
+    FAILIF(num_written < 0,
+           "write(%d, &info, sizeof(info)): %s (%d)\n",
+           fd, strerror(errno), errno);
+    FAILIF((retouch_byte_cnt+12) != num_written,
+           "Could not write %d bytes as expected (wrote %d bytes instead)!\n",
+           retouch_byte_cnt, num_written);
+    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
+}
+
+/* End of retouch code.
+ */
+
 #if defined(DEBUG) && 0
 
 static void print_shdr(source_t *source, Elf_Scn *scn)
@@ -325,6 +474,9 @@
                    basename(source->name));
         }
 
+        /* Save some of the info; needed for retouching (ASLR). */
+        retouch_init();
+
         source->newelf_fd = open(source->output,
                                  O_RDWR | O_CREAT,
                                  0666);
@@ -615,15 +767,15 @@
            strerror(errno),
            errno);
 
-	FAILIF(fstat(source->elf_fd, &source->elf_file_info) < 0,
-		   "fstat(%s(fd %d)): %s (%d)\n",
-		   source->name,
-		   source->elf_fd,
-		   strerror(errno),
-		   errno);
-	INFO("File [%s]'s size is %lld bytes!\n",
-		 source->name,
-		 source->elf_file_info.st_size);
+    FAILIF(fstat(source->elf_fd, &source->elf_file_info) < 0,
+           "fstat(%s(fd %d)): %s (%d)\n",
+           source->name,
+           source->elf_fd,
+           strerror(errno),
+           errno);
+    INFO("File [%s]'s size is %lld bytes!\n",
+         source->name,
+         source->elf_file_info.st_size);
 
     INFO("Calling elf_begin(%s)...\n", full_path);
 
@@ -775,6 +927,11 @@
                function setup_prelink_info() below. */
             INFO("%s: setting up prelink tag at end of file.\n",
                  source->output ? source->output : source->name);
+            retouch_encode(-1, source->base);
+            retouch_dump(source->output ? source->output : source->name,
+                         source->elf_hdr.e_ident[EI_DATA] == ELFDATA2LSB,
+                         retouch_byte_cnt,
+                         retouch_buf);
             setup_prelink_info(source->output ? source->output : source->name,
                                source->elf_hdr.e_ident[EI_DATA] == ELFDATA2LSB,
                                source->base);
@@ -785,6 +942,7 @@
 #endif/*SUPPORT_ANDROID_PRELINK_TAGS*/
 
     do_destroy_source(source);
+    if (retouch_buf != NULL) { free(retouch_buf); retouch_buf = NULL; }
 
     if (source->shstrtab_data != NULL)
         FREEIF(source->shstrtab_data->d_buf); /* adjust_elf */
@@ -1226,8 +1384,11 @@
                        rel->r_offset,
                        found_sym->st_value,
                        sym_source->base);
-                  if (!dry_run)
+                  if (!dry_run) {
+                    PRINT("WARNING: Relocation type not supported "
+                          "for retouching!");
                     *dest = found_sym->st_value + sym_source->base;
+                  }
                 }
               num_relocations++;
               break;
@@ -1240,8 +1401,15 @@
                    sname,
                    symname ?: "(symbol has no name)",
                    rel->r_offset, *dest, source->base);
-              if (!dry_run)
+              if (!dry_run) {
                 *dest += source->base;
+
+                /* Output an entry for the ASLR touch-up process. */
+                retouch_encode(rel->r_offset
+                               -shdr_mem.sh_addr
+                               +shdr_mem.sh_offset,
+                               *dest);
+              }
               num_relocations++;
               break;
             case R_ARM_COPY:
@@ -1352,15 +1520,21 @@
                             ASSERT(data->d_buf != NULL);
                             ASSERT(data->d_size >= rel->r_offset -
                                    shdr_mem.sh_addr);
-                            if (!dry_run)
-                              memcpy(dest, src, found_sym->st_size);
+                            if (!dry_run) {
+                                PRINT("WARNING: Relocation type not supported "
+                                      "for retouching!");
+                                memcpy(dest, src, found_sym->st_size);
+                            }
                           }
                         else {
                           ASSERT(src == NULL);
                           ASSERT(elf_ndxscn(src_scn) ==
                                  elf_ndxscn(sym_source->bss.scn));
-                          if (!dry_run)
-                            memset(dest, 0, found_sym->st_size);
+                          if (!dry_run) {
+                              PRINT("WARNING: Relocation type not supported "
+                                    "for retouching!");
+                              memset(dest, 0, found_sym->st_size);
+                          }
                         }
                       }
                     }
diff --git a/tools/apriori/source.h b/tools/apriori/source.h
index a5d96bd..5381a29 100644
--- a/tools/apriori/source.h
+++ b/tools/apriori/source.h
@@ -62,7 +62,8 @@
     Elf_Data *shstrtab_data;
     int elf_fd;
     int newelf_fd; /* fd of output file, -1 if output == NULL */
-	struct stat elf_file_info;
+    int newelf_relo_fd; /* fd of relocaion output file */
+    struct stat elf_file_info;
     GElf_Ehdr elf_hdr, oldelf_hdr;
     size_t shstrndx;
     int shnum; /* number of sections */
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index 6c85149..e3fe99c 100755
--- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh
@@ -25,8 +25,12 @@
   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"
+if [ -n "$PRODUCT_DEFAULT_LANGUAGE" ] ; then
+  echo "ro.product.locale.language=$PRODUCT_DEFAULT_LANGUAGE"
+fi
+if [ -n "$PRODUCT_DEFAULT_REGION" ] ; then
+  echo "ro.product.locale.region=$PRODUCT_DEFAULT_REGION"
+fi
 echo "ro.wifi.channels=$PRODUCT_DEFAULT_WIFI_CHANNELS"
 echo "ro.board.platform=$TARGET_BOARD_PLATFORM"
 
@@ -36,5 +40,6 @@
 echo "# Do not try to parse ro.build.description or .fingerprint"
 echo "ro.build.description=$PRIVATE_BUILD_DESC"
 echo "ro.build.fingerprint=$BUILD_FINGERPRINT"
+echo "ro.build.characteristics=$TARGET_AAPT_CHARACTERISTICS"
 
 echo "# end build properties"
diff --git a/tools/droiddoc/Android.mk b/tools/droiddoc/Android.mk
index d2d7a95..ff08edc 100644
--- a/tools/droiddoc/Android.mk
+++ b/tools/droiddoc/Android.mk
@@ -14,5 +14,4 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(LOCAL_PATH)/src/Android.mk
-
+# Droiddoc is now Doclava -- See external/doclava.
diff --git a/tools/droiddoc/NOTICE b/tools/droiddoc/NOTICE
deleted file mode 100644
index 3f1b1bb..0000000
--- a/tools/droiddoc/NOTICE
+++ /dev/null
@@ -1,45 +0,0 @@
-
-Copyright (C) 2008 The Android Open Source Project
-
-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
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-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.
-
-
-======================================================================
-
-jQuery 1.2.6 - New Wave Javascript
-
-Copyright (c) 2008 John Resig (jquery.com)
-Dual licensed under the MIT (MIT-LICENSE.txt)
-and GPL (GPL-LICENSE.txt) licenses.
-
-Copyright (c) 2009 John Resig, http://jquery.com/
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/tools/droiddoc/src/Android.mk b/tools/droiddoc/src/Android.mk
deleted file mode 100644
index 30270b5..0000000
--- a/tools/droiddoc/src/Android.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright (C) 2008 The Android Open Source Project
-#
-# 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
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-    AnnotationInstanceInfo.java \
-    AnnotationValueInfo.java \
-	AttributeInfo.java \
-	AttrTagInfo.java \
-	ClassInfo.java \
-	DroidDoc.java \
-	ClearPage.java \
-	Comment.java \
-	ContainerInfo.java \
-	Converter.java \
-	DocFile.java \
-	DocInfo.java \
-	Errors.java \
-	FieldInfo.java \
-	Hierarchy.java \
-	InheritedTags.java \
-	KeywordEntry.java \
-    LinkReference.java \
-	LiteralTagInfo.java \
-	MemberInfo.java \
-	MethodInfo.java \
-	NavTree.java \
-	PackageInfo.java \
-	ParamTagInfo.java \
-	ParameterInfo.java \
-	ParsedTagInfo.java \
-	Proofread.java \
-	SampleCode.java \
-	SampleTagInfo.java \
-    Scoped.java \
-	SeeTagInfo.java \
-	SinceTagger.java \
-	Sorter.java \
-	SourcePositionInfo.java \
-    Stubs.java \
-	TagInfo.java \
-    TextTagInfo.java \
-	ThrowsTagInfo.java \
-	TodoFile.java \
-	TypeInfo.java
-
-LOCAL_JAVA_LIBRARIES := \
-	apicheck \
-	clearsilver
-
-LOCAL_CLASSPATH := \
-	$(HOST_JDK_TOOLS_JAR)
-
-LOCAL_MODULE:= droiddoc
-
-include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/tools/droiddoc/src/AnnotationInstanceInfo.java b/tools/droiddoc/src/AnnotationInstanceInfo.java
deleted file mode 100644
index c4abc7e..0000000
--- a/tools/droiddoc/src/AnnotationInstanceInfo.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-class AnnotationInstanceInfo
-{
-    private ClassInfo mType;
-    private AnnotationValueInfo[] mElementValues;
-
-    public AnnotationInstanceInfo(ClassInfo type, AnnotationValueInfo[] elementValues)
-    {
-        mType = type;
-        mElementValues = elementValues;
-    }
-
-    ClassInfo type()
-    {
-        return mType;
-    }
-
-    AnnotationValueInfo[] elementValues()
-    {
-        return mElementValues;
-    }
-
-    @Override
-    public String toString()
-    {
-        StringBuilder str = new StringBuilder();
-        str.append("@");
-        str.append(mType.qualifiedName());
-        str.append("(");
-        AnnotationValueInfo[] values = mElementValues;
-        final int N = values.length;
-        for (int i=0; i<N; i++) {
-            AnnotationValueInfo value = values[i];
-            str.append(value.element().name());
-            str.append("=");
-            str.append(value.valueString());
-            if (i != N-1) {
-                str.append(",");
-            }
-        }
-        str.append(")");
-        return str.toString();
-    }
-}
-
diff --git a/tools/droiddoc/src/AnnotationValueInfo.java b/tools/droiddoc/src/AnnotationValueInfo.java
deleted file mode 100644
index a2d869a..0000000
--- a/tools/droiddoc/src/AnnotationValueInfo.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public class AnnotationValueInfo
-{
-    private Object mValue;
-    private String mString;
-    private MethodInfo mElement;
-
-    public AnnotationValueInfo(MethodInfo element)
-    {
-        mElement = element;
-    }
-
-    public void init(Object value)
-    {
-        mValue = value;
-    }
-
-    public MethodInfo element()
-    {
-        return mElement;
-    }
-
-    public Object value()
-    {
-        return mValue;
-    }
-
-    public String valueString()
-    {
-        Object v = mValue;
-        if (v instanceof TypeInfo) {
-            return ((TypeInfo)v).fullName();
-        }
-        else if (v instanceof FieldInfo) {
-            StringBuilder str = new StringBuilder();
-            FieldInfo f = (FieldInfo)v;
-            str.append(f.containingClass().qualifiedName());
-            str.append('.');
-            str.append(f.name());
-            return str.toString();
-        }
-        else if (v instanceof AnnotationInstanceInfo) {
-            return v.toString();
-        }
-        else if (v instanceof AnnotationValueInfo[]) {
-            StringBuilder str = new StringBuilder();
-            AnnotationValueInfo[] array = (AnnotationValueInfo[])v;
-            final int N = array.length;
-            str.append("{");
-            for (int i=0; i<array.length; i++) {
-                str.append(array[i].valueString());
-                if (i != N-1) {
-                    str.append(",");
-                }
-            }
-            str.append("}");
-            return str.toString();
-        }
-        else {
-            return FieldInfo.constantLiteralValue(v);
-        }
-    }
-}
-
diff --git a/tools/droiddoc/src/AttrTagInfo.java b/tools/droiddoc/src/AttrTagInfo.java
deleted file mode 100644
index 7f1b4d9..0000000
--- a/tools/droiddoc/src/AttrTagInfo.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-
-public class AttrTagInfo extends TagInfo
-{
-    private static final String REF_COMMAND = "ref";
-    private static final String NAME_COMMAND = "name";
-    private static final String DESCRIPTION_COMMAND = "description";
-    private static final Pattern TEXT = Pattern.compile("(\\S+)\\s*(.*)", Pattern.DOTALL);
-    private static final Pattern NAME_TEXT = Pattern.compile("(\\S+)(.*)",
-                                                Pattern.DOTALL);
-
-    private ContainerInfo mBase;
-    private String mCommand;
-
-    // if mCommand == "ref"
-    private FieldInfo mRefField;
-    private AttributeInfo mAttrInfo;
-
-    // if mCommand == "name"
-    private String mAttrName;
-
-    // if mCommand == "description"
-    private Comment mDescrComment;
-
-    AttrTagInfo(String name, String kind, String text, ContainerInfo base,
-            SourcePositionInfo position)
-    {
-        super(name, kind, text, position);
-        mBase = base;
-
-        parse(text, base, position);
-    }
-
-    void parse(String text, ContainerInfo base, SourcePositionInfo position) {
-        Matcher m;
-
-        m = TEXT.matcher(text);
-        if (!m.matches()) {
-            Errors.error(Errors.BAD_ATTR_TAG, position, "Bad @attr tag: " + text);
-            return;
-        }
-
-        String command = m.group(1);
-        String more = m.group(2);
-
-        if (REF_COMMAND.equals(command)) {
-            String ref = more.trim();
-            LinkReference linkRef = LinkReference.parse(ref, mBase, position, false);
-            if (!linkRef.good) {
-                Errors.error(Errors.BAD_ATTR_TAG, position, "Unresolved @attr ref: " + ref);
-                return;
-            }
-            if (!(linkRef.memberInfo instanceof FieldInfo)) {
-                Errors.error(Errors.BAD_ATTR_TAG, position, "@attr must be a field: " + ref);
-                return;
-            }
-            mCommand = command;
-            mRefField = (FieldInfo)linkRef.memberInfo;
-        }
-        else if (NAME_COMMAND.equals(command)) {
-            m = NAME_TEXT.matcher(more);
-            if (!m.matches() || m.group(2).trim().length() != 0) {
-                Errors.error(Errors.BAD_ATTR_TAG, position, "Bad @attr name tag: " + more);
-                return;
-            }
-            mCommand = command;
-            mAttrName = m.group(1);
-        }
-        else if (DESCRIPTION_COMMAND.equals(command)) {
-            mCommand = command;
-            mDescrComment = new Comment(more, base, position);
-        }
-        else {
-            Errors.error(Errors.BAD_ATTR_TAG, position, "Bad @attr command: " + command);
-        }
-    }
-
-    public FieldInfo reference() {
-        return REF_COMMAND.equals(mCommand) ? mRefField : null;
-    }
-
-    @Override
-    public String name() {
-        return NAME_COMMAND.equals(mCommand) ? mAttrName : null;
-    }
-
-    public Comment description() {
-        return DESCRIPTION_COMMAND.equals(mCommand) ? mDescrComment : null;
-    }
-
-    @Override
-    public void makeHDF(HDF data, String base)
-    {
-        super.makeHDF(data, base);
-    }
-
-    public void setAttribute(AttributeInfo info) {
-        mAttrInfo = info;
-    }
-
-    public static void makeReferenceHDF(HDF data, String base, AttrTagInfo[] tags)
-    {
-        int i=0;
-        for (AttrTagInfo t: tags) {
-            if (REF_COMMAND.equals(t.mCommand)) {
-                if (t.mAttrInfo == null) {
-                    String msg = "ERROR: unlinked attr: " + t.mRefField.name();
-                    if (false) {
-                        System.out.println(msg);
-                    } else {
-                        throw new RuntimeException(msg);
-                    }
-                } else {
-                    data.setValue(base + "." + i + ".name", t.mAttrInfo.name());
-                    data.setValue(base + "." + i + ".href", t.mAttrInfo.htmlPage());
-                    i++;
-                }
-            }
-        }
-    }
-
-}
diff --git a/tools/droiddoc/src/AttributeInfo.java b/tools/droiddoc/src/AttributeInfo.java
deleted file mode 100644
index a24106b..0000000
--- a/tools/droiddoc/src/AttributeInfo.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Comparator;
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-public class AttributeInfo {
-    public static final Comparator<AttributeInfo> comparator = new Comparator<AttributeInfo>() {
-        public int compare(AttributeInfo a, AttributeInfo b) {
-            return a.name().compareTo(b.name());
-        }
-    };
-    
-    public FieldInfo attrField;
-    public ArrayList<MethodInfo> methods = new ArrayList<MethodInfo>();
-    
-    private ClassInfo mClass;
-    private String mName;
-    private Comment mComment;
-
-    public AttributeInfo(ClassInfo cl, FieldInfo f) {
-        mClass = cl;
-        attrField = f;
-    }
-
-    public String name() {
-        if (mName == null) {
-            for (AttrTagInfo comment: attrField.comment().attrTags()) {
-                String n = comment.name();
-                if (n != null) {
-                    mName = n;
-                    return n;
-                }
-            }
-        }
-        return mName;
-    }
-
-    public Comment comment() {
-        if (mComment == null) {
-            for (AttrTagInfo attr: attrField.comment().attrTags()) {
-                Comment c = attr.description();
-                if (c != null) {
-                    mComment = c;
-                    return c;
-                }
-            }
-        }
-        if (mComment == null) {
-            return new Comment("", mClass, new SourcePositionInfo());
-        }
-        return mComment;
-    }
-    
-    public String anchor() {
-        return "attr_" + name();
-    }
-    public String htmlPage() {
-        return mClass.htmlPage() + "#" + anchor();
-    }
-
-    public void makeHDF(HDF data, String base) {
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".anchor", anchor());
-        data.setValue(base + ".href", htmlPage());
-        data.setValue(base + ".R.name", attrField.name());
-        data.setValue(base + ".R.href", attrField.htmlPage());
-        TagInfo.makeHDF(data, base + ".deprecated", attrField.comment().deprecatedTags());
-        TagInfo.makeHDF(data, base + ".shortDescr", comment().briefTags());
-        TagInfo.makeHDF(data, base + ".descr", comment().tags());
-
-        int i=0;
-        for (MethodInfo m: methods) {
-            String s = base + ".methods." + i;
-            data.setValue(s + ".href", m.htmlPage());
-            data.setValue(s + ".name", m.name() + m.prettySignature());
-        }
-    }
-
-    public boolean checkLevel() {
-        return attrField.checkLevel();
-    }
-}
-
diff --git a/tools/droiddoc/src/ClassInfo.java b/tools/droiddoc/src/ClassInfo.java
deleted file mode 100644
index f3f11de..0000000
--- a/tools/droiddoc/src/ClassInfo.java
+++ /dev/null
@@ -1,1464 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.*;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-
-public class ClassInfo extends DocInfo implements ContainerInfo, Comparable, Scoped
-{
-    public static final Comparator<ClassInfo> comparator = new Comparator<ClassInfo>() {
-        public int compare(ClassInfo a, ClassInfo b) {
-            return a.name().compareTo(b.name());
-        }
-    };
-
-    public static final Comparator<ClassInfo> qualifiedComparator = new Comparator<ClassInfo>() {
-        public int compare(ClassInfo a, ClassInfo b) {
-            return a.qualifiedName().compareTo(b.qualifiedName());
-        }
-    };
-
-    public ClassInfo(
-            ClassDoc cl,
-            String rawCommentText, SourcePositionInfo position,
-            boolean isPublic, boolean isProtected, boolean isPackagePrivate,
-            boolean isPrivate, boolean isStatic,
-            boolean isInterface, boolean isAbstract, boolean isOrdinaryClass,
-            boolean isException, boolean isError, boolean isEnum, boolean isAnnotation,
-            boolean isFinal, boolean isIncluded, String name,
-            String qualifiedName, String qualifiedTypeName, boolean isPrimitive)
-    {
-        super(rawCommentText, position);
-
-        mClass = cl;
-        mIsPublic = isPublic;
-        mIsProtected = isProtected;
-        mIsPackagePrivate = isPackagePrivate;
-        mIsPrivate = isPrivate;
-        mIsStatic = isStatic;
-        mIsInterface = isInterface;
-        mIsAbstract = isAbstract;
-        mIsOrdinaryClass = isOrdinaryClass;
-        mIsException = isException;
-        mIsError = isError;
-        mIsEnum = isEnum;
-        mIsAnnotation = isAnnotation;
-        mIsFinal = isFinal;
-        mIsIncluded = isIncluded;
-        mName = name;
-        mQualifiedName = qualifiedName;
-        mQualifiedTypeName = qualifiedTypeName;
-        mIsPrimitive = isPrimitive;
-        mNameParts = name.split("\\.");
-    }
-
-    public void init(TypeInfo typeInfo, ClassInfo[] interfaces, TypeInfo[] interfaceTypes,
-            ClassInfo[] innerClasses,
-            MethodInfo[] constructors, MethodInfo[] methods, MethodInfo[] annotationElements,
-            FieldInfo[] fields, FieldInfo[] enumConstants,
-            PackageInfo containingPackage, ClassInfo containingClass,
-            ClassInfo superclass, TypeInfo superclassType, AnnotationInstanceInfo[] annotations)
-    {
-        mTypeInfo = typeInfo;
-        mRealInterfaces = interfaces;
-        mRealInterfaceTypes = interfaceTypes;
-        mInnerClasses = innerClasses;
-        mAllConstructors = constructors;
-        mAllSelfMethods = methods;
-        mAnnotationElements = annotationElements;
-        mAllSelfFields = fields;
-        mEnumConstants = enumConstants;
-        mContainingPackage = containingPackage;
-        mContainingClass = containingClass;
-        mRealSuperclass = superclass;
-        mRealSuperclassType = superclassType;
-        mAnnotations = annotations;
-
-        // after providing new methods and new superclass info,clear any cached
-        // lists of self + superclass methods, ctors, etc.
-        mSuperclassInit = false;
-        mConstructors = null;
-        mMethods = null;
-        mSelfMethods = null;
-        mFields = null;
-        mSelfFields = null;
-        mSelfAttributes = null;
-        mDeprecatedKnown = false;
-
-        Arrays.sort(mEnumConstants, FieldInfo.comparator);
-        Arrays.sort(mInnerClasses, ClassInfo.comparator);
-    }
-
-    public void init2() {
-        // calling this here forces the AttrTagInfo objects to be linked to the AttribtueInfo
-        // objects
-        selfAttributes();
-    }
-
-    public void init3(TypeInfo[] types, ClassInfo[] realInnerClasses){
-      mTypeParameters = types;
-      mRealInnerClasses = realInnerClasses;
-    }
-
-    public ClassInfo[] getRealInnerClasses(){
-      return mRealInnerClasses;
-    }
-
-    public TypeInfo[] getTypeParameters(){
-      return mTypeParameters;
-    }
-
-    public boolean checkLevel()
-    {
-        int val = mCheckLevel;
-        if (val >= 0) {
-            return val != 0;
-        } else {
-            boolean v = DroidDoc.checkLevel(mIsPublic, mIsProtected,
-                                                mIsPackagePrivate, mIsPrivate, isHidden());
-            mCheckLevel = v ? 1 : 0;
-            return v;
-        }
-    }
-
-    public int compareTo(Object that) {
-        if (that instanceof ClassInfo) {
-            return mQualifiedName.compareTo(((ClassInfo)that).mQualifiedName);
-        } else {
-            return this.hashCode() - that.hashCode();
-        }
-    }
-
-    @Override
-    public ContainerInfo parent()
-    {
-        return this;
-    }
-
-    public boolean isPublic()
-    {
-        return mIsPublic;
-    }
-
-    public boolean isProtected()
-    {
-        return mIsProtected;
-    }
-
-    public boolean isPackagePrivate()
-    {
-        return mIsPackagePrivate;
-    }
-
-    public boolean isPrivate()
-    {
-        return mIsPrivate;
-    }
-
-    public boolean isStatic()
-    {
-        return mIsStatic;
-    }
-
-    public boolean isInterface()
-    {
-        return mIsInterface;
-    }
-
-    public boolean isAbstract()
-    {
-        return mIsAbstract;
-    }
-
-    public PackageInfo containingPackage()
-    {
-        return mContainingPackage;
-    }
-
-    public ClassInfo containingClass()
-    {
-        return mContainingClass;
-    }
-
-    public boolean isOrdinaryClass()
-    {
-        return mIsOrdinaryClass;
-    }
-
-    public boolean isException()
-    {
-        return mIsException;
-    }
-
-    public boolean isError()
-    {
-        return mIsError;
-    }
-
-    public boolean isEnum()
-    {
-        return mIsEnum;
-    }
-
-    public boolean isAnnotation()
-    {
-        return mIsAnnotation;
-    }
-
-    public boolean isFinal()
-    {
-        return mIsFinal;
-    }
-
-    public boolean isIncluded()
-    {
-        return mIsIncluded;
-    }
-
-    public HashSet<String> typeVariables()
-    {
-        HashSet<String> result = TypeInfo.typeVariables(mTypeInfo.typeArguments());
-        ClassInfo cl = containingClass();
-        while (cl != null) {
-            TypeInfo[] types = cl.asTypeInfo().typeArguments();
-            if (types != null) {
-                TypeInfo.typeVariables(types, result);
-            }
-            cl = cl.containingClass();
-        }
-        return result;
-    }
-
-    private static void gatherHiddenInterfaces(ClassInfo cl, HashSet<ClassInfo> interfaces) {
-        for (ClassInfo iface: cl.mRealInterfaces) {
-            if (iface.checkLevel()) {
-                interfaces.add(iface);
-            } else {
-                gatherHiddenInterfaces(iface, interfaces);
-            }
-        }
-    }
-
-    public ClassInfo[] interfaces()
-    {
-        if (mInterfaces == null) {
-            if (checkLevel()) {
-                HashSet<ClassInfo> interfaces = new HashSet<ClassInfo>();
-                ClassInfo superclass = mRealSuperclass;
-                while (superclass != null && !superclass.checkLevel()) {
-                    gatherHiddenInterfaces(superclass, interfaces);
-                    superclass = superclass.mRealSuperclass;
-                }
-                gatherHiddenInterfaces(this, interfaces);
-                mInterfaces = interfaces.toArray(new ClassInfo[interfaces.size()]);
-            } else {
-                // put something here in case someone uses it
-                mInterfaces = mRealInterfaces;
-            }
-            Arrays.sort(mInterfaces, ClassInfo.qualifiedComparator);
-        }
-        return mInterfaces;
-    }
-
-    public ClassInfo[] realInterfaces()
-    {
-        return mRealInterfaces;
-    }
-
-    TypeInfo[] realInterfaceTypes()
-    {
-        return mRealInterfaceTypes;
-    }
-
-    public String name()
-    {
-        return mName;
-    }
-
-    public String[] nameParts()
-    {
-        return mNameParts;
-    }
-
-    public String leafName()
-    {
-        return mNameParts[mNameParts.length-1];
-    }
-
-    public String qualifiedName()
-    {
-        return mQualifiedName;
-    }
-
-    public String qualifiedTypeName()
-    {
-        return mQualifiedTypeName;
-    }
-
-    public boolean isPrimitive()
-    {
-        return mIsPrimitive;
-    }
-
-    public MethodInfo[] allConstructors() {
-        return mAllConstructors;
-    }
-
-    public MethodInfo[] constructors()
-    {
-        if (mConstructors == null) {
-            MethodInfo[] methods = mAllConstructors;
-            ArrayList<MethodInfo> ctors = new ArrayList<MethodInfo>();
-            for (int i=0; i<methods.length; i++) {
-                MethodInfo m = methods[i];
-                if (!m.isHidden()) {
-                    ctors.add(m);
-                }
-            }
-            mConstructors = ctors.toArray(new MethodInfo[ctors.size()]);
-            Arrays.sort(mConstructors, MethodInfo.comparator);
-        }
-        return mConstructors;
-    }
-
-    public ClassInfo[] innerClasses()
-    {
-        return mInnerClasses;
-    }
-
-    public TagInfo[] inlineTags()
-    {
-        return comment().tags();
-    }
-
-    public TagInfo[] firstSentenceTags()
-    {
-        return comment().briefTags();
-    }
-
-    public boolean isDeprecated() {
-        boolean deprecated = false;
-        if (!mDeprecatedKnown) {
-            boolean commentDeprecated = (comment().deprecatedTags().length > 0);
-            boolean annotationDeprecated = false;
-            for (AnnotationInstanceInfo annotation : annotations()) {
-                if (annotation.type().qualifiedName().equals("java.lang.Deprecated")) {
-                    annotationDeprecated = true;
-                    break;
-                }
-            }
-
-            if (commentDeprecated != annotationDeprecated) {
-                Errors.error(Errors.DEPRECATION_MISMATCH, position(),
-                        "Class " + qualifiedName()
-                        + ": @Deprecated annotation and @deprecated comment do not match");
-            }
-
-            mIsDeprecated = commentDeprecated | annotationDeprecated;
-            mDeprecatedKnown = true;
-        }
-        return mIsDeprecated;
-    }
-
-    public TagInfo[] deprecatedTags()
-    {
-        // Should we also do the interfaces?
-        return comment().deprecatedTags();
-    }
-
-    public MethodInfo[] methods()
-    {
-        if (mMethods == null) {
-            TreeMap<String,MethodInfo> all = new TreeMap<String,MethodInfo>();
-
-            ClassInfo[] ifaces = interfaces();
-            for (ClassInfo iface: ifaces) {
-                if (iface != null) {
-                    MethodInfo[] inhereted = iface.methods();
-                    for (MethodInfo method: inhereted) {
-                        String key = method.name() + method.signature();
-                        all.put(key, method);
-                    }
-                }
-            }
-
-            ClassInfo superclass = superclass();
-            if (superclass != null) {
-                MethodInfo[] inhereted = superclass.methods();
-                for (MethodInfo method: inhereted) {
-                    String key = method.name() + method.signature();
-                    all.put(key, method);
-                }
-            }
-
-            MethodInfo[] methods = selfMethods();
-            for (MethodInfo method: methods) {
-                String key = method.name() + method.signature();
-                MethodInfo old = all.put(key, method);
-            }
-
-            mMethods = all.values().toArray(new MethodInfo[all.size()]);
-        }
-        return mMethods;
-    }
-
-    public MethodInfo[] annotationElements()
-    {
-        return mAnnotationElements;
-    }
-
-    public AnnotationInstanceInfo[] annotations()
-    {
-        return mAnnotations;
-    }
-
-    private static void addFields(ClassInfo cl, TreeMap<String,FieldInfo> all)
-    {
-        FieldInfo[] fields = cl.fields();
-        int N = fields.length;
-        for (int i=0; i<N; i++) {
-            FieldInfo f = fields[i];
-            all.put(f.name(), f);
-        }
-    }
-
-    public FieldInfo[] fields()
-    {
-        if (mFields == null) {
-            int N;
-            TreeMap<String,FieldInfo> all = new TreeMap<String,FieldInfo>();
-
-            ClassInfo[] interfaces = interfaces();
-            N = interfaces.length;
-            for (int i=0; i<N; i++) {
-                addFields(interfaces[i], all);
-            }
-
-            ClassInfo superclass = superclass();
-            if (superclass != null) {
-                addFields(superclass, all);
-            }
-
-            FieldInfo[] fields = selfFields();
-            N = fields.length;
-            for (int i=0; i<N; i++) {
-                FieldInfo f = fields[i];
-                if (!f.isHidden()) {
-                    String key = f.name();
-                    all.put(key, f);
-                }
-            }
-
-            mFields = all.values().toArray(new FieldInfo[0]);
-        }
-        return mFields;
-    }
-
-    public void gatherFields(ClassInfo owner, ClassInfo cl, HashMap<String,FieldInfo> fields) {
-        FieldInfo[] flds = cl.selfFields();
-        for (FieldInfo f: flds) {
-            if (f.checkLevel()) {
-                fields.put(f.name(), f.cloneForClass(owner));
-            }
-        }
-    }
-
-    public FieldInfo[] selfFields()
-    {
-        if (mSelfFields == null) {
-            HashMap<String,FieldInfo> fields = new HashMap<String,FieldInfo>();
-            // our hidden parents
-            if (mRealSuperclass != null && !mRealSuperclass.checkLevel()) {
-                gatherFields(this, mRealSuperclass, fields);
-            }
-            for (ClassInfo iface: mRealInterfaces) {
-                if (!iface.checkLevel()) {
-                    gatherFields(this, iface, fields);
-                }
-            }
-            // mine
-            FieldInfo[] selfFields = mAllSelfFields;
-            for (int i=0; i<selfFields.length; i++) {
-                FieldInfo f = selfFields[i];
-                if (!f.isHidden()) {
-                    fields.put(f.name(), f);
-                }
-            }
-            // combine and return in
-            mSelfFields = fields.values().toArray(new FieldInfo[fields.size()]);
-            Arrays.sort(mSelfFields, FieldInfo.comparator);
-        }
-        return mSelfFields;
-    }
-
-    public FieldInfo[] allSelfFields() {
-        return mAllSelfFields;
-    }
-
-    public void gatherMethods(ClassInfo owner, ClassInfo cl, HashMap<String,MethodInfo> methods) {
-        MethodInfo[] meth = cl.selfMethods();
-        for (MethodInfo m: meth) {
-            if (m.checkLevel()) {
-                methods.put(m.name()+m.signature(), m.cloneForClass(owner));
-            }
-        }
-    }
-
-    public MethodInfo[] selfMethods()
-    {
-        if (mSelfMethods == null) {
-            HashMap<String,MethodInfo> methods = new HashMap<String,MethodInfo>();
-            // our hidden parents
-            if (mRealSuperclass != null && !mRealSuperclass.checkLevel()) {
-                gatherMethods(this, mRealSuperclass, methods);
-            }
-            for (ClassInfo iface: mRealInterfaces) {
-                if (!iface.checkLevel()) {
-                    gatherMethods(this, iface, methods);
-                }
-            }
-            // mine
-            MethodInfo[] selfMethods = mAllSelfMethods;
-            for (int i=0; i<selfMethods.length; i++) {
-                MethodInfo m = selfMethods[i];
-                if (m.checkLevel()) {
-                    methods.put(m.name()+m.signature(), m);
-                }
-            }
-            // combine and return it
-            mSelfMethods = methods.values().toArray(new MethodInfo[methods.size()]);
-            Arrays.sort(mSelfMethods, MethodInfo.comparator);
-        }
-        return mSelfMethods;
-    }
-
-    public MethodInfo[] allSelfMethods() {
-        return mAllSelfMethods;
-    }
-
-    public void addMethod(MethodInfo method) {
-        MethodInfo[] methods = new MethodInfo[mAllSelfMethods.length + 1];
-        int i = 0;
-        for (MethodInfo m : mAllSelfMethods) {
-            methods[i] = m;
-            i++;
-        }
-        methods[i] = method;
-        mAllSelfMethods = methods;
-    }
-
-    public AttributeInfo[] selfAttributes()
-    {
-        if (mSelfAttributes == null) {
-            TreeMap<FieldInfo,AttributeInfo> attrs = new TreeMap<FieldInfo,AttributeInfo>();
-
-            // the ones in the class comment won't have any methods
-            for (AttrTagInfo tag: comment().attrTags()) {
-                FieldInfo field = tag.reference();
-                if (field != null) {
-                    AttributeInfo attr = attrs.get(field);
-                    if (attr == null) {
-                        attr = new AttributeInfo(this, field);
-                        attrs.put(field, attr);
-                    }
-                    tag.setAttribute(attr);
-                }
-            }
-
-            // in the methods
-            for (MethodInfo m: selfMethods()) {
-                for (AttrTagInfo tag: m.comment().attrTags()) {
-                    FieldInfo field = tag.reference();
-                    if (field != null) {
-                        AttributeInfo attr = attrs.get(field);
-                        if (attr == null) {
-                            attr = new AttributeInfo(this, field);
-                            attrs.put(field, attr);
-                        }
-                        tag.setAttribute(attr);
-                        attr.methods.add(m);
-                    }
-                }
-            }
-
-            //constructors too
-           for (MethodInfo m: constructors()) {
-              for (AttrTagInfo tag: m.comment().attrTags()) {
-                  FieldInfo field = tag.reference();
-                  if (field != null) {
-                      AttributeInfo attr = attrs.get(field);
-                      if (attr == null) {
-                          attr = new AttributeInfo(this, field);
-                          attrs.put(field, attr);
-                      }
-                      tag.setAttribute(attr);
-                      attr.methods.add(m);
-                  }
-              }
-          }
-
-            mSelfAttributes = attrs.values().toArray(new AttributeInfo[attrs.size()]);
-            Arrays.sort(mSelfAttributes, AttributeInfo.comparator);
-        }
-        return mSelfAttributes;
-    }
-
-    public FieldInfo[] enumConstants()
-    {
-        return mEnumConstants;
-    }
-
-    public ClassInfo superclass()
-    {
-        if (!mSuperclassInit) {
-            if (this.checkLevel()) {
-                // rearrange our little inheritance hierarchy, because we need to hide classes that
-                // don't pass checkLevel
-                ClassInfo superclass = mRealSuperclass;
-                while (superclass != null && !superclass.checkLevel()) {
-                    superclass = superclass.mRealSuperclass;
-                }
-                mSuperclass = superclass;
-            } else {
-                mSuperclass = mRealSuperclass;
-            }
-        }
-        return mSuperclass;
-    }
-
-    public ClassInfo realSuperclass()
-    {
-        return mRealSuperclass;
-    }
-
-    /** always the real superclass, not the collapsed one we get through superclass(),
-     * also has the type parameter info if it's generic.
-     */
-    public TypeInfo superclassType()
-    {
-        return mRealSuperclassType;
-    }
-
-    public TypeInfo asTypeInfo()
-    {
-        return mTypeInfo;
-    }
-
-    TypeInfo[] interfaceTypes()
-    {
-        ClassInfo[] infos = interfaces();
-        int len = infos.length;
-        TypeInfo[] types = new TypeInfo[len];
-        for (int i=0; i<len; i++) {
-            types[i] = infos[i].asTypeInfo();
-        }
-        return types;
-    }
-
-    public String htmlPage()
-    {
-        String s = containingPackage().name();
-        s = s.replace('.', '/');
-        s += '/';
-        s += name();
-        s += ".html";
-        s = DroidDoc.javadocDir + s;
-        return s;
-    }
-
-    /** Even indirectly */
-    public boolean isDerivedFrom(ClassInfo cl)
-    {
-        ClassInfo dad = this.superclass();
-        if (dad != null) {
-            if (dad.equals(cl)) {
-                return true;
-            } else {
-                if (dad.isDerivedFrom(cl)) {
-                    return true;
-                }
-            }
-        }
-        for (ClassInfo iface: interfaces()) {
-            if (iface.equals(cl)) {
-                return true;
-            } else {
-                if (iface.isDerivedFrom(cl)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    public void makeKeywordEntries(List<KeywordEntry> keywords)
-    {
-        if (!checkLevel()) {
-            return;
-        }
-
-        String htmlPage = htmlPage();
-        String qualifiedName = qualifiedName();
-
-        keywords.add(new KeywordEntry(name(), htmlPage,
-                "class in " + containingPackage().name()));
-
-        FieldInfo[] fields = selfFields();
-        FieldInfo[] enumConstants = enumConstants();
-        MethodInfo[] ctors = constructors();
-        MethodInfo[] methods = selfMethods();
-
-        // enum constants
-        for (FieldInfo field: enumConstants()) {
-            if (field.checkLevel()) {
-                keywords.add(new KeywordEntry(field.name(),
-                            htmlPage + "#" + field.anchor(),
-                            "enum constant in " + qualifiedName));
-            }
-        }
-
-        // constants
-        for (FieldInfo field: fields) {
-            if (field.isConstant() && field.checkLevel()) {
-                keywords.add(new KeywordEntry(field.name(),
-                            htmlPage + "#" + field.anchor(),
-                            "constant in " + qualifiedName));
-            }
-        }
-
-        // fields
-        for (FieldInfo field: fields) {
-            if (!field.isConstant() && field.checkLevel()) {
-                keywords.add(new KeywordEntry(field.name(),
-                            htmlPage + "#" + field.anchor(),
-                            "field in " + qualifiedName));
-            }
-        }
-
-        // public constructors
-        for (MethodInfo m: ctors) {
-            if (m.isPublic() && m.checkLevel()) {
-                keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                            htmlPage + "#" + m.anchor(),
-                            "constructor in " + qualifiedName));
-            }
-        }
-
-        // protected constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PROTECTED)) {
-            for (MethodInfo m: ctors) {
-                if (m.isProtected() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "constructor in " + qualifiedName));
-                }
-            }
-        }
-
-        // package private constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PACKAGE)) {
-            for (MethodInfo m: ctors) {
-                if (m.isPackagePrivate() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "constructor in " + qualifiedName));
-                }
-            }
-        }
-
-        // private constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PRIVATE)) {
-            for (MethodInfo m: ctors) {
-                if (m.isPrivate() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "constructor in " + qualifiedName));
-                }
-            }
-        }
-
-        // public methods
-        for (MethodInfo m: methods) {
-            if (m.isPublic() && m.checkLevel()) {
-                keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                            htmlPage + "#" + m.anchor(),
-                            "method in " + qualifiedName));
-            }
-        }
-
-        // protected methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PROTECTED)) {
-            for (MethodInfo m: methods) {
-                if (m.isProtected() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "method in " + qualifiedName));
-                }
-            }
-        }
-
-        // package private methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PACKAGE)) {
-            for (MethodInfo m: methods) {
-                if (m.isPackagePrivate() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "method in " + qualifiedName));
-                }
-            }
-        }
-
-        // private methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PRIVATE)) {
-            for (MethodInfo m: methods) {
-                if (m.isPrivate() && m.checkLevel()) {
-                    keywords.add(new KeywordEntry(m.name() + m.prettySignature(),
-                                htmlPage + "#" + m.anchor(),
-                                "method in " + qualifiedName));
-                }
-            }
-        }
-    }
-
-    public void makeLink(HDF data, String base)
-    {
-        data.setValue(base + ".label", this.name());
-        if (!this.isPrimitive() && this.isIncluded() && this.checkLevel()) {
-            data.setValue(base + ".link", this.htmlPage());
-        }
-    }
-
-    public static void makeLinkListHDF(HDF data, String base, ClassInfo[] classes) {
-        final int N = classes.length;
-        for (int i=0; i<N; i++) {
-            ClassInfo cl = classes[i];
-            if (cl.checkLevel()) {
-                cl.asTypeInfo().makeHDF(data, base + "." + i);
-            }
-        }
-    }
-
-    /**
-     * Used in lists of this class (packages, nested classes, known subclasses)
-     */
-    public void makeShortDescrHDF(HDF data, String base)
-    {
-        mTypeInfo.makeHDF(data, base + ".type");
-        data.setValue(base + ".kind", this.kind());
-        TagInfo.makeHDF(data, base + ".shortDescr", this.firstSentenceTags());
-        TagInfo.makeHDF(data, base + ".deprecated", deprecatedTags());
-        data.setValue(base + ".since", getSince());
-    }
-
-    /**
-     * Turns into the main class page
-     */
-    public void makeHDF(HDF data)
-    {
-        int i, j, n;
-        String name = name();
-        String qualified = qualifiedName();
-        AttributeInfo[] selfAttributes = selfAttributes();
-        MethodInfo[] methods = selfMethods();
-        FieldInfo[] fields = selfFields();
-        FieldInfo[] enumConstants = enumConstants();
-        MethodInfo[] ctors = constructors();
-        ClassInfo[] inners = innerClasses();
-
-        // class name
-        mTypeInfo.makeHDF(data, "class.type");
-        mTypeInfo.makeQualifiedHDF(data, "class.qualifiedType");
-        data.setValue("class.name", name);
-        data.setValue("class.qualified", qualified);
-        String scope = "";
-        if (isProtected()) {
-            data.setValue("class.scope", "protected");
-        }
-        else if (isPublic()) {
-            data.setValue("class.scope", "public");
-        }
-        if (isStatic()) {
-            data.setValue("class.static", "static");
-        }
-        if (isFinal()) {
-            data.setValue("class.final", "final");
-        }
-        if (isAbstract() && !isInterface()) {
-            data.setValue("class.abstract", "abstract");
-        }
-
-        // class info
-        String kind = kind();
-        if (kind != null) {
-            data.setValue("class.kind", kind);
-        }
-        data.setValue("class.since", getSince());
-
-        // the containing package -- note that this can be passed to type_link,
-        // but it also contains the list of all of the packages
-        containingPackage().makeClassLinkListHDF(data, "class.package");
-
-        // inheritance hierarchy
-        Vector<ClassInfo> superClasses = new Vector<ClassInfo>();
-        superClasses.add(this);
-        ClassInfo supr = superclass();
-        while (supr != null) {
-            superClasses.add(supr);
-            supr = supr.superclass();
-        }
-        n = superClasses.size();
-        for (i=0; i<n; i++) {
-            supr = superClasses.elementAt(n-i-1);
-
-            supr.asTypeInfo().makeQualifiedHDF(data, "class.inheritance." + i + ".class");
-            supr.asTypeInfo().makeHDF(data, "class.inheritance." + i + ".short_class");
-            j = 0;
-            for (TypeInfo t: supr.interfaceTypes()) {
-                t.makeHDF(data, "class.inheritance." + i + ".interfaces." + j);
-                j++;
-            }
-        }
-
-        // class description
-        TagInfo.makeHDF(data, "class.descr", inlineTags());
-        TagInfo.makeHDF(data, "class.seeAlso", comment().seeTags());
-        TagInfo.makeHDF(data, "class.deprecated", deprecatedTags());
-
-        // known subclasses
-        TreeMap<String, ClassInfo> direct = new TreeMap<String, ClassInfo>();
-        TreeMap<String, ClassInfo> indirect = new TreeMap<String, ClassInfo>();
-        ClassInfo[] all = Converter.rootClasses();
-        for (ClassInfo cl: all) {
-            if (cl.superclass() != null && cl.superclass().equals(this)) {
-                direct.put(cl.name(), cl);
-            }
-            else if (cl.isDerivedFrom(this)) {
-                indirect.put(cl.name(), cl);
-            }
-        }
-        // direct
-        i = 0;
-        for (ClassInfo cl: direct.values()) {
-            if (cl.checkLevel()) {
-                cl.makeShortDescrHDF(data, "class.subclasses.direct." + i);
-            }
-            i++;
-        }
-        // indirect
-        i = 0;
-        for (ClassInfo cl: indirect.values()) {
-            if (cl.checkLevel()) {
-                cl.makeShortDescrHDF(data, "class.subclasses.indirect." + i);
-            }
-            i++;
-        }
-
-        // nested classes
-        i=0;
-        for (ClassInfo inner: inners) {
-            if (inner.checkLevel()) {
-                inner.makeShortDescrHDF(data, "class.inners." + i);
-            }
-            i++;
-        }
-
-        // enum constants
-        i=0;
-        for (FieldInfo field: enumConstants) {
-            if (field.isConstant()) {
-                field.makeHDF(data, "class.enumConstants." + i);
-                i++;
-            }
-        }
-
-        // constants
-        i=0;
-        for (FieldInfo field: fields) {
-            if (field.isConstant()) {
-                field.makeHDF(data, "class.constants." + i);
-                i++;
-            }
-        }
-
-        // fields
-        i=0;
-        for (FieldInfo field: fields) {
-            if (!field.isConstant()) {
-                field.makeHDF(data, "class.fields." + i);
-                i++;
-            }
-        }
-
-        // public constructors
-        i=0;
-        for (MethodInfo ctor: ctors) {
-            if (ctor.isPublic()) {
-                ctor.makeHDF(data, "class.ctors.public." + i);
-                i++;
-            }
-        }
-
-        // protected constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PROTECTED)) {
-            i=0;
-            for (MethodInfo ctor: ctors) {
-                if (ctor.isProtected()) {
-                    ctor.makeHDF(data, "class.ctors.protected." + i);
-                    i++;
-                }
-            }
-        }
-
-        // package private constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PACKAGE)) {
-            i=0;
-            for (MethodInfo ctor: ctors) {
-                if (ctor.isPackagePrivate()) {
-                    ctor.makeHDF(data, "class.ctors.package." + i);
-                    i++;
-                }
-            }
-        }
-
-        // private constructors
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PRIVATE)) {
-            i=0;
-            for (MethodInfo ctor: ctors) {
-                if (ctor.isPrivate()) {
-                    ctor.makeHDF(data, "class.ctors.private." + i);
-                    i++;
-                }
-            }
-        }
-
-        // public methods
-        i=0;
-        for (MethodInfo method: methods) {
-            if (method.isPublic()) {
-                method.makeHDF(data, "class.methods.public." + i);
-                i++;
-            }
-        }
-
-        // protected methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PROTECTED)) {
-            i=0;
-            for (MethodInfo method: methods) {
-                if (method.isProtected()) {
-                    method.makeHDF(data, "class.methods.protected." + i);
-                    i++;
-                }
-            }
-        }
-
-        // package private methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PACKAGE)) {
-            i=0;
-            for (MethodInfo method: methods) {
-                if (method.isPackagePrivate()) {
-                    method.makeHDF(data, "class.methods.package." + i);
-                    i++;
-                }
-            }
-        }
-
-        // private methods
-        if (DroidDoc.checkLevel(DroidDoc.SHOW_PRIVATE)) {
-            i=0;
-            for (MethodInfo method: methods) {
-                if (method.isPrivate()) {
-                    method.makeHDF(data, "class.methods.private." + i);
-                    i++;
-                }
-            }
-        }
-
-        // xml attributes
-        i=0;
-        for (AttributeInfo attr: selfAttributes) {
-            if (attr.checkLevel()) {
-                attr.makeHDF(data, "class.attrs." + i);
-                i++;
-            }
-        }
-
-        // inherited methods
-        Set<ClassInfo> interfaces = new TreeSet<ClassInfo>();
-        addInterfaces(interfaces(), interfaces);
-        ClassInfo cl = superclass();
-        i=0;
-        while (cl != null) {
-            addInterfaces(cl.interfaces(), interfaces);
-            makeInheritedHDF(data, i, cl);
-            cl = cl.superclass();
-            i++;
-        }
-        for (ClassInfo iface: interfaces) {
-            makeInheritedHDF(data, i, iface);
-            i++;
-        }
-    }
-
-    private static void addInterfaces(ClassInfo[] ifaces, Set<ClassInfo> out)
-    {
-        for (ClassInfo cl: ifaces) {
-            out.add(cl);
-            addInterfaces(cl.interfaces(), out);
-        }
-    }
-
-    private static void makeInheritedHDF(HDF data, int index, ClassInfo cl)
-    {
-        int i;
-
-        String base = "class.inherited." + index;
-        data.setValue(base + ".qualified", cl.qualifiedName());
-        if (cl.checkLevel()) {
-            data.setValue(base + ".link", cl.htmlPage());
-        }
-        String kind = cl.kind();
-        if (kind != null) {
-            data.setValue(base + ".kind", kind);
-        }
-
-        if (cl.mIsIncluded) {
-            data.setValue(base + ".included", "true");
-        }
-
-        // xml attributes
-        i=0;
-        for (AttributeInfo attr: cl.selfAttributes()) {
-            attr.makeHDF(data, base + ".attrs." + i);
-            i++;
-        }
-
-        // methods
-        i=0;
-        for (MethodInfo method: cl.selfMethods()) {
-            method.makeHDF(data, base + ".methods." + i);
-            i++;
-        }
-
-        // fields
-        i=0;
-        for (FieldInfo field: cl.selfFields()) {
-            if (!field.isConstant()) {
-                field.makeHDF(data, base + ".fields." + i);
-                i++;
-            }
-        }
-
-        // constants
-        i=0;
-        for (FieldInfo field: cl.selfFields()) {
-            if (field.isConstant()) {
-                field.makeHDF(data, base + ".constants." + i);
-                i++;
-            }
-        }
-    }
-
-    @Override
-    public boolean isHidden()
-    {
-        int val = mHidden;
-        if (val >= 0) {
-            return val != 0;
-        } else {
-            boolean v = isHiddenImpl();
-            mHidden = v ? 1 : 0;
-            return v;
-        }
-    }
-
-    public boolean isHiddenImpl()
-    {
-        ClassInfo cl = this;
-        while (cl != null) {
-            PackageInfo pkg = cl.containingPackage();
-            if (pkg != null && pkg.isHidden()) {
-                return true;
-            }
-            if (cl.comment().isHidden()) {
-                return true;
-            }
-            cl = cl.containingClass();
-        }
-        return false;
-    }
-
-    private MethodInfo matchMethod(MethodInfo[] methods, String name,
-                                    String[] params, String[] dimensions)
-    {
-        int len = methods.length;
-        for (int i=0; i<len; i++) {
-            MethodInfo method = methods[i];
-            if (method.name().equals(name)) {
-                if (params == null) {
-                    return method;
-                } else {
-                    if (method.matchesParams(params, dimensions)) {
-                        return method;
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    public MethodInfo findMethod(String name,
-                                    String[] params, String[] dimensions)
-    {
-        // first look on our class, and our superclasses
-
-        // for methods
-        MethodInfo rv;
-        rv = matchMethod(methods(), name, params, dimensions);
-
-        if (rv != null) {
-            return rv;
-        }
-
-        // for constructors
-        rv = matchMethod(constructors(), name, params, dimensions);
-        if (rv != null) {
-            return rv;
-        }
-
-        // then recursively look at our containing class
-        ClassInfo containing = containingClass();
-        if (containing != null) {
-            return containing.findMethod(name, params, dimensions);
-        }
-
-        return null;
-    }
-
-    private ClassInfo searchInnerClasses(String[] nameParts, int index)
-    {
-        String part = nameParts[index];
-
-        ClassInfo[] inners = mInnerClasses;
-        for (ClassInfo in: inners) {
-            String[] innerParts = in.nameParts();
-            if (part.equals(innerParts[innerParts.length-1])) {
-                if (index == nameParts.length-1) {
-                    return in;
-                } else {
-                    return in.searchInnerClasses(nameParts, index+1);
-                }
-            }
-        }
-        return null;
-    }
-
-    public ClassInfo extendedFindClass(String className)
-    {
-        // ClassDoc.findClass has this bug that we're working around here:
-        // If you have a class PackageManager with an inner class PackageInfo
-        // and you call it with "PackageInfo" it doesn't find it.
-        return searchInnerClasses(className.split("\\."), 0);
-    }
-
-    public ClassInfo findClass(String className)
-    {
-        return Converter.obtainClass(mClass.findClass(className));
-    }
-
-    public ClassInfo findInnerClass(String className)
-    {
-        // ClassDoc.findClass won't find inner classes.  To deal with that,
-        // we try what they gave us first, but if that didn't work, then
-        // we see if there are any periods in className, and start searching
-        // from there.
-        String[] nodes = className.split("\\.");
-        ClassDoc cl = mClass;
-        for (String n: nodes) {
-            cl = cl.findClass(n);
-            if (cl == null) {
-                return null;
-            }
-        }
-        return Converter.obtainClass(cl);
-    }
-
-    public FieldInfo findField(String name)
-    {
-        // first look on our class, and our superclasses
-        for (FieldInfo f: fields()) {
-            if (f.name().equals(name)) {
-                return f;
-            }
-        }
-
-        // then look at our enum constants (these are really fields, maybe
-        // they should be mixed into fields().  not sure)
-        for (FieldInfo f: enumConstants()) {
-            if (f.name().equals(name)) {
-                return f;
-            }
-        }
-
-        // then recursively look at our containing class
-        ClassInfo containing = containingClass();
-        if (containing != null) {
-            return containing.findField(name);
-        }
-
-        return null;
-    }
-
-    public static ClassInfo[] sortByName(ClassInfo[] classes)
-    {
-        int i;
-        Sorter[] sorted = new Sorter[classes.length];
-        for (i=0; i<sorted.length; i++) {
-            ClassInfo cl = classes[i];
-            sorted[i] = new Sorter(cl.name(), cl);
-        }
-
-        Arrays.sort(sorted);
-
-        ClassInfo[] rv = new ClassInfo[classes.length];
-        for (i=0; i<rv.length; i++) {
-            rv[i] = (ClassInfo)sorted[i].data;
-        }
-
-        return rv;
-    }
-
-    public boolean equals(ClassInfo that)
-    {
-        if (that != null) {
-            return this.qualifiedName().equals(that.qualifiedName());
-        } else {
-            return false;
-        }
-    }
-
-    public void setNonWrittenConstructors(MethodInfo[] nonWritten) {
-        mNonWrittenConstructors = nonWritten;
-    }
-
-    public MethodInfo[] getNonWrittenConstructors() {
-        return mNonWrittenConstructors;
-    }
-
-    public String kind()
-    {
-        if (isOrdinaryClass()) {
-            return "class";
-        }
-        else if (isInterface()) {
-            return "interface";
-        }
-        else if (isEnum()) {
-            return "enum";
-        }
-        else if (isError()) {
-            return "class";
-        }
-        else if (isException()) {
-            return "class";
-        }
-        else if (isAnnotation()) {
-            return "@interface";
-        }
-        return null;
-    }
-
-    public void setHiddenMethods(MethodInfo[] mInfo){
-        mHiddenMethods = mInfo;
-    }
-    public MethodInfo[] getHiddenMethods(){
-        return mHiddenMethods;
-    }
-    @Override
-    public String toString(){
-        return this.qualifiedName();
-    }
-
-    public void setReasonIncluded(String reason) {
-        mReasonIncluded = reason;
-    }
-
-    public String getReasonIncluded() {
-        return mReasonIncluded;
-    }
-
-    private ClassDoc mClass;
-
-    // ctor
-    private boolean mIsPublic;
-    private boolean mIsProtected;
-    private boolean mIsPackagePrivate;
-    private boolean mIsPrivate;
-    private boolean mIsStatic;
-    private boolean mIsInterface;
-    private boolean mIsAbstract;
-    private boolean mIsOrdinaryClass;
-    private boolean mIsException;
-    private boolean mIsError;
-    private boolean mIsEnum;
-    private boolean mIsAnnotation;
-    private boolean mIsFinal;
-    private boolean mIsIncluded;
-    private String mName;
-    private String mQualifiedName;
-    private String mQualifiedTypeName;
-    private boolean mIsPrimitive;
-    private TypeInfo mTypeInfo;
-    private String[] mNameParts;
-
-    // init
-    private ClassInfo[] mRealInterfaces;
-    private ClassInfo[] mInterfaces;
-    private TypeInfo[] mRealInterfaceTypes;
-    private ClassInfo[] mInnerClasses;
-    private MethodInfo[] mAllConstructors;
-    private MethodInfo[] mAllSelfMethods;
-    private MethodInfo[] mAnnotationElements; // if this class is an annotation
-    private FieldInfo[] mAllSelfFields;
-    private FieldInfo[] mEnumConstants;
-    private PackageInfo mContainingPackage;
-    private ClassInfo mContainingClass;
-    private ClassInfo mRealSuperclass;
-    private TypeInfo mRealSuperclassType;
-    private ClassInfo mSuperclass;
-    private AnnotationInstanceInfo[] mAnnotations;
-    private boolean mSuperclassInit;
-    private boolean mDeprecatedKnown;
-
-    // lazy
-    private MethodInfo[] mConstructors;
-    private ClassInfo[] mRealInnerClasses;
-    private MethodInfo[] mSelfMethods;
-    private FieldInfo[] mSelfFields;
-    private AttributeInfo[] mSelfAttributes;
-    private MethodInfo[] mMethods;
-    private FieldInfo[] mFields;
-    private TypeInfo[] mTypeParameters;
-    private MethodInfo[] mHiddenMethods;
-    private int mHidden = -1;
-    private int mCheckLevel = -1;
-    private String mReasonIncluded;
-    private MethodInfo[] mNonWrittenConstructors;
-    private boolean mIsDeprecated;
-}
diff --git a/tools/droiddoc/src/ClearPage.java b/tools/droiddoc/src/ClearPage.java
deleted file mode 100644
index 016ca93..0000000
--- a/tools/droiddoc/src/ClearPage.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import com.sun.javadoc.*;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ClearPage
-{
-    /*
-    public ClearPage()
-    {
-        String templ = "templates/index.cs";
-        String filename = "docs/index.html";
-
-        data.setValue("A.B.C", "1");
-        data.setValue("A.B.D", "2");
-    }
-    */
-
-    public static ArrayList<String> hdfFiles = new ArrayList<String>();
-
-    private static ArrayList<String> mTemplateDirs = new ArrayList<String>();
-    private static boolean mTemplateDirSet = false;
-
-    public static String outputDir = "docs";
-    public static List<String> htmlDirs = new ArrayList<String>();
-    public static String toroot = null;
-
-    public static void addTemplateDir(String dir)
-    {
-        mTemplateDirSet = true;
-        mTemplateDirs.add(dir);
-
-        File hdfFile = new File(dir, "data.hdf");
-        if (hdfFile.canRead()) {
-            hdfFiles.add(hdfFile.getPath());
-        }
-    }
-
-    private static int countSlashes(String s)
-    {
-        final int N = s.length();
-        int slashcount = 0;
-        for (int i=0; i<N; i++) {
-            if (s.charAt(i) == '/') {
-                slashcount++;
-            }
-        }
-        return slashcount;
-    }
-
-    public static void write(HDF data, String templ, String filename)
-    {
-        write(data, templ, filename, false);
-    }
-
-    public static void write(HDF data, String templ, String filename, boolean fullPath)
-    {
-        if (!htmlDirs.isEmpty()) {
-            data.setValue("hasindex", "true");
-        }
-
-        String toroot;
-        if (ClearPage.toroot != null) {
-            toroot = ClearPage.toroot;
-        } else {
-            int slashcount = countSlashes(filename);
-            if (slashcount > 0) {
-                toroot = "";
-                for (int i=0; i<slashcount; i++) {
-                    toroot += "../";
-                }
-            } else {
-                toroot = "./";
-            }
-        }
-        data.setValue("toroot", toroot);
-
-        data.setValue("filename", filename);
-
-        if (!fullPath) {
-            filename = outputDir + "/" + filename;
-        }
-
-        int i=0;
-        if (!htmlDirs.isEmpty()) {
-            for (String dir : htmlDirs) {
-                data.setValue("hdf.loadpaths." + i, dir);
-                i++;
-            }
-        }
-        if (mTemplateDirSet) {
-            for (String dir: mTemplateDirs) {
-                data.setValue("hdf.loadpaths." + i, dir);
-                i++;
-            }
-        } else {
-            data.setValue("hdf.loadpaths." + i, "templates");
-        }
-        
-        CS cs = new CS(data);
-        cs.parseFile(templ);
-
-        File file = new File(outputFilename(filename));
-        
-        ensureDirectory(file);
-
-        OutputStreamWriter stream = null;
-        try {
-            stream = new OutputStreamWriter(
-                            new FileOutputStream(file), "UTF-8");
-            String rendered = cs.render();
-            stream.write(rendered, 0, rendered.length());
-        }
-        catch (IOException e) {
-            System.out.println("error: " + e.getMessage() + "; when writing file: " + filename);
-        }
-        finally {
-            if (stream != null) {
-                try {
-                    stream.close();
-                }
-                catch (IOException e) {
-                }
-            }
-        }
-    }
-
-    // recursively create the directories to the output
-    public static void ensureDirectory(File f)
-    {
-        File parent = f.getParentFile();
-        if (parent != null) {
-            parent.mkdirs();
-        }
-    }
-
-    public static void copyFile(File from, String toPath)
-    {
-        File to = new File(outputDir + "/" + toPath);
-        FileInputStream in;
-        FileOutputStream out;
-        try {
-            if (!from.exists()) {
-                throw new IOException();
-            }
-            in = new FileInputStream(from);
-        }
-        catch (IOException e) {
-            System.err.println(from.getAbsolutePath() + ": Error opening file");
-            return ;
-        }
-        ensureDirectory(to);
-        try {
-            out = new FileOutputStream(to);
-        }
-        catch (IOException e) {
-            System.err.println(from.getAbsolutePath() + ": Error opening file");
-            return ;
-        }
-
-        long sizel = from.length();
-        final int maxsize = 64*1024;
-        int size = sizel > maxsize ? maxsize : (int)sizel;
-        byte[] buf = new byte[size];
-        while (true) {
-            try {
-                size = in.read(buf);
-            }
-            catch (IOException e) {
-                System.err.println(from.getAbsolutePath()
-                        + ": error reading file");
-                break;
-            }
-            if (size > 0) {
-                try {
-                    out.write(buf, 0, size);
-                }
-                catch (IOException e) {
-                    System.err.println(from.getAbsolutePath()
-                        + ": error writing file");
-                }
-            } else {
-                break;
-            }
-        }
-        try {
-            in.close();
-        }
-        catch (IOException e) {
-        }
-        try {
-            out.close();
-        }
-        catch (IOException e) {
-        }
-    }
-    
-    /** Takes a string that ends w/ .html and changes the .html to htmlExtension */
-    public static String outputFilename(String htmlFile) {
-        if (!DroidDoc.htmlExtension.equals(".html") && htmlFile.endsWith(".html")) {
-            return htmlFile.substring(0, htmlFile.length()-5) + DroidDoc.htmlExtension;
-        } else {
-            return htmlFile;
-        }
-    }
-
-}
diff --git a/tools/droiddoc/src/Comment.java b/tools/droiddoc/src/Comment.java
deleted file mode 100644
index 68b6d20..0000000
--- a/tools/droiddoc/src/Comment.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.util.ArrayList;
-
-public class Comment
-{
-    static final Pattern LEADING_WHITESPACE = Pattern.compile(
-                                "^[ \t\n\r]*(.*)$",
-                                Pattern.DOTALL);
-
-    static final Pattern TAG_BEGIN = Pattern.compile(
-                                "[\r\n][\r\n \t]*@",
-                                Pattern.DOTALL);
-
-    static final Pattern TAG = Pattern.compile(
-                                "(@[^ \t\r\n]+)[ \t\r\n]+(.*)",
-                                Pattern.DOTALL);
-
-    static final Pattern INLINE_TAG = Pattern.compile(
-                                "(.*?)\\{(@[^ \t\r\n\\}]+)[ \t\r\n]*(.*?)\\}",
-                                Pattern.DOTALL);
-
-    static final Pattern FIRST_SENTENCE = Pattern.compile(
-                                "((.*?)\\.)[ \t\r\n\\<](.*)",
-                                Pattern.DOTALL);
-
-    private static final String[] KNOWN_TAGS = new String[] {
-            "@author",
-            "@since",
-            "@version",
-            "@deprecated",
-            "@undeprecate",
-            "@docRoot",
-            "@sdkCurrent",
-            "@inheritDoc",
-            "@more",
-            "@code",
-            "@samplecode",
-            "@sample",
-            "@include",
-            "@serial",
-        };
-
-    public Comment(String text, ContainerInfo base, SourcePositionInfo sp)
-    {
-        mText = text;
-        mBase = base;
-        // sp now points to the end of the text, not the beginning!
-        mPosition = SourcePositionInfo.findBeginning(sp, text);
-    }
-
-    private void parseRegex(String text)
-    {
-        Matcher m;
-
-        m = LEADING_WHITESPACE.matcher(text);
-        m.matches();
-        text = m.group(1);
-
-        m = TAG_BEGIN.matcher(text);
-
-        int start = 0;
-        int end = 0;
-        while (m.find()) {
-            end = m.start();
-
-            tag(text, start, end);
-
-            start = m.end()-1; // -1 is the @
-        }
-        end = text.length();
-        tag(text, start, end);
-    }
-
-    private void tag(String text, int start, int end)
-    {
-        SourcePositionInfo pos = SourcePositionInfo.add(mPosition, mText, start);
-
-        if (start >= 0 && end > 0 && (end-start) > 0) {
-            text = text.substring(start, end);
-
-            Matcher m = TAG.matcher(text);
-            if (m.matches()) {
-                // out of line tag
-                tag(m.group(1), m.group(2), false, pos);
-            } else {
-                // look for inline tags
-                m = INLINE_TAG.matcher(text);
-                start = 0;
-                while (m.find()) {
-                    String str = m.group(1);
-                    String tagname = m.group(2);
-                    String tagvalue = m.group(3);
-                    tag(null, m.group(1), true, pos);
-                    tag(tagname, tagvalue, true, pos);
-                    start = m.end();
-                }
-                int len = text.length();
-                if (start != len) {
-                    tag(null, text.substring(start), true, pos);
-                }
-            }
-        }
-    }
-
-    private void tag(String name, String text, boolean isInline, SourcePositionInfo pos)
-    {
-        /*
-        String s = isInline ? "inline" : "outofline";
-        System.out.println("---> " + s
-                + " name=[" + name + "] text=[" + text + "]");
-        */
-        if (name == null) {
-            mInlineTagsList.add(new TextTagInfo("Text", "Text", text, pos));
-        }
-        else if (name.equals("@param")) {
-            mParamTagsList.add(new ParamTagInfo("@param", "@param", text, mBase, pos));
-        }
-        else if (name.equals("@see")) {
-            mSeeTagsList.add(new SeeTagInfo("@see", "@see", text, mBase, pos));
-        }
-        else if (name.equals("@link") || name.equals("@linkplain")) {
-            mInlineTagsList.add(new SeeTagInfo(name, "@see", text, mBase, pos));
-        }
-        else if (name.equals("@throws") || name.equals("@exception")) {
-            mThrowsTagsList.add(new ThrowsTagInfo("@throws", "@throws", text, mBase, pos));
-        }
-        else if (name.equals("@return")) {
-            mReturnTagsList.add(new ParsedTagInfo("@return", "@return", text, mBase, pos));
-        }
-        else if (name.equals("@deprecated")) {
-            if (text.length() == 0) {
-                Errors.error(Errors.MISSING_COMMENT, pos,
-                        "@deprecated tag with no explanatory comment");
-                text = "No replacement.";
-            }
-            mDeprecatedTagsList.add(new ParsedTagInfo("@deprecated", "@deprecated", text, mBase, pos));
-        }
-        else if (name.equals("@literal")) {
-            mInlineTagsList.add(new LiteralTagInfo(name, name, text, pos));
-        }
-        else if (name.equals("@hide") || name.equals("@pending") || name.equals("@doconly")) {
-            // nothing
-        }
-        else if (name.equals("@attr")) {
-            AttrTagInfo tag = new AttrTagInfo("@attr", "@attr", text, mBase, pos);
-            mAttrTagsList.add(tag);
-            Comment c = tag.description();
-            if (c != null) {
-                for (TagInfo t: c.tags()) {
-                    mInlineTagsList.add(t);
-                }
-            }
-        }
-        else if (name.equals("@undeprecate")) {
-            mUndeprecateTagsList.add(new TextTagInfo("@undeprecate", "@undeprecate", text, pos));
-        }
-        else if (name.equals("@include") || name.equals("@sample")) {
-            mInlineTagsList.add(new SampleTagInfo(name, "@include", text, mBase, pos));
-        }
-        else {
-            boolean known = false;
-            for (String s: KNOWN_TAGS) {
-                if (s.equals(name)) {
-                    known = true;
-                    break;
-                }
-            }
-            if (!known) {
-                known = DroidDoc.knownTags.contains(name);
-            }
-            if (!known) {
-                Errors.error(Errors.UNKNOWN_TAG, pos == null ? null : new SourcePositionInfo(pos),
-                        "Unknown tag: " + name);
-            }
-            TagInfo t = new TextTagInfo(name, name, text, pos);
-            if (isInline) {
-                mInlineTagsList.add(t);
-            } else {
-                mTagsList.add(t);
-            }
-        }
-    }
-
-    private void parseBriefTags()
-    {
-        int N = mInlineTagsList.size();
-
-        // look for "@more" tag, which means that we might go past the first sentence.
-        int more = -1;
-        for (int i=0; i<N; i++) {
-            if (mInlineTagsList.get(i).name().equals("@more")) {
-                more = i;
-            }
-        }
-          if (more >= 0) {
-            for (int i=0; i<more; i++) {
-                mBriefTagsList.add(mInlineTagsList.get(i));
-            }
-        } else {
-            for (int i=0; i<N; i++) {
-                TagInfo t = mInlineTagsList.get(i);
-                if (t.name().equals("Text")) {
-                    Matcher m = FIRST_SENTENCE.matcher(t.text());
-                    if (m.matches()) {
-                        String text = m.group(1);
-                        TagInfo firstSentenceTag = new TagInfo(t.name(), t.kind(), text, t.position());
-                        mBriefTagsList.add(firstSentenceTag);
-                        break;
-                    }
-                }
-                mBriefTagsList.add(t);
-
-            }
-        }
-    }
-
-    public TagInfo[] tags()
-    {
-        init();
-        return mInlineTags;
-    }
-
-    public TagInfo[] tags(String name)
-    {
-        init();
-        ArrayList<TagInfo> results = new ArrayList<TagInfo>();
-        int N = mInlineTagsList.size();
-        for (int i=0; i<N; i++) {
-            TagInfo t = mInlineTagsList.get(i);
-            if (t.name().equals(name)) {
-                results.add(t);
-            }
-        }
-        return results.toArray(new TagInfo[results.size()]);
-    }
-
-    public ParamTagInfo[] paramTags()
-    {
-        init();
-        return mParamTags;
-    }
-
-    public SeeTagInfo[] seeTags()
-    {
-        init();
-        return mSeeTags;
-    }
-
-    public ThrowsTagInfo[] throwsTags()
-    {
-        init();
-        return mThrowsTags;
-    }
-
-    public TagInfo[] returnTags()
-    {
-        init();
-        return mReturnTags;
-    }
-
-    public TagInfo[] deprecatedTags()
-    {
-        init();
-        return mDeprecatedTags;
-    }
-
-    public TagInfo[] undeprecateTags()
-    {
-        init();
-        return mUndeprecateTags;
-    }
-
-    public AttrTagInfo[] attrTags()
-    {
-        init();
-        return mAttrTags;
-    }
-
-    public TagInfo[] briefTags()
-    {
-        init();
-        return mBriefTags;
-    }
-
-    public boolean isHidden()
-    {
-        if (mHidden >= 0) {
-            return mHidden != 0;
-        } else {
-            if (DroidDoc.checkLevel(DroidDoc.SHOW_HIDDEN)) {
-                mHidden = 0;
-                return false;
-            }
-            boolean b = mText.indexOf("@hide") >= 0 || mText.indexOf("@pending") >= 0;
-            mHidden = b ? 1 : 0;
-            return b;
-        }
-    }
-
-    public boolean isDocOnly() {
-        if (mDocOnly >= 0) {
-            return mDocOnly != 0;
-        } else {
-            boolean b = (mText != null) && (mText.indexOf("@doconly") >= 0);
-            mDocOnly = b ? 1 : 0;
-            return b;
-        }
-    }
-
-    private void init()
-    {
-        if (!mInitialized) {
-            initImpl();
-        }
-    }
-
-    private void initImpl()
-    {
-        isHidden();
-        isDocOnly();
-
-        // Don't bother parsing text if we aren't generating documentation.
-        if (DroidDoc.parseComments()) {
-            parseRegex(mText);
-            parseBriefTags();
-        } else {
-          // Forces methods to be recognized by findOverriddenMethods in MethodInfo.
-          mInlineTagsList.add(new TextTagInfo("Text", "Text", mText,
-                  SourcePositionInfo.add(mPosition, mText, 0)));
-        }
-
-        mText = null;
-        mInitialized = true;
-
-        mInlineTags = mInlineTagsList.toArray(new TagInfo[mInlineTagsList.size()]);
-        mParamTags = mParamTagsList.toArray(new ParamTagInfo[mParamTagsList.size()]);
-        mSeeTags = mSeeTagsList.toArray(new SeeTagInfo[mSeeTagsList.size()]);
-        mThrowsTags = mThrowsTagsList.toArray(new ThrowsTagInfo[mThrowsTagsList.size()]);
-        mReturnTags = ParsedTagInfo.joinTags(mReturnTagsList.toArray(
-                                             new ParsedTagInfo[mReturnTagsList.size()]));
-        mDeprecatedTags = ParsedTagInfo.joinTags(mDeprecatedTagsList.toArray(
-                                        new ParsedTagInfo[mDeprecatedTagsList.size()]));
-        mUndeprecateTags = mUndeprecateTagsList.toArray(new TagInfo[mUndeprecateTagsList.size()]);
-        mAttrTags = mAttrTagsList.toArray(new AttrTagInfo[mAttrTagsList.size()]);
-        mBriefTags = mBriefTagsList.toArray(new TagInfo[mBriefTagsList.size()]);
-
-        mParamTagsList = null;
-        mSeeTagsList = null;
-        mThrowsTagsList = null;
-        mReturnTagsList = null;
-        mDeprecatedTagsList = null;
-        mUndeprecateTagsList = null;
-        mAttrTagsList = null;
-        mBriefTagsList = null;
-    }
-
-    boolean mInitialized;
-    int mHidden = -1;
-    int mDocOnly = -1;
-    String mText;
-    ContainerInfo mBase;
-    SourcePositionInfo mPosition;
-    int mLine = 1;
-
-    TagInfo[] mInlineTags;
-    TagInfo[] mTags;
-    ParamTagInfo[] mParamTags;
-    SeeTagInfo[] mSeeTags;
-    ThrowsTagInfo[] mThrowsTags;
-    TagInfo[] mBriefTags;
-    TagInfo[] mReturnTags;
-    TagInfo[] mDeprecatedTags;
-    TagInfo[] mUndeprecateTags;
-    AttrTagInfo[] mAttrTags;
-
-    ArrayList<TagInfo> mInlineTagsList = new ArrayList<TagInfo>();
-    ArrayList<TagInfo> mTagsList = new ArrayList<TagInfo>();
-    ArrayList<ParamTagInfo> mParamTagsList = new ArrayList<ParamTagInfo>();
-    ArrayList<SeeTagInfo> mSeeTagsList = new ArrayList<SeeTagInfo>();
-    ArrayList<ThrowsTagInfo> mThrowsTagsList = new ArrayList<ThrowsTagInfo>();
-    ArrayList<TagInfo> mBriefTagsList = new ArrayList<TagInfo>();
-    ArrayList<ParsedTagInfo> mReturnTagsList = new ArrayList<ParsedTagInfo>();
-    ArrayList<ParsedTagInfo> mDeprecatedTagsList = new ArrayList<ParsedTagInfo>();
-    ArrayList<TagInfo> mUndeprecateTagsList = new ArrayList<TagInfo>();
-    ArrayList<AttrTagInfo> mAttrTagsList = new ArrayList<AttrTagInfo>();
-
-
-}
diff --git a/tools/droiddoc/src/ContainerInfo.java b/tools/droiddoc/src/ContainerInfo.java
deleted file mode 100644
index b8a3e10..0000000
--- a/tools/droiddoc/src/ContainerInfo.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public interface ContainerInfo
-{
-    public String qualifiedName();
-    public boolean checkLevel();
-}
diff --git a/tools/droiddoc/src/Converter.java b/tools/droiddoc/src/Converter.java
deleted file mode 100644
index ee911f4..0000000
--- a/tools/droiddoc/src/Converter.java
+++ /dev/null
@@ -1,755 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.*;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-
-public class Converter
-{
-    private static RootDoc root;
-
-    public static void makeInfo(RootDoc r)
-    {
-        root = r;
-
-        int N, i;
-
-        // create the objects
-        ClassDoc[] classDocs = r.classes();
-        N = classDocs.length;
-        for (i=0; i<N; i++) {
-            Converter.obtainClass(classDocs[i]);
-        }
-        ArrayList<ClassInfo> classesNeedingInit2 = new ArrayList<ClassInfo>();
-        // fill in the fields that reference other classes
-        while (mClassesNeedingInit.size() > 0) {
-            i = mClassesNeedingInit.size()-1;
-            ClassNeedingInit clni = mClassesNeedingInit.get(i);
-            mClassesNeedingInit.remove(i);
-
-            initClass(clni.c, clni.cl);
-            classesNeedingInit2.add(clni.cl);
-        }
-        mClassesNeedingInit = null;
-        for (ClassInfo cl: classesNeedingInit2) {
-            cl.init2();
-        }
-
-        finishAnnotationValueInit();
-
-        // fill in the "root" stuff
-        mRootClasses = Converter.convertClasses(r.classes());
-    }
-
-    private static ClassInfo[] mRootClasses;
-    public static ClassInfo[] rootClasses()
-    {
-        return mRootClasses;
-    }
-
-    public static ClassInfo[] allClasses() {
-        return (ClassInfo[])mClasses.all();
-    }
-
-    private static void initClass(ClassDoc c, ClassInfo cl)
-    {
-        MethodDoc[] annotationElements;
-        if (c instanceof AnnotationTypeDoc) {
-            annotationElements = ((AnnotationTypeDoc)c).elements();
-        } else {
-            annotationElements = new MethodDoc[0];
-        }
-        cl.init(Converter.obtainType(c),
-                Converter.convertClasses(c.interfaces()),
-                Converter.convertTypes(c.interfaceTypes()),
-                Converter.convertClasses(c.innerClasses()),
-                Converter.convertMethods(c.constructors(false)),
-                Converter.convertMethods(c.methods(false)),
-                Converter.convertMethods(annotationElements),
-                Converter.convertFields(c.fields(false)),
-                Converter.convertFields(c.enumConstants()),
-                Converter.obtainPackage(c.containingPackage()),
-                Converter.obtainClass(c.containingClass()),
-                Converter.obtainClass(c.superclass()),
-                Converter.obtainType(c.superclassType()),
-                Converter.convertAnnotationInstances(c.annotations())
-                );
-          cl.setHiddenMethods(Converter.getHiddenMethods(c.methods(false)));
-          cl.setNonWrittenConstructors(Converter.convertNonWrittenConstructors(c.constructors(false)));
-          cl.init3(Converter.convertTypes(c.typeParameters()), Converter.convertClasses(c.innerClasses(false)));
-    }
-
-    public static ClassInfo obtainClass(String className)
-    {
-        return Converter.obtainClass(root.classNamed(className));
-    }
-
-    public static PackageInfo obtainPackage(String packageName)
-    {
-        return Converter.obtainPackage(root.packageNamed(packageName));
-    }
-
-    private static TagInfo convertTag(Tag tag)
-    {
-        return new TextTagInfo(tag.name(), tag.kind(), tag.text(),
-                                Converter.convertSourcePosition(tag.position()));
-    }
-
-    private static ThrowsTagInfo convertThrowsTag(ThrowsTag tag,
-                                                ContainerInfo base)
-    {
-        return new ThrowsTagInfo(tag.name(), tag.text(), tag.kind(),
-                              Converter.obtainClass(tag.exception()),
-                              tag.exceptionComment(), base,
-                              Converter.convertSourcePosition(tag.position()));
-    }
-
-    private static ParamTagInfo convertParamTag(ParamTag tag,
-                                                ContainerInfo base)
-    {
-        return new ParamTagInfo(tag.name(), tag.kind(), tag.text(),
-                              tag.isTypeParameter(), tag.parameterComment(),
-                              tag.parameterName(),
-                              base,
-                              Converter.convertSourcePosition(tag.position()));
-    }
-
-    private static SeeTagInfo convertSeeTag(SeeTag tag, ContainerInfo base)
-    {
-        return new SeeTagInfo(tag.name(), tag.kind(), tag.text(), base,
-                              Converter.convertSourcePosition(tag.position()));
-    }
-
-    private static SourcePositionInfo convertSourcePosition(SourcePosition sp)
-    {
-        if (sp == null) {
-            return null;
-        }
-        return new SourcePositionInfo(sp.file().toString(), sp.line(),
-                                        sp.column());
-    }
-
-    public static TagInfo[] convertTags(Tag[] tags, ContainerInfo base)
-    {
-        int len = tags.length;
-        TagInfo[] out = new TagInfo[len];
-        for (int i=0; i<len; i++) {
-            Tag t = tags[i];
-            /*
-            System.out.println("Tag name='" + t.name() + "' kind='"
-                    + t.kind() + "'");
-            */
-            if (t instanceof SeeTag) {
-                out[i] = Converter.convertSeeTag((SeeTag)t, base);
-            }
-            else if (t instanceof ThrowsTag) {
-                out[i] = Converter.convertThrowsTag((ThrowsTag)t, base);
-            }
-            else if (t instanceof ParamTag) {
-                out[i] = Converter.convertParamTag((ParamTag)t, base);
-            }
-            else {
-                out[i] = Converter.convertTag(t);
-            }
-        }
-        return out;
-    }
-
-    public static ClassInfo[] convertClasses(ClassDoc[] classes)
-    {
-        if (classes == null) return null;
-        int N = classes.length;
-        ClassInfo[] result = new ClassInfo[N];
-        for (int i=0; i<N; i++) {
-            result[i] = Converter.obtainClass(classes[i]);
-        }
-        return result;
-    }
-
-    private static ParameterInfo convertParameter(Parameter p, SourcePosition pos)
-    {
-        if (p == null) return null;
-        ParameterInfo pi = new ParameterInfo(p.name(), p.typeName(),
-                Converter.obtainType(p.type()),
-                Converter.convertSourcePosition(pos));
-        return pi;
-    }
-
-    private static ParameterInfo[] convertParameters(Parameter[] p, MemberDoc m)
-    {
-        SourcePosition pos = m.position();
-        int len = p.length;
-        ParameterInfo[] q = new ParameterInfo[len];
-        for (int i=0; i<len; i++) {
-            q[i] = Converter.convertParameter(p[i], pos);
-        }
-        return q;
-    }
-
-    private static TypeInfo[] convertTypes(Type[] p)
-    {
-        if (p == null) return null;
-        int len = p.length;
-        TypeInfo[] q = new TypeInfo[len];
-        for (int i=0; i<len; i++) {
-            q[i] = Converter.obtainType(p[i]);
-        }
-        return q;
-    }
-
-    private Converter()
-    {
-    }
-
-    private static class ClassNeedingInit
-    {
-        ClassNeedingInit(ClassDoc c, ClassInfo cl)
-        {
-            this.c = c;
-            this.cl = cl;
-        }
-        ClassDoc c;
-        ClassInfo cl;
-    };
-    private static ArrayList<ClassNeedingInit> mClassesNeedingInit
-                                            = new ArrayList<ClassNeedingInit>();
-
-    static ClassInfo obtainClass(ClassDoc o)
-    {
-        return (ClassInfo)mClasses.obtain(o);
-    }
-    private static Cache mClasses = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            ClassDoc c = (ClassDoc)o;
-            ClassInfo cl = new ClassInfo(
-                    c,
-                    c.getRawCommentText(),
-                    Converter.convertSourcePosition(c.position()),
-                    c.isPublic(),
-                    c.isProtected(),
-                    c.isPackagePrivate(),
-                    c.isPrivate(),
-                    c.isStatic(),
-                    c.isInterface(),
-                    c.isAbstract(),
-                    c.isOrdinaryClass(),
-                    c.isException(),
-                    c.isError(),
-                    c.isEnum(),
-                    (c instanceof AnnotationTypeDoc),
-                    c.isFinal(),
-                    c.isIncluded(),
-                    c.name(),
-                    c.qualifiedName(),
-                    c.qualifiedTypeName(),
-                    c.isPrimitive());
-            if (mClassesNeedingInit != null) {
-                mClassesNeedingInit.add(new ClassNeedingInit(c, cl));
-            }
-            return cl;
-        }
-        @Override
-        protected void made(Object o, Object r)
-        {
-            if (mClassesNeedingInit == null) {
-                initClass((ClassDoc)o, (ClassInfo)r);
-                ((ClassInfo)r).init2();
-            }
-        }
-        @Override
-        ClassInfo[] all()
-        {
-            return (ClassInfo[])mCache.values().toArray(new ClassInfo[mCache.size()]);
-        }
-    };
-
-    private static MethodInfo[] getHiddenMethods(MethodDoc[] methods){
-      if (methods == null) return null;
-      ArrayList<MethodInfo> out = new ArrayList<MethodInfo>();
-      int N = methods.length;
-      for (int i=0; i<N; i++) {
-          MethodInfo m = Converter.obtainMethod(methods[i]);
-          //System.out.println(m.toString() + ": ");
-          //for (TypeInfo ti : m.getTypeParameters()){
-            //  if (ti.asClassInfo() != null){
-                //System.out.println(" " +ti.asClassInfo().toString());
-              //} else {
-                //System.out.println(" null");
-              //}
-            //}
-          if (m.isHidden()) {
-              out.add(m);
-          }
-      }
-      return out.toArray(new MethodInfo[out.size()]);
-    }
-
-    /**
-     * Convert MethodDoc[] into MethodInfo[].  Also filters according
-     * to the -private, -public option, because the filtering doesn't seem
-     * to be working in the ClassDoc.constructors(boolean) call.
-     */
-    private static MethodInfo[] convertMethods(MethodDoc[] methods)
-    {
-        if (methods == null) return null;
-        ArrayList<MethodInfo> out = new ArrayList<MethodInfo>();
-        int N = methods.length;
-        for (int i=0; i<N; i++) {
-            MethodInfo m = Converter.obtainMethod(methods[i]);
-            //System.out.println(m.toString() + ": ");
-            //for (TypeInfo ti : m.getTypeParameters()){
-              //  if (ti.asClassInfo() != null){
-                  //System.out.println(" " +ti.asClassInfo().toString());
-                //} else {
-                  //System.out.println(" null");
-                //}
-              //}
-            if (m.checkLevel()) {
-                out.add(m);
-            }
-        }
-        return out.toArray(new MethodInfo[out.size()]);
-    }
-
-    private static MethodInfo[] convertMethods(ConstructorDoc[] methods)
-    {
-        if (methods == null) return null;
-        ArrayList<MethodInfo> out = new ArrayList<MethodInfo>();
-        int N = methods.length;
-        for (int i=0; i<N; i++) {
-            MethodInfo m = Converter.obtainMethod(methods[i]);
-            if (m.checkLevel()) {
-                out.add(m);
-            }
-        }
-        return out.toArray(new MethodInfo[out.size()]);
-    }
-
-    private static MethodInfo[] convertNonWrittenConstructors(ConstructorDoc[] methods)
-    {
-        if (methods == null) return null;
-        ArrayList<MethodInfo> out = new ArrayList<MethodInfo>();
-        int N = methods.length;
-        for (int i=0; i<N; i++) {
-            MethodInfo m = Converter.obtainMethod(methods[i]);
-            if (!m.checkLevel()) {
-                out.add(m);
-            }
-        }
-        return out.toArray(new MethodInfo[out.size()]);
-    }
-
-    private static MethodInfo obtainMethod(MethodDoc o)
-    {
-        return (MethodInfo)mMethods.obtain(o);
-    }
-    private static MethodInfo obtainMethod(ConstructorDoc o)
-    {
-        return (MethodInfo)mMethods.obtain(o);
-    }
-    private static Cache mMethods = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            if (o instanceof AnnotationTypeElementDoc) {
-                AnnotationTypeElementDoc m = (AnnotationTypeElementDoc)o;
-                MethodInfo result = new MethodInfo(
-                                m.getRawCommentText(),
-                                Converter.convertTypes(m.typeParameters()),
-                                m.name(), m.signature(),
-                                Converter.obtainClass(m.containingClass()),
-                                Converter.obtainClass(m.containingClass()),
-                                m.isPublic(), m.isProtected(),
-                                m.isPackagePrivate(), m.isPrivate(),
-                                m.isFinal(), m.isStatic(), m.isSynthetic(),
-                                m.isAbstract(), m.isSynchronized(), m.isNative(), true,
-                                "annotationElement",
-                                m.flatSignature(),
-                                Converter.obtainMethod(m.overriddenMethod()),
-                                Converter.obtainType(m.returnType()),
-                                Converter.convertParameters(m.parameters(), m),
-                                Converter.convertClasses(m.thrownExceptions()),
-                                Converter.convertSourcePosition(m.position()),
-                                Converter.convertAnnotationInstances(m.annotations())
-                            );
-                result.setVarargs(m.isVarArgs());
-                result.init(Converter.obtainAnnotationValue(m.defaultValue(), result));
-                return result;
-            }
-            else if (o instanceof MethodDoc) {
-                MethodDoc m = (MethodDoc)o;
-                MethodInfo result = new MethodInfo(
-                                m.getRawCommentText(),
-                                Converter.convertTypes(m.typeParameters()),
-                                m.name(), m.signature(),
-                                Converter.obtainClass(m.containingClass()),
-                                Converter.obtainClass(m.containingClass()),
-                                m.isPublic(), m.isProtected(),
-                                m.isPackagePrivate(), m.isPrivate(),
-                                m.isFinal(), m.isStatic(), m.isSynthetic(),
-                                m.isAbstract(), m.isSynchronized(), m.isNative(), false,
-                                "method",
-                                m.flatSignature(),
-                                Converter.obtainMethod(m.overriddenMethod()),
-                                Converter.obtainType(m.returnType()),
-                                Converter.convertParameters(m.parameters(), m),
-                                Converter.convertClasses(m.thrownExceptions()),
-                                Converter.convertSourcePosition(m.position()),
-                                Converter.convertAnnotationInstances(m.annotations())
-                           );
-                result.setVarargs(m.isVarArgs());
-                result.init(null);
-                return result;
-            }
-            else {
-                ConstructorDoc m = (ConstructorDoc)o;
-                MethodInfo result = new MethodInfo(
-                                m.getRawCommentText(),
-                                Converter.convertTypes(m.typeParameters()),
-                                m.name(), m.signature(),
-                                Converter.obtainClass(m.containingClass()),
-                                Converter.obtainClass(m.containingClass()),
-                                m.isPublic(), m.isProtected(),
-                                m.isPackagePrivate(), m.isPrivate(),
-                                m.isFinal(), m.isStatic(), m.isSynthetic(),
-                                false, m.isSynchronized(), m.isNative(), false,
-                                "constructor",
-                                m.flatSignature(),
-                                null,
-                                null,
-                                Converter.convertParameters(m.parameters(), m),
-                                Converter.convertClasses(m.thrownExceptions()),
-                                Converter.convertSourcePosition(m.position()),
-                                Converter.convertAnnotationInstances(m.annotations())
-                            );
-                result.setVarargs(m.isVarArgs());
-                result.init(null);
-                return result;
-            }
-        }
-    };
-
-
-    private static FieldInfo[] convertFields(FieldDoc[] fields)
-    {
-        if (fields == null) return null;
-        ArrayList<FieldInfo> out = new ArrayList<FieldInfo>();
-        int N = fields.length;
-        for (int i=0; i<N; i++) {
-            FieldInfo f = Converter.obtainField(fields[i]);
-            if (f.checkLevel()) {
-                out.add(f);
-            }
-        }
-        return out.toArray(new FieldInfo[out.size()]);
-    }
-
-    private static FieldInfo obtainField(FieldDoc o)
-    {
-        return (FieldInfo)mFields.obtain(o);
-    }
-    private static FieldInfo obtainField(ConstructorDoc o)
-    {
-        return (FieldInfo)mFields.obtain(o);
-    }
-    private static Cache mFields = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            FieldDoc f = (FieldDoc)o;
-            return new FieldInfo(f.name(),
-                            Converter.obtainClass(f.containingClass()),
-                            Converter.obtainClass(f.containingClass()),
-                            f.isPublic(), f.isProtected(),
-                            f.isPackagePrivate(), f.isPrivate(),
-                            f.isFinal(), f.isStatic(), f.isTransient(), f.isVolatile(),
-                            f.isSynthetic(),
-                            Converter.obtainType(f.type()),
-                            f.getRawCommentText(), f.constantValue(),
-                            Converter.convertSourcePosition(f.position()),
-                            Converter.convertAnnotationInstances(f.annotations())
-                        );
-        }
-    };
-
-    private static PackageInfo obtainPackage(PackageDoc o)
-    {
-        return (PackageInfo)mPackagees.obtain(o);
-    }
-    private static Cache mPackagees = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            PackageDoc p = (PackageDoc)o;
-            return new PackageInfo(p, p.name(),
-                    Converter.convertSourcePosition(p.position()));
-        }
-    };
-
-    private static TypeInfo obtainType(Type o)
-    {
-        return (TypeInfo)mTypes.obtain(o);
-    }
-    private static Cache mTypes = new Cache()
-    {
-       @Override
-    protected Object make(Object o)
-       {
-           Type t = (Type)o;
-           String simpleTypeName;
-           if (t instanceof ClassDoc) {
-               simpleTypeName = ((ClassDoc)t).name();
-           } else {
-               simpleTypeName = t.simpleTypeName();
-           }
-           TypeInfo ti = new TypeInfo(t.isPrimitive(), t.dimension(),
-                   simpleTypeName, t.qualifiedTypeName(),
-                   Converter.obtainClass(t.asClassDoc()));
-           return ti;
-       }
-        @Override
-        protected void made(Object o, Object r)
-        {
-            Type t = (Type)o;
-            TypeInfo ti = (TypeInfo)r;
-            if (t.asParameterizedType() != null) {
-                ti.setTypeArguments(Converter.convertTypes(
-                            t.asParameterizedType().typeArguments()));
-            }
-            else if (t instanceof ClassDoc) {
-                ti.setTypeArguments(Converter.convertTypes(((ClassDoc)t).typeParameters()));
-            }
-            else if (t.asTypeVariable() != null) {
-                ti.setBounds(null, Converter.convertTypes((t.asTypeVariable().bounds())));
-                ti.setIsTypeVariable(true);
-            }
-            else if (t.asWildcardType() != null) {
-                ti.setIsWildcard(true);
-                ti.setBounds(Converter.convertTypes(t.asWildcardType().superBounds()),
-                             Converter.convertTypes(t.asWildcardType().extendsBounds()));
-            }
-        }
-        @Override
-        protected Object keyFor(Object o)
-        {
-            Type t = (Type)o;
-            String keyString = o.getClass().getName() + "/" + o.toString() + "/";
-            if (t.asParameterizedType() != null){
-              keyString += t.asParameterizedType().toString() +"/";
-              if (t.asParameterizedType().typeArguments() != null){
-              for(Type ty : t.asParameterizedType().typeArguments()){
-                keyString += ty.toString() + "/";
-              }
-              }
-            }else{
-              keyString += "NoParameterizedType//";
-            }
-            if (t.asTypeVariable() != null){
-              keyString += t.asTypeVariable().toString() +"/";
-              if (t.asTypeVariable().bounds() != null){
-              for(Type ty : t.asTypeVariable().bounds()){
-                keyString += ty.toString() + "/";
-              }
-              }
-            }else{
-              keyString += "NoTypeVariable//";
-            }
-            if (t.asWildcardType() != null){
-              keyString += t.asWildcardType().toString() +"/";
-              if (t.asWildcardType().superBounds() != null){
-              for(Type ty : t.asWildcardType().superBounds()){
-                keyString += ty.toString() + "/";
-              }
-              }
-              if (t.asWildcardType().extendsBounds() != null){
-                for(Type ty : t.asWildcardType().extendsBounds()){
-                  keyString += ty.toString() + "/";
-                }
-                }
-            }else{
-              keyString += "NoWildCardType//";
-            }
-
-
-
-            return keyString;
-        }
-    };
-
-
-
-    private static MemberInfo obtainMember(MemberDoc o)
-    {
-        return (MemberInfo)mMembers.obtain(o);
-    }
-    private static Cache mMembers = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            if (o instanceof MethodDoc) {
-                return Converter.obtainMethod((MethodDoc)o);
-            }
-            else if (o instanceof ConstructorDoc) {
-                return Converter.obtainMethod((ConstructorDoc)o);
-            }
-            else if (o instanceof FieldDoc) {
-                return Converter.obtainField((FieldDoc)o);
-            }
-            else {
-                return null;
-            }
-        }
-    };
-
-    private static AnnotationInstanceInfo[] convertAnnotationInstances(AnnotationDesc[] orig)
-    {
-        int len = orig.length;
-        AnnotationInstanceInfo[] out = new AnnotationInstanceInfo[len];
-        for (int i=0; i<len; i++) {
-            out[i] = Converter.obtainAnnotationInstance(orig[i]);
-        }
-        return out;
-    }
-
-
-    private static AnnotationInstanceInfo obtainAnnotationInstance(AnnotationDesc o)
-    {
-        return (AnnotationInstanceInfo)mAnnotationInstances.obtain(o);
-    }
-    private static Cache mAnnotationInstances = new Cache()
-    {
-        @Override
-        protected Object make(Object o)
-        {
-            AnnotationDesc a = (AnnotationDesc)o;
-            ClassInfo annotationType = Converter.obtainClass(a.annotationType());
-            AnnotationDesc.ElementValuePair[] ev = a.elementValues();
-            AnnotationValueInfo[] elementValues = new AnnotationValueInfo[ev.length];
-            for (int i=0; i<ev.length; i++) {
-                elementValues[i] = obtainAnnotationValue(ev[i].value(),
-                                            Converter.obtainMethod(ev[i].element()));
-            }
-            return new AnnotationInstanceInfo(annotationType, elementValues);
-        }
-    };
-
-
-    private abstract static class Cache
-    {
-        void put(Object key, Object value)
-        {
-            mCache.put(key, value);
-        }
-        Object obtain(Object o)
-        {
-            if (o == null ) {
-                return null;
-            }
-            Object k = keyFor(o);
-            Object r = mCache.get(k);
-            if (r == null) {
-                r = make(o);
-                mCache.put(k, r);
-                made(o, r);
-            }
-            return r;
-        }
-        protected HashMap<Object,Object> mCache = new HashMap<Object,Object>();
-        protected abstract Object make(Object o);
-        protected void made(Object o, Object r)
-        {
-        }
-        protected Object keyFor(Object o) { return o; }
-        Object[] all() { return null; }
-    }
-
-    // annotation values
-    private static HashMap<AnnotationValue,AnnotationValueInfo> mAnnotationValues = new HashMap();
-    private static HashSet<AnnotationValue> mAnnotationValuesNeedingInit = new HashSet();
-
-    private static AnnotationValueInfo obtainAnnotationValue(AnnotationValue o, MethodInfo element)
-    {
-        if (o == null) {
-            return null;
-        }
-        AnnotationValueInfo v = mAnnotationValues.get(o);
-        if (v != null) return v;
-        v = new AnnotationValueInfo(element);
-        mAnnotationValues.put(o, v);
-        if (mAnnotationValuesNeedingInit != null) {
-            mAnnotationValuesNeedingInit.add(o);
-        } else {
-            initAnnotationValue(o, v);
-        }
-        return v;
-    }
-
-    private static void initAnnotationValue(AnnotationValue o, AnnotationValueInfo v) {
-        Object orig = o.value();
-        Object converted;
-        if (orig instanceof Type) {
-            // class literal
-            converted = Converter.obtainType((Type)orig);
-        }
-        else if (orig instanceof FieldDoc) {
-            // enum constant
-            converted = Converter.obtainField((FieldDoc)orig);
-        }
-        else if (orig instanceof AnnotationDesc) {
-            // annotation instance
-            converted = Converter.obtainAnnotationInstance((AnnotationDesc)orig);
-        }
-        else if (orig instanceof AnnotationValue[]) {
-            AnnotationValue[] old = (AnnotationValue[])orig;
-            AnnotationValueInfo[] array = new AnnotationValueInfo[old.length];
-            for (int i=0; i<array.length; i++) {
-                array[i] = Converter.obtainAnnotationValue(old[i], null);
-            }
-            converted = array;
-        }
-        else {
-            converted = orig;
-        }
-        v.init(converted);
-    }
-
-    private static void finishAnnotationValueInit()
-    {
-        int depth = 0;
-        while (mAnnotationValuesNeedingInit.size() > 0) {
-            HashSet<AnnotationValue> set = mAnnotationValuesNeedingInit;
-            mAnnotationValuesNeedingInit = new HashSet();
-            for (AnnotationValue o: set) {
-                AnnotationValueInfo v = mAnnotationValues.get(o);
-                initAnnotationValue(o, v);
-            }
-            depth++;
-        }
-        mAnnotationValuesNeedingInit = null;
-    }
-}
diff --git a/tools/droiddoc/src/DocFile.java b/tools/droiddoc/src/DocFile.java
deleted file mode 100644
index 180fdcd..0000000
--- a/tools/droiddoc/src/DocFile.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-
-public class DocFile
-{
-    private static final Pattern LINE = Pattern.compile("(.*)[\r]?\n",
-                                                        Pattern.MULTILINE);
-    private static final Pattern PROP = Pattern.compile("([^=]+)=(.*)");
-
-    public static String readFile(String filename)
-    {
-        try {
-            File f = new File(filename);
-            int length = (int)f.length();
-            FileInputStream is = new FileInputStream(f);
-            InputStreamReader reader = new InputStreamReader(is, "UTF-8");
-            char[] buf = new char[length];
-            int index = 0;
-            int amt;
-            while (true) {
-                amt = reader.read(buf, index, length-index);
-
-                if (amt < 1) {
-                    break;
-                }
-
-                index += amt;
-            }
-            return new String(buf, 0, index);
-        }
-        catch (IOException e) {
-            return null;
-        }
-    }
-
-    public static void writePage(String docfile, String relative,
-                                    String outfile)
-    {
-        HDF hdf = DroidDoc.makeHDF();
-
-        /*
-        System.out.println("docfile='" + docfile
-                            + "' relative='" + relative + "'"
-                            + "' outfile='" + outfile + "'");
-        */
-
-        String filedata = readFile(docfile);
-
-        // The document is properties up until the line "@jd:body".
-        // Any blank lines are ignored.
-        int start = -1;
-        int lineno = 1;
-        Matcher lines = LINE.matcher(filedata);
-        String line = null;
-        while (lines.find()) {
-            line = lines.group(1);
-            if (line.length() > 0) {
-                if (line.equals("@jd:body")) {
-                    start = lines.end();
-                    break;
-                }
-                Matcher prop = PROP.matcher(line);
-                if (prop.matches()) {
-                    String key = prop.group(1);
-                    String value = prop.group(2);
-                    hdf.setValue(key, value);
-                } else {
-                    break;
-                }
-            }
-            lineno++;
-        }
-        if (start < 0) {
-            System.err.println(docfile + ":" + lineno + ": error parsing docfile");
-            if (line != null) {
-                System.err.println(docfile + ":" + lineno + ":" + line);
-            }
-            System.exit(1);
-        }
-
-        // if they asked to only be for a certain template, maybe skip it
-        String fromTemplate = hdf.getValue("template.which", "");
-        String fromPage = hdf.getValue("page.onlyfortemplate", "");
-        if (!"".equals(fromPage) && !fromTemplate.equals(fromPage)) {
-            return;
-        }
-
-        // and the actual text after that
-        String commentText = filedata.substring(start);
-
-        Comment comment = new Comment(commentText, null,
-                                    new SourcePositionInfo(docfile, lineno, 1));
-        TagInfo[] tags = comment.tags();
-
-        TagInfo.makeHDF(hdf, "root.descr", tags);
-
-        hdf.setValue("commentText", commentText);
-
-        // write the page using the appropriate root template, based on the 
-        // whichdoc value supplied by build
-        String fromWhichmodule = hdf.getValue("android.whichmodule", "");
-        if (fromWhichmodule.equals("online-pdk")) {
-            //leaving this in just for temporary compatibility with pdk doc
-            hdf.setValue("online-pdk", "true");
-            // add any conditional login for root template here (such as 
-            // for custom left nav based on tab etc. 
-            ClearPage.write(hdf, "docpage.cs", outfile);
-        } else {
-            if (outfile.indexOf("sdk/") != -1) {
-                hdf.setValue("sdk", "true");
-                if ((outfile.indexOf("index.html") != -1) && (outfile.indexOf("preview/") == -1)) {
-                    ClearPage.write(hdf, "sdkpage.cs", outfile);
-                } else {
-                    ClearPage.write(hdf, "docpage.cs", outfile);
-                }
-            } 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, "docpage.cs", outfile);
-            } else {
-                ClearPage.write(hdf, "nosidenavpage.cs", outfile);
-            }
-        }
-    } //writePage
-}
diff --git a/tools/droiddoc/src/DocInfo.java b/tools/droiddoc/src/DocInfo.java
deleted file mode 100644
index 3abb367..0000000
--- a/tools/droiddoc/src/DocInfo.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public abstract class DocInfo
-{
-    public DocInfo(String rawCommentText, SourcePositionInfo sp)
-    {
-        mRawCommentText = rawCommentText;
-        mPosition = sp;
-    }
-
-    public boolean isHidden()
-    {
-        return comment().isHidden();
-    }
-
-    public boolean isDocOnly() {
-        return comment().isDocOnly();
-    }
-    
-    public String getRawCommentText()
-    {
-        return mRawCommentText;
-    }
-
-    public Comment comment()
-    {
-        if (mComment == null) {
-            mComment = new Comment(mRawCommentText, parent(), mPosition);
-        }
-        return mComment;
-    }
-
-    public SourcePositionInfo position()
-    {
-        return mPosition;
-    }
-
-    public abstract ContainerInfo parent();
-
-    public void setSince(String since) {
-        mSince = since;
-    }
-
-    public String getSince() {
-        return mSince;
-    }
-
-    private String mRawCommentText;
-    Comment mComment;
-    SourcePositionInfo mPosition;
-    private String mSince;
-}
-
diff --git a/tools/droiddoc/src/DroidDoc.java b/tools/droiddoc/src/DroidDoc.java
deleted file mode 100644
index dfdbda6..0000000
--- a/tools/droiddoc/src/DroidDoc.java
+++ /dev/null
@@ -1,1465 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import com.sun.javadoc.*;
-
-import org.clearsilver.HDF;
-
-import java.util.*;
-import java.io.*;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-public class DroidDoc
-{
-    private static final String SDK_CONSTANT_ANNOTATION = "android.annotation.SdkConstant";
-    private static final String SDK_CONSTANT_TYPE_ACTIVITY_ACTION = "android.annotation.SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION";
-    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";
-
-    private static final int TYPE_NONE = 0;
-    private static final int TYPE_WIDGET = 1;
-    private static final int TYPE_LAYOUT = 2;
-    private static final int TYPE_LAYOUT_PARAM = 3;
-
-    public static final int SHOW_PUBLIC = 0x00000001;
-    public static final int SHOW_PROTECTED = 0x00000003;
-    public static final int SHOW_PACKAGE = 0x00000007;
-    public static final int SHOW_PRIVATE = 0x0000000f;
-    public static final int SHOW_HIDDEN = 0x0000001f;
-
-    public static int showLevel = SHOW_PROTECTED;
-
-    public static final String javadocDir = "reference/";
-    public static String htmlExtension;
-
-    public static RootDoc root;
-    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 HashSet<String> knownTags = new HashSet<String>();
-
-    private static boolean parseComments = false;
-    private static boolean generateDocs = true;
-    
-    /**
-    * Returns true if we should parse javadoc comments,
-    * reporting errors in the process.
-    */
-    public static boolean parseComments() {
-        return generateDocs || parseComments;
-    }
-
-    public static boolean checkLevel(int level)
-    {
-        return (showLevel & level) == level;
-    }
-
-    public static boolean checkLevel(boolean pub, boolean prot, boolean pkgp,
-            boolean priv, boolean hidden)
-    {
-        int level = 0;
-        if (hidden && !checkLevel(SHOW_HIDDEN)) {
-            return false;
-        }
-        if (pub && checkLevel(SHOW_PUBLIC)) {
-            return true;
-        }
-        if (prot && checkLevel(SHOW_PROTECTED)) {
-            return true;
-        }
-        if (pkgp && checkLevel(SHOW_PACKAGE)) {
-            return true;
-        }
-        if (priv && checkLevel(SHOW_PRIVATE)) {
-            return true;
-        }
-        return false;
-    }
-
-    public static boolean start(RootDoc r)
-    {
-        String keepListFile = null;
-        String proofreadFile = null;
-        String todoFile = null;
-        String sdkValuePath = null;
-        ArrayList<SampleCode> sampleCodes = new ArrayList<SampleCode>();
-        String stubsDir = null;
-        //Create the dependency graph for the stubs directory
-        boolean apiXML = false;
-        boolean offlineMode = false;
-        String apiFile = null;
-        String debugStubsFile = "";
-        HashSet<String> stubPackages = null;
-        ArrayList<String> knownTagsFiles = new ArrayList<String>();
-
-        root = r;
-
-        String[][] options = r.options();
-        for (String[] a: options) {
-            if (a[0].equals("-d")) {
-                ClearPage.outputDir = a[1];
-            }
-            else if (a[0].equals("-templatedir")) {
-                ClearPage.addTemplateDir(a[1]);
-            }
-            else if (a[0].equals("-hdf")) {
-                mHDFData.add(new String[] {a[1], a[2]});
-            }
-            else if (a[0].equals("-knowntags")) {
-                knownTagsFiles.add(a[1]);
-            }
-            else if (a[0].equals("-toroot")) {
-                ClearPage.toroot = a[1];
-            }
-            else if (a[0].equals("-samplecode")) {
-                sampleCodes.add(new SampleCode(a[1], a[2], a[3]));
-            }
-            else if (a[0].equals("-htmldir")) {
-                ClearPage.htmlDirs.add(a[1]);
-            }
-            else if (a[0].equals("-title")) {
-                DroidDoc.title = a[1];
-            }
-            else if (a[0].equals("-werror")) {
-                Errors.setWarningsAreErrors(true);
-            }
-            else if (a[0].equals("-error") || a[0].equals("-warning")
-                    || a[0].equals("-hide")) {
-                try {
-                    int level = -1;
-                    if (a[0].equals("-error")) {
-                        level = Errors.ERROR;
-                    }
-                    else if (a[0].equals("-warning")) {
-                        level = Errors.WARNING;
-                    }
-                    else if (a[0].equals("-hide")) {
-                        level = Errors.HIDDEN;
-                    }
-                    Errors.setErrorLevel(Integer.parseInt(a[1]), level);
-                }
-                catch (NumberFormatException e) {
-                    // already printed below
-                    return false;
-                }
-            }
-            else if (a[0].equals("-keeplist")) {
-                keepListFile = a[1];
-            }
-            else if (a[0].equals("-proofread")) {
-                proofreadFile = a[1];
-            }
-            else if (a[0].equals("-todo")) {
-                todoFile = a[1];
-            }
-            else if (a[0].equals("-public")) {
-                showLevel = SHOW_PUBLIC;
-            }
-            else if (a[0].equals("-protected")) {
-                showLevel = SHOW_PROTECTED;
-            }
-            else if (a[0].equals("-package")) {
-                showLevel = SHOW_PACKAGE;
-            }
-            else if (a[0].equals("-private")) {
-                showLevel = SHOW_PRIVATE;
-            }
-            else if (a[0].equals("-hidden")) {
-                showLevel = SHOW_HIDDEN;
-            }
-            else if (a[0].equals("-stubs")) {
-                stubsDir = a[1];
-            }
-            else if (a[0].equals("-stubpackages")) {
-                stubPackages = new HashSet();
-                for (String pkg: a[1].split(":")) {
-                    stubPackages.add(pkg);
-                }
-            }
-            else if (a[0].equals("-sdkvalues")) {
-                sdkValuePath = a[1];
-            }
-            else if (a[0].equals("-apixml")) {
-                apiXML = true;
-                apiFile = a[1];
-            }
-            else if (a[0].equals("-nodocs")) {
-                generateDocs = false;
-            }
-            else if (a[0].equals("-parsecomments")) {
-                parseComments = true;
-            }
-            else if (a[0].equals("-since")) {
-                sinceTagger.addVersion(a[1], a[2]);
-            }
-            else if (a[0].equals("-offlinemode")) {
-                offlineMode = true;
-            }
-        }
-
-        if (!readKnownTagsFiles(knownTags, knownTagsFiles)) {
-            return false;
-        }
-
-        // read some prefs from the template
-        if (!readTemplateSettings()) {
-            return false;
-        }
-
-        // Set up the data structures
-        Converter.makeInfo(r);
-
-        if (generateDocs) {
-            long startTime = System.nanoTime();
-
-            // Apply @since tags from the XML file
-            sinceTagger.tagAll(Converter.rootClasses());
-
-            // Files for proofreading
-            if (proofreadFile != null) {
-                Proofread.initProofread(proofreadFile);
-            }
-            if (todoFile != null) {
-                TodoFile.writeTodoFile(todoFile);
-            }
-
-            // HTML Pages
-            if (!ClearPage.htmlDirs.isEmpty()) {
-                writeHTMLPages();
-            }
-
-            // Navigation tree
-            NavTree.writeNavTree(javadocDir);
-
-            // Packages Pages
-            writePackages(javadocDir
-                            + (!ClearPage.htmlDirs.isEmpty()
-                                ? "packages" + htmlExtension
-                                : "index" + htmlExtension));
-
-            // Classes
-            writeClassLists();
-            writeClasses();
-            writeHierarchy();
-     //      writeKeywords();
-
-            // Lists for JavaScript
-            writeLists();
-            if (keepListFile != null) {
-                writeKeepList(keepListFile);
-            }
-
-            // Sample Code
-            for (SampleCode sc: sampleCodes) {
-                sc.write(offlineMode);
-            }
-
-            // Index page
-            writeIndex();
-
-            Proofread.finishProofread(proofreadFile);
-
-            if (sdkValuePath != null) {
-                writeSdkValues(sdkValuePath);
-            }
-
-            long time = System.nanoTime() - startTime;
-            System.out.println("DroidDoc took " + (time / 1000000000) + " sec. to write docs to "
-                    + ClearPage.outputDir);
-        }
-
-        // Stubs
-        if (stubsDir != null) {
-            Stubs.writeStubs(stubsDir, apiXML, apiFile, stubPackages);
-        }
-
-        Errors.printErrors();
-        return !Errors.hadError;
-    }
-
-    private static void writeIndex() {
-        HDF data = makeHDF();
-        ClearPage.write(data, "index.cs", javadocDir + "index" + htmlExtension);
-    }
-
-    private static boolean readTemplateSettings()
-    {
-        HDF data = makeHDF();
-        htmlExtension = data.getValue("template.extension", ".html");
-        int i=0;
-        while (true) {
-            String k = data.getValue("template.escape." + i + ".key", "");
-            String v = data.getValue("template.escape." + i + ".value", "");
-            if ("".equals(k)) {
-                break;
-            }
-            if (k.length() != 1) {
-                System.err.println("template.escape." + i + ".key must have a length of 1: " + k);
-                return false;
-            }
-            escapeChars.put(k.charAt(0), v);
-            i++;
-        }
-        return true;
-    }
-
-    private static boolean readKnownTagsFiles(HashSet<String> knownTags,
-            ArrayList<String> knownTagsFiles) {
-        for (String fn: knownTagsFiles) {
-            BufferedReader in = null;
-            try {
-                in = new BufferedReader(new FileReader(fn));
-                int lineno = 0;
-                boolean fail = false;
-                while (true) {
-                    lineno++;
-                    String line = in.readLine();
-                    if (line == null) {
-                        break;
-                    }
-                    line = line.trim();
-                    if (line.length() == 0) {
-                        continue;
-                    } else if (line.charAt(0) == '#') {
-                        continue;
-                    }
-                    String[] words = line.split("\\s+", 2);
-                    if (words.length == 2) {
-                        if (words[1].charAt(0) != '#') {
-                            System.err.println(fn + ":" + lineno
-                                    + ": Only one tag allowed per line: " + line);
-                            fail = true;
-                            continue;
-                        }
-                    }
-                    knownTags.add(words[0]);
-                }
-                if (fail) {
-                    return false;
-                }
-            } catch (IOException ex) {
-                System.err.println("Error reading file: " + fn + " (" + ex.getMessage() + ")");
-                return false;
-            } finally {
-                if (in != null) {
-                    try {
-                        in.close();
-                    } catch (IOException e) {
-                    }
-                }
-            }
-        }
-        return true;
-    }
-
-    public static String escape(String s) {
-        if (escapeChars.size() == 0) {
-            return s;
-        }
-        StringBuffer b = null;
-        int begin = 0;
-        final int N = s.length();
-        for (int i=0; i<N; i++) {
-            char c = s.charAt(i);
-            String mapped = escapeChars.get(c);
-            if (mapped != null) {
-                if (b == null) {
-                    b = new StringBuffer(s.length() + mapped.length());
-                }
-                if (begin != i) {
-                    b.append(s.substring(begin, i));
-                }
-                b.append(mapped);
-                begin = i+1;
-            }
-        }
-        if (b != null) {
-            if (begin != N) {
-                b.append(s.substring(begin, N));
-            }
-            return b.toString();
-        }
-        return s;
-    }
-
-    public static void setPageTitle(HDF data, String title)
-    {
-        String s = title;
-        if (DroidDoc.title.length() > 0) {
-            s += " - " + DroidDoc.title;
-        }
-        data.setValue("page.title", s);
-    }
-
-    public static LanguageVersion languageVersion()
-    {
-        return LanguageVersion.JAVA_1_5;
-    }
-
-    public static int optionLength(String option)
-    {
-        if (option.equals("-d")) {
-            return 2;
-        }
-        if (option.equals("-templatedir")) {
-            return 2;
-        }
-        if (option.equals("-hdf")) {
-            return 3;
-        }
-        if (option.equals("-knowntags")) {
-            return 2;
-        }
-        if (option.equals("-toroot")) {
-            return 2;
-        }
-        if (option.equals("-samplecode")) {
-            return 4;
-        }
-        if (option.equals("-htmldir")) {
-            return 2;
-        }
-        if (option.equals("-title")) {
-            return 2;
-        }
-        if (option.equals("-werror")) {
-            return 1;
-        }
-        if (option.equals("-hide")) {
-            return 2;
-        }
-        if (option.equals("-warning")) {
-            return 2;
-        }
-        if (option.equals("-error")) {
-            return 2;
-        }
-        if (option.equals("-keeplist")) {
-            return 2;
-        }
-        if (option.equals("-proofread")) {
-            return 2;
-        }
-        if (option.equals("-todo")) {
-            return 2;
-        }
-        if (option.equals("-public")) {
-            return 1;
-        }
-        if (option.equals("-protected")) {
-            return 1;
-        }
-        if (option.equals("-package")) {
-            return 1;
-        }
-        if (option.equals("-private")) {
-            return 1;
-        }
-        if (option.equals("-hidden")) {
-            return 1;
-        }
-        if (option.equals("-stubs")) {
-            return 2;
-        }
-        if (option.equals("-stubpackages")) {
-            return 2;
-        }
-        if (option.equals("-sdkvalues")) {
-            return 2;
-        }
-        if (option.equals("-apixml")) {
-            return 2;
-        }
-        if (option.equals("-nodocs")) {
-            return 1;
-        }
-        if (option.equals("-parsecomments")) {
-            return 1;
-        }
-        if (option.equals("-since")) {
-            return 3;
-        }
-        if (option.equals("-offlinemode")) {
-            return 1;
-        }
-        return 0;
-    }
-
-    public static boolean validOptions(String[][] options, DocErrorReporter r)
-    {
-        for (String[] a: options) {
-            if (a[0].equals("-error") || a[0].equals("-warning")
-                    || a[0].equals("-hide")) {
-                try {
-                    Integer.parseInt(a[1]);
-                }
-                catch (NumberFormatException e) {
-                    r.printError("bad -" + a[0] + " value must be a number: "
-                            + a[1]);
-                    return false;
-                }
-            }
-        }
-
-        return true;
-    }
-
-    public static HDF makeHDF()
-    {
-        HDF data = new HDF();
-
-        for (String[] p: mHDFData) {
-            data.setValue(p[0], p[1]);
-        }
-
-        try {
-            for (String p: ClearPage.hdfFiles) {
-                data.readFile(p);
-            }
-        }
-        catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-
-        return data;
-    }
-
-    public static HDF makePackageHDF()
-    {
-        HDF data = makeHDF();
-        ClassInfo[] classes = Converter.rootClasses();
-
-        SortedMap<String, PackageInfo> sorted = new TreeMap<String, PackageInfo>();
-        for (ClassInfo cl: classes) {
-            PackageInfo pkg = cl.containingPackage();
-            String name;
-            if (pkg == null) {
-                name = "";
-            } else {
-                name = pkg.name();
-            }
-            sorted.put(name, pkg);
-        }
-
-        int i = 0;
-        for (String s: sorted.keySet()) {
-            PackageInfo pkg = sorted.get(s);
-
-            if (pkg.isHidden()) {
-                continue;
-            }
-            Boolean allHidden = true;
-            int pass = 0;
-            ClassInfo[] classesToCheck = null;
-            while (pass < 5 ) {
-                switch(pass) {
-                case 0:
-                    classesToCheck = pkg.ordinaryClasses();
-                    break;
-                case 1:
-                    classesToCheck = pkg.enums();
-                    break;
-                case 2:
-                    classesToCheck = pkg.errors();
-                    break;
-                case 3:
-                    classesToCheck = pkg.exceptions();
-                    break;
-                case 4:
-                    classesToCheck = pkg.interfaces();
-                    break;
-                default:
-                    System.err.println("Error reading package: " + pkg.name());
-                    break;
-                }
-                for (ClassInfo cl : classesToCheck) {
-                    if (!cl.isHidden()) {
-                        allHidden = false;
-                        break;
-                    }
-                }
-                if (!allHidden) {
-                    break;
-                }
-                pass++;
-            }
-            if (allHidden) {
-                continue;
-            }
-
-            data.setValue("reference", "true");
-            data.setValue("docs.packages." + i + ".name", s);
-            data.setValue("docs.packages." + i + ".link", pkg.htmlPage());
-            data.setValue("docs.packages." + i + ".since", pkg.getSince());
-            TagInfo.makeHDF(data, "docs.packages." + i + ".shortDescr",
-                                               pkg.firstSentenceTags());
-            i++;
-        }
-
-        sinceTagger.writeVersionNames(data);
-        return data;
-    }
-
-    public static void writeDirectory(File dir, String relative)
-    {
-        File[] files = dir.listFiles();
-        int i, count = files.length;
-        for (i=0; i<count; i++) {
-            File f = files[i];
-            if (f.isFile()) {
-                String templ = relative + f.getName();
-                int len = templ.length();
-                if (len > 3 && ".cs".equals(templ.substring(len-3))) {
-                    HDF data = makeHDF();
-                    String filename = templ.substring(0,len-3) + htmlExtension;
-                    ClearPage.write(data, templ, filename);
-                }
-                else if (len > 3 && ".jd".equals(templ.substring(len-3))) {
-                    String filename = templ.substring(0,len-3) + htmlExtension;
-                    DocFile.writePage(f.getAbsolutePath(), relative, filename);
-                }
-                else {
-                    ClearPage.copyFile(f, templ);
-                }
-            }
-            else if (f.isDirectory()) {
-                writeDirectory(f, relative + f.getName() + "/");
-            }
-        }
-    }
-
-    public static void writeHTMLPages()
-    {
-        for (String htmlDir : ClearPage.htmlDirs) {
-            File f = new File(htmlDir);
-            if (!f.isDirectory()) {
-                System.err.println("htmlDir not a directory: " + htmlDir);
-                continue;
-            }
-            writeDirectory(f, "");
-        }
-    }
-
-    public static void writeLists()
-    {
-        HDF data = makeHDF();
-
-        ClassInfo[] classes = Converter.rootClasses();
-
-        SortedMap<String, Object> sorted = new TreeMap<String, Object>();
-        for (ClassInfo cl: classes) {
-            if (cl.isHidden()) {
-                continue;
-            }
-            sorted.put(cl.qualifiedName(), cl);
-            PackageInfo pkg = cl.containingPackage();
-            String name;
-            if (pkg == null) {
-                name = "";
-            } else {
-                name = pkg.name();
-            }
-            sorted.put(name, pkg);
-        }
-
-        int i = 0;
-        for (String s: sorted.keySet()) {
-            data.setValue("docs.pages." + i + ".id" , ""+i);
-            data.setValue("docs.pages." + i + ".label" , s);
-
-            Object o = sorted.get(s);
-            if (o instanceof PackageInfo) {
-                PackageInfo pkg = (PackageInfo)o;
-                data.setValue("docs.pages." + i + ".link" , pkg.htmlPage());
-                data.setValue("docs.pages." + i + ".type" , "package");
-            }
-            else if (o instanceof ClassInfo) {
-                ClassInfo cl = (ClassInfo)o;
-                data.setValue("docs.pages." + i + ".link" , cl.htmlPage());
-                data.setValue("docs.pages." + i + ".type" , "class");
-            }
-            i++;
-        }
-
-        ClearPage.write(data, "lists.cs", javadocDir + "lists.js");
-    }
-
-    public static void cantStripThis(ClassInfo cl, HashSet<ClassInfo> notStrippable) {
-        if (!notStrippable.add(cl)) {
-            // slight optimization: if it already contains cl, it already contains
-            // all of cl's parents
-            return;
-        }
-        ClassInfo supr = cl.superclass();
-        if (supr != null) {
-            cantStripThis(supr, notStrippable);
-        }
-        for (ClassInfo iface: cl.interfaces()) {
-            cantStripThis(iface, notStrippable);
-        }
-    }
-
-    private static String getPrintableName(ClassInfo cl) {
-        ClassInfo containingClass = cl.containingClass();
-        if (containingClass != null) {
-            // This is an inner class.
-            String baseName = cl.name();
-            baseName = baseName.substring(baseName.lastIndexOf('.') + 1);
-            return getPrintableName(containingClass) + '$' + baseName;
-        }
-        return cl.qualifiedName();
-    }
-
-    /**
-     * Writes the list of classes that must be present in order to
-     * provide the non-hidden APIs known to javadoc.
-     *
-     * @param filename the path to the file to write the list to
-     */
-    public static void writeKeepList(String filename) {
-        HashSet<ClassInfo> notStrippable = new HashSet<ClassInfo>();
-        ClassInfo[] all = Converter.allClasses();
-        Arrays.sort(all); // just to make the file a little more readable
-
-        // If a class is public and not hidden, then it and everything it derives
-        // from cannot be stripped.  Otherwise we can strip it.
-        for (ClassInfo cl: all) {
-            if (cl.isPublic() && !cl.isHidden()) {
-                cantStripThis(cl, notStrippable);
-            }
-        }
-        PrintStream stream = null;
-        try {
-            stream = new PrintStream(filename);
-            for (ClassInfo cl: notStrippable) {
-                stream.println(getPrintableName(cl));
-            }
-        }
-        catch (FileNotFoundException e) {
-            System.err.println("error writing file: " + filename);
-        }
-        finally {
-            if (stream != null) {
-                stream.close();
-            }
-        }
-    }
-
-    private static PackageInfo[] sVisiblePackages = null;
-    public static PackageInfo[] choosePackages() {
-        if (sVisiblePackages != null) {
-            return sVisiblePackages;
-        }
-
-        ClassInfo[] classes = Converter.rootClasses();
-        SortedMap<String, PackageInfo> sorted = new TreeMap<String, PackageInfo>();
-        for (ClassInfo cl: classes) {
-            PackageInfo pkg = cl.containingPackage();
-            String name;
-            if (pkg == null) {
-                name = "";
-            } else {
-                name = pkg.name();
-            }
-            sorted.put(name, pkg);
-        }
-
-        ArrayList<PackageInfo> result = new ArrayList();
-
-        for (String s: sorted.keySet()) {
-            PackageInfo pkg = sorted.get(s);
-
-            if (pkg.isHidden()) {
-                continue;
-            }
-            Boolean allHidden = true;
-            int pass = 0;
-            ClassInfo[] classesToCheck = null;
-            while (pass < 5 ) {
-                switch(pass) {
-                case 0:
-                    classesToCheck = pkg.ordinaryClasses();
-                    break;
-                case 1:
-                    classesToCheck = pkg.enums();
-                    break;
-                case 2:
-                    classesToCheck = pkg.errors();
-                    break;
-                case 3:
-                    classesToCheck = pkg.exceptions();
-                    break;
-                case 4:
-                    classesToCheck = pkg.interfaces();
-                    break;
-                default:
-                    System.err.println("Error reading package: " + pkg.name());
-                    break;
-                }
-                for (ClassInfo cl : classesToCheck) {
-                    if (!cl.isHidden()) {
-                        allHidden = false;
-                        break;
-                    }
-                }
-                if (!allHidden) {
-                    break;
-                }
-                pass++;
-            }
-            if (allHidden) {
-                continue;
-            }
-
-            result.add(pkg);
-        }
-
-        sVisiblePackages = result.toArray(new PackageInfo[result.size()]);
-        return sVisiblePackages;
-    }
-
-    public static void writePackages(String filename)
-    {
-        HDF data = makePackageHDF();
-
-        int i = 0;
-        for (PackageInfo pkg: choosePackages()) {
-            writePackage(pkg);
-
-            data.setValue("docs.packages." + i + ".name", pkg.name());
-            data.setValue("docs.packages." + i + ".link", pkg.htmlPage());
-            TagInfo.makeHDF(data, "docs.packages." + i + ".shortDescr",
-                            pkg.firstSentenceTags());
-
-            i++;
-        }
-
-        setPageTitle(data, "Package Index");
-
-        TagInfo.makeHDF(data, "root.descr",
-                Converter.convertTags(root.inlineTags(), null));
-
-        ClearPage.write(data, "packages.cs", filename);
-        ClearPage.write(data, "package-list.cs", javadocDir + "package-list");
-
-        Proofread.writePackages(filename,
-                Converter.convertTags(root.inlineTags(), null));
-    }
-
-    public static void writePackage(PackageInfo pkg)
-    {
-        // these this and the description are in the same directory,
-        // so it's okay
-        HDF data = makePackageHDF();
-
-        String name = pkg.name();
-
-        data.setValue("package.name", name);
-        data.setValue("package.since", pkg.getSince());
-        data.setValue("package.descr", "...description...");
-
-        makeClassListHDF(data, "package.interfaces",
-                         ClassInfo.sortByName(pkg.interfaces()));
-        makeClassListHDF(data, "package.classes",
-                         ClassInfo.sortByName(pkg.ordinaryClasses()));
-        makeClassListHDF(data, "package.enums",
-                         ClassInfo.sortByName(pkg.enums()));
-        makeClassListHDF(data, "package.exceptions",
-                         ClassInfo.sortByName(pkg.exceptions()));
-        makeClassListHDF(data, "package.errors",
-                         ClassInfo.sortByName(pkg.errors()));
-        TagInfo.makeHDF(data, "package.shortDescr",
-                         pkg.firstSentenceTags());
-        TagInfo.makeHDF(data, "package.descr", pkg.inlineTags());
-
-        String filename = pkg.htmlPage();
-        setPageTitle(data, name);
-        ClearPage.write(data, "package.cs", filename);
-
-        filename = pkg.fullDescriptionHtmlPage();
-        setPageTitle(data, name + " Details");
-        ClearPage.write(data, "package-descr.cs", filename);
-
-        Proofread.writePackage(filename, pkg.inlineTags());
-    }
-
-    public static void writeClassLists()
-    {
-        int i;
-        HDF data = makePackageHDF();
-
-        ClassInfo[] classes = PackageInfo.filterHidden(
-                                    Converter.convertClasses(root.classes()));
-        if (classes.length == 0) {
-            return ;
-        }
-
-        Sorter[] sorted = new Sorter[classes.length];
-        for (i=0; i<sorted.length; i++) {
-            ClassInfo cl = classes[i];
-            String name = cl.name();
-            sorted[i] = new Sorter(name, cl);
-        }
-
-        Arrays.sort(sorted);
-
-        // make a pass and resolve ones that have the same name
-        int firstMatch = 0;
-        String lastName = sorted[0].label;
-        for (i=1; i<sorted.length; i++) {
-            String s = sorted[i].label;
-            if (!lastName.equals(s)) {
-                if (firstMatch != i-1) {
-                    // there were duplicates
-                    for (int j=firstMatch; j<i; j++) {
-                        PackageInfo pkg = ((ClassInfo)sorted[j].data).containingPackage();
-                        if (pkg != null) {
-                            sorted[j].label = sorted[j].label + " (" + pkg.name() + ")";
-                        }
-                    }
-                }
-                firstMatch = i;
-                lastName = s;
-            }
-        }
-
-        // and sort again
-        Arrays.sort(sorted);
-
-        for (i=0; i<sorted.length; i++) {
-            String s = sorted[i].label;
-            ClassInfo cl = (ClassInfo)sorted[i].data;
-            char first = Character.toUpperCase(s.charAt(0));
-            cl.makeShortDescrHDF(data, "docs.classes." + first + '.' + i);
-        }
-
-        setPageTitle(data, "Class Index");
-        ClearPage.write(data, "classes.cs", javadocDir + "classes" + htmlExtension);
-    }
-
-    // we use the word keywords because "index" means something else in html land
-    // the user only ever sees the word index
-/*    public static void writeKeywords()
-    {
-        ArrayList<KeywordEntry> keywords = new ArrayList<KeywordEntry>();
-
-        ClassInfo[] classes = PackageInfo.filterHidden(Converter.convertClasses(root.classes()));
-
-        for (ClassInfo cl: classes) {
-            cl.makeKeywordEntries(keywords);
-        }
-
-        HDF data = makeHDF();
-
-        Collections.sort(keywords);
-
-        int i=0;
-        for (KeywordEntry entry: keywords) {
-            String base = "keywords." + entry.firstChar() + "." + i;
-            entry.makeHDF(data, base);
-            i++;
-        }
-
-        setPageTitle(data, "Index");
-        ClearPage.write(data, "keywords.cs", javadocDir + "keywords" + htmlExtension);
-    } */
-
-    public static void writeHierarchy()
-    {
-        ClassInfo[] classes = Converter.rootClasses();
-        ArrayList<ClassInfo> info = new ArrayList<ClassInfo>();
-        for (ClassInfo cl: classes) {
-            if (!cl.isHidden()) {
-                info.add(cl);
-            }
-        }
-        HDF data = makePackageHDF();
-        Hierarchy.makeHierarchy(data, info.toArray(new ClassInfo[info.size()]));
-        setPageTitle(data, "Class Hierarchy");
-        ClearPage.write(data, "hierarchy.cs", javadocDir + "hierarchy" + htmlExtension);
-    }
-
-    public static void writeClasses()
-    {
-        ClassInfo[] classes = Converter.rootClasses();
-
-        for (ClassInfo cl: classes) {
-            HDF data = makePackageHDF();
-            if (!cl.isHidden()) {
-                writeClass(cl, data);
-            }
-        }
-    }
-
-    public static void writeClass(ClassInfo cl, HDF data)
-    {
-        cl.makeHDF(data);
-
-        setPageTitle(data, cl.name());
-        ClearPage.write(data, "class.cs", cl.htmlPage());
-
-        Proofread.writeClass(cl.htmlPage(), cl);
-    }
-
-    public static void makeClassListHDF(HDF data, String base,
-            ClassInfo[] classes)
-    {
-        for (int i=0; i<classes.length; i++) {
-            ClassInfo cl = classes[i];
-            if (!cl.isHidden()) {
-                cl.makeShortDescrHDF(data, base + "." + i);
-            }
-        }
-    }
-
-    public static String linkTarget(String source, String target)
-    {
-        String[] src = source.split("/");
-        String[] tgt = target.split("/");
-
-        int srclen = src.length;
-        int tgtlen = tgt.length;
-
-        int same = 0;
-        while (same < (srclen-1)
-                && same < (tgtlen-1)
-                && (src[same].equals(tgt[same]))) {
-            same++;
-        }
-
-        String s = "";
-
-        int up = srclen-same-1;
-        for (int i=0; i<up; i++) {
-            s += "../";
-        }
-
-
-        int N = tgtlen-1;
-        for (int i=same; i<N; i++) {
-            s += tgt[i] + '/';
-        }
-        s += tgt[tgtlen-1];
-
-        return s;
-    }
-
-    /**
-     * Returns true if the given element has an @hide or @pending annotation.
-     */
-    private static boolean hasHideAnnotation(Doc doc) {
-        String comment = doc.getRawCommentText();
-        return comment.indexOf("@hide") != -1 || comment.indexOf("@pending") != -1;
-    }
-
-    /**
-     * Returns true if the given element is hidden.
-     */
-    private static boolean isHidden(Doc doc) {
-        // Methods, fields, constructors.
-        if (doc instanceof MemberDoc) {
-            return hasHideAnnotation(doc);
-        }
-
-        // Classes, interfaces, enums, annotation types.
-        if (doc instanceof ClassDoc) {
-            ClassDoc classDoc = (ClassDoc) doc;
-
-            // Check the containing package.
-            if (hasHideAnnotation(classDoc.containingPackage())) {
-                return true;
-            }
-
-            // Check the class doc and containing class docs if this is a
-            // nested class.
-            ClassDoc current = classDoc;
-            do {
-                if (hasHideAnnotation(current)) {
-                    return true;
-                }
-
-                current = current.containingClass();
-            } while (current != null);
-        }
-
-        return false;
-    }
-
-    /**
-     * Filters out hidden elements.
-     */
-    private static Object filterHidden(Object o, Class<?> expected) {
-        if (o == null) {
-            return null;
-        }
-
-        Class type = o.getClass();
-        if (type.getName().startsWith("com.sun.")) {
-            // TODO: Implement interfaces from superclasses, too.
-            return Proxy.newProxyInstance(type.getClassLoader(),
-                    type.getInterfaces(), new HideHandler(o));
-        } else if (o instanceof Object[]) {
-            Class<?> componentType = expected.getComponentType();
-            Object[] array = (Object[]) o;
-            List<Object> list = new ArrayList<Object>(array.length);
-            for (Object entry : array) {
-                if ((entry instanceof Doc) && isHidden((Doc) entry)) {
-                    continue;
-                }
-                list.add(filterHidden(entry, componentType));
-            }
-            return list.toArray(
-                    (Object[]) Array.newInstance(componentType, list.size()));
-        } else {
-            return o;
-        }
-    }
-
-    /**
-     * Filters hidden elements out of method return values.
-     */
-    private static class HideHandler implements InvocationHandler {
-
-        private final Object target;
-
-        public HideHandler(Object target) {
-            this.target = target;
-        }
-
-        public Object invoke(Object proxy, Method method, Object[] args)
-                throws Throwable {
-            String methodName = method.getName();
-            if (args != null) {
-                if (methodName.equals("compareTo") ||
-                    methodName.equals("equals") ||
-                    methodName.equals("overrides") ||
-                    methodName.equals("subclassOf")) {
-                    args[0] = unwrap(args[0]);
-                }
-            }
-
-            if (methodName.equals("getRawCommentText")) {
-                return filterComment((String) method.invoke(target, args));
-            }
-
-            // escape "&" in disjunctive types.
-            if (proxy instanceof Type && methodName.equals("toString")) {
-                return ((String) method.invoke(target, args))
-                        .replace("&", "&amp;");
-            }
-
-            try {
-                return filterHidden(method.invoke(target, args),
-                        method.getReturnType());
-            } catch (InvocationTargetException e) {
-                throw e.getTargetException();
-            }
-        }
-
-        private String filterComment(String s) {
-            if (s == null) {
-                return null;
-            }
-
-            s = s.trim();
-
-            // Work around off by one error
-            while (s.length() >= 5
-                    && s.charAt(s.length() - 5) == '{') {
-                s += "&nbsp;";
-            }
-
-            return s;
-        }
-
-        private static Object unwrap(Object proxy) {
-            if (proxy instanceof Proxy)
-                return ((HideHandler)Proxy.getInvocationHandler(proxy)).target;
-            return proxy;
-        }
-    }
-
-    public static String scope(Scoped scoped) {
-        if (scoped.isPublic()) {
-            return "public";
-        }
-        else if (scoped.isProtected()) {
-            return "protected";
-        }
-        else if (scoped.isPackagePrivate()) {
-            return "";
-        }
-        else if (scoped.isPrivate()) {
-            return "private";
-        }
-        else {
-            throw new RuntimeException("invalid scope for object " + scoped);
-        }
-    }
-
-    /**
-     * Collect the values used by the Dev tools and write them in files packaged with the SDK
-     * @param output the ouput directory for the files.
-     */
-    private static void writeSdkValues(String output) {
-        ArrayList<String> activityActions = new ArrayList<String>();
-        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>();
-        ArrayList<ClassInfo> layoutParams = new ArrayList<ClassInfo>();
-
-        ClassInfo[] classes = Converter.allClasses();
-
-        // Go through all the fields of all the classes, looking SDK stuff.
-        for (ClassInfo clazz : classes) {
-
-            // first check constant fields for the SdkConstant annotation.
-            FieldInfo[] fields = clazz.allSelfFields();
-            for (FieldInfo field : fields) {
-                Object cValue = field.constantValue();
-                if (cValue != null) {
-                    AnnotationInstanceInfo[] annotations = field.annotations();
-                    if (annotations.length > 0) {
-                        for (AnnotationInstanceInfo annotation : annotations) {
-                            if (SDK_CONSTANT_ANNOTATION.equals(annotation.type().qualifiedName())) {
-                                AnnotationValueInfo[] values = annotation.elementValues();
-                                if (values.length > 0) {
-                                    String type = values[0].valueString();
-                                    if (SDK_CONSTANT_TYPE_ACTIVITY_ACTION.equals(type)) {
-                                        activityActions.add(cValue.toString());
-                                    } else if (SDK_CONSTANT_TYPE_BROADCAST_ACTION.equals(type)) {
-                                        broadcastActions.add(cValue.toString());
-                                    } else if (SDK_CONSTANT_TYPE_SERVICE_ACTION.equals(type)) {
-                                        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;
-                            }
-                        }
-                    }
-                }
-            }
-
-            // Now check the class for @Widget or if its in the android.widget package
-            // (unless the class is hidden or abstract, or non public)
-            if (clazz.isHidden() == false && clazz.isPublic() && clazz.isAbstract() == false) {
-                boolean annotated = false;
-                AnnotationInstanceInfo[] annotations = clazz.annotations();
-                if (annotations.length > 0) {
-                    for (AnnotationInstanceInfo annotation : annotations) {
-                        if (SDK_WIDGET_ANNOTATION.equals(annotation.type().qualifiedName())) {
-                            widgets.add(clazz);
-                            annotated = true;
-                            break;
-                        } else if (SDK_LAYOUT_ANNOTATION.equals(annotation.type().qualifiedName())) {
-                            layouts.add(clazz);
-                            annotated = true;
-                            break;
-                        }
-                    }
-                }
-
-                if (annotated == false) {
-                    // lets check if this is inside android.widget
-                    PackageInfo pckg = clazz.containingPackage();
-                    String packageName = pckg.name();
-                    if ("android.widget".equals(packageName) ||
-                            "android.view".equals(packageName)) {
-                        // now we check what this class inherits either from android.view.ViewGroup
-                        // or android.view.View, or android.view.ViewGroup.LayoutParams
-                        int type = checkInheritance(clazz);
-                        switch (type) {
-                            case TYPE_WIDGET:
-                                widgets.add(clazz);
-                                break;
-                            case TYPE_LAYOUT:
-                                layouts.add(clazz);
-                                break;
-                            case TYPE_LAYOUT_PARAM:
-                                layoutParams.add(clazz);
-                                break;
-                        }
-                    }
-                }
-            }
-        }
-
-        // now write the files, whether or not the list are empty.
-        // the SDK built requires those files to be present.
-
-        Collections.sort(activityActions);
-        writeValues(output + "/activity_actions.txt", activityActions);
-
-        Collections.sort(broadcastActions);
-        writeValues(output + "/broadcast_actions.txt", broadcastActions);
-
-        Collections.sort(serviceActions);
-        writeValues(output + "/service_actions.txt", serviceActions);
-
-        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();) {
-            ClassInfo layoutParamClass = layoutParams.get(i);
-            ClassInfo containingClass = layoutParamClass.containingClass();
-            if (containingClass == null || layouts.indexOf(containingClass) == -1) {
-                layoutParams.remove(i);
-            } else {
-                i++;
-            }
-        }
-
-        writeClasses(output + "/widgets.txt", widgets, layouts, layoutParams);
-    }
-
-    /**
-     * Writes a list of values into a text files.
-     * @param pathname the absolute os path of the output file.
-     * @param values the list of values to write.
-     */
-    private static void writeValues(String pathname, ArrayList<String> values) {
-        FileWriter fw = null;
-        BufferedWriter bw = null;
-        try {
-            fw = new FileWriter(pathname, false);
-            bw = new BufferedWriter(fw);
-
-            for (String value : values) {
-                bw.append(value).append('\n');
-            }
-        } catch (IOException e) {
-            // pass for now
-        } finally {
-            try {
-                if (bw != null) bw.close();
-            } catch (IOException e) {
-                // pass for now
-            }
-            try {
-                if (fw != null) fw.close();
-            } catch (IOException e) {
-                // pass for now
-            }
-        }
-    }
-
-    /**
-     * Writes the widget/layout/layout param classes into a text files.
-     * @param pathname the absolute os path of the output file.
-     * @param widgets the list of widget classes to write.
-     * @param layouts the list of layout classes to write.
-     * @param layoutParams the list of layout param classes to write.
-     */
-    private static void writeClasses(String pathname, ArrayList<ClassInfo> widgets,
-            ArrayList<ClassInfo> layouts, ArrayList<ClassInfo> layoutParams) {
-        FileWriter fw = null;
-        BufferedWriter bw = null;
-        try {
-            fw = new FileWriter(pathname, false);
-            bw = new BufferedWriter(fw);
-
-            // write the 3 types of classes.
-            for (ClassInfo clazz : widgets) {
-                writeClass(bw, clazz, 'W');
-            }
-            for (ClassInfo clazz : layoutParams) {
-                writeClass(bw, clazz, 'P');
-            }
-            for (ClassInfo clazz : layouts) {
-                writeClass(bw, clazz, 'L');
-            }
-        } catch (IOException e) {
-            // pass for now
-        } finally {
-            try {
-                if (bw != null) bw.close();
-            } catch (IOException e) {
-                // pass for now
-            }
-            try {
-                if (fw != null) fw.close();
-            } catch (IOException e) {
-                // pass for now
-            }
-        }
-    }
-
-    /**
-     * Writes a class name and its super class names into a {@link BufferedWriter}.
-     * @param writer the BufferedWriter to write into
-     * @param clazz the class to write
-     * @param prefix the prefix to put at the beginning of the line.
-     * @throws IOException
-     */
-    private static void writeClass(BufferedWriter writer, ClassInfo clazz, char prefix)
-            throws IOException {
-        writer.append(prefix).append(clazz.qualifiedName());
-        ClassInfo superClass = clazz;
-        while ((superClass = superClass.superclass()) != null) {
-            writer.append(' ').append(superClass.qualifiedName());
-        }
-        writer.append('\n');
-    }
-
-    /**
-     * Checks the inheritance of {@link ClassInfo} objects. This method return
-     * <ul>
-     * <li>{@link #TYPE_LAYOUT}: if the class extends <code>android.view.ViewGroup</code></li>
-     * <li>{@link #TYPE_WIDGET}: if the class extends <code>android.view.View</code></li>
-     * <li>{@link #TYPE_LAYOUT_PARAM}: if the class extends <code>android.view.ViewGroup$LayoutParams</code></li>
-     * <li>{@link #TYPE_NONE}: in all other cases</li>
-     * </ul>
-     * @param clazz the {@link ClassInfo} to check.
-     */
-    private static int checkInheritance(ClassInfo clazz) {
-        if ("android.view.ViewGroup".equals(clazz.qualifiedName())) {
-            return TYPE_LAYOUT;
-        } else if ("android.view.View".equals(clazz.qualifiedName())) {
-            return TYPE_WIDGET;
-        } else if ("android.view.ViewGroup.LayoutParams".equals(clazz.qualifiedName())) {
-            return TYPE_LAYOUT_PARAM;
-        }
-
-        ClassInfo parent = clazz.superclass();
-        if (parent != null) {
-            return checkInheritance(parent);
-        }
-
-        return TYPE_NONE;
-    }
-}
diff --git a/tools/droiddoc/src/Errors.java b/tools/droiddoc/src/Errors.java
deleted file mode 100644
index 0a91abc..0000000
--- a/tools/droiddoc/src/Errors.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-public class Errors
-{
-    public static boolean hadError = false;
-    private static boolean warningsAreErrors = false;
-    private static TreeSet<Message> allErrors = new TreeSet<Message>();
-
-    private static class Message implements Comparable {
-        SourcePositionInfo pos;
-        int level;
-        String msg;
-
-        Message(SourcePositionInfo p, int l, String m) {
-            pos = p;
-            level = l;
-            msg = m;
-        }
-
-        public int compareTo(Object o) {
-            Message that = (Message)o;
-            int r = this.pos.compareTo(that.pos);
-            if (r != 0) return r;
-            return this.msg.compareTo(that.msg);
-        }
-
-        @Override
-        public String toString() {
-            String whereText = this.pos == null ? "unknown: " : this.pos.toString() + ':';
-            return whereText + this.msg;
-        }
-    }
-
-    public static void error(Error error, SourcePositionInfo where, String text) {
-        if (error.level == HIDDEN) {
-            return;
-        }
-
-        int level = (!warningsAreErrors && error.level == WARNING) ? WARNING : ERROR;
-        String which = level == WARNING ? " warning " : " error ";
-        String message = which + error.code + ": " + text;
-
-        if (where == null) {
-            where = new SourcePositionInfo("unknown", 0, 0);
-        }
-
-        allErrors.add(new Message(where, level, message));
-
-        if (error.level == ERROR || (warningsAreErrors && error.level == WARNING)) {
-            hadError = true;
-        }
-    }
-
-    public static void printErrors() {
-        for (Message m: allErrors) {
-            if (m.level == WARNING) {
-                System.err.println(m.toString());
-            }
-        }
-        for (Message m: allErrors) {
-            if (m.level == ERROR) {
-                System.err.println(m.toString());
-            }
-        }
-    }
-
-    public static int HIDDEN = 0;
-    public static int WARNING = 1;
-    public static int ERROR = 2;
-
-    public static void setWarningsAreErrors(boolean val) {
-        warningsAreErrors = val;
-    }
-
-    public static class Error {
-        public int code;
-        public int level;
-
-        public Error(int code, int level)
-        {
-            this.code = code;
-            this.level = level;
-        }
-    }
-
-    public static Error UNRESOLVED_LINK = new Error(1, WARNING);
-    public static Error BAD_INCLUDE_TAG = new Error(2, WARNING);
-    public static Error UNKNOWN_TAG = new Error(3, WARNING);
-    public static Error UNKNOWN_PARAM_TAG_NAME = new Error(4, WARNING);
-    public static Error UNDOCUMENTED_PARAMETER = new Error(5, HIDDEN);
-    public static Error BAD_ATTR_TAG = new Error(6, ERROR);
-    public static Error BAD_INHERITDOC = new Error(7, HIDDEN);
-    public static Error HIDDEN_LINK = new Error(8, WARNING);
-    public static Error HIDDEN_CONSTRUCTOR = new Error(9, WARNING);
-    public static Error UNAVAILABLE_SYMBOL = new Error(10, ERROR);
-    public static Error HIDDEN_SUPERCLASS = new Error(11, WARNING);
-    public static Error DEPRECATED = new Error(12, HIDDEN);
-    public static Error DEPRECATION_MISMATCH = new Error(13, WARNING);
-    public static Error MISSING_COMMENT = new Error(14, WARNING);
-    public static Error IO_ERROR = new Error(15, HIDDEN);
-    public static Error NO_SINCE_DATA = new Error(16, HIDDEN);
-
-    public static Error[] ERRORS = {
-            UNRESOLVED_LINK,
-            BAD_INCLUDE_TAG,
-            UNKNOWN_TAG,
-            UNKNOWN_PARAM_TAG_NAME,
-            UNDOCUMENTED_PARAMETER,
-            BAD_ATTR_TAG,
-            BAD_INHERITDOC,
-            HIDDEN_LINK,
-            HIDDEN_CONSTRUCTOR,
-            UNAVAILABLE_SYMBOL,
-            HIDDEN_SUPERCLASS,
-            DEPRECATED,
-            DEPRECATION_MISMATCH,
-            MISSING_COMMENT,
-            IO_ERROR,
-            NO_SINCE_DATA,
-        };
-
-    public static boolean setErrorLevel(int code, int level) {
-        for (Error e: ERRORS) {
-            if (e.code == code) {
-                e.level = level;
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/tools/droiddoc/src/FieldInfo.java b/tools/droiddoc/src/FieldInfo.java
deleted file mode 100644
index d9371e8..0000000
--- a/tools/droiddoc/src/FieldInfo.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-import java.util.Comparator;
-
-public class FieldInfo extends MemberInfo
-{
-    public static final Comparator<FieldInfo> comparator = new Comparator<FieldInfo>() {
-        public int compare(FieldInfo a, FieldInfo b) {
-            return a.name().compareTo(b.name());
-        }
-    };
-
-    public FieldInfo(String name, ClassInfo containingClass, ClassInfo realContainingClass,
-                        boolean isPublic, boolean isProtected,
-                        boolean isPackagePrivate, boolean isPrivate,
-                        boolean isFinal, boolean isStatic, boolean isTransient, boolean isVolatile,
-                        boolean isSynthetic, TypeInfo type, String rawCommentText,
-                        Object constantValue,
-                        SourcePositionInfo position,
-                        AnnotationInstanceInfo[] annotations)
-    {
-        super(rawCommentText, name, null, containingClass, realContainingClass,
-                isPublic, isProtected, isPackagePrivate, isPrivate,
-                isFinal, isStatic, isSynthetic, chooseKind(isFinal, isStatic), position,
-                annotations);
-        mIsTransient = isTransient;
-        mIsVolatile = isVolatile;
-        mType = type;
-        mConstantValue = constantValue;
-    }
-
-    public FieldInfo cloneForClass(ClassInfo newContainingClass) {
-        return new FieldInfo(name(), newContainingClass, realContainingClass(),
-                isPublic(), isProtected(), isPackagePrivate(),
-                isPrivate(), isFinal(), isStatic(), isTransient(), isVolatile(),
-                isSynthetic(), mType, getRawCommentText(), mConstantValue, position(),
-                annotations());
-    }
-
-    static String chooseKind(boolean isFinal, boolean isStatic)
-    {
-        if (isStatic && isFinal) {
-            return "constant";
-        } else {
-            return "field";
-        }
-    }
-
-    public TypeInfo type()
-    {
-        return mType;
-    }
-
-    public boolean isConstant()
-    {
-        return isStatic() && isFinal();
-    }
-
-    public TagInfo[] firstSentenceTags()
-    {
-        return comment().briefTags();
-    }
-
-    public TagInfo[] inlineTags()
-    {
-        return comment().tags();
-    }
-
-    public Object constantValue()
-    {
-        return mConstantValue;
-    }
-
-    public String constantLiteralValue()
-    {
-        return constantLiteralValue(mConstantValue);
-    }
-
-    public boolean isDeprecated() {
-        boolean deprecated = false;
-        if (!mDeprecatedKnown) {
-            boolean commentDeprecated = (comment().deprecatedTags().length > 0);
-            boolean annotationDeprecated = false;
-            for (AnnotationInstanceInfo annotation : annotations()) {
-                if (annotation.type().qualifiedName().equals("java.lang.Deprecated")) {
-                    annotationDeprecated = true;
-                    break;
-                }
-            }
-
-            if (commentDeprecated != annotationDeprecated) {
-                Errors.error(Errors.DEPRECATION_MISMATCH, position(),
-                        "Field " + mContainingClass.qualifiedName() + "." + name()
-                        + ": @Deprecated annotation and @deprecated comment do not match");
-            }
-
-            mIsDeprecated = commentDeprecated | annotationDeprecated;
-            mDeprecatedKnown = true;
-        }
-        return mIsDeprecated;
-    }
-
-    public static String constantLiteralValue(Object val)
-    {
-        String str = null;
-        if (val != null) {
-            if (val instanceof Boolean
-                    || val instanceof Byte
-                    || val instanceof Short
-                    || val instanceof Integer)
-            {
-                str = val.toString();
-            }
-            //catch all special values
-            else if (val instanceof Double){
-                Double dbl = (Double) val;
-                    if (dbl.toString().equals("Infinity")){
-                        str = "(1.0 / 0.0)";
-                    } else if (dbl.toString().equals("-Infinity")) {
-                        str = "(-1.0 / 0.0)";
-                    } else if (dbl.isNaN()) {
-                        str = "(0.0 / 0.0)";
-                    } else {
-                        str = dbl.toString();
-                    }
-            }
-            else if (val instanceof Long) {
-                str = val.toString() + "L";
-            }
-            else if (val instanceof Float) {
-                Float fl = (Float) val;
-                if (fl.toString().equals("Infinity")) {
-                    str = "(1.0f / 0.0f)";
-                } else if (fl.toString().equals("-Infinity")) {
-                    str = "(-1.0f / 0.0f)";
-                } else if (fl.isNaN()) {
-                    str = "(0.0f / 0.0f)";
-                } else {
-                    str = val.toString() + "f";
-                }
-            }
-            else if (val instanceof Character) {
-                str = String.format("\'\\u%04x\'", val);
-            }
-            else if (val instanceof String) {
-                str = "\"" + javaEscapeString((String)val) + "\"";
-            }
-            else {
-                str = "<<<<" +val.toString() + ">>>>";
-            }
-        }
-        if (str == null) {
-            str = "null";
-        }
-        return str;
-    }
-
-    public static String javaEscapeString(String str) {
-        String result = "";
-        final int N = str.length();
-        for (int i=0; i<N; i++) {
-            char c = str.charAt(i);
-            if (c == '\\') {
-                result += "\\\\";
-            }
-            else if (c == '\t') {
-                result += "\\t";
-            }
-            else if (c == '\b') {
-                result += "\\b";
-            }
-            else if (c == '\r') {
-                result += "\\r";
-            }
-            else if (c == '\n') {
-                result += "\\n";
-            }
-            else if (c == '\f') {
-                result += "\\f";
-            }
-            else if (c == '\'') {
-                result += "\\'";
-            }
-            else if (c == '\"') {
-                result += "\\\"";
-            }
-            else if (c >= ' ' && c <= '~') {
-                result += c;
-            }
-            else {
-                result += String.format("\\u%04x", new Integer((int)c));
-            }
-        }
-        return result;
-    }
-
-
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".kind", kind());
-        type().makeHDF(data, base + ".type");
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".href", htmlPage());
-        data.setValue(base + ".anchor", anchor());
-        TagInfo.makeHDF(data, base + ".shortDescr", firstSentenceTags());
-        TagInfo.makeHDF(data, base + ".descr", inlineTags());
-        TagInfo.makeHDF(data, base + ".deprecated", comment().deprecatedTags());
-        TagInfo.makeHDF(data, base + ".seeAlso", comment().seeTags());
-        data.setValue(base + ".since", getSince());
-        data.setValue(base + ".final", isFinal() ? "final" : "");
-        data.setValue(base + ".static", isStatic() ? "static" : "");
-        if (isPublic()) {
-            data.setValue(base + ".scope", "public");
-        }
-        else if (isProtected()) {
-            data.setValue(base + ".scope", "protected");
-        }
-        else if (isPackagePrivate()) {
-            data.setValue(base + ".scope", "");
-        }
-        else if (isPrivate()) {
-            data.setValue(base + ".scope", "private");
-        }
-        Object val = mConstantValue;
-        if (val != null) {
-            String dec = null;
-            String hex = null;
-            String str = null;
-
-            if (val instanceof Boolean) {
-                str = ((Boolean)val).toString();
-            }
-            else if (val instanceof Byte) {
-                dec = String.format("%d", val);
-                hex = String.format("0x%02x", val);
-            }
-            else if (val instanceof Character) {
-                dec = String.format("\'%c\'", val);
-                hex = String.format("0x%04x", val);
-            }
-            else if (val instanceof Double) {
-                str = ((Double)val).toString();
-            }
-            else if (val instanceof Float) {
-                str = ((Float)val).toString();
-            }
-            else if (val instanceof Integer) {
-                dec = String.format("%d", val);
-                hex = String.format("0x%08x", val);
-            }
-            else if (val instanceof Long) {
-                dec = String.format("%d", val);
-                hex = String.format("0x%016x", val);
-            }
-            else if (val instanceof Short) {
-                dec = String.format("%d", val);
-                hex = String.format("0x%04x", val);
-            }
-            else if (val instanceof String) {
-                str = "\"" + ((String)val) + "\"";
-            }
-            else {
-                str = "";
-            }
-
-            if (dec != null && hex != null) {
-                data.setValue(base + ".constantValue.dec", DroidDoc.escape(dec));
-                data.setValue(base + ".constantValue.hex", DroidDoc.escape(hex));
-            }
-            else {
-                data.setValue(base + ".constantValue.str", DroidDoc.escape(str));
-                data.setValue(base + ".constantValue.isString", "1");
-            }
-        }
-    }
-
-    @Override
-    public boolean isExecutable()
-    {
-        return false;
-    }
-
-    public boolean isTransient()
-    {
-        return mIsTransient;
-    }
-
-    public boolean isVolatile()
-    {
-        return mIsVolatile;
-    }
-
-    boolean mIsTransient;
-    boolean mIsVolatile;
-    boolean mDeprecatedKnown;
-    boolean mIsDeprecated;
-    TypeInfo mType;
-    Object mConstantValue;
-}
-
diff --git a/tools/droiddoc/src/Hierarchy.java b/tools/droiddoc/src/Hierarchy.java
deleted file mode 100755
index ac5e1dc..0000000
--- a/tools/droiddoc/src/Hierarchy.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.HashMap;
-import java.util.TreeSet;
-import java.util.Set;
-import org.clearsilver.HDF;
-
-public class Hierarchy
-{
-    public static void makeHierarchy(HDF hdf, ClassInfo[] classes)
-    {
-        HashMap<String,TreeSet<String>> nodes
-                                    = new HashMap<String,TreeSet<String>>();
-
-        for (ClassInfo cl: classes) {
-            String name = cl.qualifiedName();
-
-            TreeSet<String> me = nodes.get(name);
-            if (me == null) {
-                me = new TreeSet<String>();
-                nodes.put(name, me);
-            }
-
-            ClassInfo superclass = cl.superclass();
-            String sname = superclass != null
-                                    ? superclass.qualifiedName() : null;
-            if (sname != null) {
-                TreeSet<String> s = nodes.get(sname);
-                if (s == null) {
-                    s = new TreeSet<String>();
-                    nodes.put(sname, s);
-                }
-                s.add(name);
-            }
-        }
-
-        /*
-        Set<String> keys = nodes.keySet();
-        for (String n: keys) {
-            System.out.println("class: " + n);
-
-            TreeSet<String> values = nodes.get(n);
-            for (String v: values) {
-                System.out.println("       - " + v);
-            }
-        }
-        */
-
-        int depth = depth(nodes, "java.lang.Object");
-
-        hdf.setValue("classes.0", "");
-        hdf.setValue("colspan", "" + depth);
-
-        recurse(nodes, "java.lang.Object", hdf.getObj("classes.0"),depth,depth);
-
-        if (false) {
-            Set<String> keys = nodes.keySet();
-            if (keys.size() > 0) {
-                System.err.println("The following classes are hidden but"
-                        + " are superclasses of not-hidden classes");
-                for (String n: keys) {
-                    System.err.println("  " + n);
-                }
-            }
-        }
-    }
-
-    private static int depth(HashMap<String,TreeSet<String>> nodes,
-                                String name)
-    {
-        int d = 0;
-        TreeSet<String> derived = nodes.get(name);
-        if (derived != null && derived.size() > 0) {
-            for (String s: derived) {
-                int n = depth(nodes, s);
-                if (n > d) {
-                    d = n;
-                }
-            }
-        }
-        return d + 1;
-    }
-
-    private static boolean exists(ClassInfo cl)
-    {
-        return cl != null && !cl.isHidden() && cl.isIncluded();
-    }
-
-    private static void recurse(HashMap<String,TreeSet<String>> nodes,
-                                String name, HDF hdf, 
-                                int totalDepth, int remainingDepth)
-    {
-        int i;
-
-        hdf.setValue("indent", "" + (totalDepth-remainingDepth-1));
-        hdf.setValue("colspan", "" + remainingDepth);
-
-        ClassInfo cl = Converter.obtainClass(name);
-
-        hdf.setValue("class.label", cl.name());
-        hdf.setValue("class.qualified", cl.qualifiedName());
-        if (cl.checkLevel()) {
-            hdf.setValue("class.link", cl.htmlPage());
-        }
-
-        if (exists(cl)) {
-            hdf.setValue("exists", "1");
-        }
-
-        i = 0;
-        for (ClassInfo iface: cl.interfaces()) {
-            hdf.setValue("interfaces." + i + ".class.label", iface.name());
-            hdf.setValue("interfaces." + i + ".class.qualified", iface.qualifiedName());
-            if (iface.checkLevel()) {
-                hdf.setValue("interfaces." + i + ".class.link", iface.htmlPage());
-            }
-            if (exists(cl)) {
-                hdf.setValue("interfaces." + i + ".exists", "1");
-            }
-            i++;
-        }
-
-        TreeSet<String> derived = nodes.get(name);
-        if (derived != null && derived.size() > 0) {
-            hdf.setValue("derived", "");
-            HDF children = hdf.getObj("derived");
-            i = 0;
-            remainingDepth--;
-            for (String s: derived) {
-                String index = "" + i;
-                children.setValue(index, "");
-                recurse(nodes, s, children.getObj(index), totalDepth,
-                        remainingDepth);
-                i++;
-            }
-        }
-
-        nodes.remove(name);
-    }
-}
-
diff --git a/tools/droiddoc/src/InheritedTags.java b/tools/droiddoc/src/InheritedTags.java
deleted file mode 100644
index 242170c..0000000
--- a/tools/droiddoc/src/InheritedTags.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-
-public interface InheritedTags
-{
-    TagInfo[] tags();
-    InheritedTags inherited();
-}
-
diff --git a/tools/droiddoc/src/KeywordEntry.java b/tools/droiddoc/src/KeywordEntry.java
deleted file mode 100644
index 7e5e357..0000000
--- a/tools/droiddoc/src/KeywordEntry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-class KeywordEntry implements Comparable
-{
-    KeywordEntry(String label, String href, String comment)
-    {
-        this.label = label;
-        this.href = href;
-        this.comment = comment;
-    }
-
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".label", this.label);
-        data.setValue(base + ".href", this.href);
-        data.setValue(base + ".comment", this.comment);
-    }
-
-    public char firstChar()
-    {
-        return Character.toUpperCase(this.label.charAt(0));
-    }
-
-    public int compareTo(Object that)
-    {
-        return this.label.compareToIgnoreCase(((KeywordEntry)that).label);
-    }
-
-    private String label;
-    private String href;
-    private String comment;
-}
-
-
diff --git a/tools/droiddoc/src/LinkReference.java b/tools/droiddoc/src/LinkReference.java
deleted file mode 100644
index b1f998a..0000000
--- a/tools/droiddoc/src/LinkReference.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.util.ArrayList;
-
-/**
- * Class that represents what you see in an link or see tag.  This is
- * factored out of SeeTagInfo so it can be used elsewhere (like AttrTagInfo).
- */
-public class LinkReference {
-
-    /** The original text. */
-    public String text;
-    
-    /** The kind of this tag, if we have a new suggestion after parsing. */
-    public String kind;
-
-    /** The user visible text. */
-    public String label;
-
-    /** The link. */
-    public String href;
-
-    /** The {@link PackageInfo} if any. */
-    public PackageInfo packageInfo;
-
-    /** The {@link ClassInfo} if any. */
-    public ClassInfo classInfo;
-
-    /** The {@link MemberInfo} if any. */
-    public MemberInfo memberInfo;
-
-    /** The name of the referenced member PackageInfo} if any. */
-    public String referencedMemberName;
-
-    /** Set to true if everything is a-ok */
-    public boolean good;
-
-    /**
-     * regex pattern to use when matching explicit "<a href" reference text
-     */
-    private static final Pattern HREF_PATTERN
-            = Pattern.compile("^<a href=\"([^\"]*)\">([^<]*)</a>[ \n\r\t]*$",
-                              Pattern.CASE_INSENSITIVE);
-
-    /**
-     * regex pattern to use when matching double-quoted reference text
-     */
-    private static final Pattern QUOTE_PATTERN
-            = Pattern.compile("^\"([^\"]*)\"[ \n\r\t]*$");
-
-    /**
-     * Parse and resolve a link string.
-     *
-     * @param text the original text
-     * @param base the class or whatever that this link is on
-     * @param pos the original position in the source document
-     * @return a new link reference.  It always returns something.  If there was an
-     *         error, it logs it and fills in href and label with error text.
-     */
-    public static LinkReference parse(String text, ContainerInfo base, SourcePositionInfo pos,
-                                        boolean printOnErrors) {
-        LinkReference result = new LinkReference();
-        result.text = text;
-
-        int index;
-        int len = text.length();
-        int pairs = 0;
-        int pound = -1;
-        // split the string
-        done: {
-            for (index=0; index<len; index++) {
-                char c = text.charAt(index);
-                switch (c)
-                {
-                    case '(':
-                        pairs++;
-                        break;
-                    case '[':
-                        pairs++;
-                        break;
-                    case ')':
-                        pairs--;
-                        break;
-                    case ']':
-                        pairs--;
-                        break;
-                    case ' ':
-                    case '\t':
-                    case '\r':
-                    case '\n':
-                        if (pairs == 0) {
-                            break done;
-                        }
-                        break;
-                    case '#':
-                        if (pound < 0) {
-                            pound = index;
-                        }
-                        break;
-                }
-            }
-        }
-        if (index == len && pairs != 0) {
-            Errors.error(Errors.UNRESOLVED_LINK, pos,
-                        "unable to parse link/see tag: " + text.trim());
-            return result;
-        }
-
-        int linkend = index;
-
-        for (; index<len; index++) {
-            char c = text.charAt(index);
-            if (!(c == ' ' || c == '\t' || c == '\r' || c == '\n')) {
-                break;
-            }
-        }
-
-        result.label = text.substring(index);
-
-        String ref;
-        String mem;
-        if (pound == 0) {
-            ref = null;
-            mem = text.substring(1, linkend);
-        }
-        else if (pound > 0) {
-            ref = text.substring(0, pound);
-            mem = text.substring(pound+1, linkend);
-        }
-        else {
-            ref = text.substring(0, linkend);
-            mem = null;
-        }
-
-        // parse parameters, if any
-        String[] params = null;
-        String[] paramDimensions = null;
-        if (mem != null) {
-            index = mem.indexOf('(');
-            if (index > 0) {
-                ArrayList<String> paramList = new ArrayList<String>();
-                ArrayList<String> paramDimensionList = new ArrayList<String>();
-                len = mem.length();
-                int start = index+1;
-                final int START = 0;
-                final int TYPE = 1;
-                final int NAME = 2;
-                int dimension = 0;
-                int arraypair = 0;
-                int state = START;
-                int typestart = 0;
-                int typeend = -1;
-                for (int i=start; i<len; i++) {
-                    char c = mem.charAt(i);
-                    switch (state)
-                    {
-                        case START:
-                            if (c!=' ' && c!='\t' && c!='\r' && c!='\n') {
-                                state = TYPE;
-                                typestart = i;
-                            }
-                            break;
-                        case TYPE:
-                            if (c == '[') {
-                                if (typeend < 0) {
-                                    typeend = i;
-                                }
-                                dimension++;
-                                arraypair++;
-                            }
-                            else if (c == ']') {
-                                arraypair--;
-                            }
-                            else if (c==' ' || c=='\t' || c=='\r' || c=='\n') {
-                                if (typeend < 0) {
-                                    typeend = i;
-                                }
-                            }
-                            else {
-                                if (typeend >= 0 || c == ')' || c == ',') {
-                                    if (typeend < 0) {
-                                        typeend = i;
-                                    }
-                                    String s = mem.substring(typestart, typeend);
-                                    paramList.add(s);
-                                    s = "";
-                                    for (int j=0; j<dimension; j++) {
-                                        s += "[]";
-                                    }
-                                    paramDimensionList.add(s);
-                                    state = START;
-                                    typeend = -1;
-                                    dimension = 0;
-                                    if (c == ',' || c == ')') {
-                                        state = START;
-                                    } else {
-                                        state = NAME;
-                                    }
-                                }
-                            }
-                            break;
-                        case NAME:
-                            if (c == ',' || c == ')') {
-                                state = START;
-                            }
-                            break;
-                    }
-
-                }
-                params = paramList.toArray(new String[paramList.size()]);
-                paramDimensions = paramDimensionList.toArray(new String[paramList.size()]);
-                mem = mem.substring(0, index);
-            }
-        }
-
-        ClassInfo cl = null;
-        if (base instanceof ClassInfo) {
-            cl = (ClassInfo)base;
-        }
-
-        if (ref == null) {
-            // no class or package was provided, assume it's this class
-            if (cl != null) {
-                result.classInfo = cl;
-            }
-        } else {
-            // they provided something, maybe it's a class or a package
-            if (cl != null) {
-                result.classInfo = cl.extendedFindClass(ref);
-                if (result.classInfo == null) {
-                    result.classInfo = cl.findClass(ref);
-                }
-                if (result.classInfo == null) {
-                    result.classInfo = cl.findInnerClass(ref);
-                }
-            }
-            if (result.classInfo == null) {
-                result.classInfo = Converter.obtainClass(ref);
-            }
-            if (result.classInfo == null) {
-                result.packageInfo = Converter.obtainPackage(ref);
-            }
-        }
-
-        if (result.classInfo != null && mem != null) {
-            // it's either a field or a method, prefer a field
-            if (params == null) {
-                FieldInfo field = result.classInfo.findField(mem);
-                // findField looks in containing classes, so it might actually
-                // be somewhere else; link to where it really is, not what they
-                // typed.
-                if (field != null) {
-                    result.classInfo = field.containingClass();
-                    result.memberInfo = field;
-                }
-            }
-            if (result.memberInfo == null) {
-                MethodInfo method = result.classInfo.findMethod(mem, params, paramDimensions);
-                if (method != null) {
-                    result.classInfo = method.containingClass();
-                    result.memberInfo = method;
-                }
-            }
-        }
-
-        result.referencedMemberName = mem;
-        if (params != null) {
-            result.referencedMemberName = result.referencedMemberName + '(';
-            len = params.length;
-            if (len > 0) {
-                len--;
-                for (int i=0; i<len; i++) {
-                    result.referencedMemberName = result.referencedMemberName + params[i]
-                            + paramDimensions[i] + ", ";
-                }
-                result.referencedMemberName = result.referencedMemberName + params[len]
-                        + paramDimensions[len];
-            }
-            result.referencedMemberName = result.referencedMemberName + ")";
-        }
-
-        // debugging spew
-        if (false) {
-            result.label = result.label + "/" + ref + "/" + mem + '/';
-            if (params != null) {
-                for (int i=0; i<params.length; i++) {
-                    result.label += params[i] + "|";
-                }
-            }
-
-            FieldInfo f = (result.memberInfo instanceof FieldInfo)
-                        ? (FieldInfo)result.memberInfo
-                        : null;
-            MethodInfo m = (result.memberInfo instanceof MethodInfo)
-                        ? (MethodInfo)result.memberInfo
-                        : null;
-            result.label = result.label
-                        + "/package=" + (result.packageInfo!=null?result.packageInfo.name():"")
-                        + "/class=" + (result.classInfo!=null?result.classInfo.qualifiedName():"")
-                        + "/field=" + (f!=null?f.name():"")
-                        + "/method=" + (m!=null?m.name():"");
-            
-        }
-
-        MethodInfo method = null;
-        boolean skipHref = false;
-
-        if (result.memberInfo != null && result.memberInfo.isExecutable()) {
-           method = (MethodInfo)result.memberInfo;
-        }
-
-        if (text.startsWith("\"")) {
-            // literal quoted reference (e.g., a book title)
-            Matcher matcher = QUOTE_PATTERN.matcher(text);
-            if (! matcher.matches()) {
-                Errors.error(Errors.UNRESOLVED_LINK, pos,
-                        "unbalanced quoted link/see tag: " + text.trim());
-                result.makeError();
-                return result;
-            }
-            skipHref = true;
-            result.label = matcher.group(1);
-            result.kind = "@seeJustLabel";
-        }
-        else if (text.startsWith("<")) {
-            // explicit "<a href" form
-            Matcher matcher = HREF_PATTERN.matcher(text);
-            if (! matcher.matches()) {
-                Errors.error(Errors.UNRESOLVED_LINK, pos,
-                        "invalid <a> link/see tag: " + text.trim());
-                result.makeError();
-                return result;
-            }
-            result.href = matcher.group(1);
-            result.label = matcher.group(2);
-            result.kind = "@seeHref";
-        }
-        else if (result.packageInfo != null) {
-            result.href = result.packageInfo.htmlPage();
-            if (result.label.length() == 0) {
-                result.href = result.packageInfo.htmlPage();
-                result.label = result.packageInfo.name();
-            }
-        }
-        else if (result.classInfo != null && result.referencedMemberName == null) {
-            // class reference
-            if (result.label.length() == 0) {
-                result.label = result.classInfo.name();
-            }
-            result.href = result.classInfo.htmlPage();
-        }
-        else if (result.memberInfo != null) {
-            // member reference
-            ClassInfo containing = result.memberInfo.containingClass();
-            if (result.memberInfo.isExecutable()) {
-                if (result.referencedMemberName.indexOf('(') < 0) {
-                    result.referencedMemberName += method.flatSignature();
-                }
-            } 
-            if (result.label.length() == 0) {
-                result.label = result.referencedMemberName;
-            }
-            result.href = containing.htmlPage() + '#' + result.memberInfo.anchor();
-        }
-
-        if (result.href == null && !skipHref) {
-            if (printOnErrors && (base == null || base.checkLevel())) {
-                Errors.error(Errors.UNRESOLVED_LINK, pos,
-                        "Unresolved link/see tag \"" + text.trim()
-                        + "\" in " + ((base != null) ? base.qualifiedName() : "[null]"));
-            }
-            result.makeError();
-        }
-        else if (result.memberInfo != null && !result.memberInfo.checkLevel()) {
-            if (printOnErrors && (base == null || base.checkLevel())) {
-                Errors.error(Errors.HIDDEN_LINK, pos,
-                        "Link to hidden member: " + text.trim());
-                result.href = null;
-            }
-            result.kind = "@seeJustLabel";
-        }
-        else if (result.classInfo != null && !result.classInfo.checkLevel()) {
-            if (printOnErrors && (base == null || base.checkLevel())) {
-                Errors.error(Errors.HIDDEN_LINK, pos,
-                        "Link to hidden class: " + text.trim() + " label=" + result.label);
-                result.href = null;
-            }
-            result.kind = "@seeJustLabel";
-        }
-        else if (result.packageInfo != null && !result.packageInfo.checkLevel()) {
-            if (printOnErrors && (base == null || base.checkLevel())) {
-                Errors.error(Errors.HIDDEN_LINK, pos,
-                        "Link to hidden package: " + text.trim());
-                result.href = null;
-            }
-            result.kind = "@seeJustLabel";
-        }
-
-        result.good = true;
-
-        return result;
-    }
-
-    public boolean checkLevel() {
-        if (memberInfo != null) {
-            return memberInfo.checkLevel();
-        }
-        if (classInfo != null) {
-            return classInfo.checkLevel();
-        }
-        if (packageInfo != null) {
-            return packageInfo.checkLevel();
-        }
-        return false;
-    }
-
-    /** turn this LinkReference into one with an error message */
-    private void makeError() {
-        //this.href = "ERROR(" + this.text.trim() + ")";
-        this.href = null;
-        if (this.label == null) {
-            this.label = "";
-        }
-        this.label = "ERROR(" + this.label + "/" + text.trim() + ")";
-    }
-
-    /** private. **/
-    private LinkReference() {
-    }
-}
diff --git a/tools/droiddoc/src/LiteralTagInfo.java b/tools/droiddoc/src/LiteralTagInfo.java
deleted file mode 100644
index b39490d..0000000
--- a/tools/droiddoc/src/LiteralTagInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public class LiteralTagInfo extends TagInfo
-{
-    private static String encode(String t)
-    {
-        t = t.replace("&", "&amp;");
-        t = t.replace("<", "&lt;");
-        t = t.replace(">", "&gt;");
-        return t;
-    }
-
-    public LiteralTagInfo(String n, String k, String t, SourcePositionInfo sp)
-    {
-        super("Text", "Text", encode(t), sp);
-    }
-}
diff --git a/tools/droiddoc/src/MemberInfo.java b/tools/droiddoc/src/MemberInfo.java
deleted file mode 100644
index 05da583..0000000
--- a/tools/droiddoc/src/MemberInfo.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public abstract class MemberInfo extends DocInfo implements Comparable, Scoped
-{
-    public MemberInfo(String rawCommentText, String name, String signature,
-                        ClassInfo containingClass, ClassInfo realContainingClass,
-                        boolean isPublic, boolean isProtected,
-                        boolean isPackagePrivate, boolean isPrivate,
-                        boolean isFinal, boolean isStatic, boolean isSynthetic,
-                        String kind,
-                        SourcePositionInfo position,
-                        AnnotationInstanceInfo[] annotations)
-    {
-        super(rawCommentText, position);
-        mName = name;
-        mSignature = signature;
-        mContainingClass = containingClass;
-        mRealContainingClass = realContainingClass;
-        mIsPublic = isPublic;
-        mIsProtected = isProtected;
-        mIsPackagePrivate = isPackagePrivate;
-        mIsPrivate = isPrivate;
-        mIsFinal = isFinal;
-        mIsStatic = isStatic;
-        mIsSynthetic = isSynthetic;
-        mKind = kind;
-        mAnnotations = annotations;
-    }
-
-    public abstract boolean isExecutable();
-
-    public String anchor()
-    {
-        if (mSignature != null) {
-            return mName + mSignature;
-        } else {
-            return mName;
-        }
-    }
-
-    public String htmlPage() {
-        return mContainingClass.htmlPage() + "#" + anchor();
-    }
-
-    public int compareTo(Object that) {
-        return this.htmlPage().compareTo(((MemberInfo)that).htmlPage());
-    }
-
-    public String name()
-    {
-        return mName;
-    }
-
-    public String signature()
-    {
-        return mSignature;
-    }
-
-    public ClassInfo realContainingClass()
-    {
-        return mRealContainingClass;
-    }
-
-    public ClassInfo containingClass()
-    {
-        return mContainingClass;
-    }
-
-    public boolean isPublic()
-    {
-        return mIsPublic;
-    }
-
-    public boolean isProtected()
-    {
-        return mIsProtected;
-    }
-
-    public boolean isPackagePrivate()
-    {
-        return mIsPackagePrivate;
-    }
-
-    public boolean isPrivate()
-    {
-        return mIsPrivate;
-    }
-
-    public boolean isStatic()
-    {
-        return mIsStatic;
-    }
-
-    public boolean isFinal()
-    {
-        return mIsFinal;
-    }
-
-    public boolean isSynthetic()
-    {
-        return mIsSynthetic;
-    }
-
-    @Override
-    public ContainerInfo parent()
-    {
-        return mContainingClass;
-    }
-
-    public boolean checkLevel()
-    {
-        return DroidDoc.checkLevel(mIsPublic, mIsProtected,
-                mIsPackagePrivate, mIsPrivate, isHidden());
-    }
-
-    public String kind()
-    {
-        return mKind;
-    }
-
-    public AnnotationInstanceInfo[] annotations()
-    {
-        return mAnnotations;
-    }
-
-    ClassInfo mContainingClass;
-    ClassInfo mRealContainingClass;
-    String mName;
-    String mSignature;
-    boolean mIsPublic;
-    boolean mIsProtected;
-    boolean mIsPackagePrivate;
-    boolean mIsPrivate;
-    boolean mIsFinal;
-    boolean mIsStatic;
-    boolean mIsSynthetic;
-    String mKind;
-    private AnnotationInstanceInfo[] mAnnotations;
-
-}
-
diff --git a/tools/droiddoc/src/MethodInfo.java b/tools/droiddoc/src/MethodInfo.java
deleted file mode 100644
index 7f96b80..0000000
--- a/tools/droiddoc/src/MethodInfo.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-
-import java.util.*;
-
-public class MethodInfo extends MemberInfo
-{
-    public static final Comparator<MethodInfo> comparator = new Comparator<MethodInfo>() {
-        public int compare(MethodInfo a, MethodInfo b) {
-            return a.name().compareTo(b.name());
-        }
-    };
-
-    private class InlineTags implements InheritedTags
-    {
-        public TagInfo[] tags()
-        {
-            return comment().tags();
-        }
-        public InheritedTags inherited()
-        {
-            MethodInfo m = findOverriddenMethod(name(), signature());
-            if (m != null) {
-                return m.inlineTags();
-            } else {
-                return null;
-            }
-        }
-    }
-
-    private static void addInterfaces(ClassInfo[] ifaces, ArrayList<ClassInfo> queue)
-    {
-        for (ClassInfo i: ifaces) {
-            queue.add(i);
-        }
-        for (ClassInfo i: ifaces) {
-            addInterfaces(i.interfaces(), queue);
-        }
-    }
-
-    // first looks for a superclass, and then does a breadth first search to
-    // find the least far away match
-    public MethodInfo findOverriddenMethod(String name, String signature)
-    {
-        if (mReturnType == null) {
-            // ctor
-            return null;
-        }
-        if (mOverriddenMethod != null) {
-            return mOverriddenMethod;
-        }
-
-        ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>();
-        addInterfaces(containingClass().interfaces(), queue);
-        for (ClassInfo iface: queue) {
-            for (MethodInfo me: iface.methods()) {
-                if (me.name().equals(name)
-                        && me.signature().equals(signature)
-                        && me.inlineTags().tags() != null
-                        && me.inlineTags().tags().length > 0) {
-                    return me;
-                }
-            }
-        }
-        return null;
-    }
-
-    private static void addRealInterfaces(ClassInfo[] ifaces, ArrayList<ClassInfo> queue)
-    {
-        for (ClassInfo i: ifaces) {
-            queue.add(i);
-            if (i.realSuperclass() != null &&  i.realSuperclass().isAbstract()) {
-                queue.add(i.superclass());
-            }
-        }
-        for (ClassInfo i: ifaces) {
-            addInterfaces(i.realInterfaces(), queue);
-        }
-    }
-
-    public MethodInfo findRealOverriddenMethod(String name, String signature, HashSet notStrippable) {
-        if (mReturnType == null) {
-        // ctor
-        return null;
-        }
-        if (mOverriddenMethod != null) {
-            return mOverriddenMethod;
-        }
-
-        ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>();
-        if (containingClass().realSuperclass() != null &&
-            containingClass().realSuperclass().isAbstract()) {
-            queue.add(containingClass());
-        }
-        addInterfaces(containingClass().realInterfaces(), queue);
-        for (ClassInfo iface: queue) {
-            for (MethodInfo me: iface.methods()) {
-                if (me.name().equals(name)
-                    && me.signature().equals(signature)
-                    && me.inlineTags().tags() != null
-                    && me.inlineTags().tags().length > 0
-                    && notStrippable.contains(me.containingClass())) {
-                return me;
-                }
-            }
-        }
-        return null;
-    }
-
-    public MethodInfo findSuperclassImplementation(HashSet notStrippable) {
-        if (mReturnType == null) {
-            // ctor
-            return null;
-        }
-        if (mOverriddenMethod != null) {
-            // Even if we're told outright that this was the overridden method, we want to
-            // be conservative and ignore mismatches of parameter types -- they arise from
-            // extending generic specializations, and we want to consider the derived-class
-            // method to be a non-override.
-            if (this.signature().equals(mOverriddenMethod.signature())) {
-                return mOverriddenMethod;
-            }
-        }
-
-        ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>();
-        if (containingClass().realSuperclass() != null &&
-                containingClass().realSuperclass().isAbstract()) {
-            queue.add(containingClass());
-        }
-        addInterfaces(containingClass().realInterfaces(), queue);
-        for (ClassInfo iface: queue) {
-            for (MethodInfo me: iface.methods()) {
-                if (me.name().equals(this.name())
-                        && me.signature().equals(this.signature())
-                        && notStrippable.contains(me.containingClass())) {
-                    return me;
-                }
-            }
-        }
-        return null;
-    }
-
-    public ClassInfo findRealOverriddenClass(String name, String signature) {
-        if (mReturnType == null) {
-        // ctor
-        return null;
-        }
-        if (mOverriddenMethod != null) {
-            return mOverriddenMethod.mRealContainingClass;
-        }
-
-        ArrayList<ClassInfo> queue = new ArrayList<ClassInfo>();
-        if (containingClass().realSuperclass() != null &&
-            containingClass().realSuperclass().isAbstract()) {
-            queue.add(containingClass());
-        }
-        addInterfaces(containingClass().realInterfaces(), queue);
-        for (ClassInfo iface: queue) {
-            for (MethodInfo me: iface.methods()) {
-                if (me.name().equals(name)
-                    && me.signature().equals(signature)
-                    && me.inlineTags().tags() != null
-                    && me.inlineTags().tags().length > 0) {
-                return iface;
-                }
-            }
-        }
-        return null;
-    }
-
-    private class FirstSentenceTags implements InheritedTags
-    {
-        public TagInfo[] tags()
-        {
-            return comment().briefTags();
-        }
-        public InheritedTags inherited()
-        {
-            MethodInfo m = findOverriddenMethod(name(), signature());
-            if (m != null) {
-                return m.firstSentenceTags();
-            } else {
-                return null;
-            }
-        }
-    }
-
-    private class ReturnTags implements InheritedTags {
-        public TagInfo[] tags() {
-            return comment().returnTags();
-        }
-        public InheritedTags inherited() {
-            MethodInfo m = findOverriddenMethod(name(), signature());
-            if (m != null) {
-                return m.returnTags();
-            } else {
-                return null;
-            }
-        }
-    }
-
-    public boolean isDeprecated() {
-        boolean deprecated = false;
-        if (!mDeprecatedKnown) {
-            boolean commentDeprecated = (comment().deprecatedTags().length > 0);
-            boolean annotationDeprecated = false;
-            for (AnnotationInstanceInfo annotation : annotations()) {
-                if (annotation.type().qualifiedName().equals("java.lang.Deprecated")) {
-                    annotationDeprecated = true;
-                    break;
-                }
-            }
-
-            if (commentDeprecated != annotationDeprecated) {
-                Errors.error(Errors.DEPRECATION_MISMATCH, position(),
-                        "Method " + mContainingClass.qualifiedName() + "." + name()
-                        + ": @Deprecated annotation and @deprecated doc tag do not match");
-            }
-
-            mIsDeprecated = commentDeprecated | annotationDeprecated;
-            mDeprecatedKnown = true;
-        }
-        return mIsDeprecated;
-    }
-
-    public TypeInfo[] getTypeParameters(){
-        return mTypeParameters;
-    }
-
-    public MethodInfo cloneForClass(ClassInfo newContainingClass) {
-        MethodInfo result =  new MethodInfo(getRawCommentText(), mTypeParameters,
-                name(), signature(), newContainingClass, realContainingClass(),
-                isPublic(), isProtected(), isPackagePrivate(), isPrivate(), isFinal(), isStatic(),
-                isSynthetic(), mIsAbstract, mIsSynchronized, mIsNative, mIsAnnotationElement,
-                kind(), mFlatSignature, mOverriddenMethod,
-                mReturnType, mParameters, mThrownExceptions, position(), annotations());
-        result.init(mDefaultAnnotationElementValue);
-        return result;
-    }
-
-    public MethodInfo(String rawCommentText, TypeInfo[] typeParameters, String name,
-                        String signature, ClassInfo containingClass, ClassInfo realContainingClass,
-                        boolean isPublic, boolean isProtected,
-                        boolean isPackagePrivate, boolean isPrivate,
-                        boolean isFinal, boolean isStatic, boolean isSynthetic,
-                        boolean isAbstract, boolean isSynchronized, boolean isNative,
-                        boolean isAnnotationElement, String kind,
-                        String flatSignature, MethodInfo overriddenMethod,
-                        TypeInfo returnType, ParameterInfo[] parameters,
-                        ClassInfo[] thrownExceptions, SourcePositionInfo position,
-                        AnnotationInstanceInfo[] annotations)
-    {
-        // Explicitly coerce 'final' state of Java6-compiled enum values() method, to match
-        // the Java5-emitted base API description.
-        super(rawCommentText, name, signature, containingClass, realContainingClass,
-                isPublic, isProtected, isPackagePrivate, isPrivate,
-                ((name.equals("values") && containingClass.isEnum()) ? true : isFinal),
-                isStatic, isSynthetic, kind, position, annotations);
-
-        // The underlying MethodDoc for an interface's declared methods winds up being marked
-        // non-abstract.  Correct that here by looking at the immediate-parent class, and marking
-        // this method abstract if it is an unimplemented interface method.
-        if (containingClass.isInterface()) {
-            isAbstract = true;
-        }
-
-        mReasonOpened = "0:0";
-        mIsAnnotationElement = isAnnotationElement;
-        mTypeParameters = typeParameters;
-        mIsAbstract = isAbstract;
-        mIsSynchronized = isSynchronized;
-        mIsNative = isNative;
-        mFlatSignature = flatSignature;
-        mOverriddenMethod = overriddenMethod;
-        mReturnType = returnType;
-        mParameters = parameters;
-        mThrownExceptions = thrownExceptions;
-    }
-
-    public void init(AnnotationValueInfo defaultAnnotationElementValue)
-    {
-        mDefaultAnnotationElementValue = defaultAnnotationElementValue;
-    }
-
-    public boolean isAbstract()
-    {
-        return mIsAbstract;
-    }
-
-    public boolean isSynchronized()
-    {
-        return mIsSynchronized;
-    }
-
-    public boolean isNative()
-    {
-        return mIsNative;
-    }
-
-    public String flatSignature()
-    {
-        return mFlatSignature;
-    }
-
-    public InheritedTags inlineTags()
-    {
-        return new InlineTags();
-    }
-
-    public InheritedTags firstSentenceTags()
-    {
-        return new FirstSentenceTags();
-    }
-
-    public InheritedTags returnTags() {
-        return new ReturnTags();
-    }
-
-    public TypeInfo returnType()
-    {
-        return mReturnType;
-    }
-
-    public String prettySignature()
-    {
-        String s = "(";
-        int N = mParameters.length;
-        for (int i=0; i<N; i++) {
-            ParameterInfo p = mParameters[i];
-            TypeInfo t = p.type();
-            if (t.isPrimitive()) {
-                s += t.simpleTypeName();
-            } else {
-                s += t.asClassInfo().name();
-            }
-            if (i != N-1) {
-                s += ',';
-            }
-        }
-        s += ')';
-        return s;
-    }
-
-    /**
-     * Returns a name consistent with the {@link
-     * com.android.apicheck.MethodInfo#getHashableName()}.
-     */
-    public String getHashableName() {
-        StringBuilder result = new StringBuilder();
-        result.append(name());
-        for (int p = 0; p < mParameters.length; p++) {
-            result.append(":");
-            if (p == mParameters.length - 1 && isVarArgs()) {
-                // TODO: note that this does not attempt to handle hypothetical
-                // vararg methods whose last parameter is a list of arrays, e.g.
-                // "Object[]...".
-                result.append(mParameters[p].type().fullNameNoDimension(typeVariables()))
-                        .append("...");
-            } else {
-                result.append(mParameters[p].type().fullName(typeVariables()));
-            }
-        }
-        return result.toString();
-    }
-
-    private boolean inList(ClassInfo item, ThrowsTagInfo[] list)
-    {
-        int len = list.length;
-        String qn = item.qualifiedName();
-        for (int i=0; i<len; i++) {
-            ClassInfo ex = list[i].exception();
-            if (ex != null && ex.qualifiedName().equals(qn)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public ThrowsTagInfo[] throwsTags()
-    {
-        if (mThrowsTags == null) {
-            ThrowsTagInfo[] documented = comment().throwsTags();
-            ArrayList<ThrowsTagInfo> rv = new ArrayList<ThrowsTagInfo>();
-
-            int len = documented.length;
-            for (int i=0; i<len; i++) {
-                rv.add(documented[i]);
-            }
-
-            ClassInfo[] all = mThrownExceptions;
-            len = all.length;
-            for (int i=0; i<len; i++) {
-                ClassInfo cl = all[i];
-                if (documented == null || !inList(cl, documented)) {
-                    rv.add(new ThrowsTagInfo("@throws", "@throws",
-                                        cl.qualifiedName(), cl, "",
-                                        containingClass(), position()));
-                }
-            }
-            mThrowsTags = rv.toArray(new ThrowsTagInfo[rv.size()]);
-        }
-        return mThrowsTags;
-    }
-
-    private static int indexOfParam(String name, String[] list)
-    {
-        final int N = list.length;
-        for (int i=0; i<N; i++) {
-            if (name.equals(list[i])) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    public ParamTagInfo[] paramTags()
-    {
-        if (mParamTags == null) {
-            final int N = mParameters.length;
-
-            String[] names = new String[N];
-            String[] comments = new String[N];
-            SourcePositionInfo[] positions = new SourcePositionInfo[N];
-
-            // get the right names so we can handle our names being different from
-            // our parent's names.
-            for (int i=0; i<N; i++) {
-                names[i] = mParameters[i].name();
-                comments[i] = "";
-                positions[i] = mParameters[i].position();
-            }
-
-            // gather our comments, and complain about misnamed @param tags
-            for (ParamTagInfo tag: comment().paramTags()) {
-                int index = indexOfParam(tag.parameterName(), names);
-                if (index >= 0) {
-                    comments[index] = tag.parameterComment();
-                    positions[index] = tag.position();
-                } else {
-                    Errors.error(Errors.UNKNOWN_PARAM_TAG_NAME, tag.position(),
-                            "@param tag with name that doesn't match the parameter list: '"
-                            + tag.parameterName() + "'");
-                }
-            }
-
-            // get our parent's tags to fill in the blanks
-            MethodInfo overridden = this.findOverriddenMethod(name(), signature());
-            if (overridden != null) {
-                ParamTagInfo[] maternal = overridden.paramTags();
-                for (int i=0; i<N; i++) {
-                    if (comments[i].equals("")) {
-                        comments[i] = maternal[i].parameterComment();
-                        positions[i] = maternal[i].position();
-                    }
-                }
-            }
-
-            // construct the results, and cache them for next time
-            mParamTags = new ParamTagInfo[N];
-            for (int i=0; i<N; i++) {
-                mParamTags[i] = new ParamTagInfo("@param", "@param", names[i] + " " + comments[i],
-                        parent(), positions[i]);
-
-                // while we're here, if we find any parameters that are still undocumented at this
-                // point, complain. (this warning is off by default, because it's really, really
-                // common; but, it's good to be able to enforce it)
-                if (comments[i].equals("")) {
-                    Errors.error(Errors.UNDOCUMENTED_PARAMETER, positions[i],
-                            "Undocumented parameter '" + names[i] + "' on method '"
-                            + name() + "'");
-                }
-            }
-        }
-        return mParamTags;
-    }
-
-    public SeeTagInfo[] seeTags()
-    {
-        SeeTagInfo[] result = comment().seeTags();
-        if (result == null) {
-            if (mOverriddenMethod != null) {
-                result = mOverriddenMethod.seeTags();
-            }
-        }
-        return result;
-    }
-
-    public TagInfo[] deprecatedTags()
-    {
-        TagInfo[] result = comment().deprecatedTags();
-        if (result.length == 0) {
-            if (comment().undeprecateTags().length == 0) {
-                if (mOverriddenMethod != null) {
-                    result = mOverriddenMethod.deprecatedTags();
-                }
-            }
-        }
-        return result;
-    }
-
-    public ParameterInfo[] parameters()
-    {
-        return mParameters;
-    }
-
-
-    public boolean matchesParams(String[] params, String[] dimensions)
-    {
-        if (mParamStrings == null) {
-            ParameterInfo[] mine = mParameters;
-            int len = mine.length;
-            if (len != params.length) {
-                return false;
-            }
-            for (int i=0; i<len; i++) {
-                TypeInfo t = mine[i].type();
-                if (!t.dimension().equals(dimensions[i])) {
-                    return false;
-                }
-                String qn = t.qualifiedTypeName();
-                String s = params[i];
-                int slen = s.length();
-                int qnlen = qn.length();
-                if (!(qn.equals(s) ||
-                        ((slen+1)<qnlen && qn.charAt(qnlen-slen-1)=='.'
-                         && qn.endsWith(s)))) {
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".kind", kind());
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".href", htmlPage());
-        data.setValue(base + ".anchor", anchor());
-
-        if (mReturnType != null) {
-            returnType().makeHDF(data, base + ".returnType", false, typeVariables());
-            data.setValue(base + ".abstract", mIsAbstract ? "abstract" : "");
-        }
-
-        data.setValue(base + ".synchronized", mIsSynchronized ? "synchronized" : "");
-        data.setValue(base + ".final", isFinal() ? "final" : "");
-        data.setValue(base + ".static", isStatic() ? "static" : "");
-
-        TagInfo.makeHDF(data, base + ".shortDescr", firstSentenceTags());
-        TagInfo.makeHDF(data, base + ".descr", inlineTags());
-        TagInfo.makeHDF(data, base + ".deprecated", deprecatedTags());
-        TagInfo.makeHDF(data, base + ".seeAlso", seeTags());
-        data.setValue(base + ".since", getSince());
-        ParamTagInfo.makeHDF(data, base + ".paramTags", paramTags());
-        AttrTagInfo.makeReferenceHDF(data, base + ".attrRefs", comment().attrTags());
-        ThrowsTagInfo.makeHDF(data, base + ".throws", throwsTags());
-        ParameterInfo.makeHDF(data, base + ".params", parameters(), isVarArgs(), typeVariables());
-        if (isProtected()) {
-            data.setValue(base + ".scope", "protected");
-        }
-        else if (isPublic()) {
-            data.setValue(base + ".scope", "public");
-        }
-        TagInfo.makeHDF(data, base + ".returns", returnTags());
-
-        if (mTypeParameters != null) {
-            TypeInfo.makeHDF(data, base + ".generic.typeArguments", mTypeParameters, false);
-        }
-    }
-
-    public HashSet<String> typeVariables()
-    {
-        HashSet<String> result = TypeInfo.typeVariables(mTypeParameters);
-        ClassInfo cl = containingClass();
-        while (cl != null) {
-            TypeInfo[] types = cl.asTypeInfo().typeArguments();
-            if (types != null) {
-                TypeInfo.typeVariables(types, result);
-            }
-            cl = cl.containingClass();
-        }
-        return result;
-    }
-
-    @Override
-    public boolean isExecutable()
-    {
-        return true;
-    }
-
-    public ClassInfo[] thrownExceptions()
-    {
-        return mThrownExceptions;
-    }
-
-    public String typeArgumentsName(HashSet<String> typeVars)
-    {
-        if (mTypeParameters == null || mTypeParameters.length == 0) {
-            return "";
-        } else {
-            return TypeInfo.typeArgumentsName(mTypeParameters, typeVars);
-        }
-    }
-
-    public boolean isAnnotationElement()
-    {
-        return mIsAnnotationElement;
-    }
-
-    public AnnotationValueInfo defaultAnnotationElementValue()
-    {
-        return mDefaultAnnotationElementValue;
-    }
-
-    public void setVarargs(boolean set){
-        mIsVarargs = set;
-    }
-    public boolean isVarArgs(){
-      return mIsVarargs;
-    }
-
-    @Override
-    public String toString(){
-      return this.name();
-    }
-
-    public void setReason(String reason) {
-        mReasonOpened = reason;
-    }
-
-    public String getReason() {
-        return mReasonOpened;
-    }
-
-    private String mFlatSignature;
-    private MethodInfo mOverriddenMethod;
-    private TypeInfo mReturnType;
-    private boolean mIsAnnotationElement;
-    private boolean mIsAbstract;
-    private boolean mIsSynchronized;
-    private boolean mIsNative;
-    private boolean mIsVarargs;
-    private boolean mDeprecatedKnown;
-    private boolean mIsDeprecated;
-    private ParameterInfo[] mParameters;
-    private ClassInfo[] mThrownExceptions;
-    private String[] mParamStrings;
-    ThrowsTagInfo[] mThrowsTags;
-    private ParamTagInfo[] mParamTags;
-    private TypeInfo[] mTypeParameters;
-    private AnnotationValueInfo mDefaultAnnotationElementValue;
-    private String mReasonOpened;
-}
-
diff --git a/tools/droiddoc/src/NavTree.java b/tools/droiddoc/src/NavTree.java
deleted file mode 100644
index 0469fdc..0000000
--- a/tools/droiddoc/src/NavTree.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-
-import java.util.ArrayList;
-
-public class NavTree {
-
-    public static void writeNavTree(String dir) {
-        ArrayList<Node> children = new ArrayList();
-        for (PackageInfo pkg: DroidDoc.choosePackages()) {
-            children.add(makePackageNode(pkg));
-        }
-        Node node = new Node("Reference", dir + "packages.html", children, null);
-
-        StringBuilder buf = new StringBuilder();
-        if (false) {
-            // if you want a root node
-            buf.append("[");
-            node.render(buf);
-            buf.append("]");
-        } else {
-            // if you don't want a root node
-            node.renderChildren(buf);
-        }
-
-        HDF data = DroidDoc.makeHDF();
-        data.setValue("reference_tree", buf.toString());
-        ClearPage.write(data, "navtree_data.cs", "navtree_data.js");
-    }
-
-    private static Node makePackageNode(PackageInfo pkg) {
-        ArrayList<Node> children = new ArrayList();
-
-        children.add(new Node("Description", pkg.fullDescriptionHtmlPage(), null, null));
-
-        addClassNodes(children, "Interfaces", pkg.interfaces());
-        addClassNodes(children, "Classes", pkg.ordinaryClasses());
-        addClassNodes(children, "Enums", pkg.enums());
-        addClassNodes(children, "Exceptions", pkg.exceptions());
-        addClassNodes(children, "Errors", pkg.errors());
-
-        return new Node(pkg.name(), pkg.htmlPage(), children, pkg.getSince());
-    }
-
-    private static void addClassNodes(ArrayList<Node> parent, String label, ClassInfo[] classes) {
-        ArrayList<Node> children = new ArrayList();
-
-        for (ClassInfo cl: classes) {
-            if (cl.checkLevel()) {
-                children.add(new Node(cl.name(), cl.htmlPage(), null, cl.getSince()));
-            }
-        }
-
-        if (children.size() > 0) {
-            parent.add(new Node(label, null, children, null));
-        }
-    }
-
-    private static class Node {
-        private String mLabel;
-        private String mLink;
-        ArrayList<Node> mChildren;
-        private String mSince;
-
-        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) {
-            if (s == null) {
-                buf.append("null");
-            } else {
-                buf.append('"');
-                final int N = s.length();
-                for (int i=0; i<N; i++) {
-                    char c = s.charAt(i);
-                    if (c >= ' ' && c <= '~' && c != '"' && c != '\\') {
-                        buf.append(c);
-                    } else {
-                        buf.append("\\u");
-                        for (int j=0; i<4; i++) {
-                            char x = (char)(c & 0x000f);
-                            if (x > 10) {
-                                x = (char)(x - 10 + 'a');
-                            } else {
-                                x = (char)(x + '0');
-                            }
-                            buf.append(x);
-                            c >>= 4;
-                        }
-                    }
-                }
-                buf.append('"');
-            }
-        }
-
-        void renderChildren(StringBuilder buf) {
-            ArrayList<Node> list = mChildren;
-            if (list == null || list.size() == 0) {
-                // We output null for no children.  That way empty lists here can just
-                // be a byproduct of how we generate the lists.
-                buf.append("null");
-            } else {
-                buf.append("[ ");
-                final int N = list.size();
-                for (int i=0; i<N; i++) {
-                    list.get(i).render(buf);
-                    if (i != N-1) {
-                        buf.append(", ");
-                    }
-                }
-                buf.append(" ]\n");
-            }
-        }
-
-        void render(StringBuilder buf) {
-            buf.append("[ ");
-            renderString(buf, mLabel);
-            buf.append(", ");
-            renderString(buf, mLink);
-            buf.append(", ");
-            renderChildren(buf);
-            buf.append(", ");
-            renderString(buf, mSince);
-            buf.append(" ]");
-        }
-    }
-}
diff --git a/tools/droiddoc/src/PackageInfo.java b/tools/droiddoc/src/PackageInfo.java
deleted file mode 100644
index 17ad1b7..0000000
--- a/tools/droiddoc/src/PackageInfo.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.*;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-
-public class PackageInfo extends DocInfo implements ContainerInfo
-{
-    public static final Comparator<PackageInfo> comparator = new Comparator<PackageInfo>() {
-        public int compare(PackageInfo a, PackageInfo b) {
-            return a.name().compareTo(b.name());
-        }
-    };
-
-    public PackageInfo(PackageDoc pkg, String name, SourcePositionInfo position)
-    {
-        super(pkg.getRawCommentText(), position);
-        mName = name;
-
-        if (pkg == null) {
-            throw new RuntimeException("pkg is null");
-        }
-        mPackage = pkg;
-    }
-
-    public String htmlPage()
-    {
-        String s = mName;
-        s = s.replace('.', '/');
-        s += "/package-summary.html";
-        s = DroidDoc.javadocDir + s;
-        return s;
-    }
-
-    public String fullDescriptionHtmlPage() {
-        String s = mName;
-        s = s.replace('.', '/');
-        s += "/package-descr.html";
-        s = DroidDoc.javadocDir + s;
-        return s;
-    }
-
-    @Override
-    public ContainerInfo parent()
-    {
-        return null;
-    }
-
-    @Override
-    public boolean isHidden()
-    {
-        return comment().isHidden();
-    }
-
-    public boolean checkLevel() {
-        // TODO should return false if all classes are hidden but the package isn't.
-        // We don't have this so I'm not doing it now.
-        return !isHidden();
-    }
-
-    public String name()
-    {
-        return mName;
-    }
-
-    public String qualifiedName()
-    {
-        return mName;
-    }
-
-    public TagInfo[] inlineTags()
-    {
-        return comment().tags();
-    }
-
-    public TagInfo[] firstSentenceTags()
-    {
-        return comment().briefTags();
-    }
-
-    public static ClassInfo[] filterHidden(ClassInfo[] classes)
-    {
-        ArrayList<ClassInfo> out = new ArrayList<ClassInfo>();
-
-        for (ClassInfo cl: classes) {
-            if (!cl.isHidden()) {
-                out.add(cl);
-            }
-        }
-
-        return out.toArray(new ClassInfo[0]);
-    }
-
-    public void makeLink(HDF data, String base)
-    {
-        if (checkLevel()) {
-            data.setValue(base + ".link", htmlPage());
-        }
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".since", getSince());
-    }
-
-    public void makeClassLinkListHDF(HDF data, String base)
-    {
-        makeLink(data, base);
-        ClassInfo.makeLinkListHDF(data, base + ".interfaces", interfaces());
-        ClassInfo.makeLinkListHDF(data, base + ".classes", ordinaryClasses());
-        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()
-    {
-        if (mInterfaces == null) {
-            mInterfaces = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
-                            mPackage.interfaces())));
-        }
-        return mInterfaces;
-    }
-
-    public ClassInfo[] ordinaryClasses()
-    {
-        if (mOrdinaryClasses == null) {
-            mOrdinaryClasses = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
-                            mPackage.ordinaryClasses())));
-        }
-        return mOrdinaryClasses;
-    }
-
-    public ClassInfo[] enums()
-    {
-        if (mEnums == null) {
-            mEnums = ClassInfo.sortByName(filterHidden(Converter.convertClasses(mPackage.enums())));
-        }
-        return mEnums;
-    }
-
-    public ClassInfo[] exceptions()
-    {
-        if (mExceptions == null) {
-            mExceptions = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
-                        mPackage.exceptions())));
-        }
-        return mExceptions;
-    }
-
-    public ClassInfo[] errors()
-    {
-        if (mErrors == null) {
-            mErrors = ClassInfo.sortByName(filterHidden(Converter.convertClasses(
-                        mPackage.errors())));
-        }
-        return mErrors;
-    }
-
-    // in hashed containers, treat the name as the key
-    @Override
-    public int hashCode() {
-        return mName.hashCode();
-    }
-
-    private String mName;
-    private PackageDoc mPackage;
-    private ClassInfo[] mInterfaces;
-    private ClassInfo[] mOrdinaryClasses;
-    private ClassInfo[] mEnums;
-    private ClassInfo[] mExceptions;
-    private ClassInfo[] mErrors;
-}
-
diff --git a/tools/droiddoc/src/ParamTagInfo.java b/tools/droiddoc/src/ParamTagInfo.java
deleted file mode 100644
index d6f2b6b..0000000
--- a/tools/droiddoc/src/ParamTagInfo.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-public class ParamTagInfo extends ParsedTagInfo
-{
-    static final Pattern PATTERN = Pattern.compile(
-                                "([^ \t\r\n]+)[ \t\r\n]+(.*)",
-                                Pattern.DOTALL);
-
-    private boolean mIsTypeParameter;
-    private String mParameterComment;
-    private String mParameterName;
-
-    ParamTagInfo(String name, String kind, String text, ContainerInfo base,
-            SourcePositionInfo sp)
-    {
-        super(name, kind, text, base, sp);
-
-        Matcher m = PATTERN.matcher(text);
-        if (m.matches()) {
-            mParameterName = m.group(1);
-            mParameterComment = m.group(2);
-            int len = mParameterName.length();
-            mIsTypeParameter = len > 2
-                                && mParameterName.charAt(0) == '<'
-                                && mParameterName.charAt(len-1) == '>';
-        } else {
-            mParameterName = text.trim();
-            mParameterComment = "";
-            mIsTypeParameter = false;
-        }
-        setCommentText(mParameterComment);
-    }
-
-    ParamTagInfo(String name, String kind, String text,
-                            boolean isTypeParameter, String parameterComment,
-                            String parameterName, ContainerInfo base,
-                            SourcePositionInfo sp)
-    {
-        super(name, kind, text, base, sp);
-        mIsTypeParameter = isTypeParameter;
-        mParameterComment = parameterComment;
-        mParameterName = parameterName;
-    }
-
-    public boolean isTypeParameter()
-    {
-        return mIsTypeParameter;
-    }
-
-    public String parameterComment()
-    {
-        return mParameterComment;
-    }
-
-    public String parameterName()
-    {
-        return mParameterName;
-    }
-
-    @Override
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".name", parameterName());
-        data.setValue(base + ".isTypeParameter", isTypeParameter() ? "1" : "0");
-        TagInfo.makeHDF(data, base + ".comment", commentTags());
-    }
-
-    public static void makeHDF(HDF data, String base, ParamTagInfo[] tags)
-    {
-        for (int i=0; i<tags.length; i++) {
-            // don't output if the comment is ""
-            if (!"".equals(tags[i].parameterComment())) {
-                tags[i].makeHDF(data, base + "." + i);
-            }
-        }
-    }
-}
diff --git a/tools/droiddoc/src/ParameterInfo.java b/tools/droiddoc/src/ParameterInfo.java
deleted file mode 100644
index 44608be..0000000
--- a/tools/droiddoc/src/ParameterInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.HashSet;
-
-public class ParameterInfo
-{
-    ParameterInfo(String name, String typeName, TypeInfo type, SourcePositionInfo position)
-    {
-        mName = name;
-        mTypeName = typeName;
-        mType = type;
-        mPosition = position;
-    }
-
-    TypeInfo type()
-    {
-        return mType;
-    }
-
-    String name()
-    {
-        return mName;
-    }
-
-    String typeName()
-    {
-        return mTypeName;
-    }
-
-    SourcePositionInfo position()
-    {
-        return mPosition;
-    }
-
-    public void makeHDF(HDF data, String base, boolean isLastVararg,
-            HashSet<String> typeVariables)
-    {
-        data.setValue(base + ".name", this.name());
-        type().makeHDF(data, base + ".type", isLastVararg, typeVariables);
-    }
-
-    public static void makeHDF(HDF data, String base, ParameterInfo[] params,
-            boolean isVararg, HashSet<String> typeVariables)
-    {
-        for (int i=0; i<params.length; i++) {
-            params[i].makeHDF(data, base + "." + i,
-                    isVararg && (i == params.length - 1), typeVariables);
-        }
-    }
-    
-    String mName;
-    String mTypeName;
-    TypeInfo mType;
-    SourcePositionInfo mPosition;
-}
-
diff --git a/tools/droiddoc/src/ParsedTagInfo.java b/tools/droiddoc/src/ParsedTagInfo.java
deleted file mode 100755
index c2e4806..0000000
--- a/tools/droiddoc/src/ParsedTagInfo.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.ArrayList;
-
-public class ParsedTagInfo extends TagInfo
-{
-    private ContainerInfo mContainer;
-    private String mCommentText;
-    private Comment mComment;
-
-    ParsedTagInfo(String name, String kind, String text, ContainerInfo base, SourcePositionInfo sp)
-    {
-        super(name, kind, text, SourcePositionInfo.findBeginning(sp, text));
-        mContainer = base;
-        mCommentText = text;
-    }
-
-    public TagInfo[] commentTags()
-    {
-        if (mComment == null) {
-            mComment = new Comment(mCommentText, mContainer, position());
-        }
-        return mComment.tags();
-    }
-
-    protected void setCommentText(String comment)
-    {
-        mCommentText = comment;
-    }
-
-    public static <T extends ParsedTagInfo> TagInfo[]
-    joinTags(T[] tags)
-    {
-        ArrayList<TagInfo> list = new ArrayList<TagInfo>();
-        final int N = tags.length;
-        for (int i=0; i<N; i++) {
-            TagInfo[] t = tags[i].commentTags();
-            final int M = t.length;
-            for (int j=0; j<M; j++) {
-                list.add(t[j]);
-            }
-        }
-        return list.toArray(new TagInfo[list.size()]);
-    }
-}
diff --git a/tools/droiddoc/src/Proofread.java b/tools/droiddoc/src/Proofread.java
deleted file mode 100644
index ec9f523..0000000
--- a/tools/droiddoc/src/Proofread.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.io.IOException;
-import java.io.FileWriter;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-public class Proofread
-{
-    static FileWriter out = null;
-    static final Pattern WHITESPACE = Pattern.compile("\\r?\\n");
-    static final String INDENT = "        ";
-    static final String NEWLINE = "\n" + INDENT;
-
-    public static void initProofread(String filename)
-    {
-        try {
-            out = new FileWriter(filename);
-            out.write("javadoc proofread file: " + filename + "\n");
-        }
-        catch (IOException e) {
-            if (out != null) {
-                try {
-                    out.close();
-                }
-                catch (IOException ex) {
-                }
-                out = null;
-            }
-            System.err.println("error opening file: " + filename);
-        }
-    }
-
-    public static void finishProofread(String filename)
-    {
-        if (out == null) {
-            return;
-        }
-
-        try {
-            out.close();
-        }
-        catch (IOException e) {
-        }
-    }
-
-    public static void write(String s)
-    {
-        if (out == null) {
-            return ;
-        }
-        try {
-            out.write(s);
-        }
-        catch (IOException e) {
-        }
-    }
-
-    public static void writeIndented(String s)
-    {
-        s = s.trim();
-        Matcher m = WHITESPACE.matcher(s);
-        s = m.replaceAll(NEWLINE);
-        write(INDENT);
-        write(s);
-        write("\n");
-    }
-
-    public static void writeFileHeader(String filename)
-    {
-        write("\n\n=== ");
-        write(filename);
-        write(" ===\n");
-    }
-
-    public static void writeTagList(TagInfo[] tags)
-    {
-        if (out == null) {
-            return;
-        }
-
-        for (TagInfo t: tags) {
-            String k = t.kind();
-            if ("Text".equals(t.name())) {
-                writeIndented(t.text());
-            }
-            else if ("@more".equals(k)) {
-                writeIndented("");
-            }
-            else if ("@see".equals(k)) {
-                SeeTagInfo see = (SeeTagInfo)t;
-                String label = see.label();
-                if (label == null) {
-                    label = "";
-                }
-                writeIndented("{" + see.name() + " ... " + label + "}");
-            }
-            else if ("@code".equals(k)) {
-                writeIndented(t.text());
-            }
-            else if ("@samplecode".equals(k)) {
-                writeIndented(t.text());
-            }
-            else {
-                writeIndented("{" + (t.name() != null ? t.name() : "") + "/" +
-                        t.text() + "}");
-            }
-        }
-    }
-
-    public static void writePackages(String filename, TagInfo[] tags)
-    {
-        if (out == null) {
-            return;
-        }
-
-        writeFileHeader(filename);
-        writeTagList(tags);
-    }
-
-    public static void writePackage(String filename, TagInfo[] tags)
-    {
-        if (out == null) {
-            return;
-        }
-
-        writeFileHeader(filename);
-        writeTagList(tags);
-    }
-
-    public static void writeClass(String filename, ClassInfo cl)
-    {
-        if (out == null) {
-            return;
-        }
-
-        writeFileHeader(filename);
-        writeTagList(cl.inlineTags());
-
-        // enum constants
-        for (FieldInfo f: cl.enumConstants()) {
-            write("ENUM: " + f.name() + "\n");
-            writeTagList(f.inlineTags());
-        }
-
-        // fields
-        for (FieldInfo f: cl.selfFields()) {
-            write("FIELD: " + f.name() + "\n");
-            writeTagList(f.inlineTags());
-        }
-
-        // constructors
-        for (MethodInfo m: cl.constructors()) {
-            write("CONSTRUCTOR: " + m.name() + "\n");
-            writeTagList(m.inlineTags().tags());
-        }
-
-        // methods
-        for (MethodInfo m: cl.selfMethods()) {
-            write("METHOD: " + m.name() + "\n");
-            writeTagList(m.inlineTags().tags());
-        }
-    }
-}
diff --git a/tools/droiddoc/src/SampleCode.java b/tools/droiddoc/src/SampleCode.java
deleted file mode 100644
index bf54445..0000000
--- a/tools/droiddoc/src/SampleCode.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-
-public class SampleCode {
-    String mSource;
-    String mDest;
-    String mTitle;
-
-    public SampleCode(String source, String dest, String title) {
-        mSource = source;
-        mTitle = title;
-        int len = dest.length();
-        if (len > 1 && dest.charAt(len-1) != '/') {
-            mDest = dest + '/';
-        } else {
-            mDest = dest;
-        }
-    }
-
-    public void write(boolean offlineMode) {
-        File f = new File(mSource);
-        if (!f.isDirectory()) {
-            System.out.println("-samplecode not a directory: " + mSource);
-            return;
-        }
-        if (offlineMode) writeIndexOnly(f, mDest, offlineMode);
-        else writeDirectory(f, mDest);
-    }
-
-    public static String convertExtension(String s, String ext) {
-        return s.substring(0, s.lastIndexOf('.')) + ext;
-    }
-
-    public static String[] IMAGES = { ".png", ".jpg", ".gif" };
-    public static String[] TEMPLATED = { ".java", ".xml" };
-
-    public static boolean inList(String s, String[] list) {
-        for (String t: list) {
-            if (s.endsWith(t)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public void writeDirectory(File dir, String relative) {
-        TreeSet<String> dirs = new TreeSet<String>();
-        TreeSet<String> files = new TreeSet<String>();
-
-        String subdir = relative; //.substring(mDest.length());
-
-        for (File f: dir.listFiles()) {
-            String name = f.getName();
-            if (name.startsWith(".") || name.startsWith("_")) {
-                continue;
-            }
-            if (f.isFile()) {
-                String out = relative + name;
-
-                if (inList(out, IMAGES)) {
-                    // copied directly
-                    ClearPage.copyFile(f, out);
-                    writeImagePage(f, convertExtension(out, DroidDoc.htmlExtension), subdir);
-                    files.add(name);
-                }
-                if (inList(out, TEMPLATED)) {
-                    // copied and goes through the template
-                    ClearPage.copyFile(f, out);
-                    writePage(f, convertExtension(out, DroidDoc.htmlExtension), subdir);
-                    files.add(name);
-                }
-                // else ignored
-            }
-            else if (f.isDirectory()) {
-                writeDirectory(f, relative + name + "/");
-                dirs.add(name);
-            }
-        }
-
-        // write the index page
-        int i;
-
-        HDF hdf = writeIndex(dir);
-        hdf.setValue("subdir", subdir);
-        i=0;
-        for (String d: dirs) {
-            hdf.setValue("subdirs." + i + ".name", d);
-            i++;
-        }
-        i=0;
-        for (String f: files) {
-            hdf.setValue("files." + i + ".name", f);
-            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);
-
-        if (summary == null) {
-            summary = "";
-        }
-        hdf.setValue("summary", summary);
-
-        return hdf;
-    }
-
-    public void writePage(File f, String out, String subdir) {
-        String name = f.getName();
-
-        String filename = f.getPath();
-        String data = SampleTagInfo.readFile(new SourcePositionInfo(filename, -1,-1), filename,
-                                                "sample code", true, true, true);
-        data = DroidDoc.escape(data);
-        
-        HDF hdf = DroidDoc.makeHDF();
-
-        hdf.setValue("page.title", name);
-        hdf.setValue("subdir", subdir);
-        hdf.setValue("realFile", name);
-        hdf.setValue("fileContents", data);
-
-        ClearPage.write(hdf, "sample.cs", out);
-    }
-
-    public void writeImagePage(File f, String out, String subdir) {
-        String name = f.getName();
-
-        String data = "<img src=\"" + name + "\" title=\"" + name + "\" />";
-        
-        HDF hdf = DroidDoc.makeHDF();
-
-        hdf.setValue("page.title", name);
-        hdf.setValue("subdir", subdir);
-        hdf.setValue("realFile", name);
-        hdf.setValue("fileContents", data);
-
-        ClearPage.write(hdf, "sample.cs", out);
-    }
-}
diff --git a/tools/droiddoc/src/SampleTagInfo.java b/tools/droiddoc/src/SampleTagInfo.java
deleted file mode 100644
index c7ad1cc..0000000
--- a/tools/droiddoc/src/SampleTagInfo.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-import java.io.Reader;
-import java.io.IOException;
-import java.io.FileReader;
-import java.io.LineNumberReader;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-/*
- * SampleTagInfo copies text from a given file into the javadoc comment.
- *
- * The @include tag copies the text verbatim from the given file.
- *
- * The @sample tag copies the text from the given file, stripping leading and
- * trailing whitespace, and reducing the indent level of the text to the indent
- * level of the first non-whitespace line.
- *
- * Both tags accept either a filename and an id or just a filename.  If no id
- * is provided, the entire file is copied.  If an id is provided, the lines
- * in the given file between the first two lines containing BEGIN_INCLUDE(id)
- * and END_INCLUDE(id), for the given id, are copied.  The id may be only
- * letters, numbers and underscore (_).
- *
- * Four examples:
- * {@include samples/ApiDemos/src/com/google/app/Notification1.java}
- * {@sample samples/ApiDemos/src/com/google/app/Notification1.java}
- * {@include samples/ApiDemos/src/com/google/app/Notification1.java Bleh}
- * {@sample samples/ApiDemos/src/com/google/app/Notification1.java Bleh}
- *
- */
-public class SampleTagInfo extends TagInfo
-{
-    static final int STATE_BEGIN = 0;
-    static final int STATE_MATCHING = 1;
-
-    static final Pattern TEXT = Pattern.compile(
-                "[\r\n \t]*([^\r\n \t]*)[\r\n \t]*([0-9A-Za-z_]*)[\r\n \t]*",
-                Pattern.DOTALL);
-
-    private static final String BEGIN_INCLUDE = "BEGIN_INCLUDE";
-    private static final String END_INCLUDE = "END_INCLUDE";
-
-    private ContainerInfo mBase;
-    private String mIncluded;
-
-    public static String escapeHtml(String str) {
-        return str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
-    }
-
-    private static boolean isIncludeLine(String str) {
-        return str.indexOf(BEGIN_INCLUDE)>=0 || str.indexOf(END_INCLUDE)>=0;
-    }
-
-    SampleTagInfo(String name, String kind, String text, ContainerInfo base,
-            SourcePositionInfo position)
-    {
-        super(name, kind, text, position);
-        mBase = base;
-
-        Matcher m = TEXT.matcher(text);
-        if (!m.matches()) {
-            Errors.error(Errors.BAD_INCLUDE_TAG, position, "Bad @include tag: "
-                    + text);
-            return;
-        }
-        String filename = m.group(1);
-        String id = m.group(2);
-        boolean trim = "@sample".equals(name);
-
-        if (id == null || "".equals(id)) {
-            mIncluded = readFile(position, filename, id, trim, true, false);
-        } else {
-            mIncluded = loadInclude(position, filename, id, trim);
-        }
-
-        if (mIncluded == null) {
-            Errors.error(Errors.BAD_INCLUDE_TAG, position, "include tag '" + id
-                    + "' not found in file: " + filename);
-        }
-    }
-
-    static String getTrimString(String line)
-    {
-        int i = 0;
-        int len = line.length();
-        for (; i<len; i++) {
-            char c = line.charAt(i);
-            if (c != ' ' && c != '\t') {
-                break;
-            }
-        }
-        if (i == len) {
-            return null;
-        } else {
-            return line.substring(0, i);
-        }
-    }
-
-    static String loadInclude(SourcePositionInfo pos, String filename,
-                                String id, boolean trim)
-    {
-        Reader input = null;
-        StringBuilder result = new StringBuilder();
-
-        String begin = BEGIN_INCLUDE + "(" + id + ")";
-        String end = END_INCLUDE + "(" + id + ")";
-
-        try {
-            input = new FileReader(filename);
-            LineNumberReader lines = new LineNumberReader(input);
-
-            int state = STATE_BEGIN;
-
-            int trimLength = -1;
-            String trimString = null;
-            int trailing = 0;
-
-            while (true) {
-                String line = lines.readLine();
-                if (line == null) {
-                    return null;
-                }
-                switch (state) {
-                case STATE_BEGIN:
-                    if (line.indexOf(begin) >= 0) {
-                        state = STATE_MATCHING;
-                    }
-                    break;
-                case STATE_MATCHING:
-                    if (line.indexOf(end) >= 0) {
-                        return result.substring(0);
-                    } else {
-                        boolean empty = "".equals(line.trim());
-                        if (trim) {
-                            if (isIncludeLine(line)) {
-                                continue;
-                            }
-                            if (trimLength < 0 && !empty) {
-                                trimString = getTrimString(line);
-                                if (trimString != null) {
-                                    trimLength = trimString.length();
-                                }
-                            }
-                            if (trimLength >= 0 && line.length() > trimLength) {
-                                boolean trimThisLine = true;
-                                for (int i=0; i<trimLength; i++) {
-                                    if (line.charAt(i) != trimString.charAt(i)){
-                                        trimThisLine = false;
-                                        break;
-                                    }
-                                }
-                                if (trimThisLine) {
-                                    line = line.substring(trimLength);
-                                }
-                            }
-                            if (trimLength >= 0) {
-                                if (!empty) {
-                                    for (int i=0; i<trailing; i++) {
-                                        result.append('\n');
-                                    }
-                                    line = escapeHtml(line);
-                                    result.append(line);
-                                    trailing = 1;  // add \n next time, maybe
-                                } else {
-                                    trailing++;
-                                }
-                            }
-                        } else {
-                            result.append(line);
-                            result.append('\n');
-                        }
-                    }
-                    break;
-                }
-            }
-        }
-        catch (IOException e) {
-            Errors.error(Errors.BAD_INCLUDE_TAG, pos, "Error reading file for"
-                    + " include \"" + id + "\" " + filename);
-        }
-        finally {
-            if (input != null) {
-                try {
-                    input.close();
-                }
-                catch (IOException ex) {
-                }
-            }
-        }
-        Errors.error(Errors.BAD_INCLUDE_TAG, pos, "Did not find " + end
-                + " in file " + filename);
-        return null;
-    }
-
-    static String readFile(SourcePositionInfo pos, String filename,
-                                String id, boolean trim, boolean escape,
-                                boolean errorOk)
-    {
-        Reader input = null;
-        StringBuilder result = new StringBuilder();
-        int trailing = 0;
-        boolean started = false;
-        try {
-            input = new FileReader(filename);
-            LineNumberReader lines = new LineNumberReader(input);
-
-            while (true) {
-                String line = lines.readLine();
-                if (line == null) {
-                    break;
-                }
-                if (trim) {
-                    if (isIncludeLine(line)) {
-                        continue;
-                    }
-                    if (!"".equals(line.trim())) {
-                        if (started) {
-                            for (int i=0; i<trailing; i++) {
-                                result.append('\n');
-                            }
-                        }
-                        if (escape) {
-                            line = escapeHtml(line);
-                        }
-                        result.append(line);
-                        trailing = 1;  // add \n next time, maybe
-                        started = true;
-                    } else {
-                        if (started) {
-                            trailing++;
-                        }
-                    }
-                } else {
-                    result.append(line);
-                    result.append('\n');
-                }
-            }
-        }
-        catch (IOException e) {
-            if (errorOk) {
-                return null;
-            } else {
-                Errors.error(Errors.BAD_INCLUDE_TAG, pos, "Error reading file for"
-                        + " include \"" + id + "\" " + filename);
-            }
-        }
-        finally {
-            if (input != null) {
-                try {
-                    input.close();
-                }
-                catch (IOException ex) {
-                }
-            }
-        }
-        return result.substring(0);
-    }
-
-    @Override
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".kind", kind());
-        if (mIncluded != null) {
-            data.setValue(base + ".text", mIncluded);
-        } else {
-            data.setValue(base + ".text", "INCLUDE_ERROR");
-        }
-    }
-}
-
diff --git a/tools/droiddoc/src/Scoped.java b/tools/droiddoc/src/Scoped.java
deleted file mode 100644
index cca61ed..0000000
--- a/tools/droiddoc/src/Scoped.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public interface Scoped {
-    boolean isPublic();
-    boolean isProtected();
-    boolean isPackagePrivate();
-    boolean isPrivate();
-    boolean isHidden();
-}
diff --git a/tools/droiddoc/src/SeeTagInfo.java b/tools/droiddoc/src/SeeTagInfo.java
deleted file mode 100644
index 8420ed3..0000000
--- a/tools/droiddoc/src/SeeTagInfo.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.ArrayList;
-
-public class SeeTagInfo extends TagInfo
-{
-    private ContainerInfo mBase;
-    LinkReference mLink;
-
-    SeeTagInfo(String name, String kind, String text, ContainerInfo base,
-            SourcePositionInfo position)
-    {
-        super(name, kind, text, position);
-        mBase = base;
-    }
-
-    protected LinkReference linkReference() {
-        if (mLink == null) {
-            mLink = LinkReference.parse(text(), mBase, position(),
-                           (!"@see".equals(name())) && (mBase != null ? mBase.checkLevel() : true));
-        }
-        return mLink;
-    }
-
-    public String label()
-    {
-        return linkReference().label;
-    }
-
-    @Override
-    public void makeHDF(HDF data, String base)
-    {
-        LinkReference linkRef = linkReference();
-        if (linkRef.kind != null) {
-            // if they have a better suggestion about "kind" use that.
-            // do this before super.makeHDF() so it picks it up
-            setKind(linkRef.kind);
-        }
-
-        super.makeHDF(data, base);
-
-        data.setValue(base + ".label", linkRef.label);
-        if (linkRef.href != null) {
-            data.setValue(base + ".href", linkRef.href);
-        }
-    }
-
-    public boolean checkLevel() {
-        return linkReference().checkLevel();
-    }
-
-    public static void makeHDF(HDF data, String base, SeeTagInfo[] tags)
-    {
-        int j=0;
-        for (SeeTagInfo tag: tags) {
-            if (tag.mBase.checkLevel() && tag.checkLevel()) {
-                tag.makeHDF(data, base + "." + j);
-                j++;
-            }
-        }
-    }
-}
diff --git a/tools/droiddoc/src/SinceTagger.java b/tools/droiddoc/src/SinceTagger.java
deleted file mode 100644
index a1bce55..0000000
--- a/tools/droiddoc/src/SinceTagger.java
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright 2009 Google Inc. All Rights Reserved.
-
-import com.android.apicheck.ApiCheck;
-import com.android.apicheck.ApiInfo;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Collections;
-
-import org.clearsilver.HDF;
-
-/**
- * Applies version information to the DroidDoc class model from apicheck XML
- * files. Sample usage:
- * <pre>
- *   ClassInfo[] classInfos = ...
- *
- *   SinceTagger sinceTagger = new SinceTagger()
- *   sinceTagger.addVersion("frameworks/base/api/1.xml", "Android 1.0")
- *   sinceTagger.addVersion("frameworks/base/api/2.xml", "Android 1.5")
- *   sinceTagger.tagAll(...);
- * </pre>
- */
-public class SinceTagger {
-
-    private final Map<String, String> xmlToName
-            = new LinkedHashMap<String, String>();
-
-    /**
-     * Specifies the apicheck XML file and the API version it holds. Calls to
-     * this method should be called in order from oldest version to newest.
-     */
-    public void addVersion(String file, String name) {
-        xmlToName.put(file, name);
-    }
-
-    public void tagAll(ClassInfo[] classDocs) {
-        // read through the XML files in order, applying their since information
-        // to the Javadoc models
-        for (Map.Entry<String, String> versionSpec : xmlToName.entrySet()) {
-            String xmlFile = versionSpec.getKey();
-            String versionName = versionSpec.getValue();
-            ApiInfo specApi = new ApiCheck().parseApi(xmlFile);
-
-            applyVersionsFromSpec(versionName, specApi, classDocs);
-        }
-
-        if (!xmlToName.isEmpty()) {
-            warnForMissingVersions(classDocs);
-        }
-    }
-
-    /**
-     * 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.
-     *
-     * @param versionName the version name
-     * @param specApi the spec for this version. If a symbol is in this spec, it
-     *      was present in the named version
-     * @param classDocs the doc model to update
-     */
-    private void applyVersionsFromSpec(String versionName,
-            ApiInfo specApi, ClassInfo[] classDocs) {
-        for (ClassInfo classDoc : classDocs) {
-            com.android.apicheck.PackageInfo packageSpec
-                    = specApi.getPackages().get(classDoc.containingPackage().name());
-
-            if (packageSpec == null) {
-                continue;
-            }
-
-            com.android.apicheck.ClassInfo classSpec
-                    = packageSpec.allClasses().get(classDoc.name());
-
-            if (classSpec == null) {
-                continue;
-            }
-
-            versionPackage(versionName, classDoc.containingPackage());
-            versionClass(versionName, classDoc);
-            versionConstructors(versionName, classSpec, classDoc);
-            versionFields(versionName, classSpec, classDoc);
-            versionMethods(versionName, classSpec, classDoc);
-        }
-    }
-
-    /**
-     * Applies version information to {@code doc} where not already present.
-     */
-    private void versionPackage(String versionName, PackageInfo doc) {
-        if (doc.getSince() == null) {
-            doc.setSince(versionName);
-        }
-    }
-
-    /**
-     * Applies version information to {@code doc} where not already present.
-     */
-    private void versionClass(String versionName, ClassInfo doc) {
-        if (doc.getSince() == null) {
-            doc.setSince(versionName);
-        }
-    }
-
-    /**
-     * Applies version information from {@code spec} to {@code doc} where not
-     * already present.
-     */
-    private void versionConstructors(String versionName,
-            com.android.apicheck.ClassInfo spec, ClassInfo doc) {
-        for (MethodInfo constructor : doc.constructors()) {
-            if (constructor.getSince() == null
-                    && spec.allConstructors().containsKey(constructor.getHashableName())) {
-                constructor.setSince(versionName);
-            }
-        }
-    }
-
-    /**
-     * Applies version information from {@code spec} to {@code doc} where not
-     * already present.
-     */
-    private void versionFields(String versionName,
-            com.android.apicheck.ClassInfo spec, ClassInfo doc) {
-        for (FieldInfo field : doc.fields()) {
-            if (field.getSince() == null
-                    && spec.allFields().containsKey(field.name())) {
-                field.setSince(versionName);
-            }
-        }
-    }
-
-    /**
-     * Applies version information from {@code spec} to {@code doc} where not
-     * already present.
-     */
-    private void versionMethods(String versionName,
-            com.android.apicheck.ClassInfo spec, ClassInfo doc) {
-        for (MethodInfo method : doc.methods()) {
-            if (method.getSince() != null) {
-                continue;
-            }
-
-            for (com.android.apicheck.ClassInfo superclass : spec.hierarchy()) {
-                if (superclass.allMethods().containsKey(method.getHashableName())) {
-                    method.setSince(versionName);
-                    break;
-                }
-            }
-        }
-    }
-
-    /**
-     * Warns if any symbols are missing version information. When configured
-     * properly, this will yield zero warnings because {@code apicheck}
-     * guarantees that all symbols are present in the most recent API.
-     */
-    private void warnForMissingVersions(ClassInfo[] classDocs) {
-        for (ClassInfo claz : classDocs) {
-            if (!checkLevelRecursive(claz)) {
-                continue;
-            }
-
-            if (claz.getSince() == null) {
-                Errors.error(Errors.NO_SINCE_DATA, claz.position(),
-                        "XML missing class " + claz.qualifiedName());
-            }
-            
-            for (FieldInfo field : missingVersions(claz.fields())) {
-                Errors.error(Errors.NO_SINCE_DATA, field.position(),
-                        "XML missing field " + claz.qualifiedName()
-                                + "#" + field.name());
-            }
-
-            for (MethodInfo constructor : missingVersions(claz.constructors())) {
-                Errors.error(Errors.NO_SINCE_DATA, constructor.position(),
-                        "XML missing constructor " + claz.qualifiedName()
-                                + "#" + constructor.getHashableName());
-            }
-
-            for (MethodInfo method : missingVersions(claz.methods())) {
-                Errors.error(Errors.NO_SINCE_DATA, method.position(),
-                        "XML missing method " + claz.qualifiedName()
-                                + "#" + method.getHashableName());
-            }
-        }
-    }
-
-    /**
-     * Returns the DocInfos in {@code all} that are documented but do not have
-     * since tags.
-     */
-    private <T extends MemberInfo> Iterable<T> missingVersions(T[] all) {
-        List<T> result = Collections.emptyList();
-        for (T t : all) {
-            // if this member has version info or isn't documented, skip it
-            if (t.getSince() != null
-                    || t.isHidden()
-                    || !checkLevelRecursive(t.realContainingClass())) {
-                continue;
-            }
-
-            if (result.isEmpty()) {
-                result = new ArrayList<T>(); // lazily construct a mutable list
-            }
-            result.add(t);
-        }
-        return result;
-    }
-
-    /**
-     * Returns true if {@code claz} and all containing classes are documented.
-     * The result may be used to filter out members that exist in the API
-     * data structure but aren't a part of the API.
-     */
-    private boolean checkLevelRecursive(ClassInfo claz) {
-        for (ClassInfo c = claz; c != null; c = c.containingClass()) {
-            if (!c.checkLevel()) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
diff --git a/tools/droiddoc/src/Sorter.java b/tools/droiddoc/src/Sorter.java
deleted file mode 100644
index 92039d4..0000000
--- a/tools/droiddoc/src/Sorter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public class Sorter implements Comparable
-{
-    public String label;
-    public Object data;
-
-    public Sorter(String l, Object d)
-    {
-        label = l;
-        data = d;
-    }
-
-    public int compareTo(Object other)
-    {
-        return label.compareToIgnoreCase(((Sorter)other).label);
-    }
-}
diff --git a/tools/droiddoc/src/SourcePositionInfo.java b/tools/droiddoc/src/SourcePositionInfo.java
deleted file mode 100644
index ac605ec..0000000
--- a/tools/droiddoc/src/SourcePositionInfo.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public class SourcePositionInfo implements Comparable
-{
-    public SourcePositionInfo() {
-        this.file = "<unknown>";
-        this.line = 0;
-        this.column = 0;
-    }
-
-    public SourcePositionInfo(String file, int line, int column)
-    {
-        this.file = file;
-        this.line = line;
-        this.column = column;
-    }
-
-    public SourcePositionInfo(SourcePositionInfo that)
-    {
-        this.file = that.file;
-        this.line = that.line;
-        this.column = that.column;
-    }
-
-    /**
-     * Given this position and str which occurs at that position, as well as str an index into str,
-     * find the SourcePositionInfo.
-     *
-     * @throw StringIndexOutOfBoundsException if index &gt; str.length()
-     */
-    public static SourcePositionInfo add(SourcePositionInfo that, String str, int index)
-    {
-        if (that == null) {
-            return null;
-        }
-        int line = that.line;
-        char prev = 0;
-        for (int i=0; i<index; i++) {
-            char c = str.charAt(i);
-            if (c == '\r' || (c == '\n' && prev != '\r')) {
-                line++;
-            }
-            prev = c;
-        }
-        return new SourcePositionInfo(that.file, line, 0);
-    }
-
-    public static SourcePositionInfo findBeginning(SourcePositionInfo that, String str)
-    {
-        if (that == null) {
-            return null;
-        }
-        int line = that.line-1; // -1 because, well, it seems to work
-        int prev = 0;
-        for (int i=str.length()-1; i>=0; i--) {
-            char c = str.charAt(i);
-            if ((c == '\r' && prev != '\n') || (c == '\n')) {
-                line--;
-            }
-            prev = c;
-        }
-        return new SourcePositionInfo(that.file, line, 0);
-    }
-
-    @Override
-    public String toString()
-    {
-        return file + ':' + line;
-    }
-
-    public int compareTo(Object o) {
-        SourcePositionInfo that = (SourcePositionInfo)o;
-        int r = this.file.compareTo(that.file);
-        if (r != 0) return r;
-        return this.line - that.line;
-    }
-
-    public String file;
-    public int line;
-    public int column;
-}
diff --git a/tools/droiddoc/src/Stubs.java b/tools/droiddoc/src/Stubs.java
deleted file mode 100644
index b988ef5..0000000
--- a/tools/droiddoc/src/Stubs.java
+++ /dev/null
@@ -1,999 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Set;
-import java.util.Comparator;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.PrintStream;
-
-public class Stubs {
-    private static HashSet<ClassInfo> notStrippable;
-    public static void writeStubs(String stubsDir, Boolean writeXML, String xmlFile,
-            HashSet<String> stubPackages) {
-        // figure out which classes we need
-        notStrippable = new HashSet();
-        ClassInfo[] all = Converter.allClasses();
-        File  xml = new File(xmlFile);
-        xml.getParentFile().mkdirs();
-        PrintStream xmlWriter = null;
-        if (writeXML) {
-            try {
-                xmlWriter = new PrintStream(xml);
-            } catch (FileNotFoundException e) {
-                Errors.error(Errors.IO_ERROR, new SourcePositionInfo(xmlFile, 0, 0),
-                        "Cannot open file for write.");
-            }
-        }
-        // If a class is public or protected, not hidden, and marked as included,
-        // then we can't strip it
-        for (ClassInfo cl: all) {
-            if (cl.checkLevel() && cl.isIncluded()) {
-                cantStripThis(cl, notStrippable, "0:0");
-            }
-        }
-
-        // complain about anything that looks includeable but is not supposed to
-        // be written, e.g. hidden things
-        for (ClassInfo cl: notStrippable) {
-            if (!cl.isHidden()) {
-                MethodInfo[] methods = cl.selfMethods();
-                for (MethodInfo m: methods) {
-                    if (m.isHidden()) {
-                        Errors.error(Errors.UNAVAILABLE_SYMBOL,
-                                m.position(), "Reference to hidden method "
-                                + m.name());
-                    } else if (m.isDeprecated()) {
-                        // don't bother reporting deprecated methods
-                        // unless they are public
-                        Errors.error(Errors.DEPRECATED,
-                                m.position(), "Method "
-                                + cl.qualifiedName() + "." + m.name()
-                                + " is deprecated");
-                    }
-
-                    ClassInfo returnClass = m.returnType().asClassInfo();
-                    if (returnClass != null && returnClass.isHidden()) {
-                        Errors.error(Errors.UNAVAILABLE_SYMBOL, m.position(),
-                                "Method " + cl.qualifiedName() + "." + m.name()
-                                + " returns unavailable type " + returnClass.name());
-                    }
-
-                    ParameterInfo[] params = m.parameters();
-                    for (ParameterInfo p: params) {
-                        TypeInfo t = p.type();
-                        if (!t.isPrimitive()) {
-                            if (t.asClassInfo().isHidden()) {
-                                Errors.error(Errors.UNAVAILABLE_SYMBOL,
-                                        m.position(), "Parameter of hidden type "
-                                        + t.fullName() + " in "
-                                        + cl.qualifiedName() + "." + m.name() + "()");
-                            }
-                        }
-                    }
-                }
-
-                // annotations are handled like methods
-                methods = cl.annotationElements();
-                for (MethodInfo m: methods) {
-                    if (m.isHidden()) {
-                        Errors.error(Errors.UNAVAILABLE_SYMBOL,
-                                m.position(), "Reference to hidden annotation "
-                                + m.name());
-                    }
-
-                    ClassInfo returnClass = m.returnType().asClassInfo();
-                    if (returnClass != null && returnClass.isHidden()) {
-                        Errors.error(Errors.UNAVAILABLE_SYMBOL,
-                                m.position(), "Annotation '" + m.name()
-                                + "' returns unavailable type " + returnClass.name());
-                    }
-
-                    ParameterInfo[] params = m.parameters();
-                    for (ParameterInfo p: params) {
-                        TypeInfo t = p.type();
-                        if (!t.isPrimitive()) {
-                            if (t.asClassInfo().isHidden()) {
-                                Errors.error(Errors.UNAVAILABLE_SYMBOL,
-                                        p.position(), "Reference to unavailable annotation class "
-                                        + t.fullName());
-                            }
-                        }
-                    }
-                }
-            } else if (cl.isDeprecated()) {
-                // not hidden, but deprecated
-                Errors.error(Errors.DEPRECATED,
-                        cl.position(), "Class " + cl.qualifiedName()
-                        + " is deprecated");
-            }
-        }
-
-        // write out the stubs
-        HashMap<PackageInfo, List<ClassInfo>> packages = new HashMap<PackageInfo, List<ClassInfo>>();
-        for (ClassInfo cl: notStrippable) {
-            if (!cl.isDocOnly()) {
-                if (stubPackages == null || stubPackages.contains(cl.containingPackage().name())) {
-                    writeClassFile(stubsDir, cl);
-                    if (packages.containsKey(cl.containingPackage())) {
-                        packages.get(cl.containingPackage()).add(cl);
-                    } else {
-                        ArrayList<ClassInfo> classes = new ArrayList<ClassInfo>();
-                        classes.add(cl);
-                        packages.put(cl.containingPackage(), classes);
-                    }
-                }
-            }
-        }
-
-        // write out the XML
-        if (writeXML && xmlWriter != null) {
-            writeXML(xmlWriter, packages, notStrippable);
-        }
-
-        if (xmlWriter != null) {
-            xmlWriter.close();
-        }
-
-    }
-
-    public static void cantStripThis(ClassInfo cl, HashSet<ClassInfo> notStrippable, String why) {
-
-      if (!notStrippable.add(cl)) {
-        // slight optimization: if it already contains cl, it already contains
-        // all of cl's parents
-          return;
-      }
-      cl.setReasonIncluded(why);
-
-      // cant strip annotations
-      /*if (cl.annotations() != null){
-          for (AnnotationInstanceInfo ai : cl.annotations()){
-              if (ai.type() != null){
-                  cantStripThis(ai.type(), notStrippable, "1:" + cl.qualifiedName());
-              }
-          }
-      }*/
-      // cant strip any public fields or their generics
-      if (cl.allSelfFields() != null){
-          for (FieldInfo fInfo : cl.allSelfFields()){
-              if (fInfo.type() != null){
-                  if (fInfo.type().asClassInfo() != null){
-                      cantStripThis(fInfo.type().asClassInfo(), notStrippable,
-                          "2:" + cl.qualifiedName());
-                  }
-                  if (fInfo.type().typeArguments() != null){
-                      for (TypeInfo tTypeInfo : fInfo.type().typeArguments()){
-                          if (tTypeInfo.asClassInfo() != null){
-                              cantStripThis(tTypeInfo.asClassInfo(), notStrippable,
-                                  "3:" + cl.qualifiedName());
-                          }
-                      }
-                  }
-              }
-          }
-      }
-      //cant strip any of the type's generics
-      if (cl.asTypeInfo() != null){
-          if (cl.asTypeInfo().typeArguments() != null){
-              for (TypeInfo tInfo : cl.asTypeInfo().typeArguments()){
-                  if (tInfo.asClassInfo() != null){
-                      cantStripThis(tInfo.asClassInfo(), notStrippable, "4:" + cl.qualifiedName());
-                  }
-              }
-          }
-      }
-      //cant strip any of the annotation elements
-      //cantStripThis(cl.annotationElements(), notStrippable);
-      // take care of methods
-      cantStripThis(cl.allSelfMethods(), notStrippable);
-      cantStripThis(cl.allConstructors(), notStrippable);
-      // blow the outer class open if this is an inner class
-      if(cl.containingClass() != null){
-          cantStripThis(cl.containingClass(), notStrippable, "5:" + cl.qualifiedName());
-      }
-      // blow open super class and interfaces
-     ClassInfo supr = cl.realSuperclass();
-      if (supr != null) {
-          if (supr.isHidden()) {
-              // cl is a public class declared as extending a hidden superclass.
-              // this is not a desired practice but it's happened, so we deal
-              // with it by stripping off the superclass relation for purposes of
-              // generating the doc & stub information, and proceeding normally.
-              cl.init(cl.asTypeInfo(), cl.realInterfaces(), cl.realInterfaceTypes(),
-                      cl.innerClasses(), cl.allConstructors(), cl.allSelfMethods(),
-                      cl.annotationElements(), cl.allSelfFields(), cl.enumConstants(),
-                      cl.containingPackage(), cl.containingClass(),
-                      null, null, cl.annotations());
-              Errors.error(Errors.HIDDEN_SUPERCLASS,
-                      cl.position(), "Public class " + cl.qualifiedName()
-                      + " stripped of unavailable superclass "
-                      + supr.qualifiedName());
-          } else {
-              cantStripThis(supr, notStrippable, "6:" + cl.realSuperclass().name()
-                      + cl.qualifiedName());
-          }
-      }
-    }
-
-    private static void cantStripThis(MethodInfo[] mInfos , HashSet<ClassInfo> notStrippable) {
-      //for each method, blow open the parameters, throws and return types.  also blow open their generics
-      if (mInfos != null){
-          for (MethodInfo mInfo : mInfos){
-              if (mInfo.getTypeParameters() != null){
-                  for (TypeInfo tInfo : mInfo.getTypeParameters()){
-                      if (tInfo.asClassInfo() != null){
-                          cantStripThis(tInfo.asClassInfo(), notStrippable, "8:" +
-                                        mInfo.realContainingClass().qualifiedName() + ":" +
-                                        mInfo.name());
-                      }
-                  }
-              }
-              if (mInfo.parameters() != null){
-                  for (ParameterInfo pInfo : mInfo.parameters()){
-                      if (pInfo.type() != null && pInfo.type().asClassInfo() != null){
-                          cantStripThis(pInfo.type().asClassInfo(), notStrippable,
-                                        "9:"+  mInfo.realContainingClass().qualifiedName()
-                                        + ":" + mInfo.name());
-                          if (pInfo.type().typeArguments() != null){
-                              for (TypeInfo tInfoType : pInfo.type().typeArguments()){
-                                  if (tInfoType.asClassInfo() != null){
-                                      ClassInfo tcl = tInfoType.asClassInfo();
-                                      if (tcl.isHidden()) {
-                                          Errors.error(Errors.UNAVAILABLE_SYMBOL, mInfo.position(),
-                                                  "Parameter of hidden type "
-                                                  + tInfoType.fullName() + " in "
-                                                  + mInfo.containingClass().qualifiedName()
-                                                  + '.' + mInfo.name() + "()");
-                                      } else {
-                                          cantStripThis(tcl, notStrippable,
-                                                  "10:" +
-                                                  mInfo.realContainingClass().qualifiedName() + ":" +
-                                                  mInfo.name());
-                                      }
-                                  }
-                              }
-                          }
-                      }
-                  }
-              }
-              for (ClassInfo thrown : mInfo.thrownExceptions()){
-                  cantStripThis(thrown, notStrippable, "11:" +
-                                mInfo.realContainingClass().qualifiedName()
-                                +":" + mInfo.name());
-              }
-              if (mInfo.returnType() != null && mInfo.returnType().asClassInfo() != null){
-                  cantStripThis(mInfo.returnType().asClassInfo(), notStrippable,
-                                "12:" + mInfo.realContainingClass().qualifiedName() +
-                                ":" + mInfo.name());
-                  if (mInfo.returnType().typeArguments() != null){
-                      for (TypeInfo tyInfo: mInfo.returnType().typeArguments() ){
-                          if (tyInfo.asClassInfo() != null){
-                              cantStripThis(tyInfo.asClassInfo(), notStrippable,
-                                            "13:" +
-                                            mInfo.realContainingClass().qualifiedName()
-                                            + ":" + mInfo.name());
-                          }
-                      }
-                  }
-              }
-          }
-      }
-    }
-
-    static String javaFileName(ClassInfo cl) {
-        String dir = "";
-        PackageInfo pkg = cl.containingPackage();
-        if (pkg != null) {
-            dir = pkg.name();
-            dir = dir.replace('.', '/') + '/';
-        }
-        return dir + cl.name() + ".java";
-    }
-
-    static void writeClassFile(String stubsDir, ClassInfo cl) {
-        // inner classes are written by their containing class
-        if (cl.containingClass() != null) {
-            return;
-        }
-
-        // Work around the bogus "Array" class we invent for
-        // Arrays.copyOf's Class<? extends T[]> newType parameter. (http://b/2715505)
-        if (cl.containingPackage() != null && cl.containingPackage().name().equals("")) {
-            return;
-        }
-
-        String filename = stubsDir + '/' + javaFileName(cl);
-        File file = new File(filename);
-        ClearPage.ensureDirectory(file);
-
-        PrintStream stream = null;
-        try {
-            stream = new PrintStream(file);
-            writeClassFile(stream, cl);
-        }
-        catch (FileNotFoundException e) {
-            System.err.println("error writing file: " + filename);
-        }
-        finally {
-            if (stream != null) {
-                stream.close();
-            }
-        }
-    }
-
-    static void writeClassFile(PrintStream stream, ClassInfo cl) {
-        PackageInfo pkg = cl.containingPackage();
-        if (pkg != null) {
-            stream.println("package " + pkg.name() + ";");
-        }
-        writeClass(stream, cl);
-    }
-
-    static void writeClass(PrintStream stream, ClassInfo cl) {
-        writeAnnotations(stream, cl.annotations());
-
-        stream.print(DroidDoc.scope(cl) + " ");
-        if (cl.isAbstract() && !cl.isAnnotation() && !cl.isInterface()) {
-            stream.print("abstract ");
-        }
-        if (cl.isStatic()){
-            stream.print("static ");
-        }
-        if (cl.isFinal() && !cl.isEnum()) {
-            stream.print("final ");
-        }
-        if (false) {
-            stream.print("strictfp ");
-        }
-
-        HashSet<String> classDeclTypeVars = new HashSet();
-        String leafName = cl.asTypeInfo().fullName(classDeclTypeVars);
-        int bracket = leafName.indexOf('<');
-        if (bracket < 0) bracket = leafName.length() - 1;
-        int period = leafName.lastIndexOf('.', bracket);
-        if (period < 0) period = -1;
-        leafName = leafName.substring(period+1);
-
-        String kind = cl.kind();
-        stream.println(kind + " " + leafName);
-
-        TypeInfo base = cl.superclassType();
-
-        if (!"enum".equals(kind)) {
-            if (base != null && !"java.lang.Object".equals(base.qualifiedTypeName())) {
-                stream.println("  extends " + base.fullName(classDeclTypeVars));
-            }
-        }
-
-        TypeInfo[] interfaces = cl.realInterfaceTypes();
-        List<TypeInfo> usedInterfaces = new ArrayList<TypeInfo>();
-        for (TypeInfo iface : interfaces) {
-            if (notStrippable.contains(iface.asClassInfo())
-                    && !iface.asClassInfo().isDocOnly()) {
-                usedInterfaces.add(iface);
-            }
-        }
-        if (usedInterfaces.size() > 0 && !cl.isAnnotation()) {
-            // can java annotations extend other ones?
-            if (cl.isInterface() || cl.isAnnotation()) {
-                stream.print("  extends ");
-            } else {
-                stream.print("  implements ");
-            }
-            String comma = "";
-            for (TypeInfo iface: usedInterfaces) {
-                stream.print(comma + iface.fullName(classDeclTypeVars));
-                comma = ", ";
-            }
-            stream.println();
-        }
-
-        stream.println("{");
-
-        FieldInfo[] enumConstants = cl.enumConstants();
-        int N = enumConstants.length;
-        for (int i=0; i<N; i++) {
-            FieldInfo field = enumConstants[i];
-            if (!field.constantLiteralValue().equals("null")){
-            stream.println(field.name() + "(" + field.constantLiteralValue()
-                    + (i==N-1 ? ");" : "),"));
-            }else{
-              stream.println(field.name() + "(" + (i==N-1 ? ");" : "),"));
-            }
-        }
-
-        for (ClassInfo inner: cl.getRealInnerClasses()) {
-            if (notStrippable.contains(inner)
-                    && !inner.isDocOnly()){
-                writeClass(stream, inner);
-            }
-        }
-
-
-        for (MethodInfo method: cl.constructors()) {
-            if (!method.isDocOnly()) {
-                writeMethod(stream, method, true);
-            }
-        }
-
-        boolean fieldNeedsInitialization = false;
-        boolean staticFieldNeedsInitialization = false;
-        for (FieldInfo field: cl.allSelfFields()) {
-            if (!field.isDocOnly()) {
-                if (!field.isStatic() && field.isFinal() && !fieldIsInitialized(field)) {
-                    fieldNeedsInitialization = true;
-                }
-                if (field.isStatic() && field.isFinal() && !fieldIsInitialized(field)) {
-                    staticFieldNeedsInitialization = true;
-                }
-            }
-        }
-
-        // The compiler includes a default public constructor that calls the super classes
-        // default constructor in the case where there are no written constructors.
-        // So, if we hide all the constructors, java may put in a constructor
-        // that calls a nonexistent super class constructor.  So, if there are no constructors,
-        // and the super class doesn't have a default constructor, write in a private constructor
-        // that works.  TODO -- we generate this as protected, but we really should generate
-        // it as private unless it also exists in the real code.
-        if ((cl.constructors().length == 0 && (cl.getNonWrittenConstructors().length != 0
-                    || fieldNeedsInitialization))
-                && !cl.isAnnotation()
-                && !cl.isInterface()
-                && !cl.isEnum() ) {
-            //Errors.error(Errors.HIDDEN_CONSTRUCTOR,
-            //             cl.position(), "No constructors " +
-            //            "found and superclass has no parameterless constructor.  A constructor " +
-            //            "that calls an appropriate superclass constructor " +
-            //            "was automatically written to stubs.\n");
-            stream.println(cl.leafName()
-                    + "() { " + superCtorCall(cl,null)
-                    + "throw new" + " RuntimeException(\"Stub!\"); }");
-        }
-
-        for (MethodInfo method: cl.allSelfMethods()) {
-            if (cl.isEnum()) {
-                if (("values".equals(method.name())
-                            && "()".equals(method.signature()))
-                    || ("valueOf".equals(method.name())
-                            && "(java.lang.String)".equals(method.signature()))) {
-                    // skip these two methods on enums, because they're synthetic,
-                    // although for some reason javadoc doesn't mark them as synthetic,
-                    // maybe because they still want them documented
-                    continue;
-                }
-            }
-            if (!method.isDocOnly()) {
-                writeMethod(stream, method, false);
-            }
-        }
-        //Write all methods that are hidden, but override abstract methods or interface methods.
-        //These can't be hidden.
-        for (MethodInfo method : cl.getHiddenMethods()){
-            MethodInfo overriddenMethod = method.findRealOverriddenMethod(method.name(), method.signature(), notStrippable);
-            ClassInfo classContainingMethod = method.findRealOverriddenClass(method.name(),
-                                                                             method.signature());
-            if (overriddenMethod != null && !overriddenMethod.isHidden()
-                && !overriddenMethod.isDocOnly() &&
-                (overriddenMethod.isAbstract() ||
-                overriddenMethod.containingClass().isInterface())) {
-                method.setReason("1:" + classContainingMethod.qualifiedName());
-                cl.addMethod(method);
-                writeMethod(stream, method, false);
-            }
-        }
-
-        for (MethodInfo element: cl.annotationElements()) {
-            if (!element.isDocOnly()) {
-                writeAnnotationElement(stream, element);
-            }
-        }
-
-        for (FieldInfo field: cl.allSelfFields()) {
-            if (!field.isDocOnly()) {
-                writeField(stream, field);
-            }
-        }
-
-        if (staticFieldNeedsInitialization) {
-            stream.print("static { ");
-            for (FieldInfo field: cl.allSelfFields()) {
-                if (!field.isDocOnly() && field.isStatic() && field.isFinal()
-                        && !fieldIsInitialized(field) && field.constantValue() == null) {
-                    stream.print(field.name() + " = " + field.type().defaultValue()
-                            + "; ");
-                }
-            }
-            stream.println("}");
-        }
-
-        stream.println("}");
-    }
-
-
-    static void writeMethod(PrintStream stream, MethodInfo method, boolean isConstructor) {
-        String comma;
-
-        stream.print(DroidDoc.scope(method) + " ");
-        if (method.isStatic()) {
-            stream.print("static ");
-        }
-        if (method.isFinal()) {
-            stream.print("final ");
-        }
-        if (method.isAbstract()) {
-            stream.print("abstract ");
-        }
-        if (method.isSynchronized()) {
-            stream.print("synchronized ");
-        }
-        if (method.isNative()) {
-            stream.print("native ");
-        }
-        if (false /*method.isStictFP()*/) {
-            stream.print("strictfp ");
-        }
-
-        stream.print(method.typeArgumentsName(new HashSet()) + " ");
-
-        if (!isConstructor) {
-            stream.print(method.returnType().fullName(method.typeVariables()) + " ");
-        }
-        String n = method.name();
-        int pos = n.lastIndexOf('.');
-        if (pos >= 0) {
-            n = n.substring(pos + 1);
-        }
-        stream.print(n + "(");
-        comma = "";
-        int count = 1;
-        int size = method.parameters().length;
-        for (ParameterInfo param: method.parameters()) {
-            stream.print(comma + fullParameterTypeName(method, param.type(), count == size)
-                    + " " + param.name());
-            comma = ", ";
-            count++;
-        }
-        stream.print(")");
-
-        comma = "";
-        if (method.thrownExceptions().length > 0) {
-            stream.print(" throws ");
-            for (ClassInfo thrown: method.thrownExceptions()) {
-                stream.print(comma + thrown.qualifiedName());
-                comma = ", ";
-            }
-        }
-        if (method.isAbstract() || method.isNative() || method.containingClass().isInterface()) {
-            stream.println(";");
-        } else {
-            stream.print(" { ");
-            if (isConstructor) {
-                stream.print(superCtorCall(method.containingClass(), method.thrownExceptions()));
-            }
-            stream.println("throw new RuntimeException(\"Stub!\"); }");
-        }
-    }
-
-    static void writeField(PrintStream stream, FieldInfo field) {
-        stream.print(DroidDoc.scope(field) + " ");
-        if (field.isStatic()) {
-            stream.print("static ");
-        }
-        if (field.isFinal()) {
-            stream.print("final ");
-        }
-        if (field.isTransient()) {
-            stream.print("transient ");
-        }
-        if (field.isVolatile()) {
-            stream.print("volatile ");
-        }
-
-        stream.print(field.type().fullName());
-        stream.print(" ");
-        stream.print(field.name());
-
-        if (fieldIsInitialized(field)) {
-            stream.print(" = " + field.constantLiteralValue());
-        }
-
-        stream.println(";");
-    }
-
-    static boolean fieldIsInitialized(FieldInfo field) {
-        return (field.isFinal() && field.constantValue() != null)
-                || !field.type().dimension().equals("")
-                || field.containingClass().isInterface();
-    }
-
-    // Returns 'true' if the method is an @Override of a visible parent
-    // method implementation, and thus does not affect the API.
-    static boolean methodIsOverride(MethodInfo mi) {
-        // Abstract/static/final methods are always listed in the API description
-        if (mi.isAbstract() || mi.isStatic() || mi.isFinal()) {
-            return false;
-        }
-
-        // Find any relevant ancestor declaration and inspect it
-        MethodInfo om = mi.findSuperclassImplementation(notStrippable);
-        if (om != null) {
-            // Visibility mismatch is an API change, so check for it
-            if (mi.mIsPrivate == om.mIsPrivate
-                    && mi.mIsPublic == om.mIsPublic
-                    && mi.mIsProtected == om.mIsProtected) {
-                // Look only for overrides of an ancestor class implementation,
-                // not of e.g. an abstract or interface method declaration
-                if (!om.isAbstract()) {
-                    // If the parent is hidden, we can't rely on it to provide
-                    // the API
-                    if (!om.isHidden()) {
-                        // If the only "override" turns out to be in our own class
-                        // (which sometimes happens in concrete subclasses of
-                        // abstract base classes), it's not really an override
-                        if (!mi.mContainingClass.equals(om.mContainingClass)) {
-                            return true;
-                        }
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-    static boolean canCallMethod(ClassInfo from, MethodInfo m) {
-        if (m.isPublic() || m.isProtected()) {
-            return true;
-        }
-        if (m.isPackagePrivate()) {
-            String fromPkg = from.containingPackage().name();
-            String pkg = m.containingClass().containingPackage().name();
-            if (fromPkg.equals(pkg)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    // call a constructor, any constructor on this class's superclass.
-    static String superCtorCall(ClassInfo cl, ClassInfo[] thrownExceptions) {
-        ClassInfo base = cl.realSuperclass();
-        if (base == null) {
-            return "";
-        }
-        HashSet<String> exceptionNames = new HashSet<String>();
-        if (thrownExceptions != null ){
-            for (ClassInfo thrown : thrownExceptions){
-              exceptionNames.add(thrown.name());
-            }
-        }
-        MethodInfo[] ctors = base.constructors();
-        MethodInfo ctor = null;
-        //bad exception indicates that the exceptions thrown by the super constructor
-        //are incompatible with the constructor we're using for the sub class.
-        Boolean badException = false;
-        for (MethodInfo m: ctors) {
-            if (canCallMethod(cl, m)) {
-                if (m.thrownExceptions() != null){
-                    for (ClassInfo thrown : m.thrownExceptions()){
-                        if (!exceptionNames.contains(thrown.name())){
-                            badException = true;
-                        }
-                    }
-                }
-                if (badException){
-                  badException = false;
-                  continue;
-                }
-                // if it has no args, we're done
-                if (m.parameters().length == 0) {
-                    return "";
-                }
-                ctor = m;
-            }
-        }
-        if (ctor != null) {
-            String result = "";
-            result+= "super(";
-            ParameterInfo[] params = ctor.parameters();
-            int N = params.length;
-            for (int i=0; i<N; i++) {
-                TypeInfo t = params[i].type();
-                if (t.isPrimitive() && t.dimension().equals("")) {
-                    String n = t.simpleTypeName();
-                    if (("byte".equals(n)
-                            || "short".equals(n)
-                            || "int".equals(n)
-                            || "long".equals(n)
-                            || "float".equals(n)
-                            || "double".equals(n)) && t.dimension().equals("")) {
-                        result += "0";
-                    }
-                    else if ("char".equals(n)) {
-                        result += "'\\0'";
-                    }
-                    else if ("boolean".equals(n)) {
-                        result += "false";
-                    }
-                    else {
-                        result += "<<unknown-" + n + ">>";
-                    }
-                } else {
-                    //put null in each super class method.  Cast null to the correct type
-                    //to avoid collisions with other constructors.  If the type is generic
-                    //don't cast it
-                    result += (!t.isTypeVariable() ? "(" + t.qualifiedTypeName() + t.dimension() +
-                              ")" : "") + "null";
-                }
-                if (i != N-1) {
-                    result += ",";
-                }
-            }
-            result += "); ";
-            return result;
-        } else {
-            return "";
-        }
-    }
-
-    static void writeAnnotations(PrintStream stream, AnnotationInstanceInfo[] annotations) {
-        for (AnnotationInstanceInfo ann: annotations) {
-            if (!ann.type().isHidden()) {
-                stream.println(ann.toString());
-            }
-        }
-    }
-
-    static void writeAnnotationElement(PrintStream stream, MethodInfo ann) {
-        stream.print(ann.returnType().fullName());
-        stream.print(" ");
-        stream.print(ann.name());
-        stream.print("()");
-        AnnotationValueInfo def = ann.defaultAnnotationElementValue();
-        if (def != null) {
-            stream.print(" default ");
-            stream.print(def.valueString());
-        }
-        stream.println(";");
-    }
-
-    static void writeXML(PrintStream xmlWriter, HashMap<PackageInfo, List<ClassInfo>> allClasses,
-                         HashSet notStrippable) {
-        // extract the set of packages, sort them by name, and write them out in that order
-        Set<PackageInfo> allClassKeys = allClasses.keySet();
-        PackageInfo[] allPackages = allClassKeys.toArray(new PackageInfo[allClassKeys.size()]);
-        Arrays.sort(allPackages, PackageInfo.comparator);
-
-        xmlWriter.println("<api>");
-        for (PackageInfo pack : allPackages) {
-            writePackageXML(xmlWriter, pack, allClasses.get(pack), notStrippable);
-        }
-        xmlWriter.println("</api>");
-    }
-
-    static void writePackageXML(PrintStream xmlWriter, PackageInfo pack, List<ClassInfo> classList,
-                                HashSet notStrippable) {
-        ClassInfo[] classes = classList.toArray(new ClassInfo[classList.size()]);
-        Arrays.sort(classes, ClassInfo.comparator);
-        // Work around the bogus "Array" class we invent for
-        // Arrays.copyOf's Class<? extends T[]> newType parameter. (http://b/2715505)
-        if (pack.name().equals("")) {
-            return;
-        }
-        xmlWriter.println("<package name=\"" + pack.name() + "\"\n"
-                //+ " source=\"" + pack.position() + "\"\n"
-                + ">");
-        for (ClassInfo cl : classes) {
-            writeClassXML(xmlWriter, cl, notStrippable);
-        }
-        xmlWriter.println("</package>");
-
-
-    }
-
-    static void writeClassXML(PrintStream xmlWriter, ClassInfo cl, HashSet notStrippable) {
-        String scope = DroidDoc.scope(cl);
-        String deprecatedString = "";
-        String declString = (cl.isInterface()) ? "interface" : "class";
-        if (cl.isDeprecated()) {
-            deprecatedString = "deprecated";
-        } else {
-            deprecatedString = "not deprecated";
-        }
-        xmlWriter.println("<" + declString + " name=\"" + cl.name() + "\"");
-        if (!cl.isInterface() && !cl.qualifiedName().equals("java.lang.Object")) {
-            xmlWriter.println(" extends=\"" + ((cl.realSuperclass() == null)
-                            ? "java.lang.Object"
-                            : cl.realSuperclass().qualifiedName()) + "\"");
-        }
-        xmlWriter.println(" abstract=\"" + cl.isAbstract() + "\"\n"
-                + " static=\"" + cl.isStatic() + "\"\n"
-                + " final=\"" + cl.isFinal() + "\"\n"
-                + " deprecated=\"" + deprecatedString + "\"\n"
-                + " visibility=\"" + scope + "\"\n"
-                //+ " source=\"" + cl.position() + "\"\n"
-                + ">");
-
-        ClassInfo[] interfaces = cl.realInterfaces();
-        Arrays.sort(interfaces, ClassInfo.comparator);
-        for (ClassInfo iface : interfaces) {
-            if (notStrippable.contains(iface)) {
-                xmlWriter.println("<implements name=\"" + iface.qualifiedName() + "\">");
-                xmlWriter.println("</implements>");
-            }
-        }
-
-        MethodInfo[] constructors = cl.constructors();
-        Arrays.sort(constructors, MethodInfo.comparator);
-        for (MethodInfo mi : constructors) {
-            writeConstructorXML(xmlWriter, mi);
-        }
-
-        MethodInfo[] methods = cl.allSelfMethods();
-        Arrays.sort(methods, MethodInfo.comparator);
-        for (MethodInfo mi : methods) {
-            if (!methodIsOverride(mi)) {
-                writeMethodXML(xmlWriter, mi);
-            }
-        }
-
-        FieldInfo[] fields = cl.allSelfFields();
-        Arrays.sort(fields, FieldInfo.comparator);
-        for (FieldInfo fi : fields) {
-            writeFieldXML(xmlWriter, fi);
-        }
-        xmlWriter.println("</" + declString + ">");
-
-    }
-
-    static void writeMethodXML(PrintStream xmlWriter, MethodInfo mi) {
-        String scope = DroidDoc.scope(mi);
-
-        String deprecatedString = "";
-        if (mi.isDeprecated()) {
-            deprecatedString = "deprecated";
-        } else {
-            deprecatedString = "not deprecated";
-        }
-        xmlWriter.println("<method name=\"" + mi.name() + "\"\n"
-                + ((mi.returnType() != null)
-                        ? " return=\"" + makeXMLcompliant(fullParameterTypeName(mi, mi.returnType(), false)) + "\"\n"
-                        : "")
-                + " abstract=\"" + mi.isAbstract() + "\"\n"
-                + " native=\"" + mi.isNative() + "\"\n"
-                + " synchronized=\"" + mi.isSynchronized() + "\"\n"
-                + " static=\"" + mi.isStatic() + "\"\n"
-                + " final=\"" + mi.isFinal() + "\"\n"
-                + " deprecated=\""+ deprecatedString + "\"\n"
-                + " visibility=\"" + scope + "\"\n"
-                //+ " source=\"" + mi.position() + "\"\n"
-                + ">");
-
-        // write parameters in declaration order
-        int numParameters = mi.parameters().length;
-        int count = 0;
-        for (ParameterInfo pi : mi.parameters()) {
-            count++;
-            writeParameterXML(xmlWriter, mi, pi, count == numParameters);
-        }
-
-        // but write exceptions in canonicalized order
-        ClassInfo[] exceptions = mi.thrownExceptions();
-        Arrays.sort(exceptions, ClassInfo.comparator);
-        for (ClassInfo pi : exceptions) {
-          xmlWriter.println("<exception name=\"" + pi.name() +"\" type=\"" + pi.qualifiedName()
-                            + "\">");
-          xmlWriter.println("</exception>");
-        }
-        xmlWriter.println("</method>");
-    }
-
-    static void writeConstructorXML(PrintStream xmlWriter, MethodInfo mi) {
-        String scope = DroidDoc.scope(mi);
-        String deprecatedString = "";
-        if (mi.isDeprecated()) {
-            deprecatedString = "deprecated";
-        } else {
-            deprecatedString = "not deprecated";
-        }
-        xmlWriter.println("<constructor name=\"" + mi.name() + "\"\n"
-                + " type=\"" + mi.containingClass().qualifiedName() + "\"\n"
-                + " static=\"" + mi.isStatic() + "\"\n"
-                + " final=\"" + mi.isFinal() + "\"\n"
-                + " deprecated=\"" + deprecatedString + "\"\n"
-                + " visibility=\"" + scope +"\"\n"
-                //+ " source=\"" + mi.position() + "\"\n"
-                + ">");
-
-        int numParameters = mi.parameters().length;
-        int count = 0;
-        for (ParameterInfo pi : mi.parameters()) {
-            count++;
-            writeParameterXML(xmlWriter, mi, pi, count == numParameters);
-        }
-
-        ClassInfo[] exceptions = mi.thrownExceptions();
-        Arrays.sort(exceptions, ClassInfo.comparator);
-        for (ClassInfo pi : exceptions) {
-            xmlWriter.println("<exception name=\"" + pi.name() +"\" type=\"" + pi.qualifiedName()
-                              + "\">");
-            xmlWriter.println("</exception>");
-        }
-        xmlWriter.println("</constructor>");
-  }
-
-    static void writeParameterXML(PrintStream xmlWriter, MethodInfo method,
-            ParameterInfo pi, boolean isLast) {
-        xmlWriter.println("<parameter name=\"" + pi.name() + "\" type=\"" +
-                makeXMLcompliant(fullParameterTypeName(method, pi.type(), isLast)) + "\">");
-        xmlWriter.println("</parameter>");
-    }
-
-    static void writeFieldXML(PrintStream xmlWriter, FieldInfo fi) {
-        String scope = DroidDoc.scope(fi);
-        String deprecatedString = "";
-        if (fi.isDeprecated()) {
-            deprecatedString = "deprecated";
-        } else {
-            deprecatedString = "not deprecated";
-        }
-        //need to make sure value is valid XML
-        String value  = makeXMLcompliant(fi.constantLiteralValue());
-
-        String fullTypeName = makeXMLcompliant(fi.type().qualifiedTypeName())
-                + fi.type().dimension();
-
-        xmlWriter.println("<field name=\"" + fi.name() +"\"\n"
-                          + " type=\"" + fullTypeName + "\"\n"
-                          + " transient=\"" + fi.isTransient() + "\"\n"
-                          + " volatile=\"" + fi.isVolatile() + "\"\n"
-                          + (fieldIsInitialized(fi) ? " value=\"" + value + "\"\n" : "")
-                          + " static=\"" + fi.isStatic() + "\"\n"
-                          + " final=\"" + fi.isFinal() + "\"\n"
-                          + " deprecated=\"" + deprecatedString + "\"\n"
-                          + " visibility=\"" + scope + "\"\n"
-                          //+ " source=\"" + fi.position() + "\"\n"
-                          + ">");
-        xmlWriter.println("</field>");
-    }
-
-    static String makeXMLcompliant(String s) {
-        String returnString = "";
-        returnString = s.replaceAll("&", "&amp;");
-        returnString = returnString.replaceAll("<", "&lt;");
-        returnString = returnString.replaceAll(">", "&gt;");
-        returnString = returnString.replaceAll("\"", "&quot;");
-        returnString = returnString.replaceAll("'", "&pos;");
-        return returnString;
-    }
-
-    static String fullParameterTypeName(MethodInfo method, TypeInfo type, boolean isLast) {
-        String fullTypeName = type.fullName(method.typeVariables());
-        if (isLast && method.isVarArgs()) {
-            // TODO: note that this does not attempt to handle hypothetical
-            // vararg methods whose last parameter is a list of arrays, e.g.
-            // "Object[]...".
-            fullTypeName = type.fullNameNoDimension(method.typeVariables()) + "...";
-        }
-        return fullTypeName;
-    }
-}
diff --git a/tools/droiddoc/src/TagInfo.java b/tools/droiddoc/src/TagInfo.java
deleted file mode 100644
index d25c500..0000000
--- a/tools/droiddoc/src/TagInfo.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-
-public class TagInfo
-{
-    private String mName;
-    private String mText;
-    private String mKind;
-    private SourcePositionInfo mPosition;
-
-    TagInfo(String n, String k, String t, SourcePositionInfo sp)
-    {
-        mName = n;
-        mText = t;
-        mKind = k;
-        mPosition = sp;
-    }
-
-    String name()
-    {
-        return mName;
-    }
-
-    String text()
-    {
-        return mText;
-    }
-
-    String kind()
-    {
-        return mKind;
-    }
-    
-    SourcePositionInfo position() {
-        return mPosition;
-    }
-
-    void setKind(String kind) {
-        mKind = kind;
-    }
-
-    public void makeHDF(HDF data, String base)
-    {
-        data.setValue(base + ".name", name());
-        data.setValue(base + ".text", text());
-        data.setValue(base + ".kind", kind());
-    }
-
-    public static void makeHDF(HDF data, String base, TagInfo[] tags)
-    {
-        makeHDF(data, base, tags, null, 0, 0);
-    }
-
-    public static void makeHDF(HDF data, String base, InheritedTags tags)
-    {
-        makeHDF(data, base, tags.tags(), tags.inherited(), 0, 0);
-    }
-
-    private static int makeHDF(HDF data, String base, TagInfo[] tags,
-                                InheritedTags inherited, int j, int depth)
-    {
-        int i;
-        int len = tags.length;
-        if (len == 0 && inherited != null) {
-            j = makeHDF(data, base, inherited.tags(), inherited.inherited(), j, depth+1);
-        } else {
-            for (i=0; i<len; i++, j++) {
-                TagInfo t = tags[i];
-                if (inherited != null && t.name().equals("@inheritDoc")) {
-                    j = makeHDF(data, base, inherited.tags(),
-                                    inherited.inherited(), j, depth+1);
-                } else {
-                    if (t.name().equals("@inheritDoc")) {
-                        Errors.error(Errors.BAD_INHERITDOC, t.mPosition,
-                                "@inheritDoc on class/method that is not inherited");
-                    }
-                    t.makeHDF(data, base + "." + j);
-                }
-            }
-        }
-        return j;
-    }
-}
-
diff --git a/tools/droiddoc/src/TextTagInfo.java b/tools/droiddoc/src/TextTagInfo.java
deleted file mode 100644
index dcdfdd9..0000000
--- a/tools/droiddoc/src/TextTagInfo.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-public class TextTagInfo extends TagInfo {
-    TextTagInfo(String n, String k, String t, SourcePositionInfo p) {
-        super(n, k, DroidDoc.escape(t), p);
-    }
-}
diff --git a/tools/droiddoc/src/ThrowsTagInfo.java b/tools/droiddoc/src/ThrowsTagInfo.java
deleted file mode 100644
index 318a57d..0000000
--- a/tools/droiddoc/src/ThrowsTagInfo.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-public class ThrowsTagInfo extends ParsedTagInfo
-{
-    static final Pattern PATTERN = Pattern.compile(
-                                "(\\S+)\\s+(.*)",
-                                Pattern.DOTALL);
-    private ClassInfo mException;
-
-    public ThrowsTagInfo(String name, String kind, String text,
-            ContainerInfo base, SourcePositionInfo sp)
-    {
-        super(name, kind, text, base, sp);
-
-        Matcher m = PATTERN.matcher(text);
-        if (m.matches()) {
-            setCommentText(m.group(2));
-            String className = m.group(1);
-            if (base instanceof ClassInfo) {
-                mException = ((ClassInfo)base).findClass(className);
-            }
-            if (mException == null) {
-                mException = Converter.obtainClass(className);
-            }
-        }
-    }
-
-    public ThrowsTagInfo(String name, String kind, String text,
-                            ClassInfo exception, String exceptionComment,
-                            ContainerInfo base, SourcePositionInfo sp)
-    {
-        super(name, kind, text, base, sp);
-        mException = exception;
-        setCommentText(exceptionComment);
-    }
-
-    public ClassInfo exception()
-    {
-        return mException;
-    }
-
-    public TypeInfo exceptionType()
-    {
-        if (mException != null) {
-            return mException.asTypeInfo();
-        } else {
-            return null;
-        }
-    }
-
-    public static void makeHDF(HDF data, String base, ThrowsTagInfo[] tags)
-    {
-        for (int i=0; i<tags.length; i++) {
-            TagInfo.makeHDF(data, base + '.' + i + ".comment",
-                    tags[i].commentTags());
-            if (tags[i].exceptionType() != null) {
-                tags[i].exceptionType().makeHDF(data, base + "." + i + ".type");
-            }
-        }
-    }
-
-    
-}
-
diff --git a/tools/droiddoc/src/TodoFile.java b/tools/droiddoc/src/TodoFile.java
deleted file mode 100644
index ebef27e..0000000
--- a/tools/droiddoc/src/TodoFile.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-
-public class TodoFile {
-
-    public static final String MISSING = "No description text";
-
-    public static boolean areTagsUseful(InheritedTags tags) {
-        while (tags != null) {
-            if (areTagsUseful(tags.tags())) {
-                return true;
-            }
-            tags = tags.inherited();
-        }
-        return false;
-    }
-
-    public static boolean areTagsUseful(TagInfo[] tags) {
-        for (TagInfo t: tags) {
-            if ("Text".equals(t.name()) && t.text().trim().length() != 0) {
-                return true;
-            }
-            if ("@inheritDoc".equals(t.name())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public static void setHDF(HDF data, String base, SourcePositionInfo pos, String name,
-            String descr) {
-        data.setValue(base + ".pos", pos.toString());
-        data.setValue(base + ".name", name);
-        data.setValue(base + ".descr", descr);
-    }
-
-    static class PackageStats {
-        String name;
-        public int total;
-        public int errors;
-    }
-
-    public static String percent(int a, int b) {
-        return ""+Math.round((((b-a)/(float)b))*100) + "%";
-    }
-
-    public static void writeTodoFile(String filename) {
-        HDF data = DroidDoc.makeHDF();
-        DroidDoc.setPageTitle(data, "Missing Documentation");
-        TreeMap<String,PackageStats> packageStats = new TreeMap<String,PackageStats>();
-
-        ClassInfo[] classes = Converter.rootClasses();
-        Arrays.sort(classes);
-
-        int classIndex = 0;
-        
-        for (ClassInfo cl: classes) {
-            if (cl.isHidden()) {
-                continue;
-            }
-
-            String classBase = "classes." + classIndex;
-
-            String base = classBase + ".errors.";
-            int errors = 0;
-            int total = 1;
-
-            if (!areTagsUseful(cl.inlineTags())) {
-                setHDF(data, base + errors, cl.position(), "&lt;class comment&gt;", MISSING);
-                errors++;
-            }
-
-
-            for (MethodInfo m: cl.constructors()) {
-                boolean good = true;
-                total++;
-                if (m.checkLevel()) {
-                    if (!areTagsUseful(m.inlineTags())) {
-                        setHDF(data, base + errors, m.position(), m.name() + m.prettySignature(),
-                                MISSING);
-                        good = false;
-                    }
-                }
-                if (!good) {
-                    errors++;
-                }
-            }
-            
-            for (MethodInfo m: cl.selfMethods()) {
-                boolean good = true;
-                total++;
-                if (m.checkLevel()) {
-                    if (!areTagsUseful(m.inlineTags())) {
-                        setHDF(data, base + errors, m.position(), m.name() + m.prettySignature(),
-                                MISSING);
-                        good = false;
-                    }
-                }
-                if (!good) {
-                    errors++;
-                }
-            }
-            
-
-            for (FieldInfo f: cl.enumConstants()) {
-                boolean good = true;
-                total++;
-                if (f.checkLevel()) {
-                    if (!areTagsUseful(f.inlineTags())) {
-                        setHDF(data, base + errors, f.position(), f.name(), MISSING);
-                        good = false;
-                    }
-                }
-                if (!good) {
-                    errors++;
-                }
-            }
-            
-            for (FieldInfo f: cl.selfFields()) {
-                boolean good = true;
-                total++;
-                if (f.checkLevel()) {
-                    if (!areTagsUseful(f.inlineTags())) {
-                        setHDF(data, base + errors, f.position(), f.name(), MISSING);
-                        good = false;
-                    }
-                }
-                if (!good) {
-                    errors++;
-                }
-            }
-
-            if (errors > 0) {
-                data.setValue(classBase + ".qualified", cl.qualifiedName());
-                data.setValue(classBase + ".errorCount", ""+errors);
-                data.setValue(classBase + ".totalCount", ""+total);
-                data.setValue(classBase + ".percentGood", percent(errors, total));
-            }
-
-            PackageInfo pkg = cl.containingPackage();
-            String pkgName = pkg != null ? pkg.name() : "";
-            PackageStats ps = packageStats.get(pkgName);
-            if (ps == null) {
-                ps = new PackageStats();
-                ps.name = pkgName;
-                packageStats.put(pkgName, ps);
-            }
-            ps.total += total;
-            ps.errors += errors;
-
-            classIndex++;
-        }
-
-        int allTotal = 0;
-        int allErrors = 0;
-
-        int i = 0;
-        for (PackageStats ps: packageStats.values()) {
-            data.setValue("packages." + i + ".name", ""+ps.name);
-            data.setValue("packages." + i + ".errorCount", ""+ps.errors);
-            data.setValue("packages." + i + ".totalCount", ""+ps.total);
-            data.setValue("packages." + i + ".percentGood", percent(ps.errors, ps.total));
-
-            allTotal += ps.total;
-            allErrors += ps.errors;
-
-            i++;
-        }
-
-        data.setValue("all.errorCount", ""+allErrors);
-        data.setValue("all.totalCount", ""+allTotal);
-        data.setValue("all.percentGood", percent(allErrors, allTotal));
-
-        ClearPage.write(data, "todo.cs", filename, true);
-    }
-}
-
diff --git a/tools/droiddoc/src/TypeInfo.java b/tools/droiddoc/src/TypeInfo.java
deleted file mode 100644
index 45e9db9..0000000
--- a/tools/droiddoc/src/TypeInfo.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * 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
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-import org.clearsilver.HDF;
-import org.clearsilver.CS;
-import java.util.*;
-import java.io.*;
-
-public class TypeInfo
-{
-    public TypeInfo(boolean isPrimitive, String dimension,
-            String simpleTypeName, String qualifiedTypeName,
-            ClassInfo cl)
-    {
-        mIsPrimitive = isPrimitive;
-        mDimension = dimension;
-        mSimpleTypeName = simpleTypeName;
-        mQualifiedTypeName = qualifiedTypeName;
-        mClass = cl;
-    }
-
-    public ClassInfo asClassInfo()
-    {
-        return mClass;
-    }
-
-    public boolean isPrimitive()
-    {
-        return mIsPrimitive;
-    }
-
-    public String dimension()
-    {
-        return mDimension;
-    }
-
-    public String simpleTypeName()
-    {
-        return mSimpleTypeName;
-    }
-
-    public String qualifiedTypeName()
-    {
-        return mQualifiedTypeName;
-    }
-
-    public String fullName()
-    {
-        if (mFullName != null) {
-            return mFullName;
-        } else {
-            return fullName(new HashSet());
-        }
-    }
-
-    public static String typeArgumentsName(TypeInfo[] args, HashSet<String> typeVars)
-    {
-        String result = "<";
-        for (int i=0; i<args.length; i++) {
-            result += args[i].fullName(typeVars);
-            if (i != args.length-1) {
-                result += ", ";
-            }
-        }
-        result += ">";
-        return result;
-    }
-
-    public String fullName(HashSet<String> typeVars)
-    {
-        mFullName = fullNameNoDimension(typeVars) + mDimension;
-        return mFullName;
-    }
-
-    public String fullNameNoDimension(HashSet<String> typeVars)
-    {
-        String fullName = null;
-        if (mIsTypeVariable) {
-            if (typeVars.contains(mQualifiedTypeName)) {
-                // don't recurse forever with the parameters.  This handles
-                // Enum<K extends Enum<K>>
-                return mQualifiedTypeName;
-            }
-            typeVars.add(mQualifiedTypeName);
-        }
-/*
-        if (fullName != null) {
-            return fullName;
-        }
-*/
-        fullName = mQualifiedTypeName;
-        if (mTypeArguments != null && mTypeArguments.length > 0) {
-            fullName += typeArgumentsName(mTypeArguments, typeVars);
-        }
-        else if (mSuperBounds != null && mSuperBounds.length > 0) {
-            fullName += " super " + mSuperBounds[0].fullName(typeVars);
-            for (int i=1; i<mSuperBounds.length; i++) {
-                fullName += " & " + mSuperBounds[i].fullName(typeVars);
-            }
-        }
-        else if (mExtendsBounds != null && mExtendsBounds.length > 0) {
-            fullName += " extends " + mExtendsBounds[0].fullName(typeVars);
-            for (int i=1; i<mExtendsBounds.length; i++) {
-                fullName += " & " + mExtendsBounds[i].fullName(typeVars);
-            }
-        }
-        return fullName;
-    }
-
-    public TypeInfo[] typeArguments()
-    {
-        return mTypeArguments;
-    }
-
-    public void makeHDF(HDF data, String base)
-    {
-        makeHDFRecursive(data, base, false, false, new HashSet<String>());
-    }
-
-    public void makeQualifiedHDF(HDF data, String base)
-    {
-        makeHDFRecursive(data, base, true, false, new HashSet<String>());
-    }
-
-    public void makeHDF(HDF data, String base, boolean isLastVararg,
-            HashSet<String> typeVariables)
-    {
-        makeHDFRecursive(data, base, false, isLastVararg, typeVariables);
-    }
-
-    public void makeQualifiedHDF(HDF data, String base, HashSet<String> typeVariables)
-    {
-        makeHDFRecursive(data, base, true, false, typeVariables);
-    }
-
-    private void makeHDFRecursive(HDF data, String base, boolean qualified,
-            boolean isLastVararg, HashSet<String> typeVars)
-    {
-        String label = qualified ? qualifiedTypeName() : simpleTypeName();
-        label += (isLastVararg) ? "..." : dimension();
-        data.setValue(base + ".label", label);
-        ClassInfo cl = asClassInfo();
-        if (mIsTypeVariable || mIsWildcard) {
-            // could link to an @param tag on the class to describe this
-            // but for now, just don't make it a link
-        }
-        else if (!isPrimitive() && cl != null && cl.isIncluded()) {
-            data.setValue(base + ".link", cl.htmlPage());
-            data.setValue(base + ".since", cl.getSince());
-        }
-
-        if (mIsTypeVariable) {
-            if (typeVars.contains(qualifiedTypeName())) {
-                // don't recurse forever with the parameters.  This handles
-                // Enum<K extends Enum<K>>
-                return;
-            }
-            typeVars.add(qualifiedTypeName());
-        }
-        if (mTypeArguments != null) {
-            TypeInfo.makeHDF(data, base + ".typeArguments", mTypeArguments, qualified, typeVars);
-        }
-        if (mSuperBounds != null) {
-            TypeInfo.makeHDF(data, base + ".superBounds", mSuperBounds, qualified, typeVars);
-        }
-        if (mExtendsBounds != null) {
-            TypeInfo.makeHDF(data, base + ".extendsBounds", mExtendsBounds, qualified, typeVars);
-        }
-    }
-
-    public static void makeHDF(HDF data, String base, TypeInfo[] types, boolean qualified,
-            HashSet<String> typeVariables)
-    {
-        final int N = types.length;
-        for (int i=0; i<N; i++) {
-            types[i].makeHDFRecursive(data, base + "." + i, qualified, false, typeVariables);
-        }
-    }
-
-    public static void makeHDF(HDF data, String base, TypeInfo[] types, boolean qualified)
-    {
-        makeHDF(data, base, types, qualified, new HashSet<String>());
-    }
-
-    void setTypeArguments(TypeInfo[] args)
-    {
-        mTypeArguments = args;
-    }
-
-    void setBounds(TypeInfo[] superBounds, TypeInfo[] extendsBounds)
-    {
-        mSuperBounds = superBounds;
-        mExtendsBounds = extendsBounds;
-    }
-
-    void setIsTypeVariable(boolean b)
-    {
-        mIsTypeVariable = b;
-    }
-
-    void setIsWildcard(boolean b)
-    {
-        mIsWildcard = b;
-    }
-
-    static HashSet<String> typeVariables(TypeInfo[] params)
-    {
-        return typeVariables(params, new HashSet());
-    }
-
-    static HashSet<String> typeVariables(TypeInfo[] params, HashSet<String> result)
-    {
-        for (TypeInfo t: params) {
-            if (t.mIsTypeVariable) {
-                result.add(t.mQualifiedTypeName);
-            }
-        }
-        return result;
-    }
-
-
-    public boolean isTypeVariable()
-    {
-        return mIsTypeVariable;
-    }
-
-    public String defaultValue() {
-        if (mIsPrimitive) {
-            if ("boolean".equals(mSimpleTypeName)) {
-                return "false";
-            } else {
-                return "0";
-            }
-        } else {
-            return "null";
-        }
-    }
-
-    @Override
-    public String toString(){
-      String returnString = "";
-      returnString += "Primitive?: " + mIsPrimitive + " TypeVariable?: " +
-      mIsTypeVariable + " Wildcard?: " + mIsWildcard + " Dimension: " + mDimension
-      + " QualifedTypeName: " + mQualifiedTypeName;
-
-      if (mTypeArguments != null){
-        returnString += "\nTypeArguments: ";
-        for (TypeInfo tA : mTypeArguments){
-          returnString += tA.qualifiedTypeName() + "(" + tA + ") ";
-        }
-      }
-      if (mSuperBounds != null){
-        returnString += "\nSuperBounds: ";
-        for (TypeInfo tA : mSuperBounds){
-          returnString += tA.qualifiedTypeName() + "(" + tA + ") ";
-        }
-      }
-      if (mExtendsBounds != null){
-        returnString += "\nExtendsBounds: ";
-        for (TypeInfo tA : mExtendsBounds){
-          returnString += tA.qualifiedTypeName() + "(" + tA + ") ";
-        }
-      }
-      return returnString;
-    }
-
-    private boolean mIsPrimitive;
-    private boolean mIsTypeVariable;
-    private boolean mIsWildcard;
-    private String mDimension;
-    private String mSimpleTypeName;
-    private String mQualifiedTypeName;
-    private ClassInfo mClass;
-    private TypeInfo[] mTypeArguments;
-    private TypeInfo[] mSuperBounds;
-    private TypeInfo[] mExtendsBounds;
-    private String mFullName;
-}
diff --git a/tools/droiddoc/templates/assets/android-developer-docs-devguide.css b/tools/droiddoc/templates-pdk/assets/android-developer-docs-devguide.css
similarity index 100%
rename from tools/droiddoc/templates/assets/android-developer-docs-devguide.css
rename to tools/droiddoc/templates-pdk/assets/android-developer-docs-devguide.css
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates-pdk/assets/android-developer-docs.css
similarity index 92%
copy from tools/droiddoc/templates/assets/android-developer-docs.css
copy to tools/droiddoc/templates-pdk/assets/android-developer-docs.css
index 1672c93..bc9e98b 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates-pdk/assets/android-developer-docs.css
@@ -34,6 +34,10 @@
   font-size:12px;
 }
 
+#side-nav.not-resizable {
+  background:url('images/sidenav-rule.png') no-repeat 243px 0;
+}
+
 #resize-packages-nav {
 /* keeps the resize handle below the h-scroll handle */
   height:270px;
@@ -726,36 +730,34 @@
   padding:0;
 }
 
-p.note, div.note,
-p.caution, div.caution,
-p.warning, div.warning {
+p.note, p.caution, p.warning {
   margin: 1em;
   padding: 0 0 0 .5em;
   border-left: 4px solid;
 }
 
-p.special-note,
-div.special-note {
+p.special-note {
   background-color:#EBF3DB;
   padding:10px 20px;
   margin:0 0 1em;
 }
 
-p.note,
-div.note {
+p.note {
  border-color: #99aacc;
 }
 
-p.warning,
-div.warning {
+p.warning {
   border-color: #aa0033;
 }
 
-p.caution,
-div.caution {
+p.caution {
   border-color: #ffcf00;
 }
 
+p.warning b, p.warning strong {
+  font-weight: bold;
+}
+
 li p.note, li p.warning {
   margin: .5em 0 0 0;
   padding: .2em .5em .2em .9em;
@@ -941,7 +943,7 @@
 }
 
 .sidebox p {
-  margin-bottom: .75em;
+  margin-bottom: .25em;
 }
 
 .sidebox ul {
@@ -1052,7 +1054,7 @@
   margin: 0;
   padding: 0;
 }
-
+  
 ol.toc li li {
   padding: 0;
   margin: 0 0 0 1em;
@@ -1179,76 +1181,6 @@
   float: right;
 }
 
-/* 200px */
-.g-tpl-200 .g-unit,
-.g-unit .g-tpl-200 .g-unit,
-.g-unit .g-unit .g-tpl-200 .g-unit {
-  display: block;
-  margin: 0 0 0 200px;
-  width: auto;
-  float: none;
-}
-.g-unit .g-unit .g-tpl-200 .g-first,
-.g-unit .g-tpl-200 .g-first,
-.g-tpl-200 .g-first {
-  display: block;
-  margin: 0;
-  width: 200px;
-  float: left;
-}
-/* 200px alt */
-.g-tpl-200-alt .g-unit,
-.g-unit .g-tpl-200-alt .g-unit,
-.g-unit .g-unit .g-tpl-200-alt .g-unit {
-  display: block;
-  margin: 0 200px 0 0;
-  width: auto;
-  float: none;
-}
-.g-unit .g-unit .g-tpl-200-alt .g-first,
-.g-unit .g-tpl-200-alt .g-first,
-.g-tpl-200-alt .g-first {
-  display: block;
-  margin: 0;
-  width: 200px;
-  float: right;
-}
-
-/* 190px */
-.g-tpl-190 .g-unit,
-.g-unit .g-tpl-190 .g-unit,
-.g-unit .g-unit .g-tpl-190 .g-unit {
-  display: block;
-  margin: 0 0 0 190px;
-  width: auto;
-  float: none;
-}
-.g-unit .g-unit .g-tpl-190 .g-first,
-.g-unit .g-tpl-190 .g-first,
-.g-tpl-190 .g-first {
-  display: block;
-  margin: 0;
-  width: 190px;
-  float: left;
-}
-/* 190px alt */
-.g-tpl-190-alt .g-unit,
-.g-unit .g-tpl-190-alt .g-unit,
-.g-unit .g-unit .g-tpl-190-alt .g-unit {
-  display: block;
-  margin: 0 190px 0 0;
-  width: auto;
-  float: none;
-}
-.g-unit .g-unit .g-tpl-190-alt .g-first,
-.g-unit .g-tpl-190-alt .g-first,
-.g-tpl-190-alt .g-first {
-  display: block;
-  margin: 0;
-  width: 190px;
-  float: right;
-}
-
 /* 180px */
 .g-tpl-180 .g-unit,
 .g-unit .g-tpl-180 .g-unit,
@@ -1284,7 +1216,7 @@
   float: right;
 }
 
-
+  
 /* JQUERY RESIZABLE STYLES */
 .ui-resizable { position: relative; }
 .ui-resizable-handle { position: absolute; display: none; font-size: 0.1px; z-index:1; }
@@ -1320,7 +1252,7 @@
   #body-content {
     position:inherit;
   }
-
+  
   #doc-content {
     margin-left:0 !important;
     height:auto !important;
diff --git a/tools/droiddoc/templates-pdk/assets/android-developer-reference.js b/tools/droiddoc/templates-pdk/assets/android-developer-reference.js
new file mode 100644
index 0000000..daddde0
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/android-developer-reference.js
@@ -0,0 +1,390 @@
+
+/* API LEVEL TOGGLE */
+addLoadEvent(changeApiLevel);
+
+var API_LEVEL_ENABLED_COOKIE = "api_level_enabled";
+var API_LEVEL_COOKIE = "api_level";
+var minLevel = 1;
+
+function toggleApiLevelSelector(checkbox) {
+  var date = new Date();
+  date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
+  var expiration = date.toGMTString();
+  if (checkbox.checked) {
+    $("#apiLevelSelector").removeAttr("disabled");
+    $("#api-level-toggle label").removeClass("disabled");
+    writeCookie(API_LEVEL_ENABLED_COOKIE, 1, null, expiration);
+  } else {
+    $("#apiLevelSelector").attr("disabled","disabled");
+    $("#api-level-toggle label").addClass("disabled");
+    writeCookie(API_LEVEL_ENABLED_COOKIE, 0, null, expiration);
+  }
+  changeApiLevel();
+}
+
+function buildApiLevelSelector() {
+  var maxLevel = SINCE_DATA.length;
+  var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
+  var userApiLevel = readCookie(API_LEVEL_COOKIE);
+  userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
+
+  if (userApiLevelEnabled == 0) {
+    $("#apiLevelSelector").attr("disabled","disabled");
+  } else {
+    $("#apiLevelCheckbox").attr("checked","checked");
+    $("#api-level-toggle label").removeClass("disabled");
+  }
+  
+  minLevel = $("body").attr("class");
+  var select = $("#apiLevelSelector").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 = $("#apiLevelSelector option[value='"+userApiLevel+"']").get(0);
+  selectedLevelItem.setAttribute('selected',true);
+}
+
+function changeApiLevel() {
+  var maxLevel = SINCE_DATA.length;
+  var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
+  var selectedLevel = maxLevel;
+  
+  if (userApiLevelEnabled == 0) {
+    toggleVisisbleApis(selectedLevel, "body");
+  } else {
+    selectedLevel = $("#apiLevelSelector option:selected").val();
+    toggleVisisbleApis(selectedLevel, "body");
+    
+    var date = new Date();
+    date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
+    var expiration = date.toGMTString();
+    writeCookie(API_LEVEL_COOKIE, selectedLevel, null, expiration);
+  }
+  
+  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();
+  node.children_data = children_data;
+  node.depth = mom.depth + 1;
+
+  node.li = document.createElement("li");
+  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";
+
+  if (children_data == null) {
+    // 12 is the width of the triangle and padding extra space
+    node.label_div.style.paddingLeft = ((10*node.depth)+12) + "px";
+  } else {
+    node.label_div.style.paddingLeft = 10*node.depth + "px";
+    node.expand_toggle = document.createElement("a");
+    node.expand_toggle.href = "javascript:void(0)";
+    node.expand_toggle.onclick = function() {
+          if (node.expanded) {
+            $(node.get_children_ul()).slideUp("fast");
+            node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
+            node.expanded = false;
+          } else {
+            expand_node(me, node);
+          }
+       };
+    node.label_div.appendChild(node.expand_toggle);
+
+    node.plus_img = document.createElement("img");
+    node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
+    node.plus_img.className = "plus";
+    node.plus_img.border = "0";
+    node.expand_toggle.appendChild(node.plus_img);
+
+    node.expanded = false;
+  }
+
+  var a = document.createElement("a");
+  node.label_div.appendChild(a);
+  node.label = document.createTextNode(text);
+  a.appendChild(node.label);
+  if (link) {
+    a.href = me.toroot + link;
+  } else {
+    if (children_data != null) {
+      a.className = "nolink";
+      a.href = "javascript:void(0)";
+      a.onclick = node.expand_toggle.onclick;
+      // This next line shouldn't be necessary.  I'll buy a beer for the first
+      // person who figures out how to remove this line and have the link
+      // toggle shut on the first try. --joeo@android.com
+      node.expanded = false;
+    }
+  }
+  
+
+  node.children_ul = null;
+  node.get_children_ul = function() {
+      if (!node.children_ul) {
+        node.children_ul = document.createElement("ul");
+        node.children_ul.className = "children_ul";
+        node.children_ul.style.display = "none";
+        node.li.appendChild(node.children_ul);
+      }
+      return node.children_ul;
+    };
+
+  return node;
+}
+
+function expand_node(me, node)
+{
+  if (node.children_data && !node.expanded) {
+    if (node.children_visited) {
+      $(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 = $("#apiLevelSelector option:selected").val();
+    toggleVisisbleApis(selectedLevel, "#side-nav");
+  }
+}
+
+function get_node(me, mom)
+{
+  mom.children_visited = true;
+  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[3]);
+  }
+}
+
+function this_page_relative(toroot)
+{
+  var full = document.location.pathname;
+  var file = "";
+  if (toroot.substr(0, 1) == "/") {
+    if (full.substr(0, toroot.length) == toroot) {
+      return full.substr(toroot.length);
+    } else {
+      // the file isn't under toroot.  Fail.
+      return null;
+    }
+  } else {
+    if (toroot != "./") {
+      toroot = "./" + toroot;
+    }
+    do {
+      if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
+        var pos = full.lastIndexOf("/");
+        file = full.substr(pos) + file;
+        full = full.substr(0, pos);
+        toroot = toroot.substr(0, toroot.length-3);
+      }
+    } while (toroot != "" && toroot != "/");
+    return file.substr(1);
+  }
+}
+
+function find_page(url, data)
+{
+  var nodes = data;
+  var result = null;
+  for (var i in nodes) {
+    var d = nodes[i];
+    if (d[1] == url) {
+      return new Array(i);
+    }
+    else if (d[2] != null) {
+      result = find_page(url, d[2]);
+      if (result != null) {
+        return (new Array(i).concat(result));
+      }
+    }
+  }
+  return null;
+}
+
+function load_navtree_data(toroot) {
+  var navtreeData = document.createElement("script");
+  navtreeData.setAttribute("type","text/javascript");
+  navtreeData.setAttribute("src", toroot+"navtree_data.js");
+  $("head").append($(navtreeData));
+}
+
+function init_default_navtree(toroot) {
+  init_navtree("nav-tree", toroot, NAVTREE_DATA);
+  
+  // perform api level toggling because because the whole tree is new to the DOM
+  var selectedLevel = $("#apiLevelSelector option:selected").val();
+  toggleVisisbleApis(selectedLevel, "#side-nav");
+}
+
+function init_navtree(navtree_id, toroot, root_nodes)
+{
+  var me = new Object();
+  me.toroot = toroot;
+  me.node = new Object();
+
+  me.node.li = document.getElementById(navtree_id);
+  me.node.children_data = root_nodes;
+  me.node.children = new Array();
+  me.node.children_ul = document.createElement("ul");
+  me.node.get_children_ul = function() { return me.node.children_ul; };
+  //me.node.children_ul.className = "children_ul";
+  me.node.li.appendChild(me.node.children_ul);
+  me.node.depth = 0;
+
+  get_node(me, me.node);
+
+  me.this_page = this_page_relative(toroot);
+  me.breadcrumbs = find_page(me.this_page, root_nodes);
+  if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
+    var mom = me.node;
+    for (var i in me.breadcrumbs) {
+      var j = me.breadcrumbs[i];
+      mom = mom.children[j];
+      expand_node(me, mom);
+    }
+    mom.label_div.className = mom.label_div.className + " selected";
+    addLoadEvent(function() {
+      scrollIntoView("nav-tree");
+      });
+  }
+}
+
+/* TOGGLE INHERITED MEMBERS */
+
+/* Toggle an inherited class (arrow toggle)
+ * @param linkObj  The link that was clicked.
+ * @param expand  'true' to ensure it's expanded. 'false' to ensure it's closed.
+ *                'null' to simply toggle.
+ */
+function toggleInherited(linkObj, expand) {
+    var base = linkObj.getAttribute("id");
+    var list = document.getElementById(base + "-list");
+    var summary = document.getElementById(base + "-summary");
+    var trigger = document.getElementById(base + "-trigger");
+    var a = $(linkObj);
+    if ( (expand == null && a.hasClass("closed")) || expand ) {
+        list.style.display = "none";
+        summary.style.display = "block";
+        trigger.src = toRoot + "assets/images/triangle-opened.png";
+        a.removeClass("closed");
+        a.addClass("opened");
+    } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) {
+        list.style.display = "block";
+        summary.style.display = "none";
+        trigger.src = toRoot + "assets/images/triangle-closed.png";
+        a.removeClass("opened");
+        a.addClass("closed");
+    }
+    return false;
+}
+
+/* Toggle all inherited classes in a single table (e.g. all inherited methods)
+ * @param linkObj  The link that was clicked.
+ * @param expand  'true' to ensure it's expanded. 'false' to ensure it's closed.
+ *                'null' to simply toggle.
+ */
+function toggleAllInherited(linkObj, expand) {
+  var a = $(linkObj);
+  var table = $(a.parent().parent().parent()); // ugly way to get table/tbody
+  var expandos = $(".jd-expando-trigger", table);
+  if ( (expand == null && a.text() == "[Expand]") || expand ) {
+    expandos.each(function(i) {
+      toggleInherited(this, true);
+    });
+    a.text("[Collapse]");
+  } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) {
+    expandos.each(function(i) {
+      toggleInherited(this, false);
+    });
+    a.text("[Expand]");
+  }
+  return false;
+}
+
+/* Toggle all inherited members in the class (link in the class title)
+ */
+function toggleAllClassInherited() {
+  var a = $("#toggleAllClassInherited"); // get toggle link from class title
+  var toggles = $(".toggle-all", $("#doc-content"));
+  if (a.text() == "[Expand All]") {
+    toggles.each(function(i) {
+      toggleAllInherited(this, true);
+    });
+    a.text("[Collapse All]");
+  } else {
+    toggles.each(function(i) {
+      toggleAllInherited(this, false);
+    });
+    a.text("[Expand All]");
+  }
+  return false;
+}
+
+/* Expand all inherited members in the class. Used when initiating page search */
+function ensureAllInheritedExpanded() {
+  var toggles = $(".toggle-all", $("#doc-content"));
+  toggles.each(function(i) {
+    toggleAllInherited(this, true);
+  });
+  $("#toggleAllClassInherited").text("[Collapse All]");
+}
+
+
+/* HANDLE KEY EVENTS
+ * - Listen for Ctrl+F (Cmd on Mac) and expand all inherited members (to aid page search)
+ */
+var agent = navigator['userAgent'].toLowerCase();
+var mac = agent.indexOf("macintosh") != -1;
+
+$(document).keydown( function(e) {
+var control = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey; // get ctrl key
+  if (control && e.which == 70) {  // 70 is "F"
+    ensureAllInheritedExpanded();
+  }
+});
\ No newline at end of file
diff --git a/tools/droiddoc/templates/assets/carousel.js b/tools/droiddoc/templates-pdk/assets/carousel.js
similarity index 100%
rename from tools/droiddoc/templates/assets/carousel.js
rename to tools/droiddoc/templates-pdk/assets/carousel.js
diff --git a/tools/droiddoc/templates/assets/images/android-developers-logo.png b/tools/droiddoc/templates-pdk/assets/images/android-developers-logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/android-developers-logo.png
rename to tools/droiddoc/templates-pdk/assets/images/android-developers-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/android_wrench.png b/tools/droiddoc/templates-pdk/assets/images/android_wrench.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/android_wrench.png
rename to tools/droiddoc/templates-pdk/assets/images/android_wrench.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_bluelink_down.png b/tools/droiddoc/templates-pdk/assets/images/arrow_bluelink_down.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_bluelink_down.png
rename to tools/droiddoc/templates-pdk/assets/images/arrow_bluelink_down.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_bluelink_up.png b/tools/droiddoc/templates-pdk/assets/images/arrow_bluelink_up.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_bluelink_up.png
rename to tools/droiddoc/templates-pdk/assets/images/arrow_bluelink_up.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_left_off.jpg b/tools/droiddoc/templates-pdk/assets/images/arrow_left_off.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_left_off.jpg
rename to tools/droiddoc/templates-pdk/assets/images/arrow_left_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_left_on.jpg b/tools/droiddoc/templates-pdk/assets/images/arrow_left_on.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_left_on.jpg
rename to tools/droiddoc/templates-pdk/assets/images/arrow_left_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_right_off.jpg b/tools/droiddoc/templates-pdk/assets/images/arrow_right_off.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_right_off.jpg
rename to tools/droiddoc/templates-pdk/assets/images/arrow_right_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_right_on.jpg b/tools/droiddoc/templates-pdk/assets/images/arrow_right_on.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/arrow_right_on.jpg
rename to tools/droiddoc/templates-pdk/assets/images/arrow_right_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_community_leftDiv.jpg b/tools/droiddoc/templates-pdk/assets/images/bg_community_leftDiv.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/bg_community_leftDiv.jpg
rename to tools/droiddoc/templates-pdk/assets/images/bg_community_leftDiv.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_fade.jpg b/tools/droiddoc/templates-pdk/assets/images/bg_fade.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/bg_fade.jpg
rename to tools/droiddoc/templates-pdk/assets/images/bg_fade.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_images_sprite.png b/tools/droiddoc/templates-pdk/assets/images/bg_images_sprite.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/bg_images_sprite.png
rename to tools/droiddoc/templates-pdk/assets/images/bg_images_sprite.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_logo.png b/tools/droiddoc/templates-pdk/assets/images/bg_logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/bg_logo.png
rename to tools/droiddoc/templates-pdk/assets/images/bg_logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/body-gradient-tab.png b/tools/droiddoc/templates-pdk/assets/images/body-gradient-tab.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/body-gradient-tab.png
rename to tools/droiddoc/templates-pdk/assets/images/body-gradient-tab.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/body-gradient.png b/tools/droiddoc/templates-pdk/assets/images/body-gradient.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/body-gradient.png
rename to tools/droiddoc/templates-pdk/assets/images/body-gradient.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/developers-logo.png b/tools/droiddoc/templates-pdk/assets/images/developers-logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/developers-logo.png
rename to tools/droiddoc/templates-pdk/assets/images/developers-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/grad-rule-qv.png b/tools/droiddoc/templates-pdk/assets/images/grad-rule-qv.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/grad-rule-qv.png
rename to tools/droiddoc/templates-pdk/assets/images/grad-rule-qv.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/Android_Dev_Lab_l.png b/tools/droiddoc/templates-pdk/assets/images/home/Android_Dev_Lab_l.png
new file mode 100644
index 0000000..8259981
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/Android_Dev_Lab_l.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/IO-logo.png b/tools/droiddoc/templates-pdk/assets/images/home/IO-logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/IO-logo.png
rename to tools/droiddoc/templates-pdk/assets/images/home/IO-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/adc2_l.png b/tools/droiddoc/templates-pdk/assets/images/home/adc2_l.png
new file mode 100644
index 0000000..ac51a1e
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/adc2_l.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/adc2_s.png b/tools/droiddoc/templates-pdk/assets/images/home/adc2_s.png
new file mode 100644
index 0000000..9cbfd4e
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/adc2_s.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/android_adc.png b/tools/droiddoc/templates-pdk/assets/images/home/android_adc.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/android_adc.png
rename to tools/droiddoc/templates-pdk/assets/images/home/android_adc.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_announcement.png b/tools/droiddoc/templates-pdk/assets/images/home/bg_home_announcement.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/bg_home_announcement.png
rename to tools/droiddoc/templates-pdk/assets/images/home/bg_home_announcement.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_bottom.jpg b/tools/droiddoc/templates-pdk/assets/images/home/bg_home_bottom.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/bg_home_bottom.jpg
rename to tools/droiddoc/templates-pdk/assets/images/home/bg_home_bottom.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel.png b/tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/bg_home_carousel.png
rename to tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png b/tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel_board.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
rename to tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel_board.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png b/tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel_wheel.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
rename to tools/droiddoc/templates-pdk/assets/images/home/bg_home_carousel_wheel.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png b/tools/droiddoc/templates-pdk/assets/images/home/carousel_buttons_sprite.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png
rename to tools/droiddoc/templates-pdk/assets/images/home/carousel_buttons_sprite.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/devphone-large.png b/tools/droiddoc/templates-pdk/assets/images/home/devphone-large.png
new file mode 100755
index 0000000..6221e0a
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/devphone-large.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/devphone-small.png b/tools/droiddoc/templates-pdk/assets/images/home/devphone-small.png
new file mode 100755
index 0000000..b8487f5
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/devphone-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/donut-android.png b/tools/droiddoc/templates-pdk/assets/images/home/donut-android.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/donut-android.png
rename to tools/droiddoc/templates-pdk/assets/images/home/donut-android.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/eclair-android.png b/tools/droiddoc/templates-pdk/assets/images/home/eclair-android.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/eclair-android.png
rename to tools/droiddoc/templates-pdk/assets/images/home/eclair-android.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/froyo-android.png b/tools/droiddoc/templates-pdk/assets/images/home/froyo-android.png
new file mode 100644
index 0000000..84ec5ec
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/froyo-android.png
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/assets/images/home/gdc-logo.png b/tools/droiddoc/templates-pdk/assets/images/home/gdc-logo.png
new file mode 100644
index 0000000..85617b8
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/assets/images/home/gdc-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-large.png b/tools/droiddoc/templates-pdk/assets/images/home/io-large.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/io-large.png
rename to tools/droiddoc/templates-pdk/assets/images/home/io-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-small.png b/tools/droiddoc/templates-pdk/assets/images/home/io-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/io-small.png
rename to tools/droiddoc/templates-pdk/assets/images/home/io-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/maps-large.png b/tools/droiddoc/templates-pdk/assets/images/home/maps-large.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/maps-large.png
rename to tools/droiddoc/templates-pdk/assets/images/home/maps-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/maps-small.png b/tools/droiddoc/templates-pdk/assets/images/home/maps-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/maps-small.png
rename to tools/droiddoc/templates-pdk/assets/images/home/maps-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/market-large.png b/tools/droiddoc/templates-pdk/assets/images/home/market-large.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/market-large.png
rename to tools/droiddoc/templates-pdk/assets/images/home/market-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/market-small.png b/tools/droiddoc/templates-pdk/assets/images/home/market-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/market-small.png
rename to tools/droiddoc/templates-pdk/assets/images/home/market-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/sdk-large.png b/tools/droiddoc/templates-pdk/assets/images/home/sdk-large.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/sdk-large.png
rename to tools/droiddoc/templates-pdk/assets/images/home/sdk-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/sdk-small.png b/tools/droiddoc/templates-pdk/assets/images/home/sdk-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/sdk-small.png
rename to tools/droiddoc/templates-pdk/assets/images/home/sdk-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/hr_gray_main.jpg b/tools/droiddoc/templates-pdk/assets/images/hr_gray_main.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/hr_gray_main.jpg
rename to tools/droiddoc/templates-pdk/assets/images/hr_gray_main.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/hr_gray_side.jpg b/tools/droiddoc/templates-pdk/assets/images/hr_gray_side.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/hr_gray_side.jpg
rename to tools/droiddoc/templates-pdk/assets/images/hr_gray_side.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_contribute.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_contribute.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_contribute.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_contribute.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_download.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_download.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_download.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_download.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_download2.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_download2.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_download2.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_download2.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_guidelines_logo.png b/tools/droiddoc/templates-pdk/assets/images/icon_guidelines_logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_guidelines_logo.png
rename to tools/droiddoc/templates-pdk/assets/images/icon_guidelines_logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_market.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_market.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_market.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_market.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_robot.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_robot.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_robot.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_robot.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_world.jpg b/tools/droiddoc/templates-pdk/assets/images/icon_world.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/icon_world.jpg
rename to tools/droiddoc/templates-pdk/assets/images/icon_world.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/left_off.jpg b/tools/droiddoc/templates-pdk/assets/images/left_off.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/left_off.jpg
rename to tools/droiddoc/templates-pdk/assets/images/left_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/left_on.jpg b/tools/droiddoc/templates-pdk/assets/images/left_on.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/left_on.jpg
rename to tools/droiddoc/templates-pdk/assets/images/left_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/logo_breadcrumbz.jpg b/tools/droiddoc/templates-pdk/assets/images/logo_breadcrumbz.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/logo_breadcrumbz.jpg
rename to tools/droiddoc/templates-pdk/assets/images/logo_breadcrumbz.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/open_source.png b/tools/droiddoc/templates-pdk/assets/images/open_source.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/open_source.png
rename to tools/droiddoc/templates-pdk/assets/images/open_source.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/preliminary.png b/tools/droiddoc/templates-pdk/assets/images/preliminary.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/preliminary.png
rename to tools/droiddoc/templates-pdk/assets/images/preliminary.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-e.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-e.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-e.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-e.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-e2.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-e2.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-e2.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-e2.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-eg.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-eg.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-eg.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-eg.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-s.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-s.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-s.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-s.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-s2.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-s2.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-s2.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-s2.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-sg.gif b/tools/droiddoc/templates-pdk/assets/images/resizable-sg.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/resizable-sg.gif
rename to tools/droiddoc/templates-pdk/assets/images/resizable-sg.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/sidenav-rule.png b/tools/droiddoc/templates-pdk/assets/images/sidenav-rule.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/sidenav-rule.png
rename to tools/droiddoc/templates-pdk/assets/images/sidenav-rule.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_off.jpg b/tools/droiddoc/templates-pdk/assets/images/slide_off.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_off.jpg
rename to tools/droiddoc/templates-pdk/assets/images/slide_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_on.jpg b/tools/droiddoc/templates-pdk/assets/images/slide_on.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_on.jpg
rename to tools/droiddoc/templates-pdk/assets/images/slide_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/spacer.gif b/tools/droiddoc/templates-pdk/assets/images/spacer.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/images/spacer.gif
rename to tools/droiddoc/templates-pdk/assets/images/spacer.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-closed-small.png b/tools/droiddoc/templates-pdk/assets/images/triangle-closed-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/triangle-closed-small.png
rename to tools/droiddoc/templates-pdk/assets/images/triangle-closed-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-closed.png b/tools/droiddoc/templates-pdk/assets/images/triangle-closed.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/triangle-closed.png
rename to tools/droiddoc/templates-pdk/assets/images/triangle-closed.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-opened-small.png b/tools/droiddoc/templates-pdk/assets/images/triangle-opened-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/triangle-opened-small.png
rename to tools/droiddoc/templates-pdk/assets/images/triangle-opened-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-opened.png b/tools/droiddoc/templates-pdk/assets/images/triangle-opened.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/triangle-opened.png
rename to tools/droiddoc/templates-pdk/assets/images/triangle-opened.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/uiguidelines1.png b/tools/droiddoc/templates-pdk/assets/images/uiguidelines1.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/uiguidelines1.png
rename to tools/droiddoc/templates-pdk/assets/images/uiguidelines1.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/video-droid.png b/tools/droiddoc/templates-pdk/assets/images/video-droid.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/video-droid.png
rename to tools/droiddoc/templates-pdk/assets/images/video-droid.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/jdiff_logo.gif b/tools/droiddoc/templates-pdk/assets/jdiff_logo.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/jdiff_logo.gif
rename to tools/droiddoc/templates-pdk/assets/jdiff_logo.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/jquery-history.js b/tools/droiddoc/templates-pdk/assets/jquery-history.js
similarity index 100%
rename from tools/droiddoc/templates/assets/jquery-history.js
rename to tools/droiddoc/templates-pdk/assets/jquery-history.js
diff --git a/tools/droiddoc/templates/assets/jquery-resizable.min.js b/tools/droiddoc/templates-pdk/assets/jquery-resizable.min.js
similarity index 100%
rename from tools/droiddoc/templates/assets/jquery-resizable.min.js
rename to tools/droiddoc/templates-pdk/assets/jquery-resizable.min.js
diff --git a/tools/droiddoc/templates/assets/prettify.js b/tools/droiddoc/templates-pdk/assets/prettify.js
similarity index 100%
rename from tools/droiddoc/templates/assets/prettify.js
rename to tools/droiddoc/templates-pdk/assets/prettify.js
diff --git a/tools/droiddoc/templates/assets/search_autocomplete.js b/tools/droiddoc/templates-pdk/assets/search_autocomplete.js
similarity index 100%
rename from tools/droiddoc/templates/assets/search_autocomplete.js
rename to tools/droiddoc/templates-pdk/assets/search_autocomplete.js
diff --git a/tools/droiddoc/templates/assets/style.css b/tools/droiddoc/templates-pdk/assets/style.css
similarity index 100%
rename from tools/droiddoc/templates/assets/style.css
rename to tools/droiddoc/templates-pdk/assets/style.css
diff --git a/tools/droiddoc/templates/assets/triangle-none.gif b/tools/droiddoc/templates-pdk/assets/triangle-none.gif
similarity index 100%
rename from tools/droiddoc/templates/assets/triangle-none.gif
rename to tools/droiddoc/templates-pdk/assets/triangle-none.gif
Binary files differ
diff --git a/tools/droiddoc/templates-pdk/components/left_nav.cs b/tools/droiddoc/templates-pdk/components/left_nav.cs
new file mode 100644
index 0000000..a6d0ae3
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/components/left_nav.cs
@@ -0,0 +1,15 @@
+<?cs def:custom_left_nav() ?>
+  <?cs if:doc.hidenav != "true" ?>
+    <?cs if:doc.type == "source" ?>
+      <?cs call:source_nav() ?>
+    <?cs elif:doc.type == "porting" ?>
+      <?cs call:porting_nav() ?>
+    <?cs elif:doc.type == "compatibility" ?>
+      <?cs call:compatibility_nav() ?>
+    <?cs elif:doc.type == "community" ?>
+      <?cs call:community_nav() ?>
+    <?cs elif:doc.type == "about" ?>
+      <?cs call:about_nav() ?>
+    <?cs /if ?>
+  <?cs /if ?>
+<?cs /def ?>
diff --git a/tools/droiddoc/templates-pdk/components/masthead.cs b/tools/droiddoc/templates-pdk/components/masthead.cs
new file mode 100644
index 0000000..cab58d7
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/components/masthead.cs
@@ -0,0 +1,36 @@
+<?cs 
+def:custom_masthead() ?>
+  <div id="header">
+      <div id="headerLeft">
+          <a href="<?cs var:toroot?>" tabindex="-1"><img
+              src="<?cs var:toroot ?>assets/images/open_source.png" alt="Android Open Source Project" /></a>
+          <ul class="<?cs if:home ?>home<?cs
+                      elif:doc.type == "source" ?>source<?cs
+                      elif:doc.type == "porting" ?>porting<?cs
+                      elif:doc.type == "compatibility" ?>compatibility<?cs
+                      elif:doc.type == "community" ?>community<?cs
+                      elif:doc.type == "about" ?>about<?cs /if ?>">
+              <li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
+              <li id="source-link"><a href="<?cs var:toroot ?>source/index.html"
+                                  onClick="return loadLast('source')"><span>Source</span></a></li>
+              <li id="porting-link"><a href="<?cs var:toroot ?>porting/index.html"
+                                  onClick="return loadLast('porting')"><span>Porting</span></a></li>
+              <li id="compatibility-link"><a href="<?cs var:toroot ?>compatibility/index.html"
+                                  onClick="return loadLast('compatibility')"><span>Compatibility</span></a></li>
+              <li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
+                                  onClick="return loadLast('community')"><span>Community</span></a></li>
+              <li id="about-link"><a href="<?cs var:toroot ?>about/index.html"
+                                  onClick="return loadLast('about')"><span>About</span></a></li>
+          </ul> 
+      </div>
+      <div id="headerRight">
+          <div id="headerLinks">
+            <!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> -->
+            <span class="text">
+              <!-- &nbsp;<a href="#">English</a> | -->
+              <a href="http://www.android.com">Android.com</a>
+            </span>
+          </div>
+      </div><!-- headerRight -->
+  </div><!-- header --><?cs 
+/def ?><?cs # custom_masthead ?>
diff --git a/tools/droiddoc/templates-pdk/customization.cs b/tools/droiddoc/templates-pdk/customization.cs
deleted file mode 100644
index 3e9be06..0000000
--- a/tools/droiddoc/templates-pdk/customization.cs
+++ /dev/null
@@ -1,182 +0,0 @@
-<?cs # This file defines custom definitions for the masthead (logo, searchbox, tabs, etc) and 
-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?>" tabindex="-1"><img
-              src="<?cs var:toroot ?>assets/images/open_source.png" alt="Android Open Source Project" /></a>
-          <ul class="<?cs if:home ?>home<?cs
-                      elif:doc.type == "source" ?>source<?cs
-                      elif:doc.type == "porting" ?>porting<?cs
-                      elif:doc.type == "compatibility" ?>compatibility<?cs
-                      elif:doc.type == "downloads" ?>downloads<?cs
-                      elif:doc.type == "community" ?>community<?cs
-                      elif:doc.type == "about" ?>about<?cs /if ?>">
-              <li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li>
-              <li id="source-link"><a href="<?cs var:toroot ?>source/index.html"
-                                  onClick="return loadLast('source')"><span>Source</span></a></li>
-              <li id="porting-link"><a href="<?cs var:toroot ?>porting/index.html"
-                                  onClick="return loadLast('porting')"><span>Porting</span></a></li>
-              <li id="compatibility-link"><a href="<?cs var:toroot ?>compatibility/index.html"
-                                  onClick="return loadLast('compatibility')"><span>Compatibility</span></a></li>
-              <li id="community-link"><a href="<?cs var:toroot ?>community/index.html"
-                                  onClick="return loadLast('community')"><span>Community</span></a></li>
-              <li id="downloads-link"><a href="<?cs var:toroot ?>downloads/index.html"
-                                  onClick="return loadLast('downloads')"><span>Downloads</span></a></li>
-              <li id="about-link"><a href="<?cs var:toroot ?>about/index.html"
-                                  onClick="return loadLast('about')"><span>About</span></a></li>
-          </ul> 
-      </div>
-      <div id="headerRight">
-          <div id="headerLinks">
-            <!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> -->
-            <span class="text">
-              <!-- &nbsp;<a href="#">English</a> | -->
-              <a href="http://www.android.com">Android.com</a>
-            </span>
-          </div>
-      </div><!-- headerRight -->
-  </div><!-- header --><?cs 
-/def ?><?cs # custom_masthead ?>
-
-
-<?cs def:community_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/community/community_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:about_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/about/about_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:porting_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/porting/porting_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:source_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/source/source_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:downloads_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/downloads/downloads_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:compatibility_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/compatibility/compatibility_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-  </div>
-<?cs /def ?>
-
-<?cs def:custom_left_nav() ?>
-  <?cs if:doc.hidenav != "true" ?>
-    <?cs if:doc.type == "source" ?>
-      <?cs call:source_nav() ?>
-    <?cs elif:doc.type == "porting" ?>
-      <?cs call:porting_nav() ?>
-    <?cs elif:doc.type == "compatibility" ?>
-      <?cs call:compatibility_nav() ?>
-    <?cs elif:doc.type == "downloads" ?>
-      <?cs call:downloads_nav() ?>
-    <?cs elif:doc.type == "community" ?>
-      <?cs call:community_nav() ?>
-    <?cs elif:doc.type == "about" ?>
-      <?cs call:about_nav() ?>
-    <?cs /if ?>
-  <?cs /if ?>
-<?cs /def ?>
-
-<?cs # appears at the bottom of every page ?><?cs 
-def:custom_cc_copyright() ?>
-  Except as noted, this content is 
-  licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
-  Creative Commons Attribution 2.5</a>. For details and 
-  restrictions, see the <a href="http://developer.android.com/license.html">Content 
-  License</a>.<?cs 
-/def ?>
-
-<?cs 
-def:custom_copyright() ?>
-  Except as noted, this content is licensed under <a
-  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 
-  For details and restrictions, see the <a href="http://developer.android.com/license.html">
-  Content License</a>.<?cs 
-/def ?>
-
-<?cs 
-def:custom_footerlinks() ?>
-  <p>
-    <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
-    <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
-    <a href="http://www.android.com/branding.html">Brand Guidelines</a>
-  </p><?cs 
-/def ?>
-
-<?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs 
-def:custom_buildinfo() ?>
-  Android <?cs var:sdk.platform.version ?>&nbsp;r<?cs var:sdk.rel.id ?> - <?cs var:page.now ?>
-<?cs /def ?>
diff --git a/tools/droiddoc/templates-pdk/customizations.cs b/tools/droiddoc/templates-pdk/customizations.cs
new file mode 100644
index 0000000..b0f90a7
--- /dev/null
+++ b/tools/droiddoc/templates-pdk/customizations.cs
@@ -0,0 +1,91 @@
+<?cs # This file defines custom definitions for the masthead (logo, searchbox, tabs, etc) and 
+left nav (toc) that gets placed on all pages, for the open source site. See also the components/
+directory. ?>
+
+<?cs def:community_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/community/community_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+  </div>
+<?cs /def ?>
+<?cs def:about_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/about/about_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+  </div>
+<?cs /def ?>
+<?cs def:porting_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/porting/porting_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+  </div>
+<?cs /def ?>
+<?cs def:source_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/source/source_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+  </div>
+<?cs /def ?>
+<?cs def:compatibility_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/compatibility/compatibility_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+  </div>
+<?cs /def ?>
+<?cs def:custom_cc_copyright() ?>
+<?cs /def ?>
+
+<?cs def:custom_copyright() ?>
+<?cs /def ?>
+
+<?cs 
+def:custom_footerlinks() ?>
+  <p>
+    <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+    <a href="http://www.android.com/privacy.html">Privacy Policy</a>
+  </p><?cs 
+/def ?>
+
+<?cs # appears on the right side of the blue bar at the bottom off every page ?>
+<?cs def:custom_buildinfo() ?>
+<?cs /def ?>
diff --git a/tools/droiddoc/templates/footer.cs b/tools/droiddoc/templates-pdk/footer.cs
similarity index 100%
rename from tools/droiddoc/templates/footer.cs
rename to tools/droiddoc/templates-pdk/footer.cs
diff --git a/tools/droiddoc/templates-pdk/head_tag.cs b/tools/droiddoc/templates-pdk/head_tag.cs
index 915dc0e..cccbb14 100644
--- a/tools/droiddoc/templates-pdk/head_tag.cs
+++ b/tools/droiddoc/templates-pdk/head_tag.cs
@@ -1,6 +1,6 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>assets-pdk/favicon.ico" />
+<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>assets/favicon.ico" />
 <title><?cs 
   if:page.title ?><?cs 
     var:page.title ?><?cs
@@ -9,7 +9,7 @@
     /if ?> | <?cs
   /if ?>Android Open Source</title>
 <link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" />
-<link href="<?cs var:toroot ?>assets-pdk/pdk-local.css" rel="stylesheet" type="text/css" />
+<!-- <link href="<?cs var:toroot ?>assets-pdk/pdk-local.css" rel="stylesheet" type="text/css" /> -->
 <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>
@@ -28,7 +28,7 @@
 	}
 }
 </script>
-<script type="text/javascript>
+<script type="text/javascript">
   jQuery(document).ready(function() {
         jQuery("pre").addClass("prettyprint");
   });
diff --git a/tools/droiddoc/templates/trailer.cs b/tools/droiddoc/templates-pdk/trailer.cs
similarity index 100%
rename from tools/droiddoc/templates/trailer.cs
rename to tools/droiddoc/templates-pdk/trailer.cs
diff --git a/tools/droiddoc/templates-sdk/assets-sdk/placeholder b/tools/droiddoc/templates-sdk/assets-sdk/placeholder
deleted file mode 100644
index e69de29..0000000
--- a/tools/droiddoc/templates-sdk/assets-sdk/placeholder
+++ /dev/null
diff --git a/tools/droiddoc/templates/assets/android-developer-core.css b/tools/droiddoc/templates-sdk/assets/android-developer-core.css
similarity index 99%
rename from tools/droiddoc/templates/assets/android-developer-core.css
rename to tools/droiddoc/templates-sdk/assets/android-developer-core.css
index 40ab2fd..565f173 100644
--- a/tools/droiddoc/templates/assets/android-developer-core.css
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-core.css
@@ -59,7 +59,7 @@
   padding:0 4px;
 }
 
-p {
+p, form {
   padding:0;
   margin:0 0 1em;
 }
@@ -197,7 +197,7 @@
 
 #body-content {
   /* "Preliminary" watermark for preview releases and interim builds.
-  background:transparent url(images/preliminary.png) repeat scroll 0 0;  */
+  background:transparent url(images/preliminary.png) repeat scroll 0 0; */
   margin:0;
   position:relative;
   width:100%;
@@ -1139,6 +1139,7 @@
 #mainBodyRight ul.videoPreviews h3 {
   padding:0;
   margin:0;
+  font-size:100%;
 }
 
 #mainBodyRight ul.videoPreviews a {
diff --git a/tools/droiddoc/templates/assets/android-developer-docs-devguide.css b/tools/droiddoc/templates-sdk/assets/android-developer-docs-devguide.css
similarity index 100%
copy from tools/droiddoc/templates/assets/android-developer-docs-devguide.css
copy to tools/droiddoc/templates-sdk/assets/android-developer-docs-devguide.css
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
similarity index 95%
rename from tools/droiddoc/templates/assets/android-developer-docs.css
rename to tools/droiddoc/templates-sdk/assets/android-developer-docs.css
index 1672c93..22d010a 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.css
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-docs.css
@@ -61,7 +61,7 @@
 }
 
 #side-nav ul ul {
-  margin: .35em 0 0 0;
+  margin: .5em 0 0 0;
   padding: 0;
 }
 
@@ -517,16 +517,24 @@
 }
 
 #jd-content h3 {
-  font-size:1.2em;
-  color:#222;
-  padding: .75em 0 .65em 0;
-  margin:0;
+  font-size:1.3em;
+  color:#3a3a3a;
+  padding: 0;
+  margin: 1.5em 0 .65em 0;
 }
 
 #jd-content h4 {
   font-size:1.1em;
-  margin-bottom:.5em;
-  color:#222;
+  color:#3a3a3a;
+  padding: 0;
+  margin: 1.25em 0 .65em 0;
+}
+
+#jd-content h5 {
+  font-size:1.0em;
+  color:#3a3a3a;
+  padding: 0;
+  margin: 1em 0 .65em 0;
 }
 
 #jd-content .small-header {
@@ -688,22 +696,6 @@
   -webkit-border-radius:5px;
 }
 
-.toggle-content-toggleme {
-  display:none;
-}
-
-.toggle-content-button {
-  font-size:.9em;
-  line-height:.9em;
-  text-decoration:none;
-  position:relative;
-  top:5px;
-}
-
-.toggle-content-button:hover {
-  text-decoration:underline;
-}
-
 div.special p {
   margin: .5em 0 0 0;
 }
@@ -756,11 +748,21 @@
   border-color: #ffcf00;
 }
 
-li p.note, li p.warning {
+li .note,
+li .caution,
+li .warning {
   margin: .5em 0 0 0;
   padding: .2em .5em .2em .9em;
 }
 
+/* Makes sure the first paragraph does not add top-whitespace within the box*/
+li .note>p:first-child,
+li .caution>p:first-child,
+li .warning>p:first-child {
+  margin-top:0;
+  padding-top:0;
+}
+
 dl.xml dt {
   font-variant:small-caps;
   font-size:1.2em;
@@ -789,7 +791,8 @@
   padding-left:1em;
 }
 
-.new {
+.new,
+.new-child {
   font-size: .78em;
   font-weight: bold;
   color: #ff3d3d;
@@ -798,6 +801,10 @@
   line-height:.9em;
 }
 
+.toggle-list.open .new-child {
+  display:none;
+}
+
 pre.classic {
   background-color:transparent;
   border:none;
@@ -830,6 +837,27 @@
   margin: 0 0 0.5em 1em; /* matches default table left-margin */
 }
 
+
+/* toggle for misc content (such as long sample code) 
+   see toggleContent() script in android-developer-docs.js */
+.toggle-content.closed .toggle-content-toggleme {
+  display:none;
+}
+
+.toggle-content a[href="#"] {
+  text-decoration:none;
+  color:inherit;
+}
+
+.toggle-content-toggleme {
+  padding-bottom:1px; /* fixes animation bounce due to margins */
+}
+
+#jd-content .toggle-content img.toggle-content-img {
+  margin:0;
+}
+
+
 /* BEGIN quickview sidebar element styles */
 
 #qv-wrapper {
@@ -892,20 +920,6 @@
   padding:0 10px;
 }
 
-#qv-extra #rule {
-  padding: 0 10px;
-  margin: 0;
-}
-
-#qv-sub-rule {
-  padding: 6px 20px;
-  margin: 0;
-}
-
-#qv-sub-rule p {
-  margin: 0;
-}
-
 #jd-content #qv h2 {
   font-size:1.05em;
   font-weight:bold;
@@ -918,6 +932,21 @@
   z-index:1;
 }
 
+#qv-extra #rule {
+  padding: 0 10px;
+  margin: 0;
+}
+
+#qv-sub-rule {
+  padding: 5px 15px 10px;
+  margin: 0;
+}
+
+#jd-content
+#qv-sub-rule h2 {
+  margin: 0 0 .5em 0;
+}
+
 /* END quickview sidebar element styles */
 
 /* Begin sidebox sidebar element styles */
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates-sdk/assets/android-developer-docs.js
similarity index 77%
rename from tools/droiddoc/templates/assets/android-developer-docs.js
rename to tools/droiddoc/templates-sdk/assets/android-developer-docs.js
index 5262bd8..e353236 100644
--- a/tools/droiddoc/templates/assets/android-developer-docs.js
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-docs.js
@@ -27,10 +27,10 @@
 
 var agent = navigator['userAgent'].toLowerCase();
 // If a mobile phone, set flag and do mobile setup
-if ((agent.indexOf("mobile") != -1) ||      // android, iphone, ipod 
+if ((agent.indexOf("mobile") != -1) ||      // android, iphone, ipod
     (agent.indexOf("blackberry") != -1) ||
     (agent.indexOf("webos") != -1) ||
-    (agent.indexOf("mini") != -1)) {        // opera mini browsers 
+    (agent.indexOf("mini") != -1)) {        // opera mini browsers
   isMobile = true;
   addLoadEvent(mobileSetup);
 // If not a mobile browser, set the onresize event for IE6, and others
@@ -126,7 +126,7 @@
     expiration = date.toGMTString();
   }
   document.cookie = cookie_namespace + section + cookie + "=" + val + "; expires=" + expiration+"; path=/";
-} 
+}
 
 function init() {
   $("#side-nav").css({position:"absolute",left:0});
@@ -164,11 +164,84 @@
     }
   }
 
-  if (devdocNav.length) { // only dev guide and sdk 
-    highlightNav(location.href); 
+  if (devdocNav.length) { // only dev guide, resources, and sdk
+    tryPopulateResourcesNav();
+    highlightNav(location.href);
   }
 }
 
+function tryPopulateResourcesNav() {
+  var sampleList = $('#devdoc-nav-sample-list');
+  var articleList = $('#devdoc-nav-article-list');
+  var tutorialList = $('#devdoc-nav-tutorial-list');
+  var topicList = $('#devdoc-nav-topic-list');
+
+  if (!topicList.length || !ANDROID_TAGS || !ANDROID_RESOURCES)
+    return;
+
+  var topics = [];
+  for (var topic in ANDROID_TAGS['topic']) {
+    topics.push({name:topic,title:ANDROID_TAGS['topic'][topic]});
+  }
+  topics.sort(function(x,y){ return (x.title < y.title) ? -1 : 1; });
+  for (var i = 0; i < topics.length; i++) {
+    topicList.append(
+        $('<li>').append(
+          $('<a>')
+            .attr('href', toRoot + "resources/browser.html?tag=" + topics[i].name)
+            .append($('<span>')
+              .addClass('en')
+              .html(topics[i].title)
+            )
+          )
+        );
+  }
+
+  var _renderResourceList = function(tag, listNode) {
+    var resources = [];
+    var tags;
+    var resource;
+    var i, j;
+    for (i = 0; i < ANDROID_RESOURCES.length; i++) {
+      resource = ANDROID_RESOURCES[i];
+      tags = resource.tags || [];
+      var hasTag = false;
+      for (j = 0; j < tags.length; j++)
+        if (tags[j] == tag) {
+          hasTag = true;
+          break;
+        }
+      if (!hasTag)
+        continue;
+      resources.push(resource);
+    }
+    //resources.sort(function(x,y){ return (x.title.en < y.title.en) ? -1 : 1; });
+    for (i = 0; i < resources.length; i++) {
+      resource = resources[i];
+      var listItemNode = $('<li>').append(
+          $('<a>')
+            .attr('href', toRoot + "resources/" + resource.path)
+            .append($('<span>')
+              .addClass('en')
+              .html(resource.title.en)
+            )
+          );
+      tags = resource.tags || [];
+      for (j = 0; j < tags.length; j++) {
+        if (tags[j] == 'new') {
+          listItemNode.get(0).innerHTML += '&nbsp;<span class="new">new!</span>';
+          break;
+        }
+      }
+      listNode.append(listItemNode);
+    }
+  };
+
+  _renderResourceList('sample', sampleList);
+  _renderResourceList('article', articleList);
+  _renderResourceList('tutorial', tutorialList);
+}
+
 function highlightNav(fullPageName) {
   var lastSlashPos = fullPageName.lastIndexOf("/");
   var firstSlashPos;
@@ -182,15 +255,21 @@
   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);
+
+  // get the path and page name from the URL (such as 'guide/topics/graphics/index.html')
+  var htmlPos = fullPageName.indexOf(".html");
+  var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5); // +5 advances past ".html"
+  // find instances of the page name in the side nav
   var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
-  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 and resources)
+  // 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 and resources)
+  if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) ||
+                  (fullPageName.indexOf("/resources/") != -1))) {
     lastBackstep = pathPageName.lastIndexOf("/");
     while (link.length == 0) {
       backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep);
-      link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory + 1)+"index.html']");
+      link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory +
+                      1)+"index.html']");
       lastBackstep = pathPageName.lastIndexOf("/", lastBackstep - 1);
       if (lastBackstep == 0) break;
     }
@@ -423,26 +502,37 @@
   if (navObj.is(':visible')) {
     var selected = $(".selected", navObj);
     if (selected.length == 0) return;
-    if (selected.is("div")) selected = selected.parent();
+    if (selected.is("div")) selected = selected.parent(); // when the selected item is a parent
 
     var scrolling = document.getElementById(nav);
     var navHeight = navObj.height();
     var offsetTop = selected.position().top;
-    if (selected.parent().parent().is(".toggle-list")) offsetTop += selected.parent().parent().position().top;
-    if(offsetTop > navHeight - 92) {
-      scrolling.scrollTop = offsetTop - navHeight + 92;
+
+    // handle nested items
+    if (selected.parent().parent().is(".toggle-list")) {
+      selected = selected.parent().parent();
+      // handle second level nested items
+      if (selected.parent().parent().is(".toggle-list")) {
+        selected = selected.parent().parent();
+      }
+      offsetTop += selected.position().top;
+    }
+
+    // 180px from the bottom of the list is the threshold
+    if(offsetTop > navHeight - 180) {
+      scrolling.scrollTop = offsetTop - navHeight + 180;
     }
   }
 }
 
 function changeTabLang(lang) {
   var nodes = $("#header-tabs").find("."+lang);
-  for (i=0; i < nodes.length; i++) { // for each node in this language 
+  for (i=0; i < nodes.length; i++) { // for each node in this language
     var node = $(nodes[i]);
-    node.siblings().css("display","none"); // hide all siblings 
-    if (node.not(":empty").length != 0) { //if this languages node has a translation, show it 
+    node.siblings().css("display","none"); // hide all siblings
+    if (node.not(":empty").length != 0) { //if this languages node has a translation, show it
       node.css("display","inline");
-    } else { //otherwise, show English instead 
+    } else { //otherwise, show English instead
       node.css("display","none");
       node.siblings().filter(".en").css("display","inline");
     }
@@ -451,12 +541,12 @@
 
 function changeNavLang(lang) {
   var nodes = $("#side-nav").find("."+lang);
-  for (i=0; i < nodes.length; i++) { // for each node in this language 
+  for (i=0; i < nodes.length; i++) { // for each node in this language
     var node = $(nodes[i]);
-    node.siblings().css("display","none"); // hide all siblings 
-    if (node.not(":empty").length != 0) { // if this languages node has a translation, show it 
+    node.siblings().css("display","none"); // hide all siblings
+    if (node.not(":empty").length != 0) { // if this languages node has a translation, show it
       node.css("display","inline");
-    } else { // otherwise, show English instead 
+    } else { // otherwise, show English instead
       node.css("display","none");
       node.siblings().filter(".en").css("display","inline");
     }
@@ -496,16 +586,22 @@
 }
 
 
+/* Used to hide and reveal supplemental content, such as long code samples.
+   See the companion CSS in android-developer-docs.css */
 function toggleContent(obj) {
-  var button = $(obj);
-  var div = $(obj.parentNode);
+  var div = $(obj.parentNode.parentNode);
   var toggleMe = $(".toggle-content-toggleme",div);
-  if (button.hasClass("show")) {
+  if (div.hasClass("closed")) { // if it's closed, open it
     toggleMe.slideDown();
-    button.removeClass("show").addClass("hide");
-  } else {
-    toggleMe.slideUp();
-    button.removeClass("hide").addClass("show");
+    $(".toggle-content-text", obj).toggle();
+    div.removeClass("closed").addClass("open");
+    $(".toggle-content-img", div).attr("title", "hide").attr("src", toRoot + "assets/images/triangle-opened.png");
+  } else { // if it's open, close it
+    toggleMe.slideUp('fast', function() {  // Wait until the animation is done before closing arrow
+      $(".toggle-content-text", obj).toggle();
+      div.removeClass("open").addClass("closed");
+      $(".toggle-content-img", div).attr("title", "show").attr("src", toRoot + "assets/images/triangle-closed.png");
+    });
   }
-  $("span", button).toggle();
+  return false;
 }
diff --git a/tools/droiddoc/templates/assets/android-developer-reference.js b/tools/droiddoc/templates-sdk/assets/android-developer-reference.js
similarity index 100%
rename from tools/droiddoc/templates/assets/android-developer-reference.js
rename to tools/droiddoc/templates-sdk/assets/android-developer-reference.js
diff --git a/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.css b/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.css
new file mode 100644
index 0000000..a454caa
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.css
@@ -0,0 +1,31 @@
+/* Resource Browser */
+
+#resource-browser-results .no-results {
+  font-style: italic;
+  display: none;
+}
+
+#resource-browser-results .result {
+  position: relative;
+  padding-left: 84px;
+  background: transparent none no-repeat scroll 4px 12px;
+  border-bottom: 1px solid #ddd;
+}
+
+#resource-browser-results .tagged-article {
+  background-image: url(images/resource-article.png);
+}
+
+#resource-browser-results .tagged-sample {
+  background-image: url(images/resource-sample.png);
+}
+
+#resource-browser-results .tagged-tutorial {
+  background-image: url(images/resource-tutorial.png);
+}
+
+#resource-browser-results .resource-meta {
+  margin-top: -1em;
+  font-size: 0.85em;
+  font-weight: normal;
+}
diff --git a/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.js b/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.js
new file mode 100644
index 0000000..dc65aa2
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/android-developer-resource-browser.js
@@ -0,0 +1,235 @@
+(function() { // anonymize
+
+var allTags = {};
+var loadedResults = [];
+
+/**
+ * Initialization code run upon the DOM being ready.
+ */
+$(document).ready(function() {
+  // Parse page query parameters.
+  var params = parseParams(document.location.search);
+  params.tag = params.tag ? makeArray(params.tag) : null;
+
+  // Load tag and resource dataset.
+  loadTags();
+  loadResources();
+
+  showResults(params);
+
+  // Watch for keypresses in the keyword filter textbox, and update
+  // search results to reflect the keyword filter.
+  $('#resource-browser-keyword-filter').keyup(function() {
+    // Filter results on screen by keyword.
+    var keywords = $(this).val().split(/\s+/g);
+    for (var i = 0; i < loadedResults.length; i++) {
+      var hide = false;
+      for (var j = 0; j < keywords.length; j++) {
+        if (!resultMatchesKeyword(loadedResults[i].result, keywords[j])) {
+          hide = true;
+          break;
+        }
+      }
+
+      loadedResults[i].node[hide ? 'hide' : 'show']();
+    }
+  });
+});
+
+/**
+ * Returns whether or not the given search result contains the given keyword.
+ */
+function resultMatchesKeyword(result, keyword) {
+  keyword = keyword.toLowerCase();
+  if (result.title &&
+      result.title.en.toLowerCase().indexOf(keyword) >= 0)
+    return true;
+  else if (result.description &&
+           result.description.en.toLowerCase().indexOf(keyword) >= 0)
+    return true;
+  else if (result.topicsHtml &&
+           result.topicsHtml.replace(/\<.*?\>/g,'').toLowerCase().indexOf(keyword) >= 0)
+    return true;
+  return false;
+}
+
+/**
+ * Populates the allTags array with tag data from the ANDROID_TAGS
+ * variable in the resource data JS file.
+ */
+function loadTags() {
+  for (var tagClass in ANDROID_TAGS) {
+    for (var tag in ANDROID_TAGS[tagClass]) {
+      allTags[tag] = {
+        displayTag: ANDROID_TAGS[tagClass][tag],
+        tagClass: tagClass
+      };
+    }
+  }
+}
+
+/**
+ * Massage the ANDROID_RESOURCES resource list in the resource data JS file.
+ */
+function loadResources() {
+  for (var i = 0; i < ANDROID_RESOURCES.length; i++) {
+    var resource = ANDROID_RESOURCES[i];
+
+    // Convert the tags array to a tags hash for easier querying.
+    resource.tagsHash = {};
+    for (var j = 0; j < resource.tags.length; j++)
+      resource.tagsHash[resource.tags[j]] = true;
+
+    // Determine the type and topics of the resource by inspecting its tags.
+    resource.topics = [];
+    for (tag in resource.tagsHash)
+      if (tag in allTags) {
+        if (allTags[tag].tagClass == 'type') {
+          resource.type = tag;
+        } else if (allTags[tag].tagClass == 'topic') {
+          resource.topics.push(tag);
+        }
+      }
+
+    // Add a humanized topics list string.
+    resource.topicsHtml = humanizeList(resource.topics, function(item) {
+      return '<strong>' + allTags[item].displayTag + '</strong>';
+    });
+  }
+}
+
+/**
+ * Loads resources for the given query parameters.
+ */
+function showResults(params) {
+  loadedResults = [];
+  $('#resource-browser-search-params').empty();
+  $('#resource-browser-results').empty();
+
+  var i, j;
+  var searchTags = [];
+  if (params.tag) {
+    for (i = 0; i < params.tag.length; i++) {
+      var tag = params.tag[i];
+      if (tag.toLowerCase() in allTags) {
+        searchTags.push(tag.toLowerCase());
+      }
+    }
+  }
+
+  if (searchTags.length) {
+    // Show query params.
+    var taggedWithHtml = ['Showing technical resources tagged with '];
+    taggedWithHtml.push(humanizeList(searchTags, function(item) {
+      return '<strong>' + allTags[item].displayTag + '</strong>';
+    }));
+    $('#resource-browser-search-params').html(taggedWithHtml.join('') + ':');
+  } else {
+    $('#resource-browser-search-params').html('Showing all technical resources:');
+  }
+
+  var results = [];
+
+  // Create the list of resources to show.
+  for (i = 0; i < ANDROID_RESOURCES.length; i++) {
+    var resource = ANDROID_RESOURCES[i];
+    var skip = false;
+
+    if (searchTags.length) {
+      for (j = 0; j < searchTags.length; j++)
+        if (!(searchTags[j] in resource.tagsHash)) {
+          skip = true;
+          break;
+        }
+
+      if (skip)
+        continue;
+
+      results.push(resource);
+      continue;
+    }
+
+    results.push(resource);
+  }
+
+  // Format and show the list of resource results.
+  if (results.length) {
+    $('#resource-browser-results .no-results').hide();
+    for (i = 0; i < results.length; i++) {
+      var result = results[i];
+      var resultJqNode = $(tmpl('tmpl_resource_browser_result', result));
+      for (tag in result.tagsHash)
+        resultJqNode.addClass('tagged-' + tag);
+      $('#resource-browser-results').append(resultJqNode);
+
+      loadedResults.push({ node: resultJqNode, result: result });
+    }
+  } else {
+    $('#resource-browser-results .no-results').show();
+  }
+}
+
+/**
+ * Formats the given array into a human readable, English string, ala
+ * 'a, b and c', with an optional item formatter/wrapper function.
+ */
+function humanizeList(arr, itemFormatter) {
+  itemFormatter = itemFormatter || function(o){ return o; };
+  arr = arr || [];
+
+  var out = [];
+  for (var i = 0; i < arr.length; i++) {
+    out.push(itemFormatter(arr[i]) +
+        ((i < arr.length - 2) ? ', ' : '') +
+        ((i == arr.length - 2) ? ' and ' : ''));
+  }
+
+  return out.join('');
+}
+
+/**
+ * Parses a parameter string, i.e. foo=1&bar=2 into
+ * a dictionary object.
+ */
+function parseParams(paramStr) {
+  var params = {};
+  paramStr = paramStr.replace(/^[?#]/, '');
+
+  var pairs = paramStr.split('&');
+  for (var i = 0; i < pairs.length; i++) {
+    var p = pairs[i].split('=');
+    var key = p[0] ? decodeURIComponent(p[0]) : p[0];
+    var val = p[1] ? decodeURIComponent(p[1]) : p[1];
+    if (val === '0')
+      val = 0;
+    if (val === '1')
+      val = 1;
+
+    if (key in params) {
+      // Handle array values.
+      params[key] = makeArray(params[key]);
+      params[key].push(val);
+    } else {
+      params[key] = val;
+    }
+  }
+
+  return params;
+}
+
+/**
+ * Returns the argument as a single-element array, or the argument itself
+ * if it's already an array.
+ */
+function makeArray(o) {
+  if (!o)
+    return [];
+
+  if (typeof o === 'object' && 'splice' in o) {
+    return o;
+  } else {
+    return [o];
+  }
+}
+
+})();
diff --git a/tools/droiddoc/templates/assets/carousel.js b/tools/droiddoc/templates-sdk/assets/carousel.js
similarity index 100%
copy from tools/droiddoc/templates/assets/carousel.js
copy to tools/droiddoc/templates-sdk/assets/carousel.js
diff --git a/tools/droiddoc/templates-sdk/assets/customizations.js b/tools/droiddoc/templates-sdk/assets/customizations.js
new file mode 100644
index 0000000..5258902
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/customizations.js
@@ -0,0 +1,14 @@
+function showApiWarning(thing, selectedLevel, minLevel) {
+  if (selectedLevel < minLevel) {
+	  $("#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();
+  }
+}
+
+// Direct searches to search.html
+HAS_SEARCH_PAGE = true;
diff --git a/tools/droiddoc/templates/assets/images/android-developers-logo.png b/tools/droiddoc/templates-sdk/assets/images/android-developers-logo.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/android-developers-logo.png
copy to tools/droiddoc/templates-sdk/assets/images/android-developers-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/android_wrench.png b/tools/droiddoc/templates-sdk/assets/images/android_wrench.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/android_wrench.png
copy to tools/droiddoc/templates-sdk/assets/images/android_wrench.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_bluelink_down.png b/tools/droiddoc/templates-sdk/assets/images/arrow_bluelink_down.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_bluelink_down.png
copy to tools/droiddoc/templates-sdk/assets/images/arrow_bluelink_down.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_bluelink_up.png b/tools/droiddoc/templates-sdk/assets/images/arrow_bluelink_up.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_bluelink_up.png
copy to tools/droiddoc/templates-sdk/assets/images/arrow_bluelink_up.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_left_off.jpg b/tools/droiddoc/templates-sdk/assets/images/arrow_left_off.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_left_off.jpg
copy to tools/droiddoc/templates-sdk/assets/images/arrow_left_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_left_on.jpg b/tools/droiddoc/templates-sdk/assets/images/arrow_left_on.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_left_on.jpg
copy to tools/droiddoc/templates-sdk/assets/images/arrow_left_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_right_off.jpg b/tools/droiddoc/templates-sdk/assets/images/arrow_right_off.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_right_off.jpg
copy to tools/droiddoc/templates-sdk/assets/images/arrow_right_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/arrow_right_on.jpg b/tools/droiddoc/templates-sdk/assets/images/arrow_right_on.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/arrow_right_on.jpg
copy to tools/droiddoc/templates-sdk/assets/images/arrow_right_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_community_leftDiv.jpg b/tools/droiddoc/templates-sdk/assets/images/bg_community_leftDiv.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/bg_community_leftDiv.jpg
copy to tools/droiddoc/templates-sdk/assets/images/bg_community_leftDiv.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_fade.jpg b/tools/droiddoc/templates-sdk/assets/images/bg_fade.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/bg_fade.jpg
copy to tools/droiddoc/templates-sdk/assets/images/bg_fade.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_images_sprite.png b/tools/droiddoc/templates-sdk/assets/images/bg_images_sprite.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/bg_images_sprite.png
copy to tools/droiddoc/templates-sdk/assets/images/bg_images_sprite.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/bg_logo.png b/tools/droiddoc/templates-sdk/assets/images/bg_logo.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/bg_logo.png
copy to tools/droiddoc/templates-sdk/assets/images/bg_logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/body-gradient-tab.png b/tools/droiddoc/templates-sdk/assets/images/body-gradient-tab.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/body-gradient-tab.png
copy to tools/droiddoc/templates-sdk/assets/images/body-gradient-tab.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/body-gradient.png b/tools/droiddoc/templates-sdk/assets/images/body-gradient.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/body-gradient.png
copy to tools/droiddoc/templates-sdk/assets/images/body-gradient.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/developers-logo.png b/tools/droiddoc/templates-sdk/assets/images/developers-logo.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/developers-logo.png
copy to tools/droiddoc/templates-sdk/assets/images/developers-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/grad-rule-qv.png b/tools/droiddoc/templates-sdk/assets/images/grad-rule-qv.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/grad-rule-qv.png
copy to tools/droiddoc/templates-sdk/assets/images/grad-rule-qv.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/Android_Dev_Lab_l.png b/tools/droiddoc/templates-sdk/assets/images/home/Android_Dev_Lab_l.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/Android_Dev_Lab_l.png
rename to tools/droiddoc/templates-sdk/assets/images/home/Android_Dev_Lab_l.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/home/GDC2011.png b/tools/droiddoc/templates-sdk/assets/images/home/GDC2011.png
new file mode 100644
index 0000000..82ce918
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/home/GDC2011.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_large.png b/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_large.png
new file mode 100644
index 0000000..72d54ad
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_large.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_small.png b/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_small.png
new file mode 100644
index 0000000..3da1699
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/home/GTV_icon_small.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/home/IO-logo-2011.png b/tools/droiddoc/templates-sdk/assets/images/home/IO-logo-2011.png
new file mode 100644
index 0000000..4a28447
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/home/IO-logo-2011.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/IO-logo.png b/tools/droiddoc/templates-sdk/assets/images/home/IO-logo.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/IO-logo.png
copy to tools/droiddoc/templates-sdk/assets/images/home/IO-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/adc2_l.png b/tools/droiddoc/templates-sdk/assets/images/home/adc2_l.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/adc2_l.png
rename to tools/droiddoc/templates-sdk/assets/images/home/adc2_l.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/adc2_s.png b/tools/droiddoc/templates-sdk/assets/images/home/adc2_s.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/adc2_s.png
rename to tools/droiddoc/templates-sdk/assets/images/home/adc2_s.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/android_adc.png b/tools/droiddoc/templates-sdk/assets/images/home/android_adc.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/android_adc.png
copy to tools/droiddoc/templates-sdk/assets/images/home/android_adc.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_announcement.png b/tools/droiddoc/templates-sdk/assets/images/home/bg_home_announcement.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/bg_home_announcement.png
copy to tools/droiddoc/templates-sdk/assets/images/home/bg_home_announcement.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_bottom.jpg b/tools/droiddoc/templates-sdk/assets/images/home/bg_home_bottom.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/bg_home_bottom.jpg
copy to tools/droiddoc/templates-sdk/assets/images/home/bg_home_bottom.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel.png b/tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/bg_home_carousel.png
copy to tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png b/tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel_board.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/bg_home_carousel_board.png
copy to tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel_board.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png b/tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel_wheel.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/bg_home_carousel_wheel.png
copy to tools/droiddoc/templates-sdk/assets/images/home/bg_home_carousel_wheel.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png b/tools/droiddoc/templates-sdk/assets/images/home/carousel_buttons_sprite.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png
copy to tools/droiddoc/templates-sdk/assets/images/home/carousel_buttons_sprite.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/devphone-large.png b/tools/droiddoc/templates-sdk/assets/images/home/devphone-large.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/devphone-large.png
rename to tools/droiddoc/templates-sdk/assets/images/home/devphone-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/devphone-small.png b/tools/droiddoc/templates-sdk/assets/images/home/devphone-small.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/devphone-small.png
rename to tools/droiddoc/templates-sdk/assets/images/home/devphone-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/donut-android.png b/tools/droiddoc/templates-sdk/assets/images/home/donut-android.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/donut-android.png
copy to tools/droiddoc/templates-sdk/assets/images/home/donut-android.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/eclair-android.png b/tools/droiddoc/templates-sdk/assets/images/home/eclair-android.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/eclair-android.png
copy to tools/droiddoc/templates-sdk/assets/images/home/eclair-android.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/froyo-android.png b/tools/droiddoc/templates-sdk/assets/images/home/froyo-android.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/froyo-android.png
rename to tools/droiddoc/templates-sdk/assets/images/home/froyo-android.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/gdc-logo.png b/tools/droiddoc/templates-sdk/assets/images/home/gdc-logo.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/gdc-logo.png
rename to tools/droiddoc/templates-sdk/assets/images/home/gdc-logo.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/gingerdroid.png b/tools/droiddoc/templates-sdk/assets/images/home/gingerdroid.png
similarity index 100%
rename from tools/droiddoc/templates/assets/images/home/gingerdroid.png
rename to tools/droiddoc/templates-sdk/assets/images/home/gingerdroid.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/home/honeycomb-android.png b/tools/droiddoc/templates-sdk/assets/images/home/honeycomb-android.png
new file mode 100644
index 0000000..6cc5031
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/home/honeycomb-android.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-large.png b/tools/droiddoc/templates-sdk/assets/images/home/io-large.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/io-large.png
copy to tools/droiddoc/templates-sdk/assets/images/home/io-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/io-small.png b/tools/droiddoc/templates-sdk/assets/images/home/io-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/io-small.png
copy to tools/droiddoc/templates-sdk/assets/images/home/io-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/maps-large.png b/tools/droiddoc/templates-sdk/assets/images/home/maps-large.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/maps-large.png
copy to tools/droiddoc/templates-sdk/assets/images/home/maps-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/maps-small.png b/tools/droiddoc/templates-sdk/assets/images/home/maps-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/maps-small.png
copy to tools/droiddoc/templates-sdk/assets/images/home/maps-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/market-large.png b/tools/droiddoc/templates-sdk/assets/images/home/market-large.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/market-large.png
copy to tools/droiddoc/templates-sdk/assets/images/home/market-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/market-small.png b/tools/droiddoc/templates-sdk/assets/images/home/market-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/market-small.png
copy to tools/droiddoc/templates-sdk/assets/images/home/market-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/sdk-large.png b/tools/droiddoc/templates-sdk/assets/images/home/sdk-large.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/sdk-large.png
copy to tools/droiddoc/templates-sdk/assets/images/home/sdk-large.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/sdk-small.png b/tools/droiddoc/templates-sdk/assets/images/home/sdk-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/home/sdk-small.png
copy to tools/droiddoc/templates-sdk/assets/images/home/sdk-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/hr_gray_main.jpg b/tools/droiddoc/templates-sdk/assets/images/hr_gray_main.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/hr_gray_main.jpg
copy to tools/droiddoc/templates-sdk/assets/images/hr_gray_main.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/hr_gray_side.jpg b/tools/droiddoc/templates-sdk/assets/images/hr_gray_side.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/hr_gray_side.jpg
copy to tools/droiddoc/templates-sdk/assets/images/hr_gray_side.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_contribute.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_contribute.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_contribute.jpg
copy to tools/droiddoc/templates-sdk/assets/images/icon_contribute.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_download.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_download.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_download.jpg
copy to tools/droiddoc/templates-sdk/assets/images/icon_download.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_download2.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_download2.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_download2.jpg
copy to tools/droiddoc/templates-sdk/assets/images/icon_download2.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_guidelines_logo.png b/tools/droiddoc/templates-sdk/assets/images/icon_guidelines_logo.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_guidelines_logo.png
copy to tools/droiddoc/templates-sdk/assets/images/icon_guidelines_logo.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/icon_market.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_market.jpg
new file mode 100644
index 0000000..cb1ff0b
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/icon_market.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_robot.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_robot.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_robot.jpg
copy to tools/droiddoc/templates-sdk/assets/images/icon_robot.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/icon_world.jpg b/tools/droiddoc/templates-sdk/assets/images/icon_world.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/icon_world.jpg
copy to tools/droiddoc/templates-sdk/assets/images/icon_world.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/left_off.jpg b/tools/droiddoc/templates-sdk/assets/images/left_off.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/left_off.jpg
copy to tools/droiddoc/templates-sdk/assets/images/left_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/left_on.jpg b/tools/droiddoc/templates-sdk/assets/images/left_on.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/left_on.jpg
copy to tools/droiddoc/templates-sdk/assets/images/left_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/logo_breadcrumbz.jpg b/tools/droiddoc/templates-sdk/assets/images/logo_breadcrumbz.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/logo_breadcrumbz.jpg
copy to tools/droiddoc/templates-sdk/assets/images/logo_breadcrumbz.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/open_source.png b/tools/droiddoc/templates-sdk/assets/images/open_source.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/open_source.png
copy to tools/droiddoc/templates-sdk/assets/images/open_source.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/preliminary.png b/tools/droiddoc/templates-sdk/assets/images/preliminary.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/preliminary.png
copy to tools/droiddoc/templates-sdk/assets/images/preliminary.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-e.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-e.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-e.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-e.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-e2.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-e2.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-e2.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-e2.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-eg.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-eg.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-eg.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-eg.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-s.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-s.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-s.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-s.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-s2.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-s2.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-s2.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-s2.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/resizable-sg.gif b/tools/droiddoc/templates-sdk/assets/images/resizable-sg.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/resizable-sg.gif
copy to tools/droiddoc/templates-sdk/assets/images/resizable-sg.gif
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-article.png b/tools/droiddoc/templates-sdk/assets/images/resource-article.png
new file mode 100644
index 0000000..416493f
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-article.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-big-article.png b/tools/droiddoc/templates-sdk/assets/images/resource-big-article.png
new file mode 100644
index 0000000..7273275
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-big-article.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-big-sample.png b/tools/droiddoc/templates-sdk/assets/images/resource-big-sample.png
new file mode 100644
index 0000000..59b6b68
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-big-sample.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-big-tutorial.png b/tools/droiddoc/templates-sdk/assets/images/resource-big-tutorial.png
new file mode 100644
index 0000000..c32e89a
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-big-tutorial.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-big-video.png b/tools/droiddoc/templates-sdk/assets/images/resource-big-video.png
new file mode 100644
index 0000000..59d46a0
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-big-video.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-sample.png b/tools/droiddoc/templates-sdk/assets/images/resource-sample.png
new file mode 100644
index 0000000..f7a411c
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-sample.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-tutorial.png b/tools/droiddoc/templates-sdk/assets/images/resource-tutorial.png
new file mode 100644
index 0000000..10a14fe
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-tutorial.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/images/resource-video.png b/tools/droiddoc/templates-sdk/assets/images/resource-video.png
new file mode 100644
index 0000000..8fd5cae
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/images/resource-video.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/right_off.jpg b/tools/droiddoc/templates-sdk/assets/images/right_off.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/right_off.jpg
rename to tools/droiddoc/templates-sdk/assets/images/right_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/right_on.jpg b/tools/droiddoc/templates-sdk/assets/images/right_on.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/right_on.jpg
rename to tools/droiddoc/templates-sdk/assets/images/right_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/sidenav-rule.png b/tools/droiddoc/templates-sdk/assets/images/sidenav-rule.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/sidenav-rule.png
copy to tools/droiddoc/templates-sdk/assets/images/sidenav-rule.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_1.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_1.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_1.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_1.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_2.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_2.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_2.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_2.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_3.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_3.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_3.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_3.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_large_1.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_large_1.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_large_1.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_large_1.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_large_2.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_large_2.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_large_2.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_large_2.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_large_3.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_large_3.jpg
similarity index 100%
rename from tools/droiddoc/templates/assets/images/slide_large_3.jpg
rename to tools/droiddoc/templates-sdk/assets/images/slide_large_3.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_off.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_off.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/slide_off.jpg
copy to tools/droiddoc/templates-sdk/assets/images/slide_off.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/slide_on.jpg b/tools/droiddoc/templates-sdk/assets/images/slide_on.jpg
similarity index 100%
copy from tools/droiddoc/templates/assets/images/slide_on.jpg
copy to tools/droiddoc/templates-sdk/assets/images/slide_on.jpg
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/spacer.gif b/tools/droiddoc/templates-sdk/assets/images/spacer.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/images/spacer.gif
copy to tools/droiddoc/templates-sdk/assets/images/spacer.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-closed-small.png b/tools/droiddoc/templates-sdk/assets/images/triangle-closed-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/triangle-closed-small.png
copy to tools/droiddoc/templates-sdk/assets/images/triangle-closed-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-closed.png b/tools/droiddoc/templates-sdk/assets/images/triangle-closed.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/triangle-closed.png
copy to tools/droiddoc/templates-sdk/assets/images/triangle-closed.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-opened-small.png b/tools/droiddoc/templates-sdk/assets/images/triangle-opened-small.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/triangle-opened-small.png
copy to tools/droiddoc/templates-sdk/assets/images/triangle-opened-small.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/triangle-opened.png b/tools/droiddoc/templates-sdk/assets/images/triangle-opened.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/triangle-opened.png
copy to tools/droiddoc/templates-sdk/assets/images/triangle-opened.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/uiguidelines1.png b/tools/droiddoc/templates-sdk/assets/images/uiguidelines1.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/uiguidelines1.png
copy to tools/droiddoc/templates-sdk/assets/images/uiguidelines1.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/video-droid.png b/tools/droiddoc/templates-sdk/assets/images/video-droid.png
similarity index 100%
copy from tools/droiddoc/templates/assets/images/video-droid.png
copy to tools/droiddoc/templates-sdk/assets/images/video-droid.png
Binary files differ
diff --git a/tools/droiddoc/templates/assets/jdiff_logo.gif b/tools/droiddoc/templates-sdk/assets/jdiff_logo.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/jdiff_logo.gif
copy to tools/droiddoc/templates-sdk/assets/jdiff_logo.gif
Binary files differ
diff --git a/tools/droiddoc/templates/assets/jquery-history.js b/tools/droiddoc/templates-sdk/assets/jquery-history.js
similarity index 100%
copy from tools/droiddoc/templates/assets/jquery-history.js
copy to tools/droiddoc/templates-sdk/assets/jquery-history.js
diff --git a/tools/droiddoc/templates/assets/jquery-resizable.min.js b/tools/droiddoc/templates-sdk/assets/jquery-resizable.min.js
similarity index 100%
copy from tools/droiddoc/templates/assets/jquery-resizable.min.js
copy to tools/droiddoc/templates-sdk/assets/jquery-resizable.min.js
diff --git a/tools/droiddoc/templates-sdk/assets/microtemplate.js b/tools/droiddoc/templates-sdk/assets/microtemplate.js
new file mode 100644
index 0000000..ada1235
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/microtemplate.js
@@ -0,0 +1,35 @@
+// Simple JavaScript Templating
+// John Resig - http://ejohn.org/ - MIT Licensed
+(function(){
+  var cache = {};
+
+  this.tmpl = function tmpl(str, data){
+    // Figure out if we're getting a template, or if we need to
+    // load the template - and be sure to cache the result.
+    var fn = !/\W/.test(str) ?
+      cache[str] = cache[str] ||
+        tmpl(document.getElementById(str).innerHTML) :
+
+      // Generate a reusable function that will serve as a template
+      // generator (and which will be cached).
+      new Function("obj",
+        "var p=[],print=function(){p.push.apply(p,arguments);};" +
+
+        // Introduce the data as local variables using with(){}
+        "with(obj){p.push('" +
+
+        // Convert the template into pure JavaScript
+        str
+          .replace(/[\r\t\n]/g, " ")
+          .split("<%").join("\t")
+          .replace(/((^|%>)[^\t]*)'/g, "$1\r")
+          .replace(/\t=(.*?)%>/g, "',$1,'")
+          .split("\t").join("');")
+          .split("%>").join("p.push('")
+          .split("\r").join("\\'")
+      + "');}return p.join('');");
+
+    // Provide some basic currying to the user
+    return data ? fn( data ) : fn;
+  };
+})();
\ No newline at end of file
diff --git a/tools/droiddoc/templates/assets/prettify.js b/tools/droiddoc/templates-sdk/assets/prettify.js
similarity index 100%
copy from tools/droiddoc/templates/assets/prettify.js
copy to tools/droiddoc/templates-sdk/assets/prettify.js
diff --git a/tools/droiddoc/templates/assets/search_autocomplete.js b/tools/droiddoc/templates-sdk/assets/search_autocomplete.js
similarity index 100%
copy from tools/droiddoc/templates/assets/search_autocomplete.js
copy to tools/droiddoc/templates-sdk/assets/search_autocomplete.js
diff --git a/tools/droiddoc/templates/assets/style.css b/tools/droiddoc/templates-sdk/assets/style.css
similarity index 100%
copy from tools/droiddoc/templates/assets/style.css
copy to tools/droiddoc/templates-sdk/assets/style.css
diff --git a/tools/droiddoc/templates/assets/triangle-none.gif b/tools/droiddoc/templates-sdk/assets/triangle-none.gif
similarity index 100%
copy from tools/droiddoc/templates/assets/triangle-none.gif
copy to tools/droiddoc/templates-sdk/assets/triangle-none.gif
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs
new file mode 100644
index 0000000..e521489
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/components/masthead.cs
@@ -0,0 +1,60 @@
+<?cs def:custom_masthead() ?>
+  <div id="header">
+      <div id="headerLeft">
+          <a href="<?cs var:toroot ?>index.html" tabindex="-1"><img
+              src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" /></a>
+          <?cs include:"header_tabs.cs" ?>     <?cs # The links are extracted so we can better manage localization ?>
+      </div>
+      <div id="headerRight">
+          <div id="headerLinks">
+          <?cs if:template.showLanguageMenu ?>
+            <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>
+      			    ?>
+             	</select>	
+             	<script type="text/javascript">
+             	  <!--  
+                  loadLangPref();  
+             	   //-->
+             	</script>
+            </span>
+          <?cs /if ?>
+          <a href="http://www.android.com">Android.com</a>
+          </div><?cs 
+          call:default_search_box() ?><?cs 
+    	 	  if:reference ?>
+    			  <div id="api-level-toggle">
+    			    <input type="checkbox" id="apiLevelCheckbox" onclick="toggleApiLevelSelector(this)" />
+    			    <label for="apiLevelCheckbox" class="disabled">Filter by API Level: </label>
+    			    <select id="apiLevelSelector">
+    			      <!-- option elements added by buildApiLevelSelector() -->
+    			    </select>
+    			  </div>
+    	 	    <script>
+              var SINCE_DATA = [ <?cs 
+                each:since = since ?>'<?cs 
+                  var:since.name ?>'<?cs 
+                  if:!last(since) ?>, <?cs /if ?><?cs
+                /each 
+              ?> ];
+              buildApiLevelSelector();
+            </script><?cs 
+    			/if ?>
+      </div><!-- headerRight -->
+      <script type="text/javascript">
+        <!--  
+        changeTabLang(getLangPref());
+        //-->
+      </script>
+  </div><!-- header --><?cs 
+/def ?>
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk/customization.cs b/tools/droiddoc/templates-sdk/customization.cs
deleted file mode 100644
index 907f0f7..0000000
--- a/tools/droiddoc/templates-sdk/customization.cs
+++ /dev/null
@@ -1,252 +0,0 @@
-<?cs # This default template file is meant to be replaced. ?>
-<?cs # Use the -tempatedir arg to javadoc to set your own directory with a replacement for this file in it. ?>
-
-
-<?cs # The default search box that goes in the header ?><?cs 
-def:default_search_box() ?>
-  <div id="search" >
-      <div id="searchForm">
-          <form accept-charset="utf-8" class="gsc-search-box" 
-                onsubmit="return submit_search()">
-            <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody>
-                <tr>
-                  <td class="gsc-input">
-                    <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off"
-                      title="search developer docs" name="q"
-                      value="search developer docs"
-                      onFocus="search_focus_changed(this, true)"
-                      onBlur="search_focus_changed(this, false)"
-                      onkeydown="return search_changed(event, true, '<?cs var:toroot?>')"
-                      onkeyup="return search_changed(event, false, '<?cs var:toroot?>')" />
-                  <div id="search_filtered_div" class="no-display">
-                      <table id="search_filtered" cellspacing=0>
-                      </table>
-                  </div>
-                  </td>
-                  <td class="gsc-search-button">
-                    <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" />
-                  </td>
-                  <td class="gsc-clear-button">
-                    <div title="clear results" class="gsc-clear-button">&nbsp;</div>
-                  </td>
-                </tr></tbody>
-              </table>
-          </form>
-      </div><!-- searchForm -->
-  </div><!-- search --><?cs 
-/def ?>
-
-<?cs 
-def:custom_masthead() ?>
-  <div id="header">
-      <div id="headerLeft">
-          <a href="<?cs var:toroot ?>index.html" tabindex="-1"><img
-              src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" /></a>
-          <?cs include:"header_tabs.cs" ?>     <?cs # The links are extracted so we can better manage localization ?>
-      </div>
-      <div id="headerRight">
-          <div id="headerLinks">
-          <?cs if:template.showLanguageMenu ?>
-            <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>
-      			    ?>
-             	</select>	
-             	<script type="text/javascript">
-             	  <!--  
-                  loadLangPref();  
-             	   //-->
-             	</script>
-            </span>
-          <?cs /if ?>
-          <a href="http://www.android.com">Android.com</a>
-          </div><?cs 
-          call:default_search_box() ?><?cs 
-    	 	  if:reference ?>
-    			  <div id="api-level-toggle">
-    			    <input type="checkbox" id="apiLevelCheckbox" onclick="toggleApiLevelSelector(this)" />
-    			    <label for="apiLevelCheckbox" class="disabled">Filter by API Level: </label>
-    			    <select id="apiLevelSelector">
-    			      <!-- option elements added by buildApiLevelSelector() -->
-    			    </select>
-    			  </div>
-    	 	    <script>
-              var SINCE_DATA = [ <?cs 
-                each:since = since ?>'<?cs 
-                  var:since.name ?>'<?cs 
-                  if:!last(since) ?>, <?cs /if ?><?cs
-                /each 
-              ?> ];
-              buildApiLevelSelector();
-            </script><?cs 
-    			/if ?>
-      </div><!-- headerRight -->
-      <script type="text/javascript">
-        <!--  
-        changeTabLang(getLangPref());
-        //-->
-      </script>
-  </div><!-- header --><?cs 
-/def ?>
-
-<?cs 
-def:sdk_nav() ?>
-  <div class="g-section g-tpl-240" id="body-content">
-    <div class="g-unit g-first" id="side-nav">
-      <div id="devdoc-nav"><?cs 
-        include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-<?cs /def ?>
-
-<?cs 
-def:resources_tab_nav() ?>
-  <div class="g-section g-tpl-200" id="body-content">
-    <div class="g-unit g-first" 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" id="side-nav">
-      <div id="devdoc-nav"><?cs 
-        include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
-      </div>
-    </div> <!-- end side-nav -->
-    <script>
-      addLoadEvent(function() {
-        scrollIntoView("devdoc-nav");
-        });
-    </script>
-<?cs /def ?>
-
-<?cs # The default side navigation for the reference docs ?><?cs 
-def:default_left_nav() ?>
-  <div class="g-section g-tpl-240" id="body-content">
-    <div class="g-unit g-first" id="side-nav">
-      <div id="swapper">
-        <div id="nav-panels">
-          <div id="resize-packages-nav">
-            <div id="packages-nav">
-              <div id="index-links"><nobr>
-                <a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> | 
-                <a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
-              </div>
-              <ul>
-              	<?cs call:package_link_list(docs.packages) ?>
-              </ul><br/>
-            </div> <!-- end packages -->
-          </div> <!-- end resize-packages -->
-          <div id="classes-nav"><?cs 
-            if:subcount(class.package) ?>
-            <ul>
-              <?cs call:list("Interfaces", class.package.interfaces) ?>
-              <?cs call:list("Classes", class.package.classes) ?>
-              <?cs call:list("Enums", class.package.enums) ?>
-              <?cs call:list("Exceptions", class.package.exceptions) ?>
-              <?cs call:list("Errors", class.package.errors) ?>
-            </ul><?cs 
-            elif:subcount(package) ?>
-            <ul>
-              <?cs call:class_link_list("Interfaces", package.interfaces) ?>
-              <?cs call:class_link_list("Classes", package.classes) ?>
-              <?cs call:class_link_list("Enums", package.enums) ?>
-              <?cs call:class_link_list("Exceptions", package.exceptions) ?>
-              <?cs call:class_link_list("Errors", package.errors) ?>
-            </ul><?cs 
-            else ?>
-              <script>
-                /*addLoadEvent(maxPackageHeight);*/
-              </script>
-              <p style="padding:10px">Select a package to view its members</p><?cs 
-            /if ?><br/>
-          </div><!-- end classes -->
-        </div><!-- end nav-panels -->
-        <div id="nav-tree" style="display:none">
-          <div id="index-links"><nobr>
-            <a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> | 
-            <a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
-          </div>
-        </div><!-- end nav-tree -->
-      </div><!-- end swapper -->
-    </div> <!-- end side-nav -->
-    <script>
-      if (!isMobile) {
-        $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav");
-        chooseDefaultNav();
-        if ($("#nav-tree").is(':visible')) {
-          init_default_navtree("<?cs var:toroot ?>");
-        } else {
-          addLoadEvent(function() {
-            scrollIntoView("packages-nav");
-            scrollIntoView("classes-nav");
-          });
-        }
-        $("#swapper").css({borderBottom:"2px solid #aaa"});
-      } else {
-        swapNav(); // tree view should be used on mobile
-      }
-    </script><?cs 
-/def ?>
-
-<?cs 
-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 
-    call:default_left_nav() ?><?cs 
-  /if ?><?cs 
-/def ?>
-
-<?cs # appears at the bottom of every page ?><?cs 
-def:custom_cc_copyright() ?>
-  Except as noted, this content is 
-  licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
-  Creative Commons Attribution 2.5</a>. For details and 
-  restrictions, see the <a href="<?cs var:toroot ?>license.html">Content 
-  License</a>.<?cs 
-/def ?>
-
-<?cs 
-def:custom_copyright() ?>
-  Except as noted, this content is licensed under <a
-  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 
-  For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
-  Content License</a>.<?cs 
-/def ?>
-
-<?cs 
-def:custom_footerlinks() ?>
-  <p>
-    <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
-    <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
-    <a href="http://www.android.com/branding.html">Brand Guidelines</a>
-  </p><?cs 
-/def ?>
-
-<?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs 
-def:custom_buildinfo() ?>
-  Android <?cs var:sdk.version ?>&nbsp;r<?cs var:sdk.rel.id ?> - <?cs var:page.now ?>
-<?cs /def ?>
diff --git a/tools/droiddoc/templates-sdk/customizations.cs b/tools/droiddoc/templates-sdk/customizations.cs
new file mode 100644
index 0000000..cfeab16
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/customizations.cs
@@ -0,0 +1,151 @@
+<?cs 
+def:sdk_nav() ?>
+  <div class="g-section g-tpl-240" id="body-content">
+    <div class="g-unit g-first" id="side-nav">
+      <div id="devdoc-nav"><?cs 
+        include:"../../../../frameworks/base/docs/html/sdk/sdk_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+<?cs /def ?>
+<?cs 
+def:resources_tab_nav() ?>
+  <div class="g-section g-tpl-200" id="body-content">
+    <div class="g-unit g-first" 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" id="side-nav">
+      <div id="devdoc-nav"><?cs 
+        include:"../../../../frameworks/base/docs/html/guide/guide_toc.cs" ?>
+      </div>
+    </div> <!-- end side-nav -->
+    <script>
+      addLoadEvent(function() {
+        scrollIntoView("devdoc-nav");
+        });
+    </script>
+<?cs /def ?>
+
+<?cs # The default side navigation for the reference docs ?><?cs 
+def:default_left_nav() ?>
+  <div class="g-section g-tpl-240" id="body-content">
+    <div class="g-unit g-first" id="side-nav">
+      <div id="swapper">
+        <div id="nav-panels">
+          <div id="resize-packages-nav">
+            <div id="packages-nav">
+              <div id="index-links"><nobr>
+                <a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> | 
+                <a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
+              </div>
+              <ul>
+              	<?cs call:package_link_list(docs.packages) ?>
+              </ul><br/>
+            </div> <!-- end packages -->
+          </div> <!-- end resize-packages -->
+          <div id="classes-nav"><?cs 
+            if:subcount(class.package) ?>
+            <ul>
+              <?cs call:list("Interfaces", class.package.interfaces) ?>
+              <?cs call:list("Classes", class.package.classes) ?>
+              <?cs call:list("Enums", class.package.enums) ?>
+              <?cs call:list("Exceptions", class.package.exceptions) ?>
+              <?cs call:list("Errors", class.package.errors) ?>
+            </ul><?cs 
+            elif:subcount(package) ?>
+            <ul>
+              <?cs call:class_link_list("Interfaces", package.interfaces) ?>
+              <?cs call:class_link_list("Classes", package.classes) ?>
+              <?cs call:class_link_list("Enums", package.enums) ?>
+              <?cs call:class_link_list("Exceptions", package.exceptions) ?>
+              <?cs call:class_link_list("Errors", package.errors) ?>
+            </ul><?cs 
+            else ?>
+              <script>
+                /*addLoadEvent(maxPackageHeight);*/
+              </script>
+              <p style="padding:10px">Select a package to view its members</p><?cs 
+            /if ?><br/>
+          </div><!-- end classes -->
+        </div><!-- end nav-panels -->
+        <div id="nav-tree" style="display:none">
+          <div id="index-links"><nobr>
+            <a href="<?cs var:toroot ?>reference/packages.html" <?cs if:(page.title == "Package Index") ?>class="selected"<?cs /if ?> >Package Index</a> | 
+            <a href="<?cs var:toroot ?>reference/classes.html" <?cs if:(page.title == "Class Index") ?>class="selected"<?cs /if ?>>Class Index</a></nobr>
+          </div>
+        </div><!-- end nav-tree -->
+      </div><!-- end swapper -->
+    </div> <!-- end side-nav -->
+    <script>
+      if (!isMobile) {
+        $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav");
+        chooseDefaultNav();
+        if ($("#nav-tree").is(':visible')) {
+          init_default_navtree("<?cs var:toroot ?>");
+        } else {
+          addLoadEvent(function() {
+            scrollIntoView("packages-nav");
+            scrollIntoView("classes-nav");
+          });
+        }
+        $("#swapper").css({borderBottom:"2px solid #aaa"});
+      } else {
+        swapNav(); // tree view should be used on mobile
+      }
+    </script><?cs 
+/def ?>
+
+<?cs 
+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 
+    call:default_left_nav() ?><?cs 
+  /if ?><?cs 
+/def ?>
+
+<?cs # appears at the bottom of every page ?><?cs 
+def:custom_cc_copyright() ?>
+  Except as noted, this content is 
+  licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
+  Creative Commons Attribution 2.5</a>. For details and 
+  restrictions, see the <a href="<?cs var:toroot ?>license.html">Content 
+  License</a>.<?cs 
+/def ?>
+
+<?cs 
+def:custom_copyright() ?>
+  Except as noted, this content is licensed under <a
+  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 
+  For details and restrictions, see the <a href="<?cs var:toroot ?>license.html">
+  Content License</a>.<?cs 
+/def ?>
+
+<?cs 
+def:custom_footerlinks() ?>
+  <p>
+    <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
+    <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
+    <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+  </p><?cs 
+/def ?>
+
+<?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs 
+def:custom_buildinfo() ?>
+  Android <?cs var:sdk.version ?>&nbsp;r<?cs var:sdk.rel.id ?> - <?cs var:page.now ?>
+<?cs /def ?>
+
diff --git a/tools/droiddoc/templates/footer.cs b/tools/droiddoc/templates-sdk/footer.cs
similarity index 100%
copy from tools/droiddoc/templates/footer.cs
copy to tools/droiddoc/templates-sdk/footer.cs
diff --git a/tools/droiddoc/templates/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs
similarity index 92%
rename from tools/droiddoc/templates/head_tag.cs
rename to tools/droiddoc/templates-sdk/head_tag.cs
index 5a7fd40..fd8aad6 100644
--- a/tools/droiddoc/templates/head_tag.cs
+++ b/tools/droiddoc/templates-sdk/head_tag.cs
@@ -20,6 +20,9 @@
 if:reference ?>
 <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 ?><?cs 
+if:resources ?>
+<script src="<?cs var:toroot ?>resources/resources-data.js" type="text/javascript"></script><?cs 
 /if ?>
 <noscript>
   <style type="text/css">
@@ -31,4 +34,4 @@
     #resize-packages-nav{border-bottom:3px solid #666;}
   </style>
 </noscript>
-</head>
+</head>
\ No newline at end of file
diff --git a/tools/droiddoc/templates/sampleindex.cs b/tools/droiddoc/templates-sdk/sampleindex.cs
similarity index 66%
rename from tools/droiddoc/templates/sampleindex.cs
rename to tools/droiddoc/templates-sdk/sampleindex.cs
index 8a75298..81ba68c 100644
--- a/tools/droiddoc/templates/sampleindex.cs
+++ b/tools/droiddoc/templates-sdk/sampleindex.cs
@@ -10,17 +10,17 @@
 <a name="top"></a>
 <div class="g-unit" id="doc-content">
  <div id="jd-header" class="guide-header">
-  <span class="crumb">&nbsp;</span>
+    <span class="crumb">
+      <a href="<?cs var:toroot ?>resources/browser.html?tag=sample">Sample Code</a> >
+    </span>
   <h1><?cs var:page.title ?></h1>
  </div>
 
 <div id="jd-content">
+<p><a href="../index.html">&larr; Back</a></p>
 
 <?cs var:summary ?>
 
-<?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">
@@ -41,17 +41,6 @@
       </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>&lt;sdk&gt;</em>/platforms/android-<em>&lt;version&gt;</em>/samples/</code>
-</p>
-
-<?cs /if ?><?cs # end if/else online docs ?>
-
 </div><!-- end jd-content -->
 
 <?cs include:"footer.cs" ?>
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 6c35b81..331411f 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -209,8 +209,29 @@
   $("#next-steps").show();
 }
 </script>
-  <?cs /if ?> <?cs # end if online ?>
+  <?cs else ?> <?cs # end if online ?>
 
+    <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
+      <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
+    Android 3.0 release, to give you a head-start on developing applications for it.
+    </p>
+    
+      <p>See the <a
+    href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
+    about how to set up the preview SDK and get started.</p>
+    <style type="text/css">
+    .non-preview { display:none; }
+    </style>
+    
+    <?cs else ?><?cs # it's normal offline docs ?>
+      <style type="text/css">
+        p.offline-message { display:block; }
+        p.online-message { display:none; }
+      </style>
+    <?cs /if ?>
+    
+  <?cs /if ?> <?cs # end if/else online ?>
+  
 <?cs /if ?> <?cs # end if/else NDK ?>
 
 <?cs /if ?> <?cs # end if/else redirect ?>
diff --git a/tools/droiddoc/templates/trailer.cs b/tools/droiddoc/templates-sdk/trailer.cs
similarity index 100%
copy from tools/droiddoc/templates/trailer.cs
copy to tools/droiddoc/templates-sdk/trailer.cs
diff --git a/tools/droiddoc/templates/assets/images/home/tv_l.png b/tools/droiddoc/templates/assets/images/home/tv_l.png
deleted file mode 100644
index ed89bfc..0000000
--- a/tools/droiddoc/templates/assets/images/home/tv_l.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates/assets/images/home/tv_s.png b/tools/droiddoc/templates/assets/images/home/tv_s.png
deleted file mode 100644
index 6ca68cb..0000000
--- a/tools/droiddoc/templates/assets/images/home/tv_s.png
+++ /dev/null
Binary files differ
diff --git a/tools/droiddoc/templates/class.cs b/tools/droiddoc/templates/class.cs
deleted file mode 100644
index d2add18..0000000
--- a/tools/droiddoc/templates/class.cs
+++ /dev/null
@@ -1,623 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<body class="<?cs var:class.since ?>">
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="api-info-block">
-
-<?cs # are there inherited members ?>
-<?cs each:cl=class.inherited ?>
-  <?cs if:subcount(cl.methods) ?>
-   <?cs set:inhmethods = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.constants) ?>
-   <?cs set:inhconstants = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.fields) ?>
-   <?cs set:inhfields = #1 ?>
-  <?cs /if ?>
-  <?cs if:subcount(cl.attrs) ?>
-   <?cs set:inhattrs = #1 ?>
-  <?cs /if ?>
-<?cs /each ?>
-
-<div class="sum-details-links">
-Summary:
-<?cs if:subcount(class.inners) ?>
-  <a href="#nestedclasses">Nested Classes</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.attrs) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lattrs">XML Attrs</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhattrs ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhattrs">Inherited XML Attrs</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.enumConstants) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#enumconstants">Enums</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.constants) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#constants">Constants</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhconstants ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhconstants">Inherited Constants</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.fields) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#lfields">Fields</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhfields ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhfields">Inherited Fields</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.public) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubctors">Ctors</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.ctors.protected) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#proctors">Protected Ctors</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.public) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#pubmethods">Methods</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:subcount(class.methods.protected) ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#promethods">Protected Methods</a>
-  <?cs set:linkcount = #1 ?>
-<?cs /if ?>
-<?cs if:inhmethods ?>
-  <?cs if:linkcount ?>&#124; <?cs /if ?><a href="#inhmethods">Inherited Methods</a>
-<?cs /if ?>
-<?cs if:inhattrs || inhconstants || inhfields || inhmethods || subcount(class.subclasses.direct) || subcount(class.subclasses.indirect) ?>
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[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 ?>
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
-    <?cs var:class.scope ?>
-    <?cs var:class.static ?> 
-    <?cs var:class.final ?> 
-    <?cs var:class.abstract ?>
-    <?cs var:class.kind ?>
-<h1><?cs var:class.name ?></h1>
-
-<?cs set:colspan = subcount(class.inheritance) ?>
-<?cs each:supr = class.inheritance ?>
-  <?cs if:colspan == 2 ?>
-    extends <?cs call:type_link(supr.short_class) ?><br/>
-  <?cs /if ?>
-  <?cs if:last(supr) && subcount(supr.interfaces) ?>
-      implements 
-      <?cs each:t=supr.interfaces ?>
-        <?cs call:type_link(t) ?> 
-      <?cs /each ?>
-  <?cs /if ?>
-  <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<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 ?>
-    <tr>
-        <?cs loop:i = 1, (subcount(class.inheritance)-colspan), 1 ?>
-            <td class="jd-inheritance-space">&nbsp;<?cs if:(subcount(class.inheritance)-colspan) == i ?>&nbsp;&nbsp;&#x21b3;<?cs /if ?></td>
-        <?cs /loop ?> 	
-        <td colspan="<?cs var:colspan ?>" class="jd-inheritance-class-cell"><?cs
-            if:colspan == 1
-                ?><?cs call:class_name(class.qualifiedType) ?><?cs 
-            else 
-                ?><?cs call:type_link(supr.class) ?><?cs
-            /if ?></td>
-    </tr>
-    <?cs set:colspan = colspan-1 ?>
-<?cs /each ?>
-</table>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-
-<?cs if:subcount(class.subclasses.direct) ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-direct", "closed") ?>Known Direct Subclasses
-<?cs call:expandable_class_list("subclasses-direct", class.subclasses.direct, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<?cs if:subcount(class.subclasses.indirect) ?>
-<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
-<?cs call:expando_trigger("subclasses-indirect", "closed") ?>Known Indirect Subclasses
-<?cs call:expandable_class_list("subclasses-indirect", class.subclasses.indirect, "list") ?>
-</td></tr></table>
-<?cs /if ?>
-
-<div class="jd-descr">
-<?cs call:deprecated_warning(class) ?>
-<?cs if:subcount(class.descr) ?>
-<h2>Class Overview</h2>
-<p><?cs call:tag_list(class.descr) ?></p>
-<?cs /if ?>
-
-<?cs call:see_also_tags(class.seeAlso) ?>
-
-</div><!-- jd-descr -->
-
-
-<?cs # summary macros ?>
-
-<?cs def:write_method_summary(methods, included) ?>
-<?cs set:count = #1 ?>
-<?cs each:method = methods ?>
-	 <?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:method.since ?>" >
-        <td class="jd-typecol"><nobr>
-            <?cs var:method.abstract ?>
-            <?cs var:method.synchronized ?>
-            <?cs var:method.final ?>
-            <?cs var:method.static ?>
-            <?cs call:type_link(method.generic) ?>
-            <?cs call:type_link(method.returnType) ?></nobr>
-        </td>
-        <td class="jd-linkcol" width="100%"><nobr>
-        <span class="sympad"><?cs call:cond_link(method.name, toroot, method.href, included) ?></span>(<?cs call:parameter_list(method.params) ?>)</nobr>
-        <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
-        <div class="jd-descrdiv"><?cs call:short_descr(method) ?></div>
-  <?cs /if ?>
-  </td></tr>
-<?cs set:count = count + #1 ?>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_field_summary(fields, included) ?>
-<?cs set:count = #1 ?>
-    <?cs each:field=fields ?>
-      <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 ?>
-          <?cs var:field.final ?>
-          <?cs call:type_link(field.type) ?></nobr></td>
-          <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
-          <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?></td>
-      </tr>
-      <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_constant_summary(fields, included) ?>
-<?cs set:count = #1 ?>
-    <?cs each:field=fields ?>
-    <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"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
-        <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?></td>
-    </tr>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_attr_summary(attrs, included) ?>
-<?cs set:count = #1 ?>
-    <tr>
-        <td><nobr><em>Attribute Name</em></nobr></td>
-        <td><nobr><em>Related Method</em></nobr></td>
-        <td><nobr><em>Description</em></nobr></td>
-    </tr>
-    <?cs each:attr=attrs ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:attr.since ?>" >
-        <td class="jd-linkcol"><?cs if:included ?><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs /if ?><?cs var:attr.name ?><?cs if:included ?></a><?cs /if ?></td>
-        <td class="jd-linkcol"><?cs each:m=attr.methods ?>
-            <?cs call:cond_link(m.name, toroot, m.href, included) ?>
-            <?cs /each ?>
-        </td>
-        <td class="jd-descrcol" width="100%"><?cs call:short_descr(attr) ?>&nbsp;</td>
-    </tr>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_inners_summary(classes) ?>
-<?cs set:count = #1 ?>
-  <?cs each:cl=class.inners ?>
-    <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
-      <td class="jd-typecol"><nobr>
-        <?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>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-<?cs /def ?>
-
-<?cs # end macros ?>
-
-<div class="jd-descr">
-<h2>Summary</h2>
-
-<?cs if:subcount(class.inners) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ======== NESTED CLASS SUMMARY ======== -->
-<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
-<?cs call:write_inners_summary(class.inners) ?>
-<?cs /if ?>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<?cs if:subcount(class.attrs) ?>
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="lattrs" class="jd-sumtable"><tr><th colspan="12">XML Attributes</th></tr>
-<?cs call:write_attr_summary(class.attrs, 1) ?>
-<?cs /if ?>
-
-<?cs # if there are inherited attrs, write the table ?>
-<?cs if:inhattrs ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="inhattrs" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited XML Attributes</div></th></tr>
-<?cs each:cl=class.inherited ?>
-<?cs if:subcount(cl.attrs) ?>
-<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 ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-attrs-<?cs var:cl.qualified ?>">
-  <div id="inherited-attrs-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-attrs-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_attr_summary(cl.attrs, cl.included) ?></table>
-  </div>
-</div>
-</td></tr>
-<?cs /if ?>
-<?cs /each ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.enumConstants) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== ENUM CONSTANT 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 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"><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?>&nbsp;</td>
-        <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?>&nbsp;</td>
-    </tr>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-<?cs /if ?>
-
-<?cs if:subcount(class.constants) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
-<?cs call:write_constant_summary(class.constants, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs # if there are inherited constants, write the table ?>
-<?cs if:inhconstants ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="inhconstants" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Constants</div></th></tr>
-<?cs each:cl=class.inherited ?>
-<?cs if:subcount(cl.constants) ?>
-<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 ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-constants-<?cs var:cl.qualified ?>">
-  <div id="inherited-constants-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-constants-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_constant_summary(cl.constants, cl.included) ?></table>
-  </div>
-</div>
-</td></tr>
-<?cs /if ?>
-<?cs /each ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.fields) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
-<?cs call:write_field_summary(class.fields, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs # if there are inherited fields, write the table ?>
-<?cs if:inhfields ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="inhfields" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Fields</div></th></tr>
-<?cs each:cl=class.inherited ?>
-<?cs if:subcount(cl.fields) ?>
-<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 ?>
-<?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-fields-<?cs var:cl.qualified ?>">
-  <div id="inherited-fields-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-fields-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_field_summary(cl.fields, cl.included) ?></table>
-  </div>
-</div>
-</td></tr>
-<?cs /if ?>
-<?cs /each ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.ctors.public) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-<?cs call:write_method_summary(class.ctors.public, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.ctors.protected) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="proctors" class="jd-sumtable"><tr><th colspan="12">Protected Constructors</th></tr>
-<?cs call:write_method_summary(class.ctors.protected, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.methods.public) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-<?cs call:write_method_summary(class.methods.public, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs if:subcount(class.methods.protected) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
-<?cs call:write_method_summary(class.methods.protected, 1) ?>
-</table>
-<?cs /if ?>
-
-<?cs # if there are inherited methods, write the table ?>
-<?cs if:inhmethods ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
-  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
-  <div style="clear:left;">Inherited Methods</div></th></tr>
-<?cs each:cl=class.inherited ?>
-<?cs if:subcount(cl.methods) ?>
-<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 ?> <?cs call:cond_link(cl.qualified, toroot, cl.link, cl.included) ?>
-<div id="inherited-methods-<?cs var:cl.qualified ?>">
-  <div id="inherited-methods-<?cs var:cl.qualified ?>-list"
-        class="jd-inheritedlinks">
-  </div>
-  <div id="inherited-methods-<?cs var:cl.qualified ?>-summary" style="display: none;">
-    <table class="jd-sumtable-expando">
-    <?cs call:write_method_summary(cl.methods, cl.included) ?></table>
-  </div>
-</div>
-</td></tr>
-<?cs /if ?>
-<?cs /each ?>
-</table>
-<?cs /if ?>
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-<?cs def:write_field_details(fields) ?>
-<?cs each:field=fields ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:field.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:field.since ?>"> 
-    <h4 class="jd-details-title">
-      <span class="normal">
-        <?cs var:field.scope ?> 
-        <?cs var:field.static ?> 
-        <?cs var:field.final ?> 
-        <?cs call:type_link(field.type) ?>
-      </span>
-        <?cs var:field.name ?>
-    </h4>
-      <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>
-        <span>
-            <?cs if:field.constantValue.isString ?>
-                <?cs var:field.constantValue.str ?>
-            <?cs else ?>
-                <?cs var:field.constantValue.dec ?>
-                (<?cs var:field.constantValue.hex ?>)
-            <?cs /if ?>
-        </span>
-        </div>
-    <?cs /if ?>
-    </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-<?cs def:write_method_details(methods) ?>
-<?cs each:method=methods ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:method.anchor ?>"></A>
-<?cs # The apilevel-N class MUST BE LAST in the sequence of class names ?>
-<div class="jd-details api apilevel-<?cs var:method.since ?>"> 
-    <h4 class="jd-details-title">
-      <span class="normal">
-        <?cs var:method.scope ?> 
-        <?cs var:method.static ?> 
-        <?cs var:method.final ?> 
-        <?cs var:method.abstract ?> 
-        <?cs var:method.synchronized ?> 
-        <?cs call:type_link(method.returnType) ?>
-      </span>
-      <span class="sympad"><?cs var:method.name ?></span>
-      <span class="normal">(<?cs call:parameter_list(method.params) ?>)</span>
-    </h4>
-      <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 ?>
-
-<?cs def:write_attr_details(attrs) ?>
-<?cs each:attr=attrs ?>
-<?cs # the A tag in the next line must remain where it is, so that Eclipse can parse the docs ?>
-<A NAME="<?cs var:attr.anchor ?>"></A>
-<?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 ?>
-    </h4>
-      <div class="api-level">
-        <?cs call:since_tags(attr) ?>
-      </div>
-    <div class="jd-details-descr">
-        <?cs call:description(attr) ?>
-
-        <div class="jd-tagdata">
-            <h5 class="jd-tagtitle">Related Methods</h5>
-            <ul class="nolist">
-            <?cs each:m=attr.methods ?>
-                <li><a href="<?cs var:toroot ?><?cs var:m.href ?>"><?cs var:m.name ?></a></li>
-            <?cs /each ?>
-            </ul>
-        </div>
-    </div>
-</div>
-<?cs /each ?>
-<?cs /def ?>
-
-
-<!-- XML Attributes -->
-<?cs if:subcount(class.attrs) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= FIELD DETAIL ======== -->
-<h2>XML Attributes</h2>
-<?cs call:write_attr_details(class.attrs) ?>
-<?cs /if ?>
-
-<!-- Enum Values -->
-<?cs if:subcount(class.enumConstants) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Enum Values</h2>
-<?cs call:write_field_details(class.enumConstants) ?>
-<?cs /if ?>
-
-<!-- Constants -->
-<?cs if:subcount(class.constants) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Constants</h2>
-<?cs call:write_field_details(class.constants) ?>
-<?cs /if ?>
-
-<!-- Fields -->
-<?cs if:subcount(class.fields) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
-<?cs call:write_field_details(class.fields) ?>
-<?cs /if ?>
-
-<!-- Public ctors -->
-<?cs if:subcount(class.ctors.public) ?>
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-<?cs call:write_method_details(class.ctors.public) ?>
-<?cs /if ?>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-<?cs if:subcount(class.ctors.protected) ?>
-<h2>Protected Constructors</h2>
-<?cs call:write_method_details(class.ctors.protected) ?>
-<?cs /if ?>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-<?cs if:subcount(class.methods.public) ?>
-<h2>Public Methods</h2>
-<?cs call:write_method_details(class.methods.public) ?>
-<?cs /if ?>
-
-<?cs # this next line must be exactly like this to be parsed by eclipse ?>
-<!-- ========= METHOD DETAIL ======== -->
-<?cs if:subcount(class.methods.protected) ?>
-<h2>Protected Methods</h2>
-<?cs call:write_method_details(class.methods.protected) ?>
-<?cs /if ?>
-
-<?cs # the next two lines must be exactly like this to be parsed by eclipse ?>
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<?cs include:"footer.cs" ?>
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/classes.cs b/tools/droiddoc/templates/classes.cs
deleted file mode 100644
index 5a8315f..0000000
--- a/tools/droiddoc/templates/classes.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="jd-header">
-<h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div class="jd-letterlist"><?cs each:letter=docs.classes ?>
-    <a href="#letter_<?cs name:letter ?>"><?cs name:letter ?></a><?cs /each?>
-</div>
-
-<?cs each:letter=docs.classes ?>
-<?cs set:count = #1 ?>
-<h2 id="letter_<?cs name:letter ?>"><?cs name:letter ?></h2>
-<table class="jd-sumtable">
-    <?cs set:cur_row = #0 ?>
-    <?cs each:cl = letter ?>
-        <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>
-    <?cs set:count = count + #1 ?>
-    <?cs /each ?>
-</table>
-<?cs /each ?>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/tools/droiddoc/templates/customization.cs b/tools/droiddoc/templates/customization.cs
deleted file mode 100644
index f6a5c1a..0000000
--- a/tools/droiddoc/templates/customization.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-<?cs # This default template file is meant to be replaced.                      ?>
-<?cs # Use the -templatedir arg to javadoc to set your own directory with a     ?>
-<?cs # replacement for this file in it. ?>
-
-
-<?cs def:default_search_box() ?><?cs /def ?>
-<?cs def:default_left_nav() ?><?cs /def ?>
-
-<?cs # appears at the top of every page ?><?cs 
-def:custom_masthead() ?>
-  <div id="header">
-      <div id="headerLeft">
-          <a href="<?cs var:toroot ?>index.html" tabindex="-1"><?cs var:page.title ?></a>
-      </div>
-      <div id="headerRight">
-          <?cs if:!online-pdk ?>
-            <?cs call:default_search_box() ?>
-          <?cs /if ?>
-      </div><!-- headerRight -->
-  </div><!-- header --><?cs 
-/def ?>
-
-<?cs # appear at the bottom of every page ?>
-<?cs def:custom_copyright() ?><?cs /def ?>
-<?cs def:custom_cc_copyright() ?><?cs /def ?>
-<?cs def:custom_footerlinks() ?><?cs /def ?>
-<?cs def:custom_buildinfo() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?>
-
-<?cs # appears on the side of the page ?>
-<?cs def:custom_left_nav() ?><?cs call:default_left_nav() ?><?cs /def ?>
-
diff --git a/tools/droiddoc/templates/docpage.cs b/tools/droiddoc/templates/docpage.cs
deleted file mode 100644
index 9d85c6f..0000000
--- a/tools/droiddoc/templates/docpage.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation">
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content"><a name="top"></a>
-
-<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 ?>&nbsp;
-    <?cs /if ?>
-  </span>
-<h1><?cs var:page.title ?></h1>
-</div>
-
-  <div id="jd-content">
-
-    <div class="jd-descr">
-    <?cs call:tag_list(root.descr) ?>
-    </div>
-
-  <a href="#top" style="float:right">&uarr; Go to top</a>
-  <?cs if:parent.link ?>
-    <p><a href="<?cs var:parent.link ?>">&larr; Back to <?cs var:parent.title ?></a></p>
-  <?cs /if ?>
-  </div>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
-
-
-
diff --git a/tools/droiddoc/templates/doctype.cs b/tools/droiddoc/templates/doctype.cs
deleted file mode 100644
index 763b073..0000000
--- a/tools/droiddoc/templates/doctype.cs
+++ /dev/null
@@ -1 +0,0 @@
-<!DOCTYPE html>
\ No newline at end of file
diff --git a/tools/droiddoc/templates/header.cs b/tools/droiddoc/templates/header.cs
deleted file mode 100644
index e8301be..0000000
--- a/tools/droiddoc/templates/header.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-<?cs call:custom_masthead() ?>
-<?cs call:custom_left_nav() ?>
-
diff --git a/tools/droiddoc/templates/hierarchy.cs b/tools/droiddoc/templates/hierarchy.cs
deleted file mode 100644
index a607ffd..0000000
--- a/tools/droiddoc/templates/hierarchy.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-<?cs include:"macros.cs" ?>
-<html>
-<style>
-    .jd-hierarchy-spacer {
-        width: 15px;
-    }
-    .jd-hierarchy-data {
-        text-align: left;
-        vertical-align: top;
-    }
-</style>
-<?cs include:"head_tag.cs" ?>
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="jd-header">
-<h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div style="margin-left: 20px; margin-right: 20px;">
-
-<?cs def:hierarchy_list(classes) ?>
-<?cs each:cl = classes ?>
-<tr>
-    <?cs loop:x=#0,cl.indent,#1 ?><td class="jd-hierarchy-spacer"></td><?cs /loop ?>
-    <td class="jd-hierarchy-data" colspan="<?cs var:cl.colspan ?>">
-    <?cs if:cl.exists ?>
-        <?cs call:type_link(cl.class) ?>
-    <?cs else ?>
-        <?cs var:cl.value ?>
-    <?cs /if ?>
-    </td>
-    <td class="jd-hierarchy-data">
-    <?cs each:iface = cl.interfaces ?>
-        <?cs if:iface.exists ?>
-            <?cs call:type_link(iface.class) ?>
-        <?cs else ?>
-            <?cs var:iface.value ?>
-        <?cs /if ?> &nbsp;&nbsp;
-    <?cs /each ?>
-    &nbsp;
-    </td>
-</tr>
-<?cs call:hierarchy_list(cl.derived) ?>
-<?cs /each ?>
-<?cs /def ?>
-
-
-<table border="0" cellpadding="0" cellspacing="1">
-<th class="jd-hierarchy-data" colspan="<?cs var:colspan ?>">Class</th>
-<th class="jd-hierarchy-data">Interfaces</th>
-<?cs call:hierarchy_list(classes) ?>
-</table>
-
-</div>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
-
diff --git a/tools/droiddoc/templates/index.cs b/tools/droiddoc/templates/index.cs
deleted file mode 100644
index 15a6a59..0000000
--- a/tools/droiddoc/templates/index.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=packages.html">
-</head>
-<body>
-<?cs include:"analytics.cs" ?>
-</body>
-</html>
\ No newline at end of file
diff --git a/tools/droiddoc/templates/keywords.cs b/tools/droiddoc/templates/keywords.cs
deleted file mode 100644
index 0c8d4e3..0000000
--- a/tools/droiddoc/templates/keywords.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="jd-header">
-<h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div class="jd-letterlist"><?cs each:letter=keywords ?>
-    <a href="#letter_<?cs name:letter ?>"><?cs name:letter ?></a><?cs /each?>
-</div>
-
-<?cs each:letter=keywords ?>
-<a name="letter_<?cs name:letter ?>"></a>
-<h2><?cs name:letter ?></h2>
-<ul class="jd-letterentries">
-<?cs each:entry=letter
-?>  <li><a href="<?cs var:toroot ?><?cs var:entry.href ?>"><?cs var:entry.label
-        ?></a>&nbsp;<font class="jd-letterentrycomments">(<?cs var:entry.comment ?>)</font></li>
-<?cs /each
-?></ul>
-
-<?cs /each ?>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/lists.cs b/tools/droiddoc/templates/lists.cs
deleted file mode 100644
index 0af32b2..0000000
--- a/tools/droiddoc/templates/lists.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-var DATA = [
-<?cs each:page = docs.pages
-?>      { id:<?cs var: page.id ?>, label:"<?cs var:page.label ?>", link:"<?cs var:page.link ?>", type:"<?cs var:page.type ?>" }<?cs if:!last(page) ?>,<?cs /if ?>
-<?cs /each ?>
-    ];
diff --git a/tools/droiddoc/templates/macros.cs b/tools/droiddoc/templates/macros.cs
deleted file mode 100644
index b5fd3f2..0000000
--- a/tools/droiddoc/templates/macros.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-<?cs # A link to a package ?><?cs 
-def:package_link(pkg)) ?>
-  <a href="<?cs var:toroot ?><?cs var:pkg.link ?>"><?cs var:pkg.name ?></a><?cs 
-/def ?>
-
-<?cs # A link to a type, or not if it's a primitive type
-        link: whether to create a link at the top level, always creates links in
-              recursive invocations.
-        Expects the following fields:
-            .name
-            .link
-            .isPrimitive
-            .superBounds.N.(more links)   (... super ... & ...)
-            .extendsBounds.N.(more links) (... extends ... & ...)
-            .typeArguments.N.(more links) (< ... >)
-?><?cs 
-def:type_link_impl(type, link) ?><?cs
-  if:type.link && link=="true" ?><a href="<?cs var:toroot ?><?cs var:type.link ?>"><?cs /if
-      ?><?cs var:type.label ?><?cs if:type.link && link=="true" ?></a><?cs /if ?><?cs
-  if:subcount(type.extendsBounds) ?><?cs
-      each:t=type.extendsBounds ?><?cs
-          if:first(t) ?>&nbsp;extends&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
-          call:type_link_impl(t, "true") ?><?cs
-      /each ?><?cs
-  /if ?><?cs
-  if:subcount(type.superBounds) ?><?cs
-      each:t=type.superBounds ?><?cs
-          if:first(t) ?>&nbsp;super&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
-          call:type_link_impl(t, "true") ?><?cs
-      /each ?><?cs
-  /if ?><?cs
-  if:subcount(type.typeArguments)
-      ?>&lt;<?cs each:t=type.typeArguments ?><?cs call:type_link_impl(t, "true") ?><?cs
-          if:!last(t) ?>,&nbsp;<?cs /if ?><?cs
-      /each ?>&gt;<?cs
-  /if ?><?cs
-/def ?>
-
-<?cs def:class_name(type) ?><?cs call:type_link_impl(type, "false") ?><?cs /def ?>
-<?cs def:type_link(type) ?><?cs call:type_link_impl(type, "true") ?><?cs /def ?>
-
-<?cs # a conditional link.
-      if the "condition" parameter evals to true then the link is displayed
-      otherwise only the text is displayed
-?><?cs
-def:cond_link(text, root, path, condition) ?><?cs
-  if:condition ?><a href="<?cs var:root ?><?cs var:path ?>"><?cs /if ?><?cs var:text ?><?cs if:condition ?></a><?cs /if ?><?cs
-/def ?>
-
-
-<?cs # A comma separated parameter list ?><?cs 
-def:parameter_list(params) ?><?cs
-  each:param = params ?><?cs
-      call:type_link(param.type)?> <?cs
-      var:param.name ?><?cs
-      if: name(param)!=subcount(params)-1?>, <?cs /if ?><?cs
-  /each ?><?cs
-/def ?>
-
-<?cs # Print a list of tags (e.g. description text ?><?cs 
-def:tag_list(tags) ?><?cs
-  each:tag = tags ?><?cs
-      if:tag.name == "Text" ?><?cs var:tag.text?><?cs
-      elif:tag.kind == "@more" ?><p><?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><?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
-      elif:tag.kind == "@sdkCurrentVersion" ?><?cs var:sdk.version ?><?cs
-      elif:tag.kind == "@sdkCurrentRelId" ?><?cs var:sdk.rel.id ?><?cs
-      elif:tag.kind == "@sdkPlatformVersion" ?><?cs var:sdk.platform.version ?><?cs
-      elif:tag.kind == "@sdkPlatformApiLevel" ?><?cs var:sdk.platform.apiLevel ?><?cs
-      elif:tag.kind == "@sdkPlatformMajorMinor" ?><?cs var:sdk.platform.majorMinor ?><?cs
-      elif:tag.kind == "@sdkPlatformReleaseDate" ?><?cs var:sdk.platform.releaseDate ?><?cs
-      elif:tag.kind == "@sdkPlatformDeployableDate" ?><?cs var:sdk.platform.deployableDate ?><?cs
-      elif:tag.kind == "@adtZipVersion" ?><?cs var:adt.zip.version ?><?cs
-      elif:tag.kind == "@adtZipDownload" ?><?cs var:adt.zip.download ?><?cs
-      elif:tag.kind == "@adtZipBytes" ?><?cs var:adt.zip.bytes ?><?cs
-      elif:tag.kind == "@adtZipChecksum" ?><?cs var:adt.zip.checksum ?><?cs
-      elif:tag.kind == "@inheritDoc" ?><?cs # This is the case when @inheritDoc is in something
-                                              that doesn't inherit from anything?><?cs
-      elif:tag.kind == "@attr" ?><?cs
-      else ?>{<?cs var:tag.name?> <?cs var:tag.text ?>}<?cs
-      /if ?><?cs
-  /each ?><?cs
-/def ?>
-
-<?cs # The message about This xxx is deprecated. ?><?cs 
-def:deprecated_text(kind) ?>
-  This <?cs var:kind ?> is deprecated.<?cs 
-/def ?>
-
-<?cs # Show the short-form description of something.  These come from shortDescr and deprecated ?><?cs 
-def:short_descr(obj) ?><?cs
-  if:subcount(obj.deprecated) ?>
-      <em><?cs call:deprecated_text(obj.kind) ?>
-      <?cs call:tag_list(obj.deprecated) ?></em><?cs
-  else ?><?cs call:tag_list(obj.shortDescr) ?><?cs
-  /if ?><?cs
-/def ?>
-
-<?cs # Show the red box with the deprecated warning ?><?cs 
-def:deprecated_warning(obj) ?><?cs 
-  if:subcount(obj.deprecated) ?><p>
-  <p class="caution">
-      <strong><?cs call:deprecated_text(obj.kind) ?></strong><br/> <?cs 
-      call:tag_list(obj.deprecated) ?>
-  </p><?cs 
-  /if ?><?cs 
-/def ?>
-
-<?cs # print the See Also: section ?><?cs 
-def:see_also_tags(also) ?><?cs 
-  if:subcount(also) ?>
-  <div class="jd-tagdata">
-      <h5 class="jd-tagtitle">See Also</h5>
-      <ul class="nolist"><?cs 
-        each:tag=also ?><li><?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
-            /if ?></li><?cs 
-        /each ?>
-      </ul>
-  </div><?cs 
-  /if ?>
-<?cs /def ?>
-
-<?cs # print the API Level ?><?cs
-def:since_tags(obj) ?>
-  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.
-       Uses the following fields: deprecated descr seeAlso since ?><?cs
-def:description(obj) ?><?cs 
-  call:deprecated_warning(obj) ?>
-  <div class="jd-tagdata jd-tagdescr"><p><?cs call:tag_list(obj.descr) ?></p></div><?cs 
-  if:subcount(obj.attrRefs) ?>
-  <div class="jd-tagdata">
-      <h5 class="jd-tagtitle">Related XML Attributes</h5>
-      <ul class="nolist"><?cs 
-        each:attr=obj.attrRefs ?>
-            <li><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></li><?cs 
-        /each ?>
-      </ul>
-  </div><?cs 
-  /if ?><?cs 
-  if:subcount(obj.paramTags) ?>
-  <div class="jd-tagdata">
-      <h5 class="jd-tagtitle">Parameters</h5>
-      <table class="jd-tagtable"><?cs 
-      each:tag=obj.paramTags ?>
-        <tr>
-          <th><?cs if:tag.isTypeParameter ?>&lt;<?cs /if ?><?cs var:tag.name
-                  ?><?cs if:tag.isTypeParameter ?>&gt;<?cs /if ?></td>
-          <td><?cs call:tag_list(tag.comment) ?></td>
-        </tr><?cs 
-      /each ?>
-      </table>
-  </div><?cs 
-  /if ?><?cs 
-  if:subcount(obj.returns) ?>
-  <div class="jd-tagdata">
-      <h5 class="jd-tagtitle">Returns</h5>
-      <ul class="nolist"><li><?cs call:tag_list(obj.returns) ?></li></ul>
-  </div><?cs 
-  /if ?><?cs 
-  if:subcount(obj.throws) ?>
-  <div class="jd-tagdata">
-      <h5 class="jd-tagtitle">Throws</h5>
-      <table class="jd-tagtable"><?cs 
-      each:tag=obj.throws ?>  
-        <tr>
-            <th><?cs call:type_link(tag.type) ?></td>
-            <td><?cs call:tag_list(tag.comment) ?></td>
-        </tr><?cs 
-      /each ?>
-      </table>
-  </div><?cs 
-  /if ?><?cs 
-  call:see_also_tags(obj.seeAlso) ?><?cs
-/def ?>
-
-<?cs # A table of links to classes with descriptions, as in a package file or the nested classes ?><?cs
-def:class_link_table(classes) ?><?cs 
-  set:count = #1 ?>
-  <table class="jd-sumtable-expando"><?cs
-      each:cl=classes ?>
-        <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.type.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><?cs set:count = count + #1 ?><?cs
-      /each ?>
-  </table><?cs 
-/def ?>
-
-<?cs # A list of links to classes, for use in the side navigation of classes when viewing a package (panel nav) ?><?cs 
-def:class_link_list(label, classes) ?><?cs 
-  if:subcount(classes) ?>
-    <li><h2><?cs var:label ?></h2>
-      <ul><?cs 
-      each:cl=classes ?>
-        <li class="api apilevel-<?cs var:cl.type.since ?>"><?cs call:type_link(cl.type) ?></li><?cs 
-      /each ?>
-      </ul>
-    </li><?cs 
-  /if ?><?cs 
-/def ?>
-
-<?cs # A list of links to classes, for use in the side navigation of classes when viewing a class (panel nav) ?><?cs 
-def:list(label, classes) ?><?cs 
-  if:subcount(classes) ?>
-    <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 
-      /each ?>
-      </ul>
-    </li><?cs 
-  /if ?><?cs 
-/def ?>
-
-<?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 
-  /each ?><?cs
-/def ?>
-
-<?cs # An expando trigger ?><?cs 
-def:expando_trigger(id, default) ?>
-  <a href="#" onclick="return toggleInherited(this, null)" id="<?cs var:id ?>" class="jd-expando-trigger closed"
-          ><img id="<?cs var:id ?>-trigger"
-          src="<?cs var:toroot ?>assets/images/triangle-<?cs var:default ?>.png"
-          class="jd-expando-trigger-img" /></a><?cs 
-/def ?>
-
-<?cs # An expandable list of classes ?><?cs 
-def:expandable_class_list(id, classes, default) ?>
-  <div id="<?cs var:id ?>">
-      <div id="<?cs var:id ?>-list"
-              class="jd-inheritedlinks"
-              <?cs if:default != "list" ?>style="display: none;"<?cs /if ?>
-              ><?cs 
-          each:cl=classes ?>
-              <?cs call:type_link(cl.type) ?><?cs if:!last(cl) ?>,<?cs /if ?><?cs 
-          /each ?>
-      </div>
-      <div id="<?cs var:id ?>-summary"
-              <?cs if:default != "summary" ?>style="display: none;"<?cs /if ?>
-              ><?cs 
-          call:class_link_table(classes) ?>
-      </div>
-  </div><?cs 
-/def ?>
-
-
-<?cs include:"customization.cs" ?>
diff --git a/tools/droiddoc/templates/navtree_data.cs b/tools/droiddoc/templates/navtree_data.cs
deleted file mode 100644
index c707232..0000000
--- a/tools/droiddoc/templates/navtree_data.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-var NAVTREE_DATA =
-<?cs var:reference_tree ?>
-;
-
diff --git a/tools/droiddoc/templates/nosidenavpage.cs b/tools/droiddoc/templates/nosidenavpage.cs
deleted file mode 100644
index 1dec41e..0000000
--- a/tools/droiddoc/templates/nosidenavpage.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation">
-<a name="top"></a>
-<?cs call:custom_masthead() ?>
-
-<div id="body-content">
-<div id="doc-content" style="position:relative;">
-
-<?cs call:tag_list(root.descr) ?>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
-
-
-
diff --git a/tools/droiddoc/templates/package-descr.cs b/tools/droiddoc/templates/package-descr.cs
deleted file mode 100644
index 08fee18..0000000
--- a/tools/droiddoc/templates/package-descr.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?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 ?></b></h1>
-  <div class="jd-nav">
-      <a class="jd-navlink" href="package-summary.html">Classes</a> | Description
-  </div>
-</div><!-- end header -->
-
-<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 include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div> <!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/package-list.cs b/tools/droiddoc/templates/package-list.cs
deleted file mode 100644
index 7f0f889..0000000
--- a/tools/droiddoc/templates/package-list.cs
+++ /dev/null
@@ -1,2 +0,0 @@
-<?cs each:pkg=docs.packages ?><?cs var: pkg.name ?>
-<?cs /each ?>
diff --git a/tools/droiddoc/templates/package.cs b/tools/droiddoc/templates/package.cs
deleted file mode 100644
index b29bc77..0000000
--- a/tools/droiddoc/templates/package.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?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>
-      <?cs /if ?>
-  </div>
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-<?cs var:package.since ?>">
-
-<?cs if:subcount(package.shortDescr) ?>
-  <div class="jd-descr">
-  <p><?cs call:tag_list(package.shortDescr) ?></p>
-  <p><span class="jd-more"><a href="package-descr.html">more...</a></span></p>
-  </div>
-<?cs /if ?>
-
-<?cs def:class_table(label, classes) ?>
-  <?cs if:subcount(classes) ?>
-    <h3><?cs var:label ?></h3>
-    <div class="jd-sumtable">
-    <?cs call:class_link_table(classes) ?>
-    </div>
-  <?cs /if ?>
-<?cs /def ?>
-
-<?cs call:class_table("Interfaces", package.interfaces) ?>
-<?cs call:class_table("Classes", package.classes) ?>
-<?cs call:class_table("Enums", package.enums) ?>
-<?cs call:class_table("Exceptions", package.exceptions) ?>
-<?cs call:class_table("Errors", package.errors) ?>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div><!-- doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/packages.cs b/tools/droiddoc/templates/packages.cs
deleted file mode 100644
index 8650ad1..0000000
--- a/tools/droiddoc/templates/packages.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation">
-<?cs include:"header.cs" ?>
-
-<div class="g-unit" id="doc-content">
-
-<div id="jd-header">
-<h1><?cs var:page.title ?></h1>
-</div>
-
-<div id="jd-content">
-
-<div class="jd-descr">
-<p><?cs call:tag_list(root.descr) ?></p>
-</div>
-
-<?cs set:count = #1 ?>
-<table class="jd-sumtable">
-<?cs each:pkg = docs.packages ?>
-    <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) ?></td>
-    </tr>
-<?cs set:count = count + #1 ?>
-<?cs /each ?>
-</table>
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div> <!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/sample.cs b/tools/droiddoc/templates/sample.cs
deleted file mode 100644
index 7979b2a..0000000
--- a/tools/droiddoc/templates/sample.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-<?cs include:"doctype.cs" ?>
-<?cs include:"macros.cs" ?>
-<?cs set:resources="true" ?>
-<html>
-<?cs include:"head_tag.cs" ?>
-<?cs include:"header.cs" ?>
-<body class="gc-documentation">
-
-
-<a name="top"></a>
-<div class="g-unit" id="doc-content">
- <div id="jd-header" class="guide-header">
-  <span class="crumb">&nbsp;</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>&lt;sdk&gt;/platforms/android-&lt;version&gt;/samples/...</code></p>
-
-<!-- begin file contents -->
-<pre><?cs var:fileContents ?></pre>
-<!-- end file contents -->
-
-<?cs include:"footer.cs" ?>
-</div><!-- end jd-content -->
-</div> <!-- end doc-content -->
-
-<?cs include:"trailer.cs" ?>
-
-</body>
-</html>
diff --git a/tools/droiddoc/templates/todo.cs b/tools/droiddoc/templates/todo.cs
deleted file mode 100644
index e9f7237..0000000
--- a/tools/droiddoc/templates/todo.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <title><?cs var:page.title ?></title>
-    <style type="text/css">
-    table {
-        border-width: 1px 1px 1px 1px;
-        border-spacing: 0px;
-        border-style: solid solid solid solid;
-        border-color: black black black black;
-        border-collapse: collapse;
-        background-color: white;
-    }
-    table th {
-        border-width: 1px 1px 1px 1px;
-        padding: 1px 4px 1px 3px;
-        border-style: inset inset inset inset;
-        border-color: gray gray gray gray;
-        background-color: white;
-    }
-    table td {
-        border-width: 1px 1px 1px 1px;
-        padding: 1px 4px 1px 3px;
-        border-style: inset inset inset inset;
-        border-color: gray gray gray gray;
-        background-color: white;
-    }
-    </style>
-</head>
-<body>
-<h1><?cs var:page.title ?></h1>
-
-<h2>Overall</h2>
-<table>
-<tr><th>Errors</th><td><?cs var:all.errorCount ?></td></tr>
-<tr><th>Percent Good</th><td><?cs var:all.percentGood ?></td></tr>
-<tr><th>Total Comments</th><td><?cs var:all.totalCount ?></td></tr>
-</table>
-
-<h2>Package Summary</h2>
-
-<table>
-<tr>
-    <th>Package</th>
-    <th>Errors</th>
-    <th>Percent Good</th>
-    <th>Total</th>
-</tr>
-<?cs each:pkg=packages ?>
-<tr>
-    <td><?cs var:pkg.name ?></td>
-    <td><?cs var:pkg.errorCount ?></td>
-    <td><?cs var:pkg.percentGood ?></td>
-    <td><?cs var:pkg.totalCount ?></td>
-</tr>
-<?cs /each ?>
-</table>
-
-
-<h2>Class Summary</h3>
-
-<table>
-<tr>
-    <th>Class</th>
-    <th>Errors</th>
-    <th>Percent Good</th>
-    <th>Total</th>
-</tr>
-<?cs each:cl=classes ?>
-<tr>
-    <td><a href="#class_<?cs var:cl.qualified ?>"><?cs var:cl.qualified ?></a></td>
-    <td><?cs var:cl.errorCount ?></td>
-    <td><?cs var:cl.percentGood ?></td>
-    <td><?cs var:cl.totalCount ?></td>
-</tr>
-<?cs /each ?>
-</table>
-
-<h2>Detail</h2>
-
-<?cs each:cl=classes ?>
-<h3><a name="class_<?cs var:cl.qualified ?>"><?cs var:cl.qualified ?></a></h3>
-<p>Errors: <?cs var:cl.errorCount ?><br/>
-Total: <?cs var:cl.totalCount ?><br/>
-Percent Good: <?cs var:cl.percentGood ?></p>
-<table>
-<?cs each:err=cl.errors ?>
-<tr>
-    <td><?cs var:err.pos ?></td>
-    <td><?cs var:err.name ?></td>
-    <td><?cs var:err.descr ?></td>
-</tr>
-<?cs /each ?>
-</table>
-
-<?cs /each ?>
-
-</body>
-</html>
diff --git a/tools/event_log_tags.py b/tools/event_log_tags.py
index 81e8b39..645839e 100644
--- a/tools/event_log_tags.py
+++ b/tools/event_log_tags.py
@@ -90,6 +90,14 @@
         else:
           description = None
 
+        if description:
+          # EventLog.java checks that the description field is
+          # surrounded by parens, so we should too (to avoid a runtime
+          # crash from badly-formatted descriptions).
+          if not re.match(r"\(.*\)\s*$", description):
+            self.AddError("tag \"%s\" has unparseable description" % (tagname,))
+            continue
+
         self.tags.append(Tag(tag, tagname, description,
                              self.filename, self.linenum))
     except (IOError, OSError), e:
diff --git a/tools/kcm/Android.mk b/tools/kcm/Android.mk
deleted file mode 100644
index 130a13a..0000000
--- a/tools/kcm/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2007 The Android Open Source Project
-#
-# Copies files into the directory structure described by a manifest
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-	kcm.cpp
-
-LOCAL_MODULE := kcm
-
-include $(BUILD_HOST_EXECUTABLE)
-
-
diff --git a/tools/kcm/kcm.cpp b/tools/kcm/kcm.cpp
deleted file mode 100644
index 23ac377..0000000
--- a/tools/kcm/kcm.cpp
+++ /dev/null
@@ -1,421 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <ui/KeycodeLabels.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <map>
-#include <string>
-#include <utils/ByteOrder.h>
-
-using namespace std;
-
-enum {
-    LENDIAN,
-    BENDIAN
-};
-
-/*
- * 1: KeyEvent name
- * 2: display_label
- * 3: number
- * 4..7: base, shift, alt, shift-alt
- */
-#define COLUMNS (3+4)
-
-struct KeyRecord
-{
-    int lineno;
-    int values[COLUMNS];
-};
-
-struct PropValue
-{
-    PropValue() { lineno = -1; }
-    PropValue(const PropValue& that) { lineno=that.lineno; value=that.value; }
-    PropValue(int l, const string& v) { lineno = l; value = v; }
-
-    int lineno;
-    string value;
-};
-
-static int usage();
-
-//  0 -- ok
-// >0 -- error
-static int parse_key_line(const char* filename, int lineno, char* line,
-        KeyRecord* out);
-static int write_kr(int fd, const KeyRecord& kr);
-
-int g_endian;
-
-int
-main(int argc, char** argv)
-{
-    int err;
-    if (argc != 3) {
-        return usage();
-    }
-
-    const char* filename = argv[1];
-    const char* outfilename = argv[2];
-
-    int in = open(filename, O_RDONLY);
-    if (in == -1) {
-        fprintf(stderr, "kcm: error opening file for read: %s\n", filename);
-        return 1;
-    }
-
-    off_t size = lseek(in, 0, SEEK_END);
-    lseek(in, 0, SEEK_SET);
-
-    char* input = (char*)malloc(size+1);
-    read(in, input, size);
-    input[size] = '\0';
-
-    close(in);
-    in = -1;
-
-    map<string,PropValue> properties;
-    map<int,KeyRecord> keys;
-    int errorcount = 0;
-    int lineno = 1;
-    char *thisline = input;
-    while (*thisline) {
-        KeyRecord kr;
-        char *nextline = thisline;
-        
-        while (*nextline != '\0' && *nextline != '\n' && *nextline != '\r') {
-            nextline++;
-        }
-
-        // eat whitespace, but not newlines
-        while (*thisline != '\0' && (*thisline == ' ' || *thisline == '\t')) {
-            thisline++;
-        }
-
-        // find the end of the line
-        char lineend = *nextline;
-        *nextline = '\0';
-        if (lineend == '\r' && nextline[1] == '\n') {
-            nextline++;
-        }
-
-        if (*thisline == '\0' || *thisline == '\r' || *thisline == '\n'
-                 || *thisline == '#') {
-            // comment or blank line
-        }
-        else if (*thisline == '[') {
-            // property - syntax [name=value]
-            // look for =
-            char* prop = thisline+1;
-            char* end = prop;
-            while (*end != '\0' && *end != '=') {
-                end++;
-            }
-            if (*end != '=') {
-                fprintf(stderr, "%s:%d: invalid property line: %s\n",
-                        filename, lineno, thisline);
-                errorcount++;
-            } else {
-                *end = '\0';
-                char* value = end+1;
-                end = nextline;
-                while (end > prop && *end != ']') {
-                    end--;
-                }
-                if (*end != ']') {
-                    fprintf(stderr, "%s:%d: property missing closing ]: %s\n",
-                            filename, lineno, thisline);
-                    errorcount++;
-                } else {
-                    *end = '\0';
-                    properties[prop] = PropValue(lineno, value);
-                }
-            }
-        }
-        else {
-            // key
-            err = parse_key_line(filename, lineno, thisline, &kr);
-            if (err == 0) {
-                kr.lineno = lineno;
-
-                map<int,KeyRecord>::iterator old = keys.find(kr.values[0]);
-                if (old != keys.end()) {
-                    fprintf(stderr, "%s:%d: keycode %d already defined\n",
-                            filename, lineno, kr.values[0]);
-                    fprintf(stderr, "%s:%d: previously defined here\n",
-                            filename, old->second.lineno);
-                    errorcount++;
-                }
-
-                keys[kr.values[0]] = kr;
-            }
-            else if (err > 0) {
-                errorcount += err;
-            }
-        }
-        lineno++;
-
-        nextline++;
-        thisline = nextline;
-
-        if (errorcount > 20) {
-            fprintf(stderr, "%s:%d: too many errors.  stopping.\n", filename,
-                    lineno);
-            return 1;
-        }
-    }
-
-    free(input);
-
-    map<string,PropValue>::iterator sit = properties.find("type");
-    if (sit == properties.end()) {
-        fprintf(stderr, "%s: key character map must contain type property.\n",
-		argv[0]);
-        errorcount++;
-    }
-    PropValue pv = sit->second;
-    unsigned char kbdtype = 0;
-    if (pv.value == "NUMERIC") {
-        kbdtype = 1;
-    }
-    else if (pv.value == "Q14") {
-        kbdtype = 2;
-    }
-    else if (pv.value == "QWERTY") {
-        kbdtype = 3;
-    }
-    else {
-        fprintf(stderr, "%s:%d: keyboard type must be one of NUMERIC, Q14 "
-                " or QWERTY, not %s\n", filename, pv.lineno, pv.value.c_str());
-    }
-
-    if (errorcount != 0) {
-        return 1;
-    }
-
-    int out = open(outfilename, O_RDWR|O_CREAT|O_TRUNC, 0664);
-    if (out == -1) {
-        fprintf(stderr, "kcm: error opening file for write: %s\n", outfilename);
-        return 1;
-    }
-
-    int count = keys.size();
-    
-    map<int,KeyRecord>::iterator it;
-    int n;
-
-    /**
-     * File Format:
-     *    Offset    Description     Value
-     *    0         magic string    "keychar"
-     *    8         endian marker   0x12345678
-     *    12        version         0x00000002
-     *    16        key count       number of key entries
-     *    20        keyboard type   NUMERIC, Q14, QWERTY, etc.
-     *    21        padding         0
-     *    32        the keys
-     */
-    err = write(out, "keychar", 8);
-    if (err == -1) goto bad_write;
-
-    n = htodl(0x12345678);
-    err = write(out, &n, 4);
-    if (err == -1) goto bad_write;
-
-    n = htodl(0x00000002);
-    err = write(out, &n, 4);
-    if (err == -1) goto bad_write;
-
-    n = htodl(count);
-    err = write(out, &n, 4);
-    if (err == -1) goto bad_write;
-
-    err = write(out, &kbdtype, 1);
-    if (err == -1) goto bad_write;
-
-    char zero[11];
-    memset(zero, 0, 11);
-    err = write(out, zero, 11);
-    if (err == -1) goto bad_write;
-
-    for (it = keys.begin(); it != keys.end(); it++) {
-        const KeyRecord& kr = it->second;
-        /*
-        printf("%2d/ [%d] [%d] [%d] [%d] [%d] [%d] [%d]\n", kr.lineno,
-                kr.values[0], kr.values[1], kr.values[2], kr.values[3],
-                kr.values[4], kr.values[5], kr.values[6]);
-        */
-        err = write_kr(out, kr);
-        if (err == -1) goto bad_write;
-    }
-
-    close(out);
-    return 0;
-
-bad_write:
-    fprintf(stderr, "kcm: fatal error writing to file: %s\n", outfilename);
-    close(out);
-    unlink(outfilename);
-    return 1;
-}
-
-static int usage()
-{
-    fprintf(stderr,
-            "usage: kcm INPUT OUTPUT\n"
-            "\n"
-            "INPUT   keycharmap file\n"
-            "OUTPUT  compiled keycharmap file\n"
-        );
-    return 1;
-}
-
-static int
-is_whitespace(const char* p)
-{
-    while (*p) {
-        if (!isspace(*p)) {
-            return 0;
-        }
-        p++;
-    }
-    return 1;
-}
-
-
-static int
-parse_keycode(const char* filename, int lineno, char* str, int* value)
-{
-    const KeycodeLabel *list = KEYCODES;
-    while (list->literal) {
-        if (0 == strcmp(str, list->literal)) {
-            *value = list->value;
-            return 0;
-        }
-        list++;
-    }
-
-    char* endptr;
-    *value = strtol(str, &endptr, 0);
-    if (*endptr != '\0') {
-        fprintf(stderr, "%s:%d: expected keycode label or number near: "
-                "%s\n", filename, lineno, str);
-        return 1;
-    }
-
-    if (*value == 0) {
-        fprintf(stderr, "%s:%d: 0 is not a valid keycode.\n",
-                filename, lineno);
-        return 1;
-    }
-
-    return 0;
-}
-
-static int
-parse_number(const char* filename, int lineno, char* str, int* value)
-{
-    int len = strlen(str);
-
-    if (len == 3 && str[0] == '\'' && str[2] == '\'') {
-        if (str[1] > 0 && str[1] < 127) {
-            *value = (int)str[1];
-            return 0;
-        } else {
-            fprintf(stderr, "%s:%d: only low ascii characters are allowed in"
-                    " quotes near: %s\n", filename, lineno, str);
-            return 1;
-        }
-    }
-
-    char* endptr;
-    *value = strtol(str, &endptr, 0);
-    if (*endptr != '\0') {
-        fprintf(stderr, "%s:%d: expected number or quoted ascii but got: %s\n",
-                filename, lineno, str);
-        return 1;
-    }
-
-    if (*value >= 0xfffe || *value < 0) {
-        fprintf(stderr, "%s:%d: unicode char out of range (no negatives, "
-                "nothing larger than 0xfffe): %s\n", filename, lineno, str);
-        return 1;
-    }
-
-    return 0;
-}
-
-static int
-parse_key_line(const char* filename, int lineno, char* line, KeyRecord* out)
-{
-    char* p = line;
-
-    int len = strlen(line);
-    char* s[COLUMNS];
-    for (int i=0; i<COLUMNS; i++) {
-        s[i] = (char*)malloc(len+1);
-    }
-
-    for (int i = 0; i < COLUMNS; i++) {
-        while (*p != '\0' && isspace(*p)) {
-            p++;
-        }
-
-        if (*p == '\0') {
-            fprintf(stderr, "%s:%d: not enough on this line: %s\n", filename,
-                    lineno, line);
-            return 1;
-        }
-
-        char *p1 = p;
-        while (*p != '\0' && !isspace(*p)) {
-            p++;
-        }
-
-        memcpy(s[i], p1, p - p1);
-        s[i][p - p1] = '\0';
-    }
-
-    while (*p != '\0' && isspace(*p)) {
-        *p++;
-    }
-    if (*p != '\0') {
-        fprintf(stderr, "%s:%d: too much on one line near: %s\n", filename,
-                lineno, p);
-        fprintf(stderr, "%s:%d: -->%s<--\n", filename, lineno, line);
-        return 1;
-    }
-
-    int errorcount = parse_keycode(filename, lineno, s[0], &out->values[0]);
-    for (int i=1; i<COLUMNS && errorcount == 0; i++) {
-        errorcount += parse_number(filename, lineno, s[i], &out->values[i]);
-    }
-
-    return errorcount;
-}
-
-struct WrittenRecord
-{
-    unsigned int keycode;       // 4 bytes
-    unsigned short values[COLUMNS - 1];   // 6*2 bytes = 12
-                                // 16 bytes total 
-};
-
-static int
-write_kr(int fd, const KeyRecord& kr)
-{
-    WrittenRecord wr;
-
-    wr.keycode = htodl(kr.values[0]);
-    for (int i=0; i<COLUMNS - 1; i++) {
-        wr.values[i] = htods(kr.values[i+1]);
-    }
-
-    return write(fd, &wr, sizeof(WrittenRecord));
-}
-
diff --git a/tools/releasetools/check_target_files_signatures b/tools/releasetools/check_target_files_signatures
index 99bc801..1325ef4 100755
--- a/tools/releasetools/check_target_files_signatures
+++ b/tools/releasetools/check_target_files_signatures
@@ -116,7 +116,7 @@
         self.certs[cert] = self.certs[cert] + "," + name
     else:
       if name is None:
-        name = "unknown cert %s (%s)" % (sha1(cert).hexdigest()[:12],
+        name = "unknown cert %s (%s)" % (common.sha1(cert).hexdigest()[:12],
                                          GetCertSubject(cert))
       self.certs[cert] = name
 
@@ -249,7 +249,7 @@
     self.max_fn_len = 20
 
   def LoadZipFile(self, filename):
-    d = common.UnzipTemp(filename, '*.apk')
+    d, z = common.UnzipTemp(filename, '*.apk')
     try:
       self.apks = {}
       self.apks_by_basename = {}
@@ -267,7 +267,6 @@
     finally:
       shutil.rmtree(d)
 
-    z = zipfile.ZipFile(open(filename, "rb"))
     self.certmap = common.ReadApkCerts(z)
     z.close()
 
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index fd098ea..2cb5680 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -165,11 +165,27 @@
     p.mount_point = pieces[0]
     p.fs_type = pieces[1]
     p.device = pieces[2]
-    if len(pieces) == 4:
-      p.device2 = pieces[3]
+    p.length = 0
+    options = None
+    if len(pieces) >= 4:
+      if pieces[3].startswith("/"):
+        p.device2 = pieces[3]
+        if len(pieces) >= 5:
+          options = pieces[4]
+      else:
+        p.device2 = None
+        options = pieces[3]
     else:
       p.device2 = None
 
+    if options:
+      options = options.split(",")
+      for i in options:
+        if i.startswith("length="):
+          p.length = int(i[7:])
+        else:
+          print "%s: unknown option \"%s\"" % (p.mount_point, i)
+
     d[p.mount_point] = p
   return d
 
@@ -178,23 +194,6 @@
   for k, v in sorted(d.items()):
     print "%-25s = (%s) %s" % (k, type(v).__name__, v)
 
-def BuildAndAddBootableImage(sourcedir, targetname, output_zip, info_dict):
-  """Take a kernel, cmdline, and ramdisk directory from the input (in
-  'sourcedir'), and turn them into a boot image.  Put the boot image
-  into the output zip file under the name 'targetname'.  Returns
-  targetname on success or None on failure (if sourcedir does not
-  appear to contain files for the requested image)."""
-
-  print "creating %s..." % (targetname,)
-
-  img = BuildBootableImage(sourcedir)
-  if img is None:
-    return None
-
-  CheckSize(img, targetname, info_dict)
-  ZipWriteStr(output_zip, targetname, img)
-  return targetname
-
 def BuildBootableImage(sourcedir):
   """Take a kernel, cmdline, and ramdisk directory from the input (in
   'sourcedir'), and turn them into a boot image.  Return the image
@@ -252,28 +251,53 @@
   return data
 
 
-def AddRecovery(output_zip, info_dict):
-  BuildAndAddBootableImage(os.path.join(OPTIONS.input_tmp, "RECOVERY"),
-                           "recovery.img", output_zip, info_dict)
+def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir):
+  """Return a File object (with name 'name') with the desired bootable
+  image.  Look for it in 'unpack_dir'/BOOTABLE_IMAGES under the name
+  'prebuilt_name', otherwise construct it from the source files in
+  'unpack_dir'/'tree_subdir'."""
 
-def AddBoot(output_zip, info_dict):
-  BuildAndAddBootableImage(os.path.join(OPTIONS.input_tmp, "BOOT"),
-                           "boot.img", output_zip, info_dict)
+  prebuilt_path = os.path.join(unpack_dir, "BOOTABLE_IMAGES", prebuilt_name)
+  if os.path.exists(prebuilt_path):
+    print "using prebuilt %s..." % (prebuilt_name,)
+    return File.FromLocalFile(name, prebuilt_path)
+  else:
+    print "building image from target_files %s..." % (tree_subdir,)
+    return File(name, BuildBootableImage(os.path.join(unpack_dir, tree_subdir)))
+
 
 def UnzipTemp(filename, pattern=None):
-  """Unzip the given archive into a temporary directory and return the name."""
+  """Unzip the given archive into a temporary directory and return the name.
+
+  If filename is of the form "foo.zip+bar.zip", unzip foo.zip into a
+  temp dir, then unzip bar.zip into that_dir/BOOTABLE_IMAGES.
+
+  Returns (tempdir, zipobj) where zipobj is a zipfile.ZipFile (of the
+  main file), open for reading.
+  """
 
   tmp = tempfile.mkdtemp(prefix="targetfiles-")
   OPTIONS.tempfiles.append(tmp)
-  cmd = ["unzip", "-o", "-q", filename, "-d", tmp]
-  if pattern is not None:
-    cmd.append(pattern)
-  p = Run(cmd, stdout=subprocess.PIPE)
-  p.communicate()
-  if p.returncode != 0:
-    raise ExternalError("failed to unzip input target-files \"%s\"" %
-                        (filename,))
-  return tmp
+
+  def unzip_to_dir(filename, dirname):
+    cmd = ["unzip", "-o", "-q", filename, "-d", dirname]
+    if pattern is not None:
+      cmd.append(pattern)
+    p = Run(cmd, stdout=subprocess.PIPE)
+    p.communicate()
+    if p.returncode != 0:
+      raise ExternalError("failed to unzip input target-files \"%s\"" %
+                          (filename,))
+
+  m = re.match(r"^(.*[.]zip)\+(.*[.]zip)$", filename, re.IGNORECASE)
+  if m:
+    unzip_to_dir(m.group(1), tmp)
+    unzip_to_dir(m.group(2), os.path.join(tmp, "BOOTABLE_IMAGES"))
+    filename = m.group(1)
+  else:
+    unzip_to_dir(filename, tmp)
+
+  return tmp, zipfile.ZipFile(filename, "r")
 
 
 def GetKeyPasswords(keylist):
@@ -330,7 +354,7 @@
   else:
     sign_name = output_name
 
-  cmd = ["java", "-Xmx512m", "-jar",
+  cmd = ["java", "-Xmx2048m", "-jar",
            os.path.join(OPTIONS.search_path, "framework", "signapk.jar")]
   if whole_file:
     cmd.append("-w")
@@ -371,18 +395,17 @@
     # image size should be increased by 1/64th to account for the
     # spare area (64 bytes per 2k page)
     limit = limit / 2048 * (2048+64)
-
-  size = len(data)
-  pct = float(size) * 100.0 / limit
-  msg = "%s size (%d) is %.2f%% of limit (%d)" % (target, size, pct, limit)
-  if pct >= 99.0:
-    raise ExternalError(msg)
-  elif pct >= 95.0:
-    print
-    print "  WARNING: ", msg
-    print
-  elif OPTIONS.verbose:
-    print "  ", msg
+    size = len(data)
+    pct = float(size) * 100.0 / limit
+    msg = "%s size (%d) is %.2f%% of limit (%d)" % (target, size, pct, limit)
+    if pct >= 99.0:
+      raise ExternalError(msg)
+    elif pct >= 95.0:
+      print
+      print "  WARNING: ", msg
+      print
+    elif OPTIONS.verbose:
+      print "  ", msg
 
 
 def ReadApkCerts(tf_zip):
@@ -665,6 +688,13 @@
     self.size = len(data)
     self.sha1 = sha1(data).hexdigest()
 
+  @classmethod
+  def FromLocalFile(cls, name, diskname):
+    f = open(diskname, "rb")
+    data = f.read()
+    f.close()
+    return File(name, data)
+
   def WriteToTemp(self):
     t = tempfile.NamedTemporaryFile()
     t.write(self.data)
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index a7c8e32..6c53f9e 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -161,11 +161,13 @@
     """Format the given partition, specified by its mount point (eg,
     "/system")."""
 
+    reserve_size = 0
     fstab = self.info.get("fstab", None)
     if fstab:
       p = fstab[partition]
-      self.script.append('format("%s", "%s", "%s");' %
-                         (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device))
+      self.script.append('format("%s", "%s", "%s", "%s");' %
+                         (p.fs_type, common.PARTITION_TYPES[p.fs_type],
+                          p.device, p.length))
 
   def DeleteFiles(self, file_list):
     """Delete all files in file_list."""
@@ -187,18 +189,6 @@
     cmd = "".join(cmd)
     self.script.append(self._WordWrap(cmd))
 
-  def WriteFirmwareImage(self, kind, fn):
-    """Arrange to update the given firmware image (kind must be
-    "hboot" or "radio") when recovery finishes."""
-    if self.version == 1:
-      self.script.append(
-          ('assert(package_extract_file("%(fn)s", "/tmp/%(kind)s.img"),\n'
-           '       write_firmware_image("/tmp/%(kind)s.img", "%(kind)s"));')
-          % {'kind': kind, 'fn': fn})
-    else:
-      self.script.append(
-          'write_firmware_image("PACKAGE:%s", "%s");' % (fn, kind))
-
   def WriteRawImage(self, mount_point, fn):
     """Write the given package file into the partition for the given
     mount point."""
@@ -239,6 +229,20 @@
              ",\0".join(['"' + i + '"' for i in sorted(links)]) + ");")
       self.script.append(self._WordWrap(cmd))
 
+  def RetouchBinaries(self, file_list):
+    """Execute the retouch instructions in files listed."""
+    cmd = ('retouch_binaries(' +
+           ', '.join(['"' + i[0] + '", "' + i[1] + '"' for i in file_list]) +
+           ');')
+    self.script.append(self._WordWrap(cmd))
+
+  def UndoRetouchBinaries(self, file_list):
+    """Undo the retouching (retouch to zero offset)."""
+    cmd = ('undo_retouch_binaries(' +
+           ', '.join(['"' + i[0] + '", "' + i[1] + '"' for i in file_list]) +
+           ');')
+    self.script.append(self._WordWrap(cmd))
+
   def AppendExtra(self, extra):
     """Append text verbatim to the output script."""
     self.script.append(extra)
diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files
index 4a23ab4..c5b9886 100755
--- a/tools/releasetools/img_from_target_files
+++ b/tools/releasetools/img_from_target_files
@@ -23,6 +23,10 @@
   -b  (--board_config)  <file>
       Deprecated.
 
+  -z  (--bootable_zip)
+      Include only the bootable images (eg 'boot' and 'recovery') in
+      the output.
+
 """
 
 import sys
@@ -78,7 +82,7 @@
     build_command.append(user_dir)
     build_command.append(img.name)
 
-  p = common.Run(build_command)
+  p = common.Run(build_command);
   p.communicate()
   assert p.returncode == 0, "build userdata.img image failed"
 
@@ -149,35 +153,44 @@
 
 
 def main(argv):
+  bootable_only = [False]
 
   def option_handler(o, a):
     if o in ("-b", "--board_config"):
       pass       # deprecated
+    if o in ("-z", "--bootable_zip"):
+      bootable_only[0] = True
     else:
       return False
     return True
 
   args = common.ParseOptions(argv, __doc__,
-                             extra_opts="b:",
-                             extra_long_opts=["board_config="],
+                             extra_opts="b:z",
+                             extra_long_opts=["board_config=",
+                                              "bootable_zip"],
                              extra_option_handler=option_handler)
 
+  bootable_only = bootable_only[0]
+
   if len(args) != 2:
     common.Usage(__doc__)
     sys.exit(1)
 
-  OPTIONS.input_tmp = common.UnzipTemp(args[0])
-
-  input_zip = zipfile.ZipFile(args[0], "r")
+  OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
   OPTIONS.info_dict = common.LoadInfoDict(input_zip)
 
   output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
 
-  common.AddBoot(output_zip, OPTIONS.info_dict)
-  common.AddRecovery(output_zip, OPTIONS.info_dict)
-  AddSystem(output_zip)
-  AddUserdata(output_zip)
-  CopyInfo(output_zip)
+  common.GetBootableImage(
+      "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT").AddToZip(output_zip)
+  common.GetBootableImage(
+      "recovery.img", "recovery.img", OPTIONS.input_tmp,
+      "RECOVERY").AddToZip(output_zip)
+
+  if not bootable_only:
+    AddSystem(output_zip)
+    AddUserdata(output_zip)
+    CopyInfo(output_zip)
 
   print "cleaning up..."
   output_zip.close()
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 78f37db..aead38f 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -44,6 +44,8 @@
   -e  (--extra_script)  <file>
       Insert the contents of file at the end of the update script.
 
+  -a  (--aslr_mode)  <on|off>
+      Specify whether to turn on ASLR for the package (on by default).
 """
 
 import sys
@@ -78,6 +80,7 @@
 OPTIONS.wipe_user_data = False
 OPTIONS.omit_prereq = False
 OPTIONS.extra_script = None
+OPTIONS.aslr_mode = True
 OPTIONS.worker_threads = 3
 
 def MostPopularKey(d, default):
@@ -94,6 +97,10 @@
   symlink."""
   return (info.external_attr >> 16) == 0120777
 
+def IsRegular(info):
+  """Return true if the zipfile.ZipInfo object passed in represents a
+  symlink."""
+  return (info.external_attr >> 28) == 010
 
 class Item:
   """Items represent the metadata (user, group, mode) of files and
@@ -248,13 +255,15 @@
                     substitute=None):
   """Copies files underneath system/ in the input zip to the output
   zip.  Populates the Item class with their metadata, and returns a
-  list of symlinks.  output_zip may be None, in which case the copy is
-  skipped (but the other side effects still happen).  substitute is an
-  optional dict of {output filename: contents} to be output instead of
-  certain input files.
+  list of symlinks as well as a list of files that will be retouched.
+  output_zip may be None, in which case the copy is skipped (but the
+  other side effects still happen).  substitute is an optional dict
+  of {output filename: contents} to be output instead of certain input
+  files.
   """
 
   symlinks = []
+  retouch_files = []
 
   for info in input_zip.infolist():
     if info.filename.startswith("SYSTEM/"):
@@ -272,6 +281,9 @@
             data = substitute[fn]
           else:
             data = input_zip.read(info.filename)
+          if info.filename.startswith("SYSTEM/lib/") and IsRegular(info):
+            retouch_files.append(("/system/" + basefilename,
+                                  common.sha1(data).hexdigest()))
           output_zip.writestr(info2, data)
         if fn.endswith("/"):
           Item.Get(fn[:-1], dir=True)
@@ -279,7 +291,7 @@
           Item.Get(fn, dir=False)
 
   symlinks.sort()
-  return symlinks
+  return (symlinks, retouch_files)
 
 
 def SignOutput(temp_zip_name, output_zip_name):
@@ -304,7 +316,8 @@
   patching and install the new recovery image.
 
   recovery_img and boot_img should be File objects for the
-  corresponding images.
+  corresponding images.  info should be the dictionary returned by
+  common.LoadInfoDict() on the input target_files.
 
   Returns an Item for the shell script, which must be made
   executable.
@@ -322,7 +335,7 @@
   # we check to see if this recovery has already been installed by
   # testing just the first 2k.
   HEADER_SIZE = 2048
-  header_sha1 = sha1(recovery_img.data[:HEADER_SIZE]).hexdigest()
+  header_sha1 = common.sha1(recovery_img.data[:HEADER_SIZE]).hexdigest()
   sh = """#!/system/bin/sh
 if ! applypatch -c %(recovery_type)s:%(recovery_device)s:%(header_size)d:%(header_sha1)s; then
   log -t recovery "Installing new recovery image"
@@ -382,13 +395,17 @@
   script.UnpackPackageDir("recovery", "/system")
   script.UnpackPackageDir("system", "/system")
 
-  symlinks = CopySystemFiles(input_zip, output_zip)
+  (symlinks, retouch_files) = CopySystemFiles(input_zip, output_zip)
   script.MakeSymlinks(symlinks)
+  if OPTIONS.aslr_mode:
+    script.RetouchBinaries(retouch_files)
+  else:
+    script.UndoRetouchBinaries(retouch_files)
 
-  boot_img = common.File("boot.img", common.BuildBootableImage(
-      os.path.join(OPTIONS.input_tmp, "BOOT")))
-  recovery_img = common.File("recovery.img", common.BuildBootableImage(
-      os.path.join(OPTIONS.input_tmp, "RECOVERY")))
+  boot_img = common.GetBootableImage("boot.img", "boot.img",
+                                     OPTIONS.input_tmp, "BOOT")
+  recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
+                                         OPTIONS.input_tmp, "RECOVERY")
   MakeRecoveryPatch(output_zip, recovery_img, boot_img)
 
   Item.GetMetadata(input_zip)
@@ -424,12 +441,17 @@
   """Load all the files from SYSTEM/... in a given target-files
   ZipFile, and return a dict of {filename: File object}."""
   out = {}
+  retouch_files = []
   for info in z.infolist():
     if info.filename.startswith("SYSTEM/") and not IsSymlink(info):
-      fn = "system/" + info.filename[7:]
+      basefilename = info.filename[7:]
+      fn = "system/" + basefilename
       data = z.read(info.filename)
       out[fn] = common.File(fn, data)
-  return out
+      if info.filename.startswith("SYSTEM/lib/") and IsRegular(info):
+        retouch_files.append(("/system/" + basefilename,
+                              out[fn].sha1))
+  return (out, retouch_files)
 
 
 def GetBuildProp(property, z):
@@ -451,7 +473,7 @@
   if source_version == 0:
     print ("WARNING: generating edify script for a source that "
            "can't install it.")
-  script = edify_generator.EdifyGenerator(source_version, OPTIONS.info_dict)
+  script = edify_generator.EdifyGenerator(source_version, OPTIONS.target_info_dict)
 
   metadata = {"pre-device": GetBuildProp("ro.product.device", source_zip),
               "post-timestamp": GetBuildProp("ro.build.date.utc", target_zip),
@@ -468,9 +490,9 @@
       info_dict=OPTIONS.info_dict)
 
   print "Loading target..."
-  target_data = LoadSystemFiles(target_zip)
+  (target_data, target_retouch_files) = LoadSystemFiles(target_zip)
   print "Loading source..."
-  source_data = LoadSystemFiles(source_zip)
+  (source_data, source_retouch_files) = LoadSystemFiles(source_zip)
 
   verbatim_targets = []
   patch_list = []
@@ -505,7 +527,7 @@
       verbatim_targets.append((tf.name, tf.size))
     else:
       common.ZipWriteStr(output_zip, "patch/" + tf.name + ".p", d)
-      patch_list.append((tf.name, tf, sf, tf.size, sha1(d).hexdigest()))
+      patch_list.append((tf.name, tf, sf, tf.size, common.sha1(d).hexdigest()))
       largest_source_size = max(largest_source_size, sf.size)
 
   source_fp = GetBuildProp("ro.build.fingerprint", source_zip)
@@ -516,20 +538,16 @@
   script.Mount("/system")
   script.AssertSomeFingerprint(source_fp, target_fp)
 
-  source_boot = common.File("/tmp/boot.img",
-                            common.BuildBootableImage(
-                                os.path.join(OPTIONS.source_tmp, "BOOT")))
-  target_boot = common.File("/tmp/boot.img",
-                            common.BuildBootableImage(
-                                os.path.join(OPTIONS.target_tmp, "BOOT")))
+  source_boot = common.GetBootableImage(
+      "/tmp/boot.img", "boot.img", OPTIONS.source_tmp, "BOOT")
+  target_boot = common.GetBootableImage(
+      "/tmp/boot.img", "boot.img", OPTIONS.target_tmp, "BOOT")
   updating_boot = (source_boot.data != target_boot.data)
 
-  source_recovery = common.File("system/recovery.img",
-                                common.BuildBootableImage(
-                                    os.path.join(OPTIONS.source_tmp, "RECOVERY")))
-  target_recovery = common.File("system/recovery.img",
-                                common.BuildBootableImage(
-                                    os.path.join(OPTIONS.target_tmp, "RECOVERY")))
+  source_recovery = common.GetBootableImage(
+      "/tmp/recovery.img", "recovery.img", OPTIONS.source_tmp, "RECOVERY")
+  target_recovery = common.GetBootableImage(
+      "/tmp/recovery.img", "recovery.img", OPTIONS.target_tmp, "RECOVERY")
   updating_recovery = (source_recovery.data != target_recovery.data)
 
   # Here's how we divide up the progress bar:
@@ -639,7 +657,7 @@
 
   script.ShowProgress(0.1, 10)
 
-  target_symlinks = CopySystemFiles(target_zip, None)
+  (target_symlinks, target_retouch_dummies) = CopySystemFiles(target_zip, None)
 
   target_symlinks_d = dict([(i[1], i[0]) for i in target_symlinks])
   temp_script = script.MakeTemporary()
@@ -648,7 +666,7 @@
 
   # Note that this call will mess up the tree of Items, so make sure
   # we're done with it.
-  source_symlinks = CopySystemFiles(source_zip, None)
+  (source_symlinks, source_retouch_dummies) = CopySystemFiles(source_zip, None)
   source_symlinks_d = dict([(i[1], i[0]) for i in source_symlinks])
 
   # Delete all the symlinks in source that aren't in target.  This
@@ -682,6 +700,10 @@
       to_create.append((dest, link))
   script.DeleteFiles([i[1] for i in to_create])
   script.MakeSymlinks(to_create)
+  if OPTIONS.aslr_mode:
+    script.RetouchBinaries(target_retouch_files)
+  else:
+    script.UndoRetouchBinaries(target_retouch_files)
 
   # Now that the symlinks are created, we can set all the
   # permissions.
@@ -691,7 +713,7 @@
   device_specific.IncrementalOTA_InstallEnd()
 
   if OPTIONS.extra_script is not None:
-    scirpt.AppendExtra(OPTIONS.extra_script)
+    script.AppendExtra(OPTIONS.extra_script)
 
   script.AddToZip(target_zip, output_zip)
   WriteMetadata(metadata, output_zip)
@@ -712,6 +734,11 @@
       OPTIONS.omit_prereq = True
     elif o in ("-e", "--extra_script"):
       OPTIONS.extra_script = a
+    elif o in ("-a", "--aslr_mode"):
+      if a in ("on", "On", "true", "True", "yes", "Yes"):
+        OPTIONS.aslr_mode = True
+      else:
+        OPTIONS.aslr_mode = False
     elif o in ("--worker_threads"):
       OPTIONS.worker_threads = int(a)
     else:
@@ -719,14 +746,16 @@
     return True
 
   args = common.ParseOptions(argv, __doc__,
-                             extra_opts="b:k:i:d:wne:",
+                             extra_opts="b:k:i:d:wne:a:",
                              extra_long_opts=["board_config=",
                                               "package_key=",
                                               "incremental_from=",
                                               "wipe_user_data",
                                               "no_prereq",
                                               "extra_script=",
-                                              "worker_threads="],
+                                              "worker_threads=",
+                                              "aslr_mode=",
+                                              ],
                              extra_option_handler=option_handler)
 
   if len(args) != 2:
@@ -737,10 +766,9 @@
     OPTIONS.extra_script = open(OPTIONS.extra_script).read()
 
   print "unzipping target target-files..."
-  OPTIONS.input_tmp = common.UnzipTemp(args[0])
+  OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
 
   OPTIONS.target_tmp = OPTIONS.input_tmp
-  input_zip = zipfile.ZipFile(args[0], "r")
   OPTIONS.info_dict = common.LoadInfoDict(input_zip)
   if OPTIONS.verbose:
     print "--- target info ---"
@@ -764,8 +792,7 @@
     WriteFullOTAPackage(input_zip, output_zip)
   else:
     print "unzipping source target-files..."
-    OPTIONS.source_tmp = common.UnzipTemp(OPTIONS.incremental_source)
-    source_zip = zipfile.ZipFile(OPTIONS.incremental_source, "r")
+    OPTIONS.source_tmp, source_zip = common.UnzipTemp(OPTIONS.incremental_source)
     OPTIONS.target_info_dict = OPTIONS.info_dict
     OPTIONS.source_info_dict = common.LoadInfoDict(source_zip)
     if OPTIONS.verbose:
diff --git a/tools/releasetools/sign_target_files_apks b/tools/releasetools/sign_target_files_apks
index 5fca691..5353063 100755
--- a/tools/releasetools/sign_target_files_apks
+++ b/tools/releasetools/sign_target_files_apks
@@ -204,6 +204,17 @@
   except KeyError:
     raise ExternalError("can't read META/otakeys.txt from input")
 
+  misc_info = common.LoadInfoDict(input_tf_zip)
+
+  extra_recovery_keys = misc_info.get("extra_recovery_keys", None)
+  if extra_recovery_keys:
+    extra_recovery_keys = [OPTIONS.key_map.get(k, k) + ".x509.pem"
+                           for k in extra_recovery_keys.split()]
+    if extra_recovery_keys:
+      print "extra recovery-only key(s): " + ", ".join(extra_recovery_keys)
+  else:
+    extra_recovery_keys = []
+
   mapped_keys = []
   for k in keylist:
     m = re.match(r"^(.*)\.x509\.pem$", k)
@@ -217,15 +228,18 @@
     print "for OTA package verification"
   else:
     mapped_keys.append(
-        OPTIONS.key_map["build/target/product/security/testkey"] + ".x509.pem")
+        OPTIONS.key_map.get("build/target/product/security/testkey",
+                            "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.
+  # extra_recovery_keys are used only in recovery.
 
   p = common.Run(["java", "-jar",
                   os.path.join(OPTIONS.search_path, "framework", "dumpkey.jar")]
-                 + mapped_keys,
+                 + mapped_keys + extra_recovery_keys,
                  stdout=subprocess.PIPE)
   data, _ = p.communicate()
   if p.returncode != 0:
@@ -234,6 +248,7 @@
 
   # SystemUpdateActivity uses the x509.pem version of the keys, but
   # put into a zipfile system/etc/security/otacerts.zip.
+  # We DO NOT include the extra_recovery_keys (if any) here.
 
   tempfile = cStringIO.StringIO()
   certs_zip = zipfile.ZipFile(tempfile, "w")
diff --git a/tools/soslim/main.c b/tools/soslim/main.c
index dd8a60b..df48484 100644
--- a/tools/soslim/main.c
+++ b/tools/soslim/main.c
@@ -188,9 +188,13 @@
             else INFO("Not building symbol filter, filter file is empty.\n");
         }
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        int prelinked = 0;
+        int prelinked = 0, retouched = 0;
         int elf_little; /* valid if prelinked != 0 */
         long prelink_addr; /* valid if prelinked != 0 */
+#define RETOUCH_MAX_SIZE 600000
+        /* _cnt valid if retouched != 0 */
+        unsigned int retouch_byte_cnt = RETOUCH_MAX_SIZE;
+        char retouch_buf[RETOUCH_MAX_SIZE]; /* valid if retouched != 0 */
 #endif
         clone_elf(elf, newelf,
                   infile, outfile,
@@ -200,7 +204,10 @@
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
                   , &prelinked,
                   &elf_little,
-                  &prelink_addr
+                  &prelink_addr,
+                  &retouched,
+                  &retouch_byte_cnt,
+                  retouch_buf
 #endif
                   ,
                   true, /* rebuild the section-header-strings table */
@@ -223,6 +230,13 @@
                infile, strerror(errno), errno);
 
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
+        if (retouched) {
+            INFO("File has retouch data, putting it back in place.\n");
+            retouch_dump(outfile != NULL ? outfile : infile,
+                         elf_little,
+                         retouch_byte_cnt,
+                         retouch_buf);
+        }
         if (prelinked) {
             INFO("File is prelinked, putting prelink TAG back in place.\n");
             setup_prelink_info(outfile != NULL ? outfile : infile,
diff --git a/tools/soslim/prelink_info.c b/tools/soslim/prelink_info.c
index 81d5de3..2600ac7 100644
--- a/tools/soslim/prelink_info.c
+++ b/tools/soslim/prelink_info.c
@@ -11,6 +11,7 @@
 #include <debug.h>
 #include <common.h>
 
+#define RETOUCH_SUFFIX_SIZE 12
 typedef struct {
 	uint32_t mmap_addr;
 	char tag[4]; /* 'P', 'R', 'E', ' ' */
@@ -28,7 +29,7 @@
 		}
 		else {
 			/* Different endianness */
-			*prelink_addr = switch_endianness(info->mmap_addr);
+                        *prelink_addr = switch_endianness(info->mmap_addr);
 		}
 	}
 }
@@ -67,10 +68,104 @@
 		set_prelink(prelink_addr, elf_little, &info);
 		prelinked = 1;
 	}
-	FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
+	FAILIF(close(fd) < 0,
+               "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
 	return prelinked;
 }
 
+int check_retouched(const char *fname, int elf_little,
+                    unsigned int *retouch_byte_cnt, char *retouch_buf) {
+    FAILIF(sizeof(prelink_info_t) != 8,
+           "Unexpected sizeof(prelink_info_t) == %d!\n",
+           sizeof(prelink_info_t));
+    int fd = open(fname, O_RDONLY);
+    FAILIF(fd < 0, "open(%s, O_RDONLY): %s (%d)!\n",
+           fname, strerror(errno), errno);
+    off_t end = lseek(fd, 0, SEEK_END);
+    int nr = sizeof(prelink_info_t);
+    off_t sz = lseek(fd, -nr-RETOUCH_SUFFIX_SIZE, SEEK_CUR);
+    ASSERT((long)(end - sz) == (long)(nr+RETOUCH_SUFFIX_SIZE));
+    FAILIF(sz == (off_t)-1,
+           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
+           fd, strerror(errno), errno);
+
+    char retouch_meta[RETOUCH_SUFFIX_SIZE];
+    int num_read = read(fd, &retouch_meta, RETOUCH_SUFFIX_SIZE);
+    FAILIF(num_read < 0,
+           "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
+           fd, strerror(errno), errno);
+    FAILIF(num_read != RETOUCH_SUFFIX_SIZE,
+           "read(%d, &info, sizeof(prelink_info_t)): did not read %d bytes as "
+           "expected (read %d)!\n",
+           fd, RETOUCH_SUFFIX_SIZE, num_read);
+
+    int retouched = 0;
+    if (!strncmp(retouch_meta, "RETOUCH ", 8)) {
+        unsigned int retouch_byte_cnt_meta;
+        if (!(elf_little ^ is_host_little()))
+            retouch_byte_cnt_meta = *(unsigned int *)(retouch_meta+8);
+        else
+            retouch_byte_cnt_meta =
+              switch_endianness(*(unsigned int *)(retouch_meta+8));
+        FAILIF(*retouch_byte_cnt < retouch_byte_cnt_meta,
+               "Retouch buffer too small at %d bytes (%d needed).",
+               *retouch_byte_cnt, retouch_byte_cnt_meta);
+        *retouch_byte_cnt = retouch_byte_cnt_meta;
+        off_t sz = lseek(fd,
+                         -((long)*retouch_byte_cnt)-RETOUCH_SUFFIX_SIZE-nr,
+                         SEEK_END);
+        ASSERT((long)(end - sz) ==
+               (long)(*retouch_byte_cnt+RETOUCH_SUFFIX_SIZE+nr));
+        FAILIF(sz == (off_t)-1,
+               "lseek(%d, 0, SEEK_END): %s (%d)!\n",
+               fd, strerror(errno), errno);
+        num_read = read(fd, retouch_buf, *retouch_byte_cnt);
+        FAILIF(num_read < 0,
+               "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
+               fd, strerror(errno), errno);
+        FAILIF(num_read != *retouch_byte_cnt,
+               "read(%d, retouch_buf, %u): did not read %d bytes as "
+               "expected (read %d)!\n",
+               fd, *retouch_byte_cnt, *retouch_byte_cnt, num_read);
+
+        retouched = 1;
+    }
+    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
+    return retouched;
+}
+
+void retouch_dump(const char *fname, int elf_little,
+                  unsigned int retouch_byte_cnt, char *retouch_buf) {
+    int fd = open(fname, O_WRONLY);
+    FAILIF(fd < 0,
+           "open(%s, O_WRONLY): %s (%d)\n",
+           fname, strerror(errno), errno);
+    off_t sz = lseek(fd, 0, SEEK_END);
+    FAILIF(sz == (off_t)-1,
+           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
+           fd, strerror(errno), errno);
+
+    // The retouch blob ends with "RETOUCH XXXX", where XXXX is the 4-byte
+    // size of the retouch blob, in target endianness.
+    strncpy(retouch_buf+retouch_byte_cnt, "RETOUCH ", 8);
+    if (elf_little ^ is_host_little()) {
+        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
+          switch_endianness(retouch_byte_cnt);
+    } else {
+        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
+          retouch_byte_cnt;
+    }
+
+    int num_written = write(fd, retouch_buf, retouch_byte_cnt+12);
+    FAILIF(num_written < 0,
+           "write(%d, &info, sizeof(info)): %s (%d)\n",
+           fd, strerror(errno), errno);
+    FAILIF((retouch_byte_cnt+12) != num_written,
+           "Could not write %d bytes as expected (wrote %d bytes instead)!\n",
+           retouch_byte_cnt, num_written);
+    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
+}
+
 void setup_prelink_info(const char *fname, int elf_little, long base)
 {
     FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %zd!\n", sizeof(prelink_info_t));
@@ -92,7 +187,7 @@
     else {
         /* Different endianness */
         INFO("Host and ELF file [%s] have different endianness.\n", fname);
-		info.mmap_addr = switch_endianness(base);
+        info.mmap_addr = switch_endianness(base);
     }
     strncpy(info.tag, "PRE ", 4);
 
diff --git a/tools/soslim/prelink_info.h b/tools/soslim/prelink_info.h
index e2787cb..efa84fd 100644
--- a/tools/soslim/prelink_info.h
+++ b/tools/soslim/prelink_info.h
@@ -3,6 +3,10 @@
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
 
 int check_prelinked(const char *fname, int elf_little, long *prelink_addr);
+int check_retouched(const char *fname, int elf_little,
+                    unsigned int *retouch_byte_cnt, char *retouch_buf);
+void retouch_dump(const char *fname, int elf_little,
+                  unsigned int retouch_byte_cnt, char *retouch_buf);
 void setup_prelink_info(const char *fname, int elf_little, long base);
 
 #endif
diff --git a/tools/soslim/soslim.c b/tools/soslim/soslim.c
index 125e29e..33b1ee7 100644
--- a/tools/soslim/soslim.c
+++ b/tools/soslim/soslim.c
@@ -27,7 +27,10 @@
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
                , int *prelinked,
                int *elf_little,
-               long *prelink_addr
+               long *prelink_addr,
+               int *retouched,
+               unsigned int *retouch_byte_cnt,
+               char *retouch_buf
 #endif
                , bool rebuild_shstrtab,
                bool strip_debug,
@@ -70,6 +73,11 @@
     ASSERT(elf_little);
     *elf_little = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB);
     *prelinked = check_prelinked(elf_name, *elf_little, prelink_addr);
+    ASSERT(retouched);
+    ASSERT(retouch_byte_cnt);
+    ASSERT(retouch_buf);
+    *retouched = check_retouched(elf_name, *elf_little,
+                                 retouch_byte_cnt, retouch_buf);
 #endif
 
     INFO("\n\nCALCULATING MODIFICATIONS\n\n");
diff --git a/tools/soslim/soslim.h b/tools/soslim/soslim.h
index dfcb085..952c960 100644
--- a/tools/soslim/soslim.h
+++ b/tools/soslim/soslim.h
@@ -23,7 +23,10 @@
 #ifdef SUPPORT_ANDROID_PRELINK_TAGS
 			   , int *prelinked,
 			   int *elf_little,
-			   long *prelink_addr
+			   long *prelink_addr,
+                           int *retouched,
+                           unsigned int *retouch_byte_cnt,
+                           char *retouch_buf
 #endif
                , bool rebuild_shstrtab,
                bool strip_debug,
