Merge change Ie3f5cd4a into eclair

* changes:
  Clean steps for a product configuration change.
diff --git a/core/Makefile b/core/Makefile
index db70d2f..e704748 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -814,6 +814,13 @@
 
 $(BUILT_TARGET_FILES_PACKAGE): PRIVATE_RECOVERY_API_VERSION := $(RECOVERY_API_VERSION)
 
+ifeq ($(TARGET_RELEASETOOLS_EXTENSIONS),)
+# default to common dir for device vendor
+$(BUILT_TARGET_FILES_PACKAGE): tool_extensions := $(TARGET_DEVICE_DIR)/../common
+else
+$(BUILT_TARGET_FILES_PACKAGE): tool_extensions := $(TARGET_RELEASETOOLS_EXTENSIONS)
+endif
+
 # Depending on the various images guarantees that the underlying
 # directories are up-to-date.
 $(BUILT_TARGET_FILES_PACKAGE): \
@@ -887,6 +894,7 @@
 	$(hide) echo "recovery $(call image-size-from-data-size,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE))" >> $(zip_root)/META/imagesizes.txt
 	$(hide) echo "system $(call image-size-from-data-size,$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))" >> $(zip_root)/META/imagesizes.txt
 	$(hide) echo "userdata $(call image-size-from-data-size,$(BOARD_USERDATAIMAGE_PARTITION_SIZE))" >> $(zip_root)/META/imagesizes.txt
+	$(hide) echo "$(tool_extensions)" > $(zip_root)/META/tool-extensions.txt
 	@# Zip everything up, preserving symlinks
 	$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
 
@@ -909,13 +917,6 @@
 
 $(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
 
-ifeq ($(TARGET_RELEASETOOLS_EXTENSIONS),)
-# default to common dir for device vendor
-$(INTERNAL_OTA_PACKAGE_TARGET): extensions := $(TARGET_DEVICE_DIR)/../common
-else
-$(INTERNAL_OTA_PACKAGE_TARGET): extensions := $(TARGET_RELEASETOOLS_EXTENSIONS)
-endif
-
 ifeq ($(TARGET_OTA_SCRIPT_MODE),)
 # default to "auto"
 $(INTERNAL_OTA_PACKAGE_TARGET): scriptmode := auto
@@ -926,7 +927,7 @@
 $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) otatools
 	@echo "Package OTA: $@"
 	$(hide) ./build/tools/releasetools/ota_from_target_files \
-	   -s $(extensions) -m $(scriptmode) \
+	   -m $(scriptmode) \
 	   -p $(HOST_OUT) \
            -k $(KEY_CERT_PAIR) \
            $(BUILT_TARGET_FILES_PACKAGE) $@
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index 92f0b7c..25cb236 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -25,10 +25,7 @@
 	libwnndict \
 	ApiDemos \
 	GestureBuilder \
-	SoftKeyboard \
-	talkback \
-	soundback \
-	kickback
+	SoftKeyboard
 
 PRODUCT_COPY_FILES := \
 	development/data/etc/vold.conf:system/etc/vold.conf \
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index f1d69fb..328eae1 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -62,10 +62,10 @@
 <p>The Android NDK is a companion tool to the Android SDK that lets Android
 application developers build performance-critical portions of their apps in
 native code. It is designed for use <em>only</em> in conjunction with the
-Android SDK, so if you have not already installed the Android 1.5 SDK, please do
-so before downloading the NDK. Also, please read <a href="#overview">What is the 
-Android NDK?</a> to get an understanding of what the NDK offers and whether it 
-will be useful to you.</p>
+Android SDK, so if you have not already installed the latest Android SDK, please
+do so before downloading the NDK. Also, please read <a href="#overview">What is 
+the Android NDK?</a> to get an understanding of what the NDK offers and whether
+it will be useful to you.</p>
 
 <p>Select the download package that is appropriate for your development
 computer. </p>
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index e758deb..27264dd 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -440,7 +440,7 @@
 
     if self.module is None:
       path = OPTIONS.device_specific
-      if path is None: return
+      if not path: return
       try:
         if os.path.isdir(path):
           info = imp.find_module("releasetools", [path])
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 299e60a..e719696 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -57,6 +57,7 @@
   sys.exit(1)
 
 import copy
+import errno
 import os
 import re
 import sha
@@ -855,6 +856,23 @@
   print "unzipping target target-files..."
   OPTIONS.input_tmp = common.UnzipTemp(args[0])
 
+  if OPTIONS.device_specific is None:
+    # look for the device-specific tools extension location in the input
+    try:
+      f = open(os.path.join(OPTIONS.input_tmp, "META", "tool-extensions.txt"))
+      ds = f.read().strip()
+      f.close()
+      if ds:
+        ds = os.path.normpath(ds)
+        print "using device-specific extensions in", ds
+        OPTIONS.device_specific = ds
+    except IOError, e:
+      if e.errno == errno.ENOENT:
+        # nothing specified in the file
+        pass
+      else:
+        raise
+
   common.LoadMaxSizes()
   if not OPTIONS.max_image_size:
     print