Merge "Remove upside-down portrait orientation." into froyo
diff --git a/Android.mk b/Android.mk
index 95f38c5..5a4c547 100644
--- a/Android.mk
+++ b/Android.mk
@@ -425,10 +425,10 @@
 framework_docs_SDK_PREVIEW:=0
 
 ## Latest ADT version identifiers, for reference from published docs
-framework_docs_ADT_VERSION:=0.9.5
-framework_docs_ADT_DOWNLOAD:=ADT-0.9.5.zip
-framework_docs_ADT_BYTES:=3372982
-framework_docs_ADT_CHECKSUM:=227ec538359fbe417ccde7f0ad614a96
+framework_docs_ADT_VERSION:=0.9.6
+framework_docs_ADT_DOWNLOAD:=ADT-0.9.6.zip
+framework_docs_ADT_BYTES:=7456339
+framework_docs_ADT_CHECKSUM:=ea45d271be52b87b5dd1c9fb17536223
 
 framework_docs_LOCAL_DROIDDOC_OPTIONS += \
 		-hdf sdk.version $(framework_docs_SDK_VERSION) \
diff --git a/api/current.xml b/api/current.xml
index f9470d9..5609a63 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -7830,39 +7830,6 @@
  visibility="public"
 >
 </field>
-<field name="stripEnabled"
- type="int"
- transient="false"
- volatile="false"
- value="16843454"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="stripLeft"
- type="int"
- transient="false"
- volatile="false"
- value="16843452"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="stripRight"
- type="int"
- transient="false"
- volatile="false"
- value="16843453"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="suggestActionMsg"
  type="int"
  transient="false"
@@ -7951,6 +7918,39 @@
  visibility="public"
 >
 </field>
+<field name="tabStripEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843454"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabStripLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843452"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="tabStripRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843453"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="tabWidgetStyle"
  type="int"
  transient="false"
@@ -27075,6 +27075,76 @@
 </exception>
 </method>
 </class>
+<class name="BackupAgentHelper"
+ extends="android.app.backup.BackupAgent"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="BackupAgentHelper"
+ type="android.app.backup.BackupAgentHelper"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="addHelper"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="keyPrefix" type="java.lang.String">
+</parameter>
+<parameter name="helper" type="android.app.backup.BackupHelper">
+</parameter>
+</method>
+<method name="onBackup"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="oldState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<parameter name="data" type="android.app.backup.BackupDataOutput">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="onRestore"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="android.app.backup.BackupDataInput">
+</parameter>
+<parameter name="appVersionCode" type="int">
+</parameter>
+<parameter name="newState" type="android.os.ParcelFileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
 <class name="BackupDataInput"
  extends="java.lang.Object"
  abstract="false"
@@ -27324,76 +27394,6 @@
 </parameter>
 </method>
 </interface>
-<class name="BackupHelperAgent"
- extends="android.app.backup.BackupAgent"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="BackupHelperAgent"
- type="android.app.backup.BackupHelperAgent"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="addHelper"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="keyPrefix" type="java.lang.String">
-</parameter>
-<parameter name="helper" type="android.app.backup.BackupHelper">
-</parameter>
-</method>
-<method name="onBackup"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="oldState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<parameter name="data" type="android.app.backup.BackupDataOutput">
-</parameter>
-<parameter name="newState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-</method>
-<method name="onRestore"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="data" type="android.app.backup.BackupDataInput">
-</parameter>
-<parameter name="appVersionCode" type="int">
-</parameter>
-<parameter name="newState" type="android.os.ParcelFileDescriptor">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-</method>
-</class>
 <class name="BackupManager"
  extends="java.lang.Object"
  abstract="false"
@@ -163523,6 +163523,240 @@
 >
 </method>
 </interface>
+<class name="Base64"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="str" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="decode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encode"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encodeToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="encodeToString"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="byte[]">
+</parameter>
+<parameter name="offset" type="int">
+</parameter>
+<parameter name="len" type="int">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CRLF"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_CLOSE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_PADDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="NO_WRAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="URL_SAFE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="Base64InputStream"
+ extends="java.io.FilterInputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64InputStream"
+ type="android.util.Base64InputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.io.InputStream">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+</class>
+<class name="Base64OutputStream"
+ extends="java.io.FilterOutputStream"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Base64OutputStream"
+ type="android.util.Base64OutputStream"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="java.io.OutputStream">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</constructor>
+</class>
 <class name="Config"
  extends="java.lang.Object"
  abstract="false"
@@ -166640,243 +166874,6 @@
 </method>
 </class>
 </package>
-<package name="android.util.base64"
->
-<class name="Base64"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="decode"
- return="byte[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="str" type="java.lang.String">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="decode"
- return="byte[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="decode"
- return="byte[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="offset" type="int">
-</parameter>
-<parameter name="len" type="int">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="encode"
- return="byte[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="encode"
- return="byte[]"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="offset" type="int">
-</parameter>
-<parameter name="len" type="int">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="encodeToString"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<method name="encodeToString"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="true"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="input" type="byte[]">
-</parameter>
-<parameter name="offset" type="int">
-</parameter>
-<parameter name="len" type="int">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<field name="CRLF"
- type="int"
- transient="false"
- volatile="false"
- value="4"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="DEFAULT"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="NO_CLOSE"
- type="int"
- transient="false"
- volatile="false"
- value="16"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="NO_PADDING"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="NO_WRAP"
- type="int"
- transient="false"
- volatile="false"
- value="2"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="URL_SAFE"
- type="int"
- transient="false"
- volatile="false"
- value="8"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<class name="Base64InputStream"
- extends="java.io.FilterInputStream"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="Base64InputStream"
- type="android.util.base64.Base64InputStream"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="in" type="java.io.InputStream">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</constructor>
-</class>
-<class name="Base64OutputStream"
- extends="java.io.FilterOutputStream"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="Base64OutputStream"
- type="android.util.base64.Base64OutputStream"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="out" type="java.io.OutputStream">
-</parameter>
-<parameter name="flags" type="int">
-</parameter>
-</constructor>
-</class>
-</package>
 <package name="android.view"
 >
 <class name="AbsSavedState"
@@ -168121,17 +168118,6 @@
  visibility="public"
 >
 </field>
-<field name="SCROLL_BARRIER"
- type="int"
- transient="false"
- volatile="false"
- value="2"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="VIRTUAL_KEY"
  type="int"
  transient="false"
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 5d6970a..736ac08 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -154,6 +154,42 @@
             } else if (opt.equals("-f")) {
                 String str = nextArgRequired();
                 intent.setFlags(Integer.decode(str).intValue());
+            } else if (opt.equals("--grant-read-uri-permission")) {
+                intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+            } else if (opt.equals("--grant-write-uri-permission")) {
+                intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
+            } else if (opt.equals("--debug-log-resolution")) {
+                intent.addFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION);
+            } else if (opt.equals("--activity-brought-to-front")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
+            } else if (opt.equals("--activity-clear-top")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+            } else if (opt.equals("--activity-clear-when-task-reset")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
+            } else if (opt.equals("--activity-exclude-from-recents")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+            } else if (opt.equals("--activity-launched-from-history")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY);
+            } else if (opt.equals("--activity-multiple-task")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
+            } else if (opt.equals("--activity-no-animation")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
+            } else if (opt.equals("--activity-no-history")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
+            } else if (opt.equals("--activity-no-user-action")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);
+            } else if (opt.equals("--activity-previous-is-top")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
+            } else if (opt.equals("--activity-reorder-to-front")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+            } else if (opt.equals("--activity-reset-task-if-needed")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+            } else if (opt.equals("--activity-single-top")) {
+                intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+            } else if (opt.equals("--receiver-registered-only")) {
+                intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+            } else if (opt.equals("--receiver-replace-pending")) {
+                intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
             } else if (opt.equals("-D")) {
                 mDebugOption = true;
             } else if (opt.equals("-W")) {
@@ -565,7 +601,18 @@
                 "        [--esn <EXTRA_KEY> ...]\n" +
                 "        [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]\n" +
                 "        [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]\n" +
-                "        [-n <COMPONENT>] [-f <FLAGS>] [<URI>]\n"
+                "        [-n <COMPONENT>] [-f <FLAGS>]\n" +
+                "        [--grant-read-uri-permission] [--grant-write-uri-permission]\n" +
+                "        [--debug-log-resolution]\n" +
+                "        [--activity-brought-to-front] [--activity-clear-top]\n" +
+                "        [--activity-clear-when-task-reset] [--activity-exclude-from-recents]\n" +
+                "        [--activity-launched-from-history] [--activity-multiple-task]\n" +
+                "        [--activity-no-animation] [--activity-no-history]\n" +
+                "        [--activity-no-user-action] [--activity-previous-is-top]\n" +
+                "        [--activity-reorder-to-front] [--activity-reset-task-if-needed]\n" +
+                "        [--activity-single-top]\n" +
+                "        [--receiver-registered-only] [--receiver-replace-pending]\n" +
+                "        [<URI>]\n"
                 );
     }
 }
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 0909952..0235599 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -236,10 +236,14 @@
                     WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION;
             l = nl;
         }
-        mWindowManager.addView(mDecor, l);
-        mShowing = true;
 
-        sendShowMessage();
+        try {
+            mWindowManager.addView(mDecor, l);
+            mShowing = true;
+    
+            sendShowMessage();
+        } finally {
+        }
     }
     
     /**
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index d0cb148..f9dcab8 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -37,7 +37,7 @@
  * respectively.
  * <p>
  * A backup agent based on convenient helper classes is available in
- * {@link android.app.backup.BackupHelperAgent} for less complex implementation
+ * {@link android.app.backup.BackupAgentHelper} for less complex implementation
  * requirements.
  * <p>
  * STOPSHIP write more documentation about the backup process here.
diff --git a/core/java/android/app/backup/BackupHelperAgent.java b/core/java/android/app/backup/BackupAgentHelper.java
similarity index 93%
rename from core/java/android/app/backup/BackupHelperAgent.java
rename to core/java/android/app/backup/BackupAgentHelper.java
index 6f4a031..7b6be23 100644
--- a/core/java/android/app/backup/BackupHelperAgent.java
+++ b/core/java/android/app/backup/BackupAgentHelper.java
@@ -27,12 +27,12 @@
  * backup agent. Then, within the agent's onBackup() and onRestore() methods, it
  * will call {@link #addHelper(String, BackupHelper)} one or more times to
  * specify the data sets, then invoke super.onBackup() or super.onRestore() to
- * have the BackupHelperAgent implementation process the data.
+ * have the BackupAgentHelper implementation process the data.
  * <p>
  * STOPSHIP: document!
  */
-public class BackupHelperAgent extends BackupAgent {
-    static final String TAG = "BackupHelperAgent";
+public class BackupAgentHelper extends BackupAgent {
+    static final String TAG = "BackupAgentHelper";
 
     BackupHelperDispatcher mDispatcher = new BackupHelperDispatcher();
 
diff --git a/core/java/android/app/backup/BackupHelper.java b/core/java/android/app/backup/BackupHelper.java
index dca23881..b7ef268 100644
--- a/core/java/android/app/backup/BackupHelper.java
+++ b/core/java/android/app/backup/BackupHelper.java
@@ -20,7 +20,7 @@
 
 /**
  * A convenient interface to be used with the
- * {@link android.app.backup.BackupHelperAgent} to implement backup and restore of
+ * {@link android.app.backup.BackupAgentHelper} to implement backup and restore of
  * arbitrary data types.
  * <p>
  * STOPSHOP: document!
@@ -36,7 +36,8 @@
             ParcelFileDescriptor newState);
 
     /**
-     * Called by BackupHelperAgent to restore one entity from the restore dataset.
+     * Called by {@link android.app.backup.BackupAgentHelper BackupAgentHelper}
+     * to restore one entity from the restore dataset.
      * <p class=note>
      * Do not close the <code>data</code> stream.  Do not read more than
      * <code>data.size()</code> bytes from <code>data</code>.
@@ -44,7 +45,8 @@
     public void restoreEntity(BackupDataInputStream data);
 
     /**
-     * Called by BackupHelperAgent to write the new backup state file corresponding to
+     * Called by {@link android.app.backup.BackupAgentHelper BackupAgentHelper}
+     * to write the new backup state file corresponding to
      * the current state of the app's data at the time the backup operation was
      * performed.
      */
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index dff0695..7eb6265 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -41,7 +41,7 @@
  * of how the backup then proceeds.
  * <p>
  * A simple implementation of a BackupAgent useful for backing up Preferences
- * and files is available by using {@link android.app.backup.BackupHelperAgent}.
+ * and files is available by using {@link android.app.backup.BackupAgentHelper}.
  * <p>
  * STOPSHIP: more documentation!
  * <p>
diff --git a/core/java/android/app/backup/FileBackupHelper.java b/core/java/android/app/backup/FileBackupHelper.java
index b42049e..3ce5b43 100644
--- a/core/java/android/app/backup/FileBackupHelper.java
+++ b/core/java/android/app/backup/FileBackupHelper.java
@@ -24,7 +24,7 @@
 
 /**
  * A helper class which can be used in conjunction with
- * {@link android.app.backup.BackupHelperAgent} to manage the backup of a set of
+ * {@link android.app.backup.BackupAgentHelper} to manage the backup of a set of
  * files. Whenever backup is performed, all files changed since the last backup
  * will be saved in their entirety. During the first time the backup happens,
  * all the files in the list will be backed up. Note that this should only be
@@ -69,7 +69,7 @@
      * now. When <code>oldState</code> is <code>null</code>, all the files will
      * be backed up.
      * <p>
-     * This should be called from {@link android.app.backup.BackupHelperAgent}
+     * This should be called from {@link android.app.backup.BackupAgentHelper}
      * directly. See
      * {@link android.app.backup.BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)}
      * for a description of parameter meanings.
diff --git a/core/java/android/app/backup/SharedPreferencesBackupHelper.java b/core/java/android/app/backup/SharedPreferencesBackupHelper.java
index d35b10c..f9e6b28 100644
--- a/core/java/android/app/backup/SharedPreferencesBackupHelper.java
+++ b/core/java/android/app/backup/SharedPreferencesBackupHelper.java
@@ -25,7 +25,7 @@
 
 /**
  * A helper class which can be used in conjunction with
- * {@link android.app.backup.BackupHelperAgent} to manage the backup of
+ * {@link android.app.backup.BackupAgentHelper} to manage the backup of
  * {@link android.content.SharedPreferences}. Whenever backup is performed it
  * will back up all named shared preferences which have changed since the last
  * backup.
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 4dddfd8..abebdeb9 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -532,11 +532,15 @@
      * called with value 3. Three ZoomCallback will be generated with zoom value
      * 1, 2, and 3. The applications can call {@link #stopSmoothZoom} to stop
      * the zoom earlier. The applications should not call startSmoothZoom again
-     * or change the zoom value before zoom stops. This method is supported if
-     * {@link android.hardware.Camera.Parameters#isSmoothZoomSupported} is true.
+     * or change the zoom value before zoom stops. If the passing zoom value
+     * equals to the current zoom value, no zoom callback will be generated.
+     * This method is supported if {@link
+     * android.hardware.Camera.Parameters#isSmoothZoomSupported} is true.
      *
      * @param value zoom value. The valid range is 0 to {@link
      *              android.hardware.Camera.Parameters#getMaxZoom}.
+     * @throws IllegalArgumentException if the zoom value is invalid.
+     * @throws RuntimeException if the method fails.
      */
     public native final void startSmoothZoom(int value);
 
@@ -545,6 +549,8 @@
      * ZoomCallback} to know when the zoom is actually stopped. This method is
      * supported if {@link
      * android.hardware.Camera.Parameters#isSmoothZoomSupported} is true.
+     *
+     * @throws RuntimeException if the method fails.
      */
     public native final void stopSmoothZoom();
 
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index 5c40c9a0..174f3b6 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -112,7 +112,8 @@
     /**
      * Flag to {@link #transact}: this is a one-way call, meaning that the
      * caller returns immediately, without waiting for a result from the
-     * callee.
+     * callee. Applies only if the caller and callee are in different
+     * processes.
      */
     int FLAG_ONEWAY             = 0x00000001;
     
diff --git a/core/java/android/util/base64/Base64.java b/core/java/android/util/Base64.java
similarity index 99%
rename from core/java/android/util/base64/Base64.java
rename to core/java/android/util/Base64.java
index f6d3905..1f2a5a7 100644
--- a/core/java/android/util/base64/Base64.java
+++ b/core/java/android/util/Base64.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.util.base64;
+package android.util;
 
 import java.io.UnsupportedEncodingException;
 
diff --git a/core/java/android/util/base64/Base64InputStream.java b/core/java/android/util/Base64InputStream.java
similarity index 99%
rename from core/java/android/util/base64/Base64InputStream.java
rename to core/java/android/util/Base64InputStream.java
index 935939e..da3911d 100644
--- a/core/java/android/util/base64/Base64InputStream.java
+++ b/core/java/android/util/Base64InputStream.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.util.base64;
+package android.util;
 
 import java.io.FilterInputStream;
 import java.io.IOException;
diff --git a/core/java/android/util/base64/Base64OutputStream.java b/core/java/android/util/Base64OutputStream.java
similarity index 99%
rename from core/java/android/util/base64/Base64OutputStream.java
rename to core/java/android/util/Base64OutputStream.java
index 35e9a2b..30d632d 100644
--- a/core/java/android/util/base64/Base64OutputStream.java
+++ b/core/java/android/util/Base64OutputStream.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.util.base64;
+package android.util;
 
 import java.io.FilterOutputStream;
 import java.io.IOException;
diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java
index d31c8dc..8f40260 100644
--- a/core/java/android/view/HapticFeedbackConstants.java
+++ b/core/java/android/view/HapticFeedbackConstants.java
@@ -34,11 +34,6 @@
      * The user has pressed on a virtual on-screen key.
      */
     public static final int VIRTUAL_KEY = 1;
-
-    /**
-     * The user has hit the barrier point while scrolling a view.
-     */
-    public static final int SCROLL_BARRIER = 2;
     
     /**
      * The user has pressed a soft keyboard key.
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 7e748c0..4744c64 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8771,14 +8771,6 @@
             newScrollY = top;
             clampedY = true;
         }
-        
-        // Bump the device with some haptic feedback if we're at the edge,
-        // didn't start there, and the scroll is the result of a touch event.
-        if (isTouchEvent &&
-                ((overscrollHorizontal && clampedX && scrollX != left && scrollX != right) ||
-                (overscrollVertical && clampedY && scrollY != top && scrollY != bottom))) {
-            performHapticFeedback(HapticFeedbackConstants.SCROLL_BARRIER);
-        }
 
         onOverscrolled(newScrollX, newScrollY, clampedX, clampedY);
         
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 1c2733c..030290f 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -410,6 +410,10 @@
     // true if onPause has been called (and not onResume)
     private boolean mIsPaused;
 
+    // true if, during a transition to a new page, we're delaying
+    // deleting a root layer until there's something to draw of the new page.
+    private boolean mDelayedDeleteRootLayer;
+
     /**
      * Customizable constant
      */
@@ -6235,12 +6239,18 @@
                 case UPDATE_ZOOM_RANGE: {
                     WebViewCore.RestoreState restoreState
                             = (WebViewCore.RestoreState) msg.obj;
-                    // mScrollX contains the new minPrefWidth
+                    // mScrollX contains the new contentWidth
                     updateZoomRange(restoreState, getViewWidth(),
                             restoreState.mScrollX, false);
                     break;
                 }
                 case NEW_PICTURE_MSG_ID: {
+                    // If we've previously delayed deleting a root
+                    // layer, do it now.
+                    if (mDelayedDeleteRootLayer) {
+                        mDelayedDeleteRootLayer = false;
+                        nativeSetRootLayer(0);
+                    }
                     WebSettings settings = mWebViewCore.getSettings();
                     // called for new content
                     final int viewWidth = getViewWidth();
@@ -6252,7 +6262,7 @@
                     boolean hasRestoreState = restoreState != null;
                     if (hasRestoreState) {
                         updateZoomRange(restoreState, viewSize.x,
-                                draw.mMinPrefWidth, true);
+                                draw.mWidthHeight.x, true);
                         if (!mDrawHistory) {
                             mInZoomOverview = false;
 
@@ -6314,10 +6324,12 @@
                         // sMaxViewportWidth so that if the page doesn't behave
                         // well, the WebView won't go insane. limit the lower
                         // bound to match the default scale for mobile sites.
+                        // we choose the content width to be mZoomOverviewWidth.
+                        // this works for most of the sites. But some sites may
+                        // cause the page layout wider than it needs.
                         mZoomOverviewWidth = Math.min(sMaxViewportWidth, Math
-                                .max((int) (viewWidth / mDefaultScale), Math
-                                        .max(draw.mMinPrefWidth,
-                                                draw.mViewPoint.x)));
+                                .max((int) (viewWidth / mDefaultScale),
+                                        draw.mWidthHeight.x));
                     }
                     if (!mMinZoomScaleFixed) {
                         mMinZoomScale = (float) viewWidth / mZoomOverviewWidth;
@@ -6425,8 +6437,16 @@
                     break;
                 }
                 case SET_ROOT_LAYER_MSG_ID: {
-                    nativeSetRootLayer(msg.arg1);
-                    invalidate();
+                    if (0 == msg.arg1) {
+                        // Null indicates deleting the old layer, but
+                        // don't actually do so until we've got the
+                        // new page to display.
+                        mDelayedDeleteRootLayer = true;
+                    } else {
+                        mDelayedDeleteRootLayer = false;
+                        nativeSetRootLayer(msg.arg1);
+                        invalidate();
+                    }
                     break;
                 }
                 case REQUEST_FORM_DATA:
@@ -6958,12 +6978,13 @@
                 new InvokeListBox(array, enabledArray, selectedArray));
     }
 
+    // viewWidth/contentWidth/updateZoomOverview are only used for mobile sites
     private void updateZoomRange(WebViewCore.RestoreState restoreState,
-            int viewWidth, int minPrefWidth, boolean updateZoomOverview) {
+            int viewWidth, int contentWidth, boolean updateZoomOverview) {
         if (restoreState.mMinScale == 0) {
             if (restoreState.mMobileSite) {
-                if (minPrefWidth > Math.max(0, viewWidth)) {
-                    mMinZoomScale = (float) viewWidth / minPrefWidth;
+                if (contentWidth > Math.max(0, viewWidth)) {
+                    mMinZoomScale = (float) viewWidth / contentWidth;
                     mMinZoomScaleFixed = false;
                     if (updateZoomOverview) {
                         WebSettings settings = getSettings();
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 410227b..445e7ff 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -1705,7 +1705,6 @@
         Region mInvalRegion;
         Point mViewPoint;
         Point mWidthHeight;
-        int mMinPrefWidth;
         RestoreState mRestoreState; // only non-null if it is for the first
                                     // picture set after the first layout
         boolean mFocusSizeChanged;
@@ -1725,13 +1724,6 @@
             // layout.
             draw.mFocusSizeChanged = nativeFocusBoundsChanged();
             draw.mViewPoint = new Point(mCurrentViewWidth, mCurrentViewHeight);
-            if (mSettings.getUseWideViewPort()) {
-                draw.mMinPrefWidth = Math.max(
-                        mViewportWidth == -1 ? WebView.DEFAULT_VIEWPORT_WIDTH
-                                : (mViewportWidth == 0 ? mCurrentViewWidth
-                                        : mViewportWidth),
-                        nativeGetContentMinPrefWidth());
-            }
             if (mRestoreState != null) {
                 draw.mRestoreState = mRestoreState;
                 mRestoreState = null;
@@ -2085,7 +2077,7 @@
             restoreState.mDefaultScale = adjust;
             // as mViewportWidth is not 0, it is not mobile site.
             restoreState.mMobileSite = false;
-            // for non-mobile site, we don't need minPrefWidth, set it as 0
+            // for non-mobile site, we don't need contentWidth, set it as 0
             restoreState.mScrollX = 0;
             Message.obtain(mWebView.mPrivateHandler,
                     WebView.UPDATE_ZOOM_RANGE, restoreState).sendToTarget();
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index be633be..d867980 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -1128,11 +1128,13 @@
             default:
                 if (childCount == 0) {
                     if (!mStackFromBottom) {
-                        setSelectedPositionInt(0);
+                        setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
+                                INVALID_POSITION : 0);
                         sel = fillFromTop(childrenTop);
                     } else {
                         final int last = mItemCount - 1;
-                        setSelectedPositionInt(last);
+                        setSelectedPositionInt(mAdapter == null || isInTouchMode() ?
+                                INVALID_POSITION : last);
                         sel = fillFromBottom(last, childrenBottom);
                     }
                 } else {
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index 52a560c..4e1b585 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -42,17 +42,17 @@
  * called on the containing TabHost object.
  * 
  * @attr ref android.R.styleable#TabWidget_divider
- * @attr ref android.R.styleable#TabWidget_stripEnabled
- * @attr ref android.R.styleable#TabWidget_stripLeft
- * @attr ref android.R.styleable#TabWidget_stripRight
+ * @attr ref android.R.styleable#TabWidget_tabStripEnabled
+ * @attr ref android.R.styleable#TabWidget_tabStripLeft
+ * @attr ref android.R.styleable#TabWidget_tabStripRight
  */
 public class TabWidget extends LinearLayout implements OnFocusChangeListener {
     private OnTabSelectionChanged mSelectionChangedListener;
 
     private int mSelectedTab = 0;
 
-    private Drawable mBottomLeftStrip;
-    private Drawable mBottomRightStrip;
+    private Drawable mLeftStrip;
+    private Drawable mRightStrip;
 
     private boolean mDrawBottomStrips = true;
     private boolean mStripMoved;
@@ -76,10 +76,10 @@
             context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.TabWidget,
                     defStyle, 0);
 
-        mDrawBottomStrips = a.getBoolean(R.styleable.TabWidget_stripEnabled, true);
+        mDrawBottomStrips = a.getBoolean(R.styleable.TabWidget_tabStripEnabled, true);
         mDividerDrawable = a.getDrawable(R.styleable.TabWidget_divider);
-        mBottomLeftStrip = a.getDrawable(R.styleable.TabWidget_stripLeft);
-        mBottomRightStrip = a.getDrawable(R.styleable.TabWidget_stripRight);
+        mLeftStrip = a.getDrawable(R.styleable.TabWidget_tabStripLeft);
+        mRightStrip = a.getDrawable(R.styleable.TabWidget_tabStripRight);
 
         a.recycle();
 
@@ -114,22 +114,22 @@
         
         if (context.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.DONUT) {
             // Donut apps get old color scheme
-            if (mBottomLeftStrip == null) {
-                mBottomLeftStrip = resources.getDrawable(
+            if (mLeftStrip == null) {
+                mLeftStrip = resources.getDrawable(
                         com.android.internal.R.drawable.tab_bottom_left_v4);
             }
-            if (mBottomRightStrip == null) {
-                mBottomRightStrip = resources.getDrawable(
+            if (mRightStrip == null) {
+                mRightStrip = resources.getDrawable(
                         com.android.internal.R.drawable.tab_bottom_right_v4);
             }
         } else {
             // Use modern color scheme for Eclair and beyond
-            if (mBottomLeftStrip == null) {
-                mBottomLeftStrip = resources.getDrawable(
+            if (mLeftStrip == null) {
+                mLeftStrip = resources.getDrawable(
                         com.android.internal.R.drawable.tab_bottom_left);
             }
-            if (mBottomRightStrip == null) {
-                mBottomRightStrip = resources.getDrawable(
+            if (mRightStrip == null) {
+                mRightStrip = resources.getDrawable(
                         com.android.internal.R.drawable.tab_bottom_right);
             }
         }
@@ -198,7 +198,7 @@
      * @param drawable the left strip drawable
      */
     public void setLeftStripDrawable(Drawable drawable) {
-        mBottomLeftStrip = drawable;
+        mLeftStrip = drawable;
         requestLayout();
         invalidate();
     }
@@ -210,7 +210,7 @@
      * left strip drawable
      */
     public void setLeftStripDrawable(int resId) {
-        mBottomLeftStrip = mContext.getResources().getDrawable(resId);
+        mLeftStrip = mContext.getResources().getDrawable(resId);
         requestLayout();
         invalidate();
     }
@@ -221,7 +221,7 @@
      * @param drawable the right strip drawable
      */
     public void setRightStripDrawable(Drawable drawable) {
-        mBottomRightStrip = drawable;
+        mRightStrip = drawable;
         requestLayout();
         invalidate();    }
 
@@ -232,7 +232,7 @@
      * right strip drawable
      */
     public void setRightStripDrawable(int resId) {
-        mBottomRightStrip = mContext.getResources().getDrawable(resId);
+        mRightStrip = mContext.getResources().getDrawable(resId);
         requestLayout();
         invalidate();
     }
@@ -282,8 +282,8 @@
 
         final View selectedChild = getChildTabViewAt(mSelectedTab);
 
-        final Drawable leftStrip = mBottomLeftStrip;
-        final Drawable rightStrip = mBottomRightStrip;
+        final Drawable leftStrip = mLeftStrip;
+        final Drawable rightStrip = mRightStrip;
 
         leftStrip.setState(selectedChild.getDrawableState());
         rightStrip.setState(selectedChild.getDrawableState());
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 7466cc46..215e9ae 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -133,31 +133,39 @@
                         filter = null;
                     }
                 }
-            } else if (data != null && data.getScheme() != null) {
-                filter.addDataScheme(data.getScheme());
-
-                // Look through the resolved filter to determine which part
-                // of it matched the original Intent.
-                Iterator<IntentFilter.AuthorityEntry> aIt = ri.filter.authoritiesIterator();
-                if (aIt != null) {
-                    while (aIt.hasNext()) {
-                        IntentFilter.AuthorityEntry a = aIt.next();
-                        if (a.match(data) >= 0) {
-                            int port = a.getPort();
-                            filter.addDataAuthority(a.getHost(),
-                                    port >= 0 ? Integer.toString(port) : null);
-                            break;
+            }
+            if (data != null && data.getScheme() != null) {
+                // We need the data specification if there was no type,
+                // OR if the scheme is not one of our magical "file:"
+                // or "content:" schemes (see IntentFilter for the reason).
+                if (cat != IntentFilter.MATCH_CATEGORY_TYPE
+                        || (!"file".equals(data.getScheme())
+                                && !"content".equals(data.getScheme()))) {
+                    filter.addDataScheme(data.getScheme());
+    
+                    // Look through the resolved filter to determine which part
+                    // of it matched the original Intent.
+                    Iterator<IntentFilter.AuthorityEntry> aIt = ri.filter.authoritiesIterator();
+                    if (aIt != null) {
+                        while (aIt.hasNext()) {
+                            IntentFilter.AuthorityEntry a = aIt.next();
+                            if (a.match(data) >= 0) {
+                                int port = a.getPort();
+                                filter.addDataAuthority(a.getHost(),
+                                        port >= 0 ? Integer.toString(port) : null);
+                                break;
+                            }
                         }
                     }
-                }
-                Iterator<PatternMatcher> pIt = ri.filter.pathsIterator();
-                if (pIt != null) {
-                    String path = data.getPath();
-                    while (path != null && pIt.hasNext()) {
-                        PatternMatcher p = pIt.next();
-                        if (p.match(path)) {
-                            filter.addDataPath(p.getPath(), p.getType());
-                            break;
+                    Iterator<PatternMatcher> pIt = ri.filter.pathsIterator();
+                    if (pIt != null) {
+                        String path = data.getPath();
+                        while (path != null && pIt.hasNext()) {
+                            PatternMatcher p = pIt.next();
+                            if (p.match(path)) {
+                                filter.addDataPath(p.getPath(), p.getType());
+                                break;
+                            }
                         }
                     }
                 }
diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java
index 242f12e..ec79a50 100644
--- a/core/java/com/android/internal/widget/ContactHeaderWidget.java
+++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java
@@ -175,7 +175,6 @@
 
         mDisplayNameView = (TextView) findViewById(R.id.name);
         mAggregateBadge = findViewById(R.id.aggregate_badge);
-        mAggregateBadge.setVisibility(View.GONE);
 
         mPhoneticNameView = (TextView) findViewById(R.id.phonetic_name);
 
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index fd38998..9152729 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -476,7 +476,9 @@
         int heightSpecSize =  MeasureSpec.getSize(heightMeasureSpec);
 
         if (widthSpecMode == MeasureSpec.UNSPECIFIED || heightSpecMode == MeasureSpec.UNSPECIFIED) {
-            throw new RuntimeException(LOG_TAG + " cannot have UNSPECIFIED dimensions");
+            Log.e("SlidingTab", "SlidingTab cannot have UNSPECIFIED MeasureSpec"
+                    +"(wspec=" + widthSpecMode + ", hspec=" + heightSpecMode + ")",
+                    new RuntimeException(LOG_TAG + "stack:"));
         }
 
         mLeftSlider.measure();
@@ -554,6 +556,9 @@
     public void reset(boolean animate) {
         mLeftSlider.reset(animate);
         mRightSlider.reset(animate);
+        if (!animate) {
+            mAnimating = false;
+        }
     }
 
     @Override
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 9c0e282..b85466b 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -530,7 +530,12 @@
     sp<Camera> camera = get_native_camera(env, thiz, NULL);
     if (camera == 0) return;
 
-    if (camera->sendCommand(CAMERA_CMD_START_SMOOTH_ZOOM, value, 0) != NO_ERROR) {
+    status_t rc = camera->sendCommand(CAMERA_CMD_START_SMOOTH_ZOOM, value, 0);
+    if (rc == BAD_VALUE) {
+        char msg[64];
+        sprintf(msg, "invalid zoom value=%d", value);
+        jniThrowException(env, "java/lang/IllegalArgumentException", msg);
+    } else if (rc != NO_ERROR) {
         jniThrowException(env, "java/lang/RuntimeException", "start smooth zoom failed");
     }
 }
diff --git a/core/res/res/layout/contact_header.xml b/core/res/res/layout/contact_header.xml
index ecbe41b..bf467d3 100644
--- a/core/res/res/layout/contact_header.xml
+++ b/core/res/res/layout/contact_header.xml
@@ -48,6 +48,7 @@
                 android:paddingRight="3dip"
                 android:paddingTop="3dip"
                 android:src="@drawable/ic_aggregated"
+                android:visibility="gone"
             />
 
             <TextView android:id="@+id/name"
@@ -59,7 +60,6 @@
                 android:textStyle="bold"
                 android:shadowColor="#BB000000"
                 android:shadowRadius="2.75"
-                android:layout_marginBottom="-4dip"
                 />
         </LinearLayout>
 
@@ -70,6 +70,7 @@
             android:singleLine="true"
             android:ellipsize="end"
             android:layout_marginTop="-2dip"
+            android:visibility="gone"
         />
 
         <TextView android:id="@+id/status"
@@ -79,6 +80,7 @@
             android:singleLine="true"
             android:ellipsize="end"
             android:layout_marginTop="-2dip"
+            android:visibility="gone"
         />
 
         <TextView android:id="@+id/status_date"
@@ -88,6 +90,7 @@
             android:textAppearance="?android:attr/textAppearanceSmall"
             android:textSize="12sp"
             android:layout_marginTop="-2dip"
+            android:visibility="gone"
         />
     </LinearLayout>
 
@@ -97,7 +100,9 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
         android:paddingLeft="3dip"
-        android:paddingRight="6dip"/>
+        android:paddingRight="6dip"
+        android:visibility="gone"
+    />
 
     <CheckBox
         android:id="@+id/star"
diff --git a/core/res/res/layout/preference_dialog_edittext.xml b/core/res/res/layout/preference_dialog_edittext.xml
index 5cc1ea2..b41e774 100644
--- a/core/res/res/layout/preference_dialog_edittext.xml
+++ b/core/res/res/layout/preference_dialog_edittext.xml
@@ -15,17 +15,24 @@
 -->
 
 <!-- Layout used as the dialog's content View for EditTextPreference. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+android:id/edittext_container"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:padding="5dip"
-    android:orientation="vertical">
-    
-    <TextView android:id="@+android:id/message"
-        style="?android:attr/textAppearanceSmall"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:overscrollMode="ifContentScrolls">
+
+    <LinearLayout
+        android:id="@+android:id/edittext_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:textColor="?android:attr/textColorSecondary" />
-        
-</LinearLayout>
+        android:padding="5dip"
+        android:orientation="vertical">
+
+        <TextView android:id="@+android:id/message"
+            style="?android:attr/textAppearanceSmall"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textColor="?android:attr/textColorSecondary" />
+            
+    </LinearLayout>
+
+</ScrollView>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 06e9bbf..f92dd9b 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1874,11 +1874,11 @@
         <!-- Drawable used to draw the divider between tabs. -->
         <attr name="divider" />
         <!-- Determines whether the strip under the tab indicators is drawn or not. -->
-        <attr name="stripEnabled" format="boolean" />
+        <attr name="tabStripEnabled" format="boolean" />
         <!-- Drawable used to draw the left part of the strip underneath the tabs. -->
-        <attr name="stripLeft" format="reference" />
+        <attr name="tabStripLeft" format="reference" />
         <!-- Drawable used to draw the right part of the strip underneath the tabs. -->
-        <attr name="stripRight" format="reference" />
+        <attr name="tabStripRight" format="reference" />
     </declare-styleable>
     <declare-styleable name="TextAppearance">
         <!-- Text color. -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index a7336fc..ef6719df 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1232,9 +1232,9 @@
   <public type="attr" name="webTextViewStyle" id="0x010102b9" />
   <public type="attr" name="overscrollMode" id="0x010102ba" />
   <public type="attr" name="restoreAnyVersion" id="0x010102bb" />
-  <public type="attr" name="stripLeft" id="0x010102bc" />
-  <public type="attr" name="stripRight" id="0x010102bd" />
-  <public type="attr" name="stripEnabled" id="0x010102be" />
+  <public type="attr" name="tabStripLeft" id="0x010102bc" />
+  <public type="attr" name="tabStripRight" id="0x010102bd" />
+  <public type="attr" name="tabStripEnabled" id="0x010102be" />
   <public type="attr" name="overscrollHeader" id="0x010102bf" />
   <public type="attr" name="overscrollFooter" id="0x010102c0" />
 
diff --git a/core/tests/coretests/src/android/util/base64/Base64Test.java b/core/tests/coretests/src/android/util/Base64Test.java
similarity index 99%
rename from core/tests/coretests/src/android/util/base64/Base64Test.java
rename to core/tests/coretests/src/android/util/Base64Test.java
index 48192bb..0f5b090 100644
--- a/core/tests/coretests/src/android/util/base64/Base64Test.java
+++ b/core/tests/coretests/src/android/util/Base64Test.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.util.base64;
+package android.util;
 
 import junit.framework.TestCase;
 
diff --git a/docs/html/guide/appendix/media-formats.jd b/docs/html/guide/appendix/media-formats.jd
index db5a15e..94a6471 100644
--- a/docs/html/guide/appendix/media-formats.jd
+++ b/docs/html/guide/appendix/media-formats.jd
@@ -2,7 +2,6 @@
 @jd:body
 
 <p>The <a href="#core">Core Media Formats</a> table below describes the media format support built into the Android platform. Note that any given mobile device may provide support for additional formats or file types not listed in the table. </p>
-<p>For your convenience, the table <a href="#g1">T-Mobile G1 Media Formats</a> describes additional media formats and characteristics provided by the T-Mobile G1 device. Other devices may support additional formats not listed on this page. </p>
 
 <p>As an application developer, you are free to make use of any media codec that is available on any Android-powered device, including those provided by the Android platform and those that are device-specific.</p>
 
@@ -152,56 +151,6 @@
 
 </tbody></table>
 
-<h2 id="g1">T-Mobile G1 Media Formats and Characteristics</h2>
-
-<p>The table below lists media formats supported by the T-Mobile G1 in addition to those provided as part of the Android platform. This table also details G1-specific performance characteristics of some Android core media formats.</p>
-
-<table>
-<tbody>
-
-<tr>
-<th>Type</th>
-<th>Format</th>
-<th>Encoder</th>
-<th>Decoder</th>
-<th>Comment</th>
-<th>File Type(s) Supported</th>
-</tr>
-
-<tr>
-<td>Audio</td>
-<td>WMA</td>
-<td>&nbsp;</td>
-<td style="text-align: center;">X</td>
-<td>Supports WMA standard L1-L3:
-<ul>
-<li>L1: 64 kbps - 161 kbps @ 44.1kHz</li>
-<li>L2: &lt;=161 kbps &lt;=48 kHz</li>
-<li>L3: &lt;385 kbps &lt;=48 kHz</li>
-</ul>
-Mono and stereo profiles with 16-bits per sample. Decoder does not support WMA Pro, Lossless, or Speech codecs. 
-</td>
-<td>Windows Media Audio (.wma)</td>
-</tr>
-
-<tr>
-<td rowspan="2">Video</td>
-<td>WMV</td>
-<td>&nbsp;</td>
-<td style="text-align: center;">X</td>
-<td>Versions 7, 8 and 9. Simple profile only</td>
-<td>Windows Media Video (.wmv)</td>
-</tr>
-
-<tr>
-<td>H.264&nbsp;AVC</td>
-<td>&nbsp;</td>
-<td style="text-align: center;">X</td>
-<td>On the G1, this decoder is limited to baseline profile up to 480x320, and 600 kbps average bitrate for the video stream.</td>
-<td>3GPP (.3gp) and MPEG-4 (.mp4)</td>
-</tr>
-
-</tbody></table>
 
 
 
diff --git a/docs/html/guide/publishing/app-signing.jd b/docs/html/guide/publishing/app-signing.jd
index 86dd155..39b230b 100644
--- a/docs/html/guide/publishing/app-signing.jd
+++ b/docs/html/guide/publishing/app-signing.jd
@@ -348,7 +348,8 @@
 way, your password is not stored in your shell history.</p></td>
 </tr>
 <tr>
-<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key.</td>
+<td><code>-alias &lt;alias_name&gt;</code></td><td>An alias for the key. Only
+the first 8 characters of the alias are used.</td>
 </tr>
 <tr>
 <td><code>-keyalg &lt;alg&gt;</code></td><td>The encryption algorithm to use 
diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/topics/fundamentals.jd
index 807c7ff..fd9af50 100644
--- a/docs/html/guide/topics/fundamentals.jd
+++ b/docs/html/guide/topics/fundamentals.jd
@@ -990,8 +990,8 @@
 </p>
 
 <p>
-An RPC interface can include only methods.
-All methods are executed synchronously (the local method blocks until the 
+An RPC interface can include only methods. By default,
+all methods are executed synchronously (the local method blocks until the
 remote method finishes), even if there is no return value.
 </p>
 
diff --git a/docs/html/index.jd b/docs/html/index.jd
index e3bf685..913f83d 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -2,7 +2,7 @@
 @jd:body
 
 
-	<div id="mainBodyFixed">
+<div id="mainBodyFixed">
               <div id="mainBodyLeft">			
                     <div id="homeMiddle">
                         <div id="topAnnouncement">
@@ -11,10 +11,10 @@
                             </div><!-- end homeTitle -->
                             <div id="announcement-block">
                             <!-- total max width is 520px -->
-                                  <img src="/assets/images/home/Android_Dev_Lab_l.png" alt="Android developer labs" width="100px" style="padding-left:78px;padding-right:46px;padding-bottom: 8px;"/>
+                                  <img src="{@docRoot}assets/images/home/gdc-logo.png" alt="Android at GDC 2010" width="203px" style="padding-left:22px;padding-bottom:28px;padding-top:22px;"/>
                                   <div id="announcement" style="width:275px">
-<p>We're hosting the next Android Developer Lab in Barcelona at <a href="http://www.mobileworldcongress.com/index.htm">Mobile World Congress&nbsp;&raquo;</a> on Wednesday February 17th at <a href="http://www.mobileworldcongress.com/exhibition/app_planet.htm">App Planet&nbsp;&raquo;</a>, located in Hall 7.  Come visit us to attend a technical presentation, talk to our Android developer relations team, and meet other members of the developer community.</p><p><a href="http://sites.google.com/site/androidmwc/home">Learn more &raquo;</a></p>
-<!--<p><a href="http://android-developers.blogspot.com/2009/11/bring-your-lab-coats.html">Learn more &raquo;</a></p>-->
+<p>Android will be at the <a href="http://www.gdconf.com/">2010 Game Developers Conference</a> in San Francisco, from March 9th to 11th. We're looking forward to seeing you there!</p>
+<p><a href="http://android-developers.blogspot.com/2010/03/android-at-game-developers-conference.html">Learn more &raquo;</a></p>
                                 </div> <!-- end annoucement -->
                             </div> <!-- end annoucement-block -->
                         </div><!-- end topAnnouncement -->
diff --git a/docs/html/resources/articles/contacts.jd b/docs/html/resources/articles/contacts.jd
new file mode 100644
index 0000000..bdf84e6
--- /dev/null
+++ b/docs/html/resources/articles/contacts.jd
@@ -0,0 +1,422 @@
+page.title=Using the Contacts API
+@jd:body
+
+<p>Starting from Android 2.0 (API Level 5), the Android platform provides an
+improved Contacts API for managing and integrating contacts from multiple
+accounts and from other data sources. To handle overlapping data from multiple
+sources, the contacts content provider aggregates similar contacts and presents
+them to users as a single entity. This article describes how to use the new API
+to manage contacts.</p>
+
+<p>The new Contacts API is defined in the 
+{@link android.provider.ContactsContract android.provider.ContactsContract} 
+and related classes. The older API is still supported, although deprecated. 
+If you have an existing application that uses the older API, 
+see <a href="#legacy">Considerations for legacy apps</a>, below, for ideas 
+on how to support the Contacts API in your app.</p>
+
+<p>If you'd like to look at an applied example of how to use the new Contacts 
+API, including how to support both the new and older API in a single app,
+please see the <a 
+href="{@docRoot}resources/samples/BusinessCard/index.html">Business Card 
+sample application</a>.</p>
+
+<h3>Data structure of Contacts</h3>
+
+<p>In the new Contacts API, data is laid out in three primary tables: 
+<em>contacts</em>, <em>raw contacts</em>, and <em>data</em>, a structure that 
+is slightly different from that used in the older API. The new structure 
+allows the system to more easily store and manage information for a 
+specific contact from multiple contacts sources. </p>
+
+<img style="margin: 0px auto 10px; display: block; text-align: center; width: 471px; height: 255px;" src="images/contacts-2.png" alt="" border="0">
+
+<ul>
+<li><code>Data</code> is a generic table that stores all of the data points
+associated with a raw contact. Each row stores data of a specific kind &mdash;
+for example  name, photo, email addresses, phone numbers, and group memberships.
+Each row is tagged with a MIME type to identify what type of data it can
+contain, across the entire column. Columns are generic and the type of data they
+contain is determined by the kind of data stored in each row. For example, if a
+row's data kind is <code>Phone.CONTENT_ITEM_TYPE</code>, then the first column
+stores the phone number, but if the data kind is
+<code>Email.CONTENT_ITEM_TYPE</code>, then the column stores the email address. 
+
+<p>The {@link android.provider.ContactsContract.CommonDataKinds ContactsContract.CommonDataKinds} 
+class provides subclasses corresponding to common MIME types for contacts data. 
+If needed, your application or other contacts sources can define additional MIME 
+types for data rows. For more information about the Data table and examples of 
+how to use it, see {@link android.provider.ContactsContract.Data android.provider.ContactsContract.Data}.</p></li>
+
+<li>A row in the <code>RawContacts</code> table represents the set of
+<code>Data</code> and other information describing a person and associated with
+a single contacts source. For example, a row might define the data associated
+with a person's Google or Exchange account or Facebook friend. For more
+information, see 
+{@link android.provider.ContactsContract.RawContacts ContactsContract.RawContacts}.</p>
+
+<li>A row in the <code>Contacts</code> table represents an aggregate of one or
+more <code>RawContacts</code> describing the same person (or entity). 
+
+<p>As mentioned above, the Contacts content provider automatically aggregates
+Raw Contacts into a single Contact entry, where possible, since common data
+fields (such as name or email address) are likely to be stored in each raw
+contact. Since the aggregation logic maintains the entries in the Contact rows,
+the entries can be read but should not be modified.  See the section <a
+href="#aggregation">Aggregation of contacts</a>, below, for more details, 
+including and information on how to
+control aggregation.</li>
+
+</ul>
+
+<p>When displaying contacts to users, applications should typically operate on
+the Contacts level, since it provides a unified, aggregated view of contacts
+from various underlying sources. </p>
+
+<h4>Example: Inserting a Phone Number</h4>
+
+<p>To insert a phone number using the new APIs you'll need the ID of the Raw
+Contact to attach the phone number to, then you'll need to create a Data
+row:</p>
+
+<pre>import android.provider.ContactsContract.CommonDataKinds.Phone;
+...
+ContentValues values = new ContentValues();
+values.put(Phone.RAW_CONTACT_ID, rawContactId);
+values.put(Phone.NUMBER, phoneNumber);
+values.put(Phone.TYPE, Phone.TYPE_MOBILE);
+Uri uri = getContentResolver().insert(Phone.CONTENT_URI, values);</pre>
+
+
+<h3 id="aggregation">Aggregation of contacts</h3>
+
+<p>When users sync contacts from multiple sources, several contacts might refer
+to the same person or entity, but with slightly different (or overlapping) data.
+ For example, "Bob Parr" might be a user's co-worker and also his personal
+friend, so the user might have his contact information stored in both a
+corporate email account and a personal account. To provide a simplified view for
+the user, the system locates such overlapping contacts and combines them into a
+single, aggregate contact.  </p>
+
+<p>The system automatically aggregates contacts by default. However, if needed,
+your application can control how the system handles aggregation or it can
+disable aggregation altogether, as described in the sections below.</p>
+
+<h4>Automatic aggregation</h4>
+
+<p>When a raw contact is added or modified, the system looks for matching
+(overlapping) raw contacts with which to aggregate it. It may not find any
+matching raw contacts, in which case it will create an aggregate contact that
+contains just the original raw contact. If it finds a single match,it creates a
+new contact that contains the two raw contacts. And it may even find multiple
+similar raw contacts, in which case it chooses the closest match. </p>
+
+<p>Two raw contacts are considered to be a match if at least one of these
+conditions is met:</p>
+
+<ul>
+<li>They have matching names.</li>
+<li>Their names consist of the same words but in different order 
+(for example, "Bob Parr" and "Parr, Bob")</li>
+<li>One of them has a common short name for the other (for example, 
+"Bob Parr" and "Robert Parr")</li>
+<li>One of them has just a first or last name and it matches the other 
+raw contact. This rule is less reliable, so it only applies if the two 
+raw contacts are also sharing some other data like a phone number, an 
+email address or a nickname (for example, Helen ["elastigirl"] = Helen 
+Parr ["elastigirl"])</li>
+<li>At least one of the two raw contacts is missing the name altogether 
+and they are sharing a phone number, an email address or a nickname (for 
+example, Bob Parr [incredible@android.com] = incredible@android.com).</li>
+</ul>
+
+<p>When comparing names, the system ignores upper/lower case differences 
+(Bob=BOB=bob) and diacritical marks (Hélène=Helene). When comparing two 
+phone numbers the system ignores special characters such as "*", "#", 
+"(", ")", and whitespace. Also if the only difference between two numbers 
+is that one has a country code and the other does not, then the system 
+considers those to be a match (except for numbers in the Japan country code).</p>
+
+<p>Automatic aggregation is not permanent; any change of a constituent raw 
+contact may create a new aggregate or break up an existing one.</p>
+
+<h4>Explicit aggregation</h4>
+
+<p>In some cases, the system's automatic aggregation may not meet the
+requirements of your application or sync adapter. There are two sets of APIs you
+can use to control aggregation explicitly: <em>aggregation modes</em> allow you
+to control automatic aggregation behaviors and <em>aggregation exceptions</em>
+allow you to override automated aggregation entirely.
+
+<p><strong>Aggregation modes</strong></p>
+
+<p>You can set an aggregation mode for each raw contact individually. To do so,
+add a mode constant as the value of the <code>AGGREGATION_MODE column</code> in
+the <code>RawContact</code> row. The mode constants available include: </p>
+
+<ul>
+<li><code>AGGREGATION_MODE_DEFAULT</code> &mdash; normal mode, automatic
+aggregation is allowed.</li>
+<li><code>AGGREGATION_MODE_DISABLED</code> &mdash; automatic aggregation is not
+allowed. The raw contact will not be aggregated.</li>
+<li><code>AGGREGATION_MODE_SUSPENDED</code> &mdash; automatic aggregation is
+deactivated. If the raw contact is already a part of an aggregated contact when
+aggregation mode changes to suspended, it will remain in the aggregate, even if
+it changes in such a way that it no longer matches the other raw contacts in the
+aggregate.</li>
+</ul>
+
+<p><strong>Aggregation exceptions</strong></p>
+
+<p>To keep two raw contacts unconditionally together or unconditionally apart,
+you can add a row to the 
+{@link android.provider.ContactsContract.AggregationExceptions} table. Exceptions
+defined in the table override all automatic aggregation rules. </p>
+
+
+<h3>Loookup URI</h3>
+
+<p>The new Contacts API introduces the notion of a lookup key for a contact. If
+your application needs to maintain references to contacts, you should use lookup
+keys instead of the traditional row ids. You can acquire a lookup key from the
+contact itself, it is a column on the 
+{@link android.provider.ContactsContract.Contacts} table. Once you have a lookup key,
+you can construct a URI in this way:</p>
+
+<pre>Uri lookupUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey)</pre>
+
+<p>and use it like you would use a traditional content URI, for example: </p>
+
+<pre>Cursor c = getContentResolver().query(lookupUri, new String[]{Contacts.DISPLAY_NAME}, ...);
+try {
+    c.moveToFirst();
+    String displayName = c.getString(0);
+} finally {
+    c.close();
+}</pre>
+
+<p>The reason for this complication is that regular contact row IDs are
+inherently volatile. Let's say your app stored a long ID of a contact. Then the
+user goes and manually joins the contact with some other contact. Now there is a
+single contact where there used to be two, and the stored long contact ID points
+nowhere. 
+
+<p>The lookup key helps resolve the contact in this case. The key is a string
+that concatenates the server-side identities of the raw contacts. Your
+application can use that string to find a contact, regardless whether the raw
+contact is aggregated with others or not. </p>
+
+<p>If performance is a concern for your application, you might want to store
+both the lookup and the long ID of a contact and construct a lookup URI out of
+both IDs, as shown here:</p>
+
+<pre>Uri lookupUri = getLookupUri(contactId, lookupKey)</pre>
+
+<p>When both IDs are present in the URI, the system will try to use the long ID
+first. That is a very quick query. If the contact is not found, or if the one
+that is found has the wrong lookup key, the content provider will parse the
+lookup key and track down the constituent raw contacts. If your app
+bulk-processes contacts, you should maintain both IDs. If your app works with a
+single contact per user action, you probably don't need to bother with storing
+the long ID.</p>
+
+Android itself uses lookup URIs whenever there is a need to reference a contact,
+such as with shortcuts or Quick Contact, and also during editing or even viewing
+a contact. The latter case is less obvious &mdash; why would a contact ID change
+while we are simply viewing the contact? It could change because there might be
+a sync going in the background, and the contact might get automatically
+aggregated with another while being viewed.</p>
+
+<p>In summary: whenever you need to reference a contact, we recommend that you
+do so by its lookup URI.</p>
+
+
+<h3 id="legacy">Considerations for legacy applications</h3>
+
+<p>If you have an existing application that uses the older Contacts API, 
+you should consider upgrading it to use the new API. You have four options: </p>
+
+<ul>
+<li>Leave it as-is and rely on the Contacts compatibility mode.</li>
+<li>Upgrade the app and discontinue support of pre-Android 2.0 platforms.</li>
+<li>Build a new version of the app for the new API, while keeping the old version available.</li>
+<li>Make the app use the right set of APIs depending on the platform where it is deployed. </li>
+</ul>
+
+<p>Let's consider these options one by one.</p>
+
+<h4>Using compatibility mode</h4>
+
+<p>Compatibility mode is the easiest option because you just leave the
+application as is, and it should run on Android 2.0 as long as it only uses
+public APIs. A couple examples of the use of non-public API include the use of
+explicit table names in nested queries and the use of columns that were not
+declared as public constants in the {@link android.provider.Contacts} class.
+</p>
+
+<p>Even if the application currently runs, you don't want to leave it like this
+for long. The main reason is that it will only have access to contacts from one
+account, namely the first Google account on the device. If the user opens other
+accounts in addition to or instead of a Google account, your application will
+not be able to access those contacts.</p>
+
+
+<h4>Upgrading to the new API and dropping support for older platforms</h4>
+
+<p>If your application will no longer target platforms older than 
+Android 2.0, you can upgrade to the new API in this way:</p>
+
+<ul>
+<li>Replace all usages of {@link android.provider.Contacts} with calls to new
+API. After you are done, you should not see any deprecation warnings during
+application build. The new application will be able to take full advantage of
+multiple accounts and other new features of Android 2.0. </p>
+
+<li>In the application's manifest, update (or add) the
+<code>android:minSdkVersion</code> attribute to the
+<code>&lt;uses-sdk&gt;</code> element. To use the new Contacts API, you should
+set the value of the attribute to "5" (or higher, as appropriate). For more
+information about <code>android:minSdkVersion</code>, see the documentation for
+the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+element. For more information about the value of the
+<code>minSdkVersion</code>, see <a
+href="{@docRoot}guide/appendix/api-levels.html">API Levels</a>.</li>
+</ul>
+
+<h4>Maintaining two applications</h4>
+
+<p>You may decide to have two different applications: one for pre-Android 2.0 
+platforms and one for Android 2.0 and beyond. If so, here's what you'll need to do:</p>
+
+<ul>
+  <li>Clone your existing app. </li>
+  <li>Change the old application: </li>
+    <ul>
+      <li>At launch time, check the version of the SDK. The version of the SDK 
+is available as {@link android.os.Build.VERSION#SDK android.os.Build.VERSION.SDK}.</li>
+      <li>If the SDK version is greater or equal to 5 (Android 2.0), show a dialog 
+suggesting to the user that it's time to go to Market and find a new version of 
+the app. You can even provide a link to the new app on Market (see <a 
+href="{@docRoot}guide/publishing/publishing.html#marketintent">Using Intents 
+to Launch Market</a>). </li>
+    </ul>
+  <li>Change the new application:</li>
+    <ul>
+      <li>Replace all usages of the older Contacts API with calls to new API. 
+The new application will be able to take full advantage of multiple accounts 
+and other new features of Android 2.0. </li>
+      <li>Modify that application's AndroidManifest.xml file: </li>
+        <ul>
+          <li>Give the application a new name and a new package name. Currently 
+Android Market does not allow you to have two applications with the same 
+name/package.</li>
+          <li>Update (or add) the <code>android:minSdkVersion</code> attribute 
+to the <code>&lt;uses-sdk&gt;</code> element. To use the new Contacts API, 
+you should set the value of the attribute to "5" (or higher, as appropriate).</li>
+        </ul>
+      </ul>
+    <li>Publish both apps on Market, the old app one as an upgrade and the 
+other as new. Make sure to explain the difference between the apps in their 
+descriptions.</li>
+</ul>
+
+<p>This plan has its disadvantages: </p>
+
+<ul>
+<li>The new application will not be able to read the old application's data. 
+Application data can only be accessed by code living in the same package. So 
+databases, shared preferences, and so on, will need to be populated from 
+scratch.</li>
+<li>The upgrade process is too clunky for the user. Some users may choose 
+to either stay with the crippled old version or uninstall altogether.</li>
+</ul>
+
+<h4>Supporting the old and new APIs in the same application</h4>
+
+<p>This is a bit tricky, but the result is worth the effort. You can 
+build a single package that will work on any platform:</p>
+
+<p>Go through the existing application and factor out all access to 
+{@link android.provider.Contacts} into one class, such as ContactAccessorOldApi. 
+For example, if you have code like this:
+
+<pre>    protected void pickContact() {
+        startActivityForResult(new Intent(Intent.ACTION_PICK, People.CONTENT_URI), 0);
+    }</pre>
+
+<p>it will change to:</p>
+
+    
+<pre>    private final ContactAccessorOldApi mContactAccessor = new ContactAccessorOldApi();
+
+    void pickContact() {
+        startActivityForResult(mContactAccessor.getContactPickerIntent(), 0);
+    }</pre>
+
+<p>The corresponding method on ContactAccessorOldApi will look like this:</p>
+
+<pre>    public Intent getContactPickerIntent() {
+        return new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
+    }</pre>
+
+<p>Once you are done, you should see deprecation warnings coming only 
+from ContactAccessorOldApi. </p>
+
+<p>Create a new abstract class ContactAccessor, make sure the abstract 
+class has all method signatures from ContactAccessorOldApi. Make 
+ContactAccessorOldApi extend ContactAccessor:</p>
+
+<pre>    public abstract class ContactAccessor {
+        public abstract Intent getContactPickerIntent();
+        ...
+    }</pre>
+
+<p>Create a new subclass of ContactAccessor, ContactAccessorNewApi and 
+implement all methods using the new API:</p>
+
+<pre>    public class ContactAccessorNewApi extends ContactAccessor {    
+        &#64;Override
+        public Intent getContactPickerIntent() {
+            return new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
+        }
+        ...
+    }</pre>
+
+<p>At this point, you have two implementations of the same API, one using the 
+old API and another using the new API. Let's plug them in. Add this code to 
+the ContactAccessor class:</p>
+
+<pre>    private static ContactAccessor sInstance;
+
+    public static ContactAccessor getInstance() {
+        if (sInstance == null) {
+            String className;
+            int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
+            if (sdkVersion &lt; Build.VERSION_CODES.ECLAIR) {
+                className = "ContactAccessorOldApi";
+            } else {
+                className = "ContactAccessorNewApi";
+            }
+            try {
+                Class&lt;? extends ContactAccessor&gt; clazz =
+                        Class.forName(ContactAccessor.class.getPackage() + "." + className)
+                                .asSubclass(ContactAccessor.class);
+                sInstance = clazz.newInstance();
+            } catch (Exception e) {
+                throw new IllegalStateException(e);
+            }
+        }
+        return sInstance;
+    }</pre>
+
+<p>Now replace references to ContactsAccessorOldApi with references to 
+ContactsAccessor:</p>
+
+<pre>    private final ContactAccessor mContactAccessor = ContactAccessor.getInstance();</pre>
+
+<p>You are done! Now you will want to test on Android 2.0, 1.6 and 1.5.</p>
+
+<p>We hope you like the new features and APIs we've added to Contacts in 
+Android 2.0, and we can't wait to see what cool things developers do with 
+the new APIs.</p>
diff --git a/docs/html/resources/articles/images/speech-input.png b/docs/html/resources/articles/images/speech-input.png
new file mode 100644
index 0000000..78fbc98
--- /dev/null
+++ b/docs/html/resources/articles/images/speech-input.png
Binary files differ
diff --git a/docs/html/resources/articles/index.jd b/docs/html/resources/articles/index.jd
index d2f0996..d2b7645 100644
--- a/docs/html/resources/articles/index.jd
+++ b/docs/html/resources/articles/index.jd
@@ -127,6 +127,11 @@
 </dl>
 
 <dl>
+  <dt><a href="{@docRoot}resources/articles/tts.html">Using the Contacts API</a></dt>
+  <dd>This article discusses the improved Contacts API introduced in Android 2.0 and how to use it to manage and integrate contacts from multiple accounts and data sources. The article also discusses techniques for using the new API on devices that support it, while maintaining backward compatibility with the old API on other devices. </dd>
+</dl>
+
+<dl>
   <dt><a href="{@docRoot}resources/articles/using-webviews.html">Using WebViews</a></dt>
   <dd>WebViews allow an application to dynamically display HTML and execute JavaScript, without relinquishing control to a separate browser application. This article introduces the WebView classes and provides a sample application that demonstrates its use.</dd>
 </dl>
diff --git a/docs/html/resources/articles/speech-input.jd b/docs/html/resources/articles/speech-input.jd
new file mode 100644
index 0000000..8e41d34
--- /dev/null
+++ b/docs/html/resources/articles/speech-input.jd
@@ -0,0 +1,91 @@
+page.title=Speech Input
+@jd:body
+
+<p> People love their mobile phones because they can stay in touch wherever they
+are.  That means not just talking, but e-mailing, texting, microblogging, and so
+on. </p>
+
+<p>Speech input adds another dimension to staying in touch.
+Google's Voice Search application, which is pre-installed on many Android devices,
+provides powerful features like "search by voice" and voice shortcuts like "Navigate to." Further
+enhancing the voice experience, Android 2.1 introduces a <a
+href="http://www.youtube.com/watch?v=laOlkD8LmZw">
+voice-enabled keyboard</a>, which makes it even easier
+to stay connected. Now you can dictate your message instead of typing it. Just
+tap the new microphone button on the keyboard, and you can speak in just about
+any context in which you would normally type. </p> 
+
+<p> We believe speech can
+fundamentally change the mobile experience. We would like to invite every
+Android application developer to consider integrating speech input capabilities
+via the Android SDK.  One of our favorite apps in the Market that integrates
+speech input is <a href="http://www.handcent.com/">Handcent SMS</a>, 
+because you can dictate a reply to any SMS with a
+quick tap on the SMS popup window. Here is Speech input integrated into
+Handcent SMS:</p>
+
+<img src="images/speech-input.png"/>
+
+
+<p> The Android SDK makes it easy to integrate speech input directly into your
+own application. Just copy and paste from this <a
+href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/
+VoiceRecognition.html">
+sample application</a> to get
+started. The sample application first verifies that the target device is able
+to recognize speech input:</p> 
+<pre>
+// Check to see if a recognition activity is present
+PackageManager pm = getPackageManager();
+List<ResolveInfo> activities = pm.queryIntentActivities(
+  new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
+if (activities.size() != 0) {
+  speakButton.setOnClickListener(this);
+} else {
+  speakButton.setEnabled(false);
+  speakButton.setText("Recognizer not present");
+}
+</pre>
+<p>
+The sample application then uses {@link
+android.app.Activity#startActivityForResult(android.content.Intent, int)
+startActivityForResult()} to broadcast an intent that requests voice
+recognition, including an extra parameter that specifies one of two language
+models. The voice recognition application that handles the intent processes the
+voice input, then passes the recognized string back to your application by
+calling the {@link android.app.Activity#onActivityResult(int, int,
+android.content.Intent) onActivityResult()} callback. </p>
+
+
+<p>Android is an open platform, so your application can potentially make
+use of any speech recognition service on the device that's registered to receive
+a {@link android.speech.RecognizerIntent}. Google's Voice Search application,
+which is pre-installed on
+many Android devices, responds to a <em>RecognizerIntent</em> by displaying the
+"Speak
+now" dialog and streaming audio to Google's servers -- the same servers used
+when a user taps the microphone button on the search widget or the voice-enabled
+keyboard. Voice Search is installed on all the major
+US devices, and it's also available on Market. You can check whether Voice
+Search is installed in 
+<strong>Settings > Applications > Manage applications</strong>. </p>
+
+<p> One important tip: for speech input to be as accurate as possible, it's
+helpful to have an idea of what words are likely to be spoken.  While a message
+like "Mom, I'm writing you this message with my voice!" might be appropriate for
+an email or SMS message, you're probably more likely to say something like
+"weather in Mountain View" if you're using Google Search. You can make sure your
+users have the best experience possible by requesting the appropriate
+<em>language model:</em> {@link
+android.speech.RecognizerIntent#LANGUAGE_MODEL_FREE_FORM free_form} for
+dictation, or {@link android.speech.RecognizerIntent#LANGUAGE_MODEL_WEB_SEARCH
+web_search} for shorter, search-like phrases.  We developed the "free form"
+model to improve dictation accuracy for the voice keyboard,
+while the "web search" model is used when users want to search by voice. </p> 
+
+<p> Google's servers currently support English, Mandarin Chinese, and Japanese. 
+The web search model is available in all three languages, while free-form has
+primarily been optimized for English. As we work hard to support more models in
+more languages, and to improve the accuracy of the speech recognition technology
+we use in our products, Android developers who integrate speech capabilities
+directly into their applications can reap the benefits as well. </p>
\ No newline at end of file
diff --git a/docs/html/resources/community-groups.jd b/docs/html/resources/community-groups.jd
index a36a425..72bdf7a 100644
--- a/docs/html/resources/community-groups.jd
+++ b/docs/html/resources/community-groups.jd
@@ -2,21 +2,27 @@
 page.title=Developer Forums
 @jd:body
 
-<p>Welcome to the Android developers community! We're glad you're here and invite you to participate in discussions with other Android application developers on topics that interest you.</p>
+<div id="qv-wrapper">
+<div id="qv">
 
-<p>The lists on this page are primarily for discussion about Android application development. If you are seeking discussion about Android source code (not application development), then please refer to the <a href="http://source.android.com/discuss">Open Source Project Mailing lists</a>.</p>
-
-<p style="margin-bottom:.5em"><strong>Contents</strong></p>
-<ol class="toc">
-  <li><a href="#StackOverflow">Stack Overflow</a> <span class="new">new!</span></li>
-  <li><a href="#MailingLists">Mailing lists</a><ol>
+  <h2>In this document</h2>
+  <ol>
+  <li><a href="#StackOverflow">Android on Stack Overflow</a></li>
+  <li><a href="#MailingLists">Mailing lists</a>
+  <ol>
     <li><a href="#BeforeYouPost">Before you post</a></li>
     <li><a href="#UsingEmail">Using email with the mailing lists</a></li>
     <li><a href="#ApplicationDeveloperLists">Application developer mailing lists</a></li>
   </ol></li>
   <li><a href="#MarketHelp">Android Market Help Forum</a></li>
-</ol>
+  </ol>
 
+</div>
+</div>
+
+<p>Welcome to the Android developers community! We're glad you're here and invite you to participate in discussions with other Android application developers on topics that interest you.</p>
+
+<p>The lists on this page are primarily for discussion about Android application development. If you are seeking discussion about Android source code (not application development), then please refer to the <a href="http://source.android.com/discuss">Open Source Project Mailing lists</a>.</p>
 
 <h2 id="StackOverflow">Stack Overflow</h2>
 
diff --git a/docs/html/resources/community-more.jd b/docs/html/resources/community-more.jd
index 2be015a..9f16fea 100644
--- a/docs/html/resources/community-more.jd
+++ b/docs/html/resources/community-more.jd
@@ -2,7 +2,7 @@
 page.title=IRC and Twitter
 @jd:body
 
-<p>In addition to the <a href="community-groups.html">Android developer groups</a>, you can also participate in the Android developer community through IRC, and you can also follow us on Twitter. </p>
+<p>In addition to the <a href="community-groups.html">Android developer forums</a>, you can participate in the Android developer community through IRC and you can follow us on Twitter. </p>
 
 <h3 id="irc">IRC</h3>
 
@@ -31,10 +31,10 @@
 <ul>
 <li>Set your nickname before you join the channel.</li>
 <li>Registering your nickname prevents others from using your nickname or impersonating you later:
-<pre>/nick &lt;yournickname&gt;
-/msg nickserv register &lt;password&gt; &lt;email&gt;</code></pre>
+<pre class="no-pretty-print" style="width:50%;">/nick &lt;yournickname&gt;
+/msg nickserv register &lt;password&gt; &lt;email&gt;</pre>
 <p>Afterwards, when you connect, you'll need to supply a password:</p>
-<pre>/connect irc.freenode.net
+<pre class="no-pretty-print" style="width:50%;">/connect irc.freenode.net
 /nick &lt;yournickname&gt;
 /msg nickserv identify &lt;password&gt;
 /join #android-dev</pre>
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 0972029..5958f71 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -95,6 +95,9 @@
         <li><a href="<?cs var:toroot ?>resources/articles/qsb.html">
                 <span class="en">Quick Search Box</span>
                 </a></li>
+        <li><a href="<?cs var:toroot ?>resources/articles/speech-input.html">
+                <span class="en">Speech Input</span>
+                </a></li>
         <li><a href="<?cs var:toroot ?>resources/articles/touch-mode.html">
                 <span class="en">Touch Mode</span>
                 </a></li>
@@ -113,6 +116,9 @@
         <li><a href="<?cs var:toroot ?>resources/articles/tts.html">
                 <span class="en">Using Text-to-Speech</span>
                 </a></li>
+        <li><a href="<?cs var:toroot ?>resources/articles/contacts.html">
+                <span class="en">Using the Contacts API</span>
+                </a> <span class="new">new!</span></li>
         <li><a href="<?cs var:toroot ?>resources/articles/using-webviews.html">
                 <span class="en">Using WebViews</span>
                 </a></li>
@@ -171,9 +177,12 @@
                <span class="zh-TW" style="display:none"></span>
     </h2>
     <ul>
+      <li><a href="<?cs var:toroot ?>resources/samples/get.html">
+            <span class="en">Getting the Samples</span>
+          </a></li>
       <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>resources/samples/index.html">
-               <span class="en">List of Sample Apps</span>
+               <span class="en">List of Samples</span>
              </a> <span class="new">new!</span></div>
         <ul>
           <li><a href="<?cs var:toroot ?>resources/samples/ApiDemos/index.html">
diff --git a/docs/html/resources/samples/get.jd b/docs/html/resources/samples/get.jd
new file mode 100644
index 0000000..898bc49
--- /dev/null
+++ b/docs/html/resources/samples/get.jd
@@ -0,0 +1,90 @@
+page.title=Getting the Samples
+
+@jd:body
+
+<p>Sometimes, the best way to learn how things are done is to look at some
+code.</p>
+
+<p>To help you get started quickly, the Android SDK includes a variety of sample
+code and tutorials that illustrate key concepts and techniques of Android
+application development. For example, the samples show the structure of the
+manifest file and the use of activities, services, resources,
+intents, content providers, and permissions. They also show how to add
+specialized capabilities to your apps, such as Bluetooth and Contacts
+integration, multiple screens support, Live Wallpaper, and more. </p>
+
+<p>The SDK provides the samples both as source code and as browseable HTML, as
+described in the sections below. All of the samples included in the SDK are
+licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+2.0 license</a>, so feel free to use any of the code in your own applications as
+needed!</p>
+
+<h3 id="downloading">Downloading the Sample Code</h3>
+
+<p>The SDK sample code is available to you as a set of downloadable SDK
+components, each of which contains the samples for a specific Android platform
+version. Once you have installed the SDK, you can download one or more samples
+component(s) into your SDK environment using the Android SDK and AVD Manager
+tool, which is pre-installed in the SDK. </p>
+
+<p>To download the samples, launch the Android SDK and AVD Manager tool and
+select one of the samples components from the <strong>Available
+Packages</strong> panel, for example "Samples for SDK API 7". Select
+<strong>Install Selected</strong>, verify and accept the download, then select
+<strong>Install Accepted</strong> to download the component into your SDK. If
+you aren't familiar with the Android SDK and AVD Manager and how to launch or
+use it, please read the <a href="{@docRoot}sdk/adding-components.html">Adding
+SDK Components</a> document. </p>
+
+<p>When the download is complete, you can find the samples sources on your
+computer in this location:</p>
+
+<p style="margin-left:2em">
+<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform-version&gt;</em>/</code>
+</p>
+
+<p>You can easily create new Android projects with the downloaded samples, modify them
+if you'd like, and then run them on an emulator or device. </p>
+
+<p>For example, if you are developing in Eclipse with the ADT Plugin, you can
+create a project for the "API Demos" sample app by starting a new Android
+Project, selecting "Create project from existing source", and then browsing to
+the <code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;</em>/ApiDemos</code>
+directory (the <code>samples</code> directory for the platform version you are
+using).</p>
+
+<p>If you are not working in Eclipse, you can create a project for the API Demos
+sample using the <code>android</code> tool, by executing this command:</p>
+
+<pre class="no-pretty-print">
+android update project -s -n API Demos -t <em>&lt;target_ID></em> -p <em>&lt;path&gt;</em>samples/<em>&lt;platforms&gt;</em>/ApiDemos/
+</pre>
+
+<h3 id="browsing">Browsing the Sample Code</h3>
+
+<p>For your convenience, the SDK provides browseable source code for the latest
+versions of the samples. You can use your browser to navigate through the
+structure of each sample and look at the source code in each of its files. </p>
+
+<p>To browse the samples, go to the <a
+href="{@docRoot}resources/samples/index.html">List of Sample Apps</a> first.
+From there you can read a short summary of each sample application and what
+types of concepts, features, or APIs it includes. Then, use the links provided
+to move through the directories and files of each sample. The browseable source
+is generated from the same source code that is downloadable through the Android
+SDK and AVD Manager, as described above. </p>
+
+<p>The browseable samples files are available online, at the Android Developers
+site only and are not included in the downloadable offline documentation.
+Note that, although samples for several platform versions are available for 
+download, only the samples for the latest platform version are browseable online.
+</p>
+
+
+<h3 id="more">More Sample Code</h3>
+
+<p>If you are looking for more sample code, check out
+<a href="http://code.google.com/p/apps-for-android/">apps-for-android</a>, a
+collection of open source applications that demonstrate various Android APIs.</p>
+
+
diff --git a/docs/html/resources/samples/index.jd b/docs/html/resources/samples/index.jd
index 5ebf41c..044c69de 100644
--- a/docs/html/resources/samples/index.jd
+++ b/docs/html/resources/samples/index.jd
@@ -1,38 +1,21 @@
-page.title=Sample Code
+page.title=List of Sample Apps
 @jd:body
 
+<p>The list below provides a summary of the sample applications that are 
+available with the Android SDK. Using the links on this page, you can view
+the source files of the sample applications in your browser. </p>
 
-<p>Sometimes, the best way to learn how things are done is to look at some code.</p>
-
-<p>Here, you can browse the source of some sample Android applications. Also, each version of the
-Android platform available for the SDK includes a set of sample
-applications (which may vary between different versions of the platform).
-You can find the samples 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>
-
-<p>You can easily create new Android projects with these samples, modify them
-if you'd like, then run them on an emulator or device. For example, to create
-a project for the API Demos app from Eclipse,
-start a new Android Project, select "Create project from existing source", then select
-{@code ApiDemos} in the {@code samples/} directory. To create the API Demos project
-using the {@code android} tool, execute:</p>
-<pre>
-android update project -s -n API Demos -t <em>&lt;target_ID></em> -p <em>&lt;path-to-platform></em>/samples/ApiDemos/
-</pre>
-
-<p>The pages below provide an overview of each sample application (available with most
-platforms) and allow you to view the source files in your browser. </p>
-
+<p>You can also download the source of these samples into your SDK, then 
+modify and reuse it as you need. For more information, see <a 
+href="{@docRoot}resources/samples/get.html">Getting the Samples</a>.</p>
+<!--
 <div class="special">
   <p>Some of the samples in this listing may not yet be available in the
   SDK. To ensure that you have the latest versions of the samples, you can
   <a href="{@docRoot}shareables/latest_samples.zip">download the samples pack</a>
   as a .zip archive.</p>
 </div>
-
+-->
 <dl>
 
  <dt><a href="ApiDemos/index.html">API Demos</a></dt>
diff --git a/docs/html/resources/tutorials/hello-world.jd b/docs/html/resources/tutorials/hello-world.jd
index 6e315b2..431a6cd 100644
--- a/docs/html/resources/tutorials/hello-world.jd
+++ b/docs/html/resources/tutorials/hello-world.jd
@@ -1,10 +1,10 @@
 page.title=Hello, World
 @jd:body
-
 <div id="qv-wrapper">
-  <div id="qv">
+<div id="qv">
     <h2>In this document</h2>
     <ol>
+      <li><a href="#platform">Install a Platform</a></li>
       <li><a href="#avd">Create an AVD</a></li>
       <li><a href="#create">Create the Project</a></li>
       <li><a href="#ui">Construct the UI</a></li>
@@ -23,14 +23,35 @@
 great plugin that handles your project creation and management to greatly speed-up your
 development cycles.</p>
 
-<p>If you're not using Eclipse, that's okay. Familiarize yourself with 
+<p>This tutorial assumes that you're using Eclipse. If you're not, see 
 <a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.
 You can then return to this tutorial and ignore anything about Eclipse.</p>
 
-<p>Before you start, you should already have the very latest SDK installed, and if you're using
-Eclipse, you should have installed the ADT plugin as well. If you have not installed these, see 
-<a href="{@docRoot}sdk/installing.html">Installing the Android SDK</a> and return
-here when you've completed the installation.</p>
+<p>Before you start, you should already have the SDK installed, and if you're
+using Eclipse, you should have installed the ADT plugin as well. If you have not
+installed these, see <a href="{@docRoot}sdk/installing.html">Installing the
+Android SDK</a> and return here when you've completed the installation.</p>
+
+<h2 id="platform">Install a Platform</h2>
+
+<p>To run the Hello World application, you need to install at least one Android
+platform in your SDK environment. If you have not already performed this step,
+you need to do it now.</p>
+
+<p>To install a platform in Eclipse:</p>
+
+<ol>
+  
+  <li>In the Android SDK and AVD Manager, choose <strong>Available
+Packages</strong> in the left panel.</li> 
+ 
+<li>Click the repository site checkbox to display the components
+available for installation.</li>
+
+  <li>Select at least one platform to install, and click <strong>Install
+Selected</strong>. If you aren't sure which platform to install, use the latest
+version.</li>
+</ol>
 
 <h2 id="avd">Create an AVD</h2>
 
@@ -48,24 +69,25 @@
 Android Virtual Device (AVD). An AVD defines the system image and
 device settings used by the emulator.</p>
 
-<p>To create an AVD, use the "android" tool provided in the Android SDK.
-Open a command prompt or terminal, navigate to the 
-<code>tools/</code> directory in the SDK package and execute:
-<pre>
-android create avd --target 2 --name my_avd
-</pre>
-
-<p>The tool now asks if you would like to create a custom hardware profile.
-For the time being, press Return to skip it ("no" is the default response). 
-That's it. This configures an AVD named "my_avd" that uses the Android 1.5
-platform. The AVD is now ready for use in the emulator.</p>
-
-<p>In the above command, the <code>--target</code> option is required 
-and specifies the deployment target to run on the emulator.
-The <code>--name</code> option is also required and defines the 
-name for the new AVD.</p>
 
 
+<p>To create an AVD:</p>
+<ol>
+  <li>In Eclipse, choose <strong>Window &gt; Android SDK and AVD Manager</strong>. 
+  <li>Select <strong>Virtual Devices</strong> in the left panel.</li>
+
+  <li>Click <strong>New</strong>. </li>
+ 
+
+<p>The <strong>Create New AVD</strong> dialog appears.</p>
+
+  <li>Type the name of the AVD, such as "my_avd".</li>
+  <li>Choose a target. The target is the platform (that is, the version of the Android
+    SDK, such as 2.1) you want to run on the emulator. </li>
+  
+  <p>You can ignore the rest of the fields for now. </p>
+  <li>Click <strong>Create AVD</strong>.</li>
+</ol>
 <h2 id="create">Create a New Android Project</h2>
 
 <p>After you've created an AVD, the next step is to start a new
@@ -90,7 +112,6 @@
           <li><em>Application name:</em> Hello, Android</li>
           <li><em>Package name:</em> com.example.helloandroid (or your own private namespace)</li>
           <li><em>Create Activity:</em> HelloAndroid</li>
-          <li><em>Min SDK Version:</em> 2</li>
         </ul>
         <p>Click <strong>Finish</strong>.</p>
 
@@ -111,7 +132,7 @@
                   reside under. This also sets the package name under which the stub
                   Activity will be generated.
                   <p>Your package name must be unique across
-                  all packages installed on the Android system; for this reason, it's very
+                  all packages installed on the Android system; for this reason, it's 
                   important to use a standard domain-style package for your
                   applications.  The example above uses the "com.example" namespace, which is
                   a namespace reserved for example documentation &mdash;
@@ -124,15 +145,9 @@
                 chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an
                 Activity is almost always used as the basis for an application.</dd>
             <dt><em>Min SDK Version</em></dt>
-                <dd>This value specifies the minimum API Level required by your application. If the API Level
-                entered here matches the API Level provided by one of the available targets, 
-                then that Build Target will be automatically selected (in this case, entering 
-                "2" as the API Level will select the Android 1.1 target). With each new
-                version of the Android system image and Android SDK, there have likely been 
-                additions or changes made to the APIs. When this occurs, a new API Level is assigned
-                to the system image to regulate which applications are allowed to be run. If an
-                application requires an API Level that is <em>higher</em> than the level supported 
-                by the device, then the application will not be installed.</dd>
+                <dd>This value specifies the minimum API Level required by your application. For
+                more information, see <a href="{@docRoot}guide/appendix/api-levels.html">Android API Levels</a>.
+               </dd>
         </dl>
       
         <p><em>Other fields</em>: The checkbox for "Use default location" allows you to change 
@@ -172,7 +187,7 @@
 <p>Notice that the class is based on the {@link android.app.Activity} class. An Activity is a 
 single application entity that is used to perform actions. An application may have many separate 
 activities, but the user interacts with them one at a time. The 
-{@link android.app.Activity#onCreate(Bundle) onCreate()} method 
+{@link android.app.Activity#onCreate(Bundle) onCreate()} method  
 will be called by the Android system when your Activity starts &mdash;
 it is where you should perform all initialization and UI setup. An activity is not required to
 have a user interface, but usually will.</p>
@@ -221,7 +236,7 @@
 pass <code>this</code> as your Context reference to the TextView.</p>
 
 <p>Next, you define the text content with 
-{@link android.widget.TextView setText(CharSequence) setText()}.</p>
+{@link android.widget.TextView#setText(CharSequence) setText()}.</p>
 
 <p>Finally, you pass the TextView to
 {@link android.app.Activity#setContentView(View) setContentView()} in order to
@@ -235,7 +250,7 @@
 
 <h2 id="run">Run the Application</h2>
 
-<p>The Eclipse plugin makes it very easy to run your applications:</p>
+<p>The Eclipse plugin makes it easy to run your applications:</p>
 
 <ol>
   <li>Select <strong>Run > Run</strong>.</li>
@@ -271,7 +286,7 @@
 UI layout. This means that you constructed and built your application's UI
 directly in source code. If you've done much UI programming, you're
 probably familiar with how brittle that approach can sometimes be: small
-changes in layout can result in big source-code headaches. It's also very
+changes in layout can result in big source-code headaches. It's also
 easy to forget to properly connect Views together, which can result in errors in
 your layout and wasted time debugging your code.</p>
 
@@ -291,7 +306,7 @@
 (this example, however, is just one View element). You can use the
 name of any class that extends {@link android.view.View} as an element in your XML layouts,
 including custom View classes you define in your own code. This
-structure makes it very easy to quickly build up UIs, using a more simple
+structure makes it easy to quickly build up UIs, using a more simple
 structure and syntax than you would use in a programmatic layout. This model is inspired
 by the web development model, wherein you can separate the presentation of your
 application (its UI) from the application logic used to fetch and fill in data.</p>
@@ -563,4 +578,4 @@
   defined by the <em>path</em>.</p>
   
   <p>For more information on how to use the SDK tools to create and build projects, please read 
-<a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p>
+<a href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p>
\ No newline at end of file
diff --git a/docs/html/resources/tutorials/images/hello_world_1.png b/docs/html/resources/tutorials/images/hello_world_1.png
index 1e5f7b0..1ff8e2b 100644
--- a/docs/html/resources/tutorials/images/hello_world_1.png
+++ b/docs/html/resources/tutorials/images/hello_world_1.png
Binary files differ
diff --git a/docs/html/sdk/RELEASENOTES.jd b/docs/html/sdk/RELEASENOTES.jd
index ae86a4b..a94eba7 100644
--- a/docs/html/sdk/RELEASENOTES.jd
+++ b/docs/html/sdk/RELEASENOTES.jd
@@ -39,8 +39,8 @@
 <li>Notes for the Android 2.0.1 platform are in the <a
 href="{@docRoot}sdk/android-2.0.1.html">Android 2.0.1, Release 1</a> document. </li>
 <li>You can find information about tools changes in the <a
-href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> and <a
-href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a>.</li>
+href="{@docRoot}sdk/tools-notes.html#notes">SDK Tools</a> and <a
+href="{@docRoot}sdk/eclipse-adt.html#notes">ADT Plugin for Eclipse</a>.</li>
 </ul>
 
 <p>To get started with the SDK, review the Quick Start summary on the <a
@@ -109,7 +109,7 @@
 <p>The new version of ADT is downloadable from the usual remote update site or
 is separately downloadable as a .zip archive. For instructions on how to
 download the plugin, please see <a
-href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>. </p>
+href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>. </p>
 
 <h3>Android SDK and AVD Manager</h3>
 
@@ -545,7 +545,7 @@
 Plugin for Eclipse is <strong>0.8.0</strong>. If you are using a
 previous version of ADT, you should update to the latest version for use
 with this SDK. For information about how to update your ADT plugin, see
-<a href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
+<a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
 
 <h3>Installation and Upgrade Notes</h3>
 
@@ -651,7 +651,7 @@
 Development Tools (ADT) Plugin for Eclipse is <strong>0.8.0</strong>. If you are
 using a previous version of ADT, you should update to the latest version for use
 with this SDK. For information about how to update your ADT plugin, see <a
-href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
+href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a>.</p>
 
 <h3>Other Notes</h3>
 
diff --git a/docs/html/sdk/adding-components.jd b/docs/html/sdk/adding-components.jd
index d7c886e..90e9045 100644
--- a/docs/html/sdk/adding-components.jd
+++ b/docs/html/sdk/adding-components.jd
@@ -7,22 +7,17 @@
 <h2>Quickview</h2>
 <ul>
   <li>Use the Android SDK and AVD Manager to 
-   keep your SDK up-to-date without having to install new
-   SDK directories.</li>
-  <li>The Android SDK and AVD Manager is available only with the 
-   Android 1.6 SDK or later.</li>
-  <li>The Eclipse ADT plugin may require an update when installing
-   new tools or system images.</li>
+   set up your SDK and keep it up-to-date.</li>
 </ul>
 
 <h2>In this document</h2>
 <ol>
+  <li><a href="#launching">Launching the Android SDK and AVD Manager</a>
   <li><a href="#InstallingComponents">Installing SDK Components</a>
-    <ol>
-      <li><a href="#AddingSites">Adding New Sites</a></li>
-    </ol>
-  </li>
+  <li><a href="#UpdatingComponents">Updating SDK Components</a>
   <li><a href="#dependencies">Component Dependencies</a></li>
+  <li><a href="#AddingSites">Adding New Sites</a></li>
+  <li><a href="#troubleshooting">Troubleshooting</a></li>
 </ol>
 </div>
 </div>
@@ -30,58 +25,102 @@
 <p>Adding and updating components in your Android SDK is fast and easy. To
 perform an update, use the <strong>Android SDK and AVD Manager</strong> to
 install or update the individual SDK components that you need. The Android SDK
-and AVD Manager tool is included in Android 1.6 and later SDK packages.</p>
+and AVD Manager tool is included in the <a href="index.html">Android SDK 
+download</a>.</p>
 
-<p>It only takes a couple of clicks to install
-individual versions of the Android platform, new development tools, new documentation, and
-SDK add-ons. The new SDK components are automatically installed into your existing SDK 
-directory, so you don't need to update your development environment to specify a
-new SDK location.</p>
+<p>It only takes a couple of clicks to install individual versions of the
+Android platform, new development tools, new documentation, and SDK add-ons. The
+new SDK components are automatically installed into your existing SDK directory,
+so you don't need to update your development environment to specify a new SDK
+location.</p>
 
-<p>Because each version of the Android platform can be installed as an individual component
-of your SDK, you can customize your development environment to the Android platforms
-you are targetting. Testing your app on multiple versions of
-the platform is very important in order to successfully operate on as many devices as possible.
-Be sure to install each version of the Android platform with which your app is compatible, then test
-your apps on <a href="{@docRoot}guide/developing/tools/avd.html">AVDs</a> that run each platform.</p>
+<p>Because each version of the Android platform can be installed as an
+individual component of your SDK, you can customize your development environment
+to the Android platforms you are targetting. Testing your app on multiple
+versions of the platform is very important in order to successfully operate on
+as many devices as possible. Be sure to install each version of the Android
+platform with which your app is compatible, then test your apps on <a
+href="{@docRoot}guide/developing/tools/avd.html">AVDs</a> that run each
+platform.</p>
+
+<p>If you are just getting started and you are not sure what components to install,
+see <a href="installing.html#components">Adding Platforms and Other
+Components</a> for information. </p>
 
 <p>If you develop applications using Eclipse, you may also need to update your
-ADT plugin when you update your development tools or in order to compile against
-a new version of the platform. See the <a
-href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> document for ADT
-compatibility.</p>
+ADT plugin when you update your development tools, in order to compile against
+a new version of the platform. See the revisions listed in the <a
+href="{@docRoot}sdk/tools-notes.html">SDK Tools</a> document for ADT
+Plugin compatibility.</p>
+
+<div style="TEXT-ALIGN:left; width:600px;"> 
+<img src="{@docRoot}images/sdk_manager_packages.png" 
+style="padding-bottom:0;margin-bottom:0;" /> 
+<p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0
+1em;"><strong>Figure 1.</strong> The Android SDK and AVD Manager's 
+<strong>Available Packages</strong>
+panel, which shows the SDK components that are
+available for you to download into your environment. </p>
+</div> 
+
+<h2 id="launching">Launching the Android SDK and AVD Manager</h2>
+
+<p>The Android SDK and AVD Manager is the tool that you use to install and 
+upgrade SDK components in your development environment. </p>
+
+<p>You can access the tool in any of three ways:</p>
+<ul>
+<li>If you are developing in the Eclipse IDE with the ADT Plugin, you can access
+the tool directly from the Eclipse UI.</li>
+<li>On Windows only, you can launch he tool by double-clicking a script file.</li>
+<li>In all environments, you can access the tool from a command line.</li>
+</ul>
+
+<h4>Launching from Eclipse/ADT</h4>
+
+<p>If you are developing in Eclipse and have already installed the ADT Plugin,
+follow these steps to access the Android SDK and AVD Manager tool:</p>
+
+<ol>
+<li>Open Eclipse</li>
+<li>Select <strong>Window</strong> &gt; <strong>Android SDK and AVD 
+Manager</strong>.</li>
+</ol>
+
+<h4>Launching from the setup script (Windows only)</h4>
+
+<p>For Windows only, the SDK includes a script that invokes the Android SDK and
+AVD Manager. To launch the tool using the script, double-click "SDK
+Setup.exe" at the root of the the SDK directory.</p>
+
+<h4>Launching from a command line</h4>
+
+<p>In all development environments, follow these steps to access the Android SDK
+and AVD Manager tool from the command line: </p>
+
+<ol>
+<li>Navigate to the <code>&lt;<em>sdk</em>&gt;/tools/</code> directory.</li>
+<li>Execute the {@code android} tool command with no options. 
+  <pre style="width:400px">$ android</pre></li>
+</ol>
 
 
 <h2 id="InstallingComponents">Installing SDK Components</h2>
 
-<p>Use the Android SDK and AVD Manager to install new SDK components. </p>
-
 <p class="caution"><strong>Important:</strong> Before you install SDK components, 
 we recommend that you disable any antivirus programs that may be running on
 your computer.</p>
 
-<p>You can launch the SDK and AVD Manager in one of these ways:</p>
-<ul>
-  <li>Execute the {@code android}</a> tool command with no options. If you
-haven't used the tool before, change to the <code>&lt;sdk&gt;/tools</code>
-directory and run the command: 
-  <pre style="width:400px">$ android</pre></li>
-  <li>If you have downloaded the SDK Tools (Revision 3 or higher) and are 
-  running Windows, you can double-click "SDK Setup.exe" in the SDK directory.
-  <li>If you are developing in Eclipse with ADT, you can select 
-  <strong>Window</strong> &gt;<strong>Android SDK and AVD Manager</strong>.</li>
-</ul>
+<p>Follow these steps to install new SDK components in your environment:</p>
 
-<img src="{@docRoot}images/sdk_manager_packages.png" alt="" style="float:right" />
-
-<p>When a new platform version, add-on, set of development tools or
-documentation becomes available, you can quickly install them into your existing
-Android SDK:</p>
 <ol>
-  <li>Select <strong>Available Components</strong> in the left panel.
-  This will reveal all components currently available for download.</li>
-  <li>Select the components you'd like to install and click <strong>Install
-  Selected</strong>.</li>
+  <li>Launch the Android SDK and AVD Manager as described in the section above.</li>
+  <li>Select <strong>Available Packages</strong> in the left panel.
+  This will reveal all of the components that are currently available for download 
+  from the SDK repository.</li>
+  <li>Select the component(s) you'd like to install and click <strong>Install
+  Selected</strong>. If you aren't sure which packages to select, read <a 
+  href="installing.html#which">Which components do I need?</a>.</li>
   <li>Verify and accept the components you want and click <strong>Install
   Accepted</strong>. The components will now be installed into your existing
   Android SDK directories.</li>
@@ -93,14 +132,56 @@
 directory; and new documentation is saved in the existing
 <code><em>&lt;sdk>/</em>docs/</code> directory (old docs are replaced).</p>
 
+
+<h2 id="UpdatingComponents">Updating SDK Components</h2>
+
+<p>From time to time, new revisions of existing SDK components are released and
+made available to you through the SDK repository. In most cases, if you have those
+components installed in your environment, you will want
+to download the new revisions as soon as possible. </p>
+
+<p>You can learn about the release of new revisions in two ways: </p>
+
+<ul>
+<li>You can watch for updates listed in the "SDK" tab of the Android Developers
+site, in the "Downloadable SDK Components" section. </li>
+<li>You can watch for updates listed in the <strong>Available Packages</strong>
+panel of the Android SDK and AVD Manager. </li>
+</ul>
+
+<p>When you see that a new revision is available, you can use the Android SDK
+and AVD Manager to quickly download it to your environment. Follow the same
+procedure as given in <a href="">Installing SDK Components</a>, above. The new
+component is installed in place of the old, but without impacting your
+applications. </p>
+
 <p class="note"><strong>Tip:</strong>
 Use the "Display updates only" checkbox to show only the components
 you do not have.</p>
 
 
-<h3 id="AddingSites">Adding New Sites</h3>
+<h2 id="dependencies">SDK Component Dependencies</h2>
 
-<p>By default, <strong>Available Components</strong> only shows the default
+<p>In some cases, an SDK component may require a specific minimum revision of
+another component or SDK tool. Where such dependencies exist, they are
+documented in the revision notes for each component, available from the links in
+the "Downloadable SDK Components" section at left.</p>
+
+<p>For example, there may be a dependency between the ADT Plugin for Eclipse and
+the SDK Tools component. When you install the SDK Tools
+component, you would then need to upgrade to the required version of ADT (if you
+are developing in Eclipse). In this case, you would find dependencies listed in
+"Revisions" section of the <a href="{@docRoot}sdk/eclipse-adt.html#notes">ADT
+Plugin Notes</a> and <a href="{@docRoot}sdk/tools-notes.html#notes">SDK Tools
+Notes</a> documents. </p>
+
+<p>Additionally, the development tools will notify you with debug warnings
+if there is dependency that you need to address. </p>
+
+
+<h2 id="AddingSites">Adding New Sites</h2>
+
+<p>By default, <strong>Available Packages</strong> only shows the default
 repository site, which offers platforms, SDK tools, documentation, the 
 Google APIs Add-on, and other components. You can add other sites that host 
 their own Android SDK add-ons, then download the SDK add-ons
@@ -115,14 +196,14 @@
 Manager:</p>
 
 <ol>
-  <li>Select <strong>Available Components</strong> in the left panel.</li>
+  <li>Select <strong>Available Packages</strong> in the left panel.</li>
   <li>Click <strong>Add Site</strong> and enter the URL of the 
 {@code repository.xml} file. Click <strong>OK</strong>.</li>
 </ol>
 <p>Any SDK components available from the site will now be listed under
-<strong>Available Components</strong>.</p>
+<strong>Available Packages</strong>.</p>
 
-<h3 id="troubleshooting">Troubleshooting</h3>
+<h2 id="troubleshooting">Troubleshooting</h2>
 
 <p><strong>Problems connecting to the SDK repository</strong></p>
 
@@ -138,18 +219,4 @@
   <li>Click <strong>Save &amp; Apply</strong>.</li>
 </ol>
 
-<h2 id="dependencies">SDK Component Dependencies</h2>
 
-<p>In some cases, a specific SDK component may require a specific minimum
-version of another component or SDK tool. Such dependencies are documented
-in the release notes for each component. </p>
-
-<p>For example, there may be a dependency between the ADT plugin for Eclipse and
-a specific version of the SDK Tools component. When you install the SDK Tools
-component, you would then need to upgrade to the required version of ADT (if you
-are developing in Eclipse). In this case, you would find dependencies listed in
-the <a href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a> and <a
-href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> documents. </p>
-
-<p>Additionally, the development tools will notify you with debug warnings
-if there is dependency that you need to address. </p>
diff --git a/docs/html/sdk/adt-notes.jd b/docs/html/sdk/adt-notes.jd
index 361d99a..291b543 100644
--- a/docs/html/sdk/adt-notes.jd
+++ b/docs/html/sdk/adt-notes.jd
@@ -1,83 +1,5 @@
-page.title=ADT Plugin Notes
+page.title=ADT Plugin for Eclipse
+sdk.redirect=true
+sdk.redirect.path=eclipse-adt.html
+
 @jd:body
-
-<p>Android Development Tools (ADT) is a development plugin for the Eclipse IDE.  It
-extends the capabilites of Eclipse to let you quickly set up new Android
-projects, create an application UI, add components based on the Android
-Framework API, debug your applications using the Android SDK tools, and even export
-signed (or unsigned) APKs in order to distribute your application.</p>
-
-<p>This document provides version-specific information about ADT releases. To
-keep up-to-date on new releases, make sure that you view this page at <a
-href="http://developer.android.com/sdk/adt-notes.html">http://developer.
-android.com/sdk/adt-notes.html</a>.</p>
-
-<p>To install ADT in your Eclipse IDE environment, use the Eclipse Update Site
-feature. For more information, see <a
-href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>. </p>
-
-
-<h2 id="0.9.5">ADT 0.9.5</h2>
-
-<p>December 2009. ADT 0.9.5 provides several bug fixes for developers, 
-as described below.
-</p>
-
-<h3>Dependencies</h3>
-
-<p>ADT 0.9.5 requires features provided in SDK Tools r4. If you install
-ADT 0.9.5, which is highly recommended, you should use the Android SDK and AVD
-Manager to download SDK Tools r4 or higher into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
-</p>
-
-<h3>General Notes</h3>
-<ul>
-<li>AVD Launch dialog now shows scale value.</li>
-<li>Fixes potential NPE in SDK Manager on AVD launch, for older AVD with no skin name specified.</li>
-<li>Fixes XML validation issue in on older Java versions.</li>
-<li>.apk packaging now properly ignores vi swap files as well as hidden files.</li>
-</ul>
-
-
-<h2 id="0.9.4">ADT 0.9.4</h2>
-
-<p>October 2009. ADT 0.9.4 provides several new features for developers, as described below.
-</p>
-
-<h3>Dependencies</h3>
-
-<p>ADT 0.9.4 requires features provided in SDK Tools, revision 3. If you install
-ADT 0.9.4, which is highly recommended, you should use the Android SDK and AVD
-Manager to download SDK Tools r3 or higher into your SDK. For more information,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
-</p>
-
-<h3>Project Creation Wizard</h3> 
-<ul>
-<li>New option to create a project from a sample by choosing it from a list.</li>
-</ul>
-
-<h3>Layout Editor</h3>
-<ul>
-<li>Improved Configuration selector that lets you see how your layout will
-render on different devices. Default device descriptions include ADP1
-and Google Ion, while SDK add-ons can also provide new descriptions.
-A new UI allows you to create custom descriptions.</li>
-<li>Adds a new clipping toggle, to let you see your full layout even if it's
-bigger than the screen.</li>
-</ul>
-
-<h3>DDMS Integration</h3>
-<ul>
-<li>Includes the improvements from the standlone DDMS, revision 3.</li>
-<li>Adds an option to open HPROF files into eclipse instead of writing them on
-disk. If a profiler such as MAT (<a href="http://eclipse.org/mat">Memory Analyzer 
-Tool</a>) is installed, it'll open the file.</li>
-</ul>
-
-<h3>Android SDK and AVD Manager integration</h3>
-<ul>
-<li>Includes the improvements from the standalone Android SDK and AVD Manager, 
-revision 3.</li>
-</ul>
\ No newline at end of file
diff --git a/docs/html/sdk/adt_download.jd b/docs/html/sdk/adt_download.jd
index 6dbca48..96896c7 100644
--- a/docs/html/sdk/adt_download.jd
+++ b/docs/html/sdk/adt_download.jd
@@ -22,10 +22,17 @@
     <th>Notes</th>
   </tr>
   <tr>
-     <td>0.9.5</td>
-     <td><a href="http://dl-ssl.google.com/android/ADT-0.9.5.zip">ADT-0.9.5.zip</a></td>
+     <td>0.9.6</td>
+     <td><a href="http://dl-ssl.google.com/android/ADT-0.9.6.zip">ADT-0.9.6.zip</a></td>
      <td><nobr>{@adtZipBytes} bytes</nobr></td>
      <td>{@adtZipChecksum}</td>
+     <td>Requires SDK Tools, Revision 5 <em><nobr>March 2009</nobr></em></td>
+  </tr>
+  <tr>
+     <td>0.9.5</td>
+     <td><a href="http://dl-ssl.google.com/android/ADT-0.9.5.zip">ADT-0.9.5.zip</a></td>
+     <td><nobr>3372982 bytes</nobr></td>
+     <td>227ec538359fbe417ccde7f0ad614a96</td>
      <td>Requires SDK Tools, Revision 4 <em><nobr>December 2009</nobr></em></td>
   </tr>
   <tr>
diff --git a/docs/html/sdk/android-1.5.jd b/docs/html/sdk/android-1.5.jd
index 4612682..b3eea77 100644
--- a/docs/html/sdk/android-1.5.jd
+++ b/docs/html/sdk/android-1.5.jd
@@ -1,4 +1,4 @@
-page.title=Android 1.5, Release 3
+page.title=Android 1.5 Platform
 sdk.platform.version=1.5
 sdk.platform.apiLevel=3
 sdk.platform.majorMinor=major
@@ -13,6 +13,7 @@
   <h2>In this document</h2>
   <ol>
 	<li><a href="#features">Platform Highlights</a></li>
+	<li><a href="#relnotes">Revisions</a></li>
 	<li><a href="#apps">Built-in Applications</a></li>
 	<li><a href="#locs">Locales</a></li>
 	<li><a href="#skins">Emulator Skins</a></li>
@@ -33,7 +34,6 @@
 </div>
 
 <p>
-<em>Date:</em> {@sdkPlatformReleaseDate}<br />
 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
 
 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
@@ -60,6 +60,81 @@
 href="http://developer.android.com/sdk/android-{@sdkPlatformVersion}-highlights.html">Android 
 {@sdkPlatformVersion} Platform Highlights</a> document.</p>
 
+<h2 id="relnotes">Revisions</h2>
+
+<p>The sections below provide notes about successive releases of
+the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+        Android 1.5, Revision 3</a> <em>(July 2009)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r3 or higher.</p>
+</dd>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+        Android 1.5, Revision 2</a> <em>(May 2009)</em></a>
+  <div class="toggleme">
+<p>Not available as an SDK component &mdash; please use Android 1.5, r3 instead. </p>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+        Android 1.5, Revision 1</a> <em>(April 2009)</em></a>
+  <div class="toggleme">
+<p>Not available as an SDK component &mdash; please use Android 1.5, r3 instead. </p>
+ </div>
+</div>
 
 <h2 id="apps">Built-in Applications</h2>
 
diff --git a/docs/html/sdk/android-1.6.jd b/docs/html/sdk/android-1.6.jd
index 7151325..e0bac41 100644
--- a/docs/html/sdk/android-1.6.jd
+++ b/docs/html/sdk/android-1.6.jd
@@ -1,4 +1,4 @@
-page.title=Android 1.6, Release 2
+page.title=Android 1.6 Platform
 sdk.platform.version=1.6
 sdk.platform.apiLevel=4
 sdk.platform.majorMinor=minor
@@ -13,7 +13,7 @@
   <h2>In this document</h2>
   <ol>
 	<li><a href="#features">Platform Highlights</a></li>
-	<li><a href="#releases">Release Notes</a></li>
+	<li><a href="#relnotes">Revisions</a></li>
 	<li><a href="#apps">Built-in Applications</a></li>
 	<li><a href="#locs">Locales</a></li>
 	<li><a href="#skins">Emulator Skins</a></li>
@@ -34,7 +34,6 @@
 </div>
 
 <p>
-<em>Date:</em> {@sdkPlatformReleaseDate}<br />
 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
 
 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
@@ -63,44 +62,106 @@
 {@sdkPlatformVersion} Platform Highlights</a> document.</p>
 
 
-<h2 id="relnotes">Release Notes</h2>
+<h2 id="relnotes">Revisions</h2>
 
-<p>The sections below provide information about the available releases of the 
-Android 1.6 platform.</p>
+<p>The sections below provide notes about successive releases of
+the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
 
-<h3>Android 1.6, Release 2</h3>
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
 
-<p>December 2009. Requires SDK Tools r4 or higher.</p>
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+        Android 1.6, Revision 2</a> <em>(December 2009)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r4 or higher.</p>
+</dd>
 
-<p>API related:</p>
-<ul>
-<li>Properly exposes CDMA-related constants in {@link android.telephony.TelephonyManager android.telephony.TelephonyManager}: <code>DATA_ACTIVITY_DORMANT</code>,
+<dt>API related:</dt> 
+<dd>
+<ul> 
+<li>Properly exposes CDMA-related constants in <code><a href="{@docRoot}reference/android/telephony/TelephonyManager.html">android.telephony.TelephonyManager</a></code>: <code>DATA_ACTIVITY_DORMANT</code>,
 <code>PHONE_TYPE_CDMA</code>, <code>NETWORK_TYPE_CDMA</code>,
 <code>NETWORK_TYPE_EVDO_0</code>, <code>NETWORK_TYPE_EVDO_A</code>, and
-<code>NETWORK_TYPE_1xRTT</code>.</li>
-</ul>
-<p>System image:</p>
-<ul>
-<li>Fixes bug so that Bitmap's density is now propagated through Parcelable.</li>
-<li>Fixes NinePatchDrawable to properly scale its reported padding for compatibility mode.</li>
-<li>Fixes TextView to properly compute styled font metrics based on the screen density.</li>
+<code>NETWORK_TYPE_1xRTT</code>.</li> 
+</ul> 
+</dd>
+<dt>System image:</dt> 
+<dd>
+<ul> 
+<li>Fixes bug so that Bitmap's density is now propagated through Parcelable.</li> 
+<li>Fixes NinePatchDrawable to properly scale its reported padding for compatibility mode.</li> 
+<li>Fixes TextView to properly compute styled font metrics based on the screen density.</li> 
 <li>Updates kernel to 2.6.29, to match kernel on commercially
-available Android-powered devices.</li>
-</ul>
-<p>Tools:</p>
-<ul>
+available Android-powered devices.</li> 
+</ul> 
+</dd>
+<dt>Tools:</dt> 
+<dd>
+<ul> 
 <li>Adds new Ant build system with support for Emma instrumentation projects
-(code coverage).</li>
-<li>Fixes emulator skins to properly emulate d-pad in landscape mode.</li>
-<li>Fixes density rendering in the layout editor in ADT.</li>
-</ul>
+(code coverage).</li> 
+<li>Fixes emulator skins to properly emulate d-pad in landscape mode.</li> 
+<li>Fixes density rendering in the layout editor in ADT.</li> 
+</ul> 
+</dd>
+</dl>
+ </div>
+</div>
 
-
-
-<h3>Android 1.6, Release 1</h3>
-
-<p>September 2009. Initial release. Requires SDK Tools r3 or higher.</p>
-
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+        Android 1.6, Revision 1</a> <em>(September 2009)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies</dt>
+<dd>
+<p>Requires SDK Tools r3 or higher.</p>
+</dd>
+</dl>
+ </div>
+</div>
 
 <h2 id="apps">Built-in Applications</h2>
 
@@ -188,7 +249,9 @@
 
 <h2 id="skins">Emulator Skins</h2>
 
-<p>The downloadable platform includes a set of emulator skins that you can use for modeling your application in different screen sizes and resolutions. The emulator skins are: </p>
+<p>The downloadable platform includes a set of emulator skins that you can 
+use for modeling your application in different screen sizes and resolutions. 
+The emulator skins are: </p>
 
 <ul>
   <li>
diff --git a/docs/html/sdk/android-2.0.1.jd b/docs/html/sdk/android-2.0.1.jd
index 43b1710..cacb6bf 100644
--- a/docs/html/sdk/android-2.0.1.jd
+++ b/docs/html/sdk/android-2.0.1.jd
@@ -13,6 +13,7 @@
   <h2>In this document</h2>
   <ol>
 	<li><a href="#features">Platform Highlights</a></li>
+	<li><a href="#relnotes">Revisions</a></li>
 	<li><a href="#apps">Built-in Applications</a></li>
 	<li><a href="#locs">Locales</a></li>
 	<li><a href="#skins">Emulator Skins</a></li>
@@ -39,7 +40,7 @@
 </div>
 
 <p>
-<em>Date:</em> {@sdkPlatformReleaseDate}<br />
+
 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
 
 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
@@ -67,6 +68,64 @@
 href="http://developer.android.com/sdk/android-2.0-highlights.html">Android
 2.0 Platform Highlights</a> document.</p>
 
+<h2 id="relnotes">Revisions</h2>
+
+<p>The sections below provide notes about successive releases of
+the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+        Android 2.0.1, Revision 1</a> <em>(December 2009)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r4 or higher.</p>
+</dd>
+</dl>
+ </div>
+</div>
+
 <h2 id="apps">Built-in Applications</h2>
 
 <p>The system image included in the downloadable platform provides these
diff --git a/docs/html/sdk/android-2.0.jd b/docs/html/sdk/android-2.0.jd
index 9dadf8b..a430f34 100644
--- a/docs/html/sdk/android-2.0.jd
+++ b/docs/html/sdk/android-2.0.jd
@@ -13,6 +13,7 @@
   <h2>In this document</h2>
   <ol>
 	<li><a href="#features">Platform Highlights</a></li>
+	<li><a href="#relnotes">Revisions</a></li>
 	<li><a href="#apps">Built-in Applications</a></li>
 	<li><a href="#locs">Locales</a></li>
 	<li><a href="#skins">Emulator Skins</a></li>
@@ -34,7 +35,6 @@
 </div>
 
 <p>
-<em>Date:</em> {@sdkPlatformReleaseDate}<br />
 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
 
 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
@@ -50,7 +50,7 @@
 
 <p>To get started developing or testing against the Android
 {@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your Android 1.6 or later SDK. For more information,
+download the platform into your SDK. For more information,
 see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
 Components</a>.</p>
 
@@ -61,6 +61,64 @@
 href="http://developer.android.com/sdk/android-{@sdkPlatformVersion}-highlights.html">Android 
 {@sdkPlatformVersion} Platform Highlights</a> document.</p>
 
+<h2 id="relnotes">Revisions</h2>
+
+<p>The sections below provide notes about successive releases of
+the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+        Android 2.0, Revision 1</a> <em>(October 2009)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r3 or higher.</p>
+</dd>
+</dl>
+ </div>
+</div>
+
 <h2 id="apps">Built-in Applications</h2>
 
 <p>The system image included in the downloadable platform provides these
diff --git a/docs/html/sdk/android-2.1.jd b/docs/html/sdk/android-2.1.jd
index b546f0f..dfa82b3 100644
--- a/docs/html/sdk/android-2.1.jd
+++ b/docs/html/sdk/android-2.1.jd
@@ -1,8 +1,7 @@
-page.title=Android 2.1, Release 1
+page.title=Android 2.1 Platform
 sdk.platform.version=2.1
 sdk.platform.apiLevel=7
 sdk.platform.majorMinor=minor
-sdk.platform.releaseDate=January 2010
 sdk.platform.deployableDate=January 2010
 
 @jd:body
@@ -13,6 +12,7 @@
 <h2>In this document</h2>
 <ol>
   <li><a href="#features">Platform Highlights</a></li>
+  <li><a href="#relnotes">Revisions</a></li>
   <li><a href="#apps">Built-in Applications</a></li>
   <li><a href="#locs">Locales</a></li>
   <li><a href="#skins">Emulator Skins</a></li>
@@ -36,7 +36,6 @@
 </div>
 
 <p>
-<em>Date:</em> {@sdkPlatformReleaseDate}<br />
 <em>API Level:</em>&nbsp;<strong>{@sdkPlatformApiLevel}</strong></p>
 
 <p>Android {@sdkPlatformVersion} is a {@sdkPlatformMajorMinor} platform release
@@ -53,7 +52,7 @@
 
 <p>To get started developing or testing against the Android
 {@sdkPlatformVersion} platform, use the Android SDK and AVD Manager tool to
-download the platform into your Android SDK. For more information,
+download the platform into your SDK. For more information,
 see <a href="{@docRoot}sdk/adding-components.html">Adding SDK
 Components</a>.</p>
 
@@ -64,6 +63,64 @@
 href="http://developer.android.com/sdk/android-2.0-highlights.html">Android
 2.0 Platform Highlights</a> document for the latest user features.</p>
 
+<h2 id="relnotes">Revisions</h2>
+
+<p>The sections below provide notes about successive releases of
+the Android {@sdkPlatformVersion} platform component for the Android SDK, as denoted by
+revision number. To determine what revision(s) of the Android
+{@sdkPlatformVersion} platforms are installed in your SDK environment, refer to
+the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+        Android 2.1, Revision 1</a> <em>(January 2010)</em></a>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+<dd>
+<p>Requires SDK Tools r4 or higher.</p>
+</dd>
+</dl>
+ </div>
+</div>
+
 <h2 id="apps">Built-in Applications</h2>
 
 <p>The system image included in the downloadable platform provides these
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 1d99c91..d3e0a10 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -1,4 +1,4 @@
-page.title=Installing and Updating ADT
+page.title=ADT Plugin for Eclipse
 sdk.preview=0
 
 @jd:body
@@ -8,9 +8,12 @@
 
   <h2>In this document</h2>
   <ol>
-    <li><a href="#preparing">Prepare for Installation</a></li>
+    <li><a href="#notes">Revisions</a></li>
     <li><a href="#installing">Installing the ADT Plugin</a>
       <ol>
+        <li><a href="#preparing">Preparing for Installation</a></li>
+        <li><a href="#downloading">Downloading the ADT Plugin</a>
+        <li><a href="#configuring">Configuring the ADT Plugin</a></li>
         <li><a href="#troubleshooting">Troubleshooting</a></li>
       </ol>
     </li>
@@ -21,50 +24,266 @@
 </div>
 </div>
 
-<p>Android offers a custom plugin for the Eclipse IDE, called Android
-Development Tools (ADT), that is designed to give you a powerful,
-integrated environment in which to build Android applications. </p>
+<p>Android Development Tools (ADT) is a plugin for the Eclipse IDE 
+that is designed to give you a powerful, integrated environment in which
+to build Android applications. </p>
 
 <p>ADT extends the capabilities of Eclipse to let you quickly set up new Android
 projects, create an application UI, add components based on the Android
 Framework API, debug your applications using the Android SDK tools, and even
 export signed (or unsigned) APKs in order to distribute your application.</p>
 
-<p>In general, using Eclipse with ADT is a highly recommended approach to
-Android development and is the fastest way to get started. If you use Eclipse,
-the ADT plugin gives you an incredible boost in developing Android
-applications.</p>
+<p>Developing in Eclipse with ADT is highly recommended and is the fastest way
+to get started. With the guided project setup it provides, as well as tools
+integration, custom XML editors, and debug ouput pane, ADT gives you an
+incredible boost in developing Android applications. </p>
 
-<p>To install and update the ADT Plugin, you can take advantage of the Eclipse
-remote update feature. By setting up a remote update site, you can easily
-download, install, and check for ADT updates. Alternatively, you can download
-the latest ADT to your development computer as a local site archive. The
-sections below provide instructions for both methods.</p>
+<p>This document provides step-by-step instructions on how to download the ADT
+plugin and install it into your Eclipse development environment. Note that
+before you can install or use ADT, you must have compatible versions of both the
+Eclipse IDE and the Android SDK installed. For details, make sure to read <a
+href="#installing">Installing the ADT Plugin</a>, below. </p>
 
+<p>If you are already using ADT, this document also provides instructions on 
+how to update ADT to the latest version or how to uninstall it, if necessary.
+</p>
 
-<h2 id="preparing">Prepare for Installation</h2>
+<h2 id="notes">Revisions</h2>
 
-<p>Before you begin, take a moment to confirm that your development machine
-meets the <a href="requirements.html">System Requirements</a>.</p>
+<p>The sections below provide notes about successive releases of
+the ADT Plugin, as denoted by revision number. </p>
 
-<p>If you will be developing in Eclipse with the Android Development
-Tools (ADT) Plugin &mdash; the recommended path if you are new to
-Android &mdash; make sure that you have a suitable version of Eclipse
-installed on your computer (3.4 or newer is recommended). If you need 
-to install Eclipse, you can download it from this location: </p>
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+ADT 0.9.6</a> <em>(March 2010)</em>
+  <div class="toggleme">
+
+<dl>
+<dt>Dependencies:</dt>
+
+<dd><p>ADT 0.9.6 is designed for use with SDK Tools r5 and later. Before 
+updating to ADT 0.9.6, we highly recommend that you use the Android SDK and
+AVD Manager to install SDK Tools r5 into your SDK.</p></dd>
+
+<dt>General Notes:</dt>
+<dd>
+<ul>
+<li>Editing <code>default.properties</code> outside of Eclipse will now
+automatically update the project.</li>
+<li>Loads the SDK content only when a project requires it. This will make
+Eclipse use less resources when the SDK contains many versions of Android.</li>
+<li>Resolves potential deadlock between modal dialogs, when launching ADT the
+first time with the SDK Usage panel.</li>
+<li>Fixes issues with the New Project Wizard when selecting samples.</li>
+</ul>
+</dd>
+<dt>AVD/SDK Manager:</dt>
+<dd>
+<ul>
+<li>Adds support for platform samples components.</li>
+<li>Improves support for dependency between components.</li>
+<li>AVDs now sorted by API level.</li>
+<li>The AVD creation dialog now enforces a minimum SD card size of 9MB.</li>
+<li>Prevents deletion of running AVDs.</li>
+</ul>
+</dd>
+<dt>DDMS:</dt>
+<dd>
+<ul>
+<li>DDMS plug-in now contains the Allocation Tracker view.</li>
+<li>New action in the Logcat view: "Go to problem" lets you go directly from an
+exception trace output to the code.</li>
+</ul>
+</dd>
+<dt>Editors:</dt>
+<dd>
+<ul>
+<li>Explode mode in the Visual Layout Editor adds a margin to all layout objects
+so that it's easier to see embedded or empty layouts.</li>
+<li>Outline mode in the Visual Layout Editor draws layout outline to make it
+easier to see layout objects.</li>
+<li>Several fixes in the configuration selector of the Visual Layout
+Editor.</li>
+</ul>
+</dd>
+<dt>Application launching:</dt>
+<dd>
+<ul>
+<li>Applications launched from ADT now behave as if they were clicked from the
+Home screen.</li>
+<li>Fixes issue where add-on with no optional library would not show up as valid
+targets for application launches.</li>
+<li>Resolves possible crash when launching applications.</li>
+</ul>
+</dd>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+ADT 0.9.5</a> <em>(December 2009)</em>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+
+<dd><p>ADT 0.9.5 requires features provided in SDK Tools r4 or higher. If you install
+ADT 0.9.5, which is highly recommended, you should use the Android SDK and AVD
+Manager to download thye latest SDK Tools into your SDK. For more information,
+see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+</dd>
+
+<dt>General Notes:</dt>
+<dd>
+<ul>
+<li>AVD Launch dialog now shows scale value.</li>
+<li>Fixes potential NPE in SDK Manager on AVD launch, for older AVD with no skin name specified.</li>
+<li>Fixes XML validation issue in on older Java versions.</li>
+<li>.apk packaging now properly ignores vi swap files as well as hidden files.</li>
+</ul>
+</dd>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+ADT 0.9.4</a> <em>(October 2009)</em>
+  <div class="toggleme">
+<dl>
+<dt>Dependencies:</dt>
+
+<dd><p>ADT 0.9.4 requires features provided in SDK Tools r3 or higher. If you install
+ADT 0.9.4, which is highly recommended, you should use the Android SDK and AVD
+Manager to download the latest SDK Tools into your SDK. For more information,
+see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
+</dd>
+
+<dt>Project Creation Wizard:</dt>
+<dd>
+<ul>
+<li>New option to create a project from a sample by choosing it from a list.</li>
+</ul>
+</dd>
+
+<dt>Layout Editor:</dt>
+<dd>
+<ul>
+<li>Improved Configuration selector that lets you see how your layout will
+render on different devices. Default device descriptions include ADP1
+and Google Ion, while SDK add-ons can also provide new descriptions.
+A new UI allows you to create custom descriptions.</li>
+<li>Adds a new clipping toggle, to let you see your full layout even if it's
+bigger than the screen.</li>
+</ul>
+</dd>
+
+<dt>DDMS Integration:</dt>
+<dd>
+<ul>
+<li>Includes the improvements from the standlone DDMS, revision 3.</li>
+<li>Adds an option to open HPROF files into eclipse instead of writing them on
+disk. If a profiler such as MAT (<a href="http://eclipse.org/mat">Memory Analyzer 
+Tool</a>) is installed, it'll open the file.</li>
+</ul>
+</dd>
+
+<dt>Android SDK and AVD Manager integration:</dt>
+<dd>
+<ul>
+<li>Includes the improvements from the standalone Android SDK and AVD Manager, 
+revision 3.</li>
+</ul>
+</dd>
+</dl>
+ </div>
+</div>
+
+<h2 id="installing">Installing the ADT Plugin</h2>
+
+<p>The sections below provide instructions on how to download and install
+ADT into your Eclipse environment. If you encounter problems, see the <a
+href="#troubleshooting">Troubleshooting</a> section.</p>
+
+<h3 id="preparing">Preparing Your Development Computer</h3>
+
+<p>ADT is a plugin for the Eclipse IDE. Before you can install or use ADT,
+you must have a compatible version of Eclipse installed on your development
+computer. </p>
+
+<ul>
+<li>If Eclipse is already installed on your computer, make sure that it is
+a version that is compatible with ADT and the Android SDK. Check the <a
+href="requirements.html">System Requirements</a> document for
+a list of Eclipse versions that are compatible with the Android SDK.</li>
+<li>If you need to install or update Eclipse, you can download it from this
+location:
 
 <p style="margin-left:2em;"><a href=
 "http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>
 </p>
 
-<p>A Java or RCP version of Eclipse is recommended. </p>
+<p>A Java or RCP version of Eclipse is recommended.</p></li>
+</ul>
 
-<h2 id="installing">Installing the ADT Plugin</h2>
+<p>Additionally, before you can configure or use ADT, you must install the
+Android SDK starter package, as described in <a
+href="installing.html#Installing">Downloading the SDK Starter Pacskage</a>.
+Specifically, you need to install a compatible version of the Android SDK Tools
+and at least one development platform. To simplify ADT setup, we recommend
+installing the Android SDK prior to installing ADT. </p>
 
-<p>Once you have the Eclipse IDE installed, as described in <a
-href="#preparing">Preparing for Installation</a>, above, follow these steps to
-download the ADT plugin and install it in your respective Eclipse environment.
-</p>
+<p>When your Eclipse and Android SDK environments are ready, continue with the
+ADT installation as described in the steps below. </p>
+
+<h3 id="downloading">Downloading the ADT Plugin</h3>
+
+<p>Use Update Manager feature of your Eclipse installation to install the latest
+revision of ADT on your development computer.<p>
+
+<p>Assuming that you have a compatible version of the Eclipse IDE installed, as
+described in <a href="#preparing">Preparing for Installation</a>, above, follow
+these steps to download the ADT plugin and install it in your Eclipse
+environment. </p>
 
 <table style="font-size:100%">
 <tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
@@ -121,7 +340,11 @@
 </tr>
 </table>
 
-<p>Now modify your Eclipse preferences to point to the Android SDK directory:</p>
+<h3 id="preparing">Configuring the ADT Plugin</h3>
+
+<p>Once you've successfully downnloaded ADT as described above, the next step
+is to modify your ADT preferences in Eclipse to point to the Android SDK directory:</p>
+
 <ol>
     <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
         panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
@@ -131,8 +354,10 @@
     <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
 </ol>
 
-<p>Done! If you haven't encountered any problems, then you're ready to
-begin developing Android applications. </p>
+<p>Done! If you haven't encountered any problems, then the installation is
+complete. Now read <a href="installing.html#components">Adding Platforms and
+Other Components</a> for instructions on how to complete the setup of your 
+SDK environment. </p>
 
 
 <h3 id="troubleshooting">Troubleshooting ADT Installation</h3>
@@ -179,7 +404,7 @@
 </li>
 
 </li>
-  <li>Follow steps 1 and 2 in the <a href="#InstallingADT">default install 
+  <li>Follow steps 1 and 2 in the <a href="#installing">default install 
       instructions</a> (above).</li>
   <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
   <li>Browse and select the downloaded zip file.</li>
@@ -187,7 +412,7 @@
       "Android Plugin") in the "Name" field.</li>
   <li>Click <strong>OK</strong>.
   <li>Follow the remaining procedures as listed for 
-      <a href="#InstallingADT">default installation</a> above,
+      <a href="#installing">default installation</a> above,
       starting from step 4.</li>
 </ol>
 
@@ -216,13 +441,27 @@
 Plugin.</p>
 
 
-<h2 id="updating">Updating Your Eclipse ADT Plugin</h2>
+<h2 id="updating">Updating the ADT Plugin</h2>
 
-<p>From time to time, a new version of the ADT Plugin becomes available. Follow 
-the steps below to check whether an update is available and, if so, to install it. 
-For 
-information about new features in ADT, see the <a
-href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a> document. </p>
+<p>From time to time, a new revision of the ADT Plugin becomes available, with
+new features and bug fixes. Generally, when a new revision of ADT is available,
+you should update to it as soon as convenient. </p>
+
+<p>In some cases, a new revision of ADT will have a dependency on a specific
+revision of the Android SDK Tools. If such dependencies exist, you will need to
+update the SDK Tools component of the SDK after installing the new revision of
+ADT. To update the SDK Tools component, use the Android SDK and AVD Manager, as
+described in <a href="adding-components.html">Adding SDK Components</a>.</p>
+
+<p>To learn about new features of each ADT revision and also any dependencies on
+the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
+section. To determine the version currently installed, open the 
+Eclipse Installed Software window using <strong>Help</strong>
+&gt; <strong>Software Updates</strong> and refer to the version listed for 
+"Android Development Tools".</p>
+
+<p>Follow the steps below to check whether an update is available and, if so, 
+to install it. </p>
 
 <table style="font-size:100%">
 <tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 25d0a82..e10c408 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -1,19 +1,17 @@
 page.title=Android SDK
 sdk.redirect=0
-sdk.version=2.0.1
-sdk.date=December 2009
 
-sdk.win_download=android-sdk_r04-windows.zip
-sdk.win_bytes=23069119
-sdk.win_checksum=c48b407de852ba483869f17337e90997
+sdk.win_download=android-sdk_r05-windows.zip
+sdk.win_bytes=23449838
+sdk.win_checksum=cc2c51a24e2f876e0fa652e182ef5840
 
-sdk.mac_download=android-sdk_r04-mac_86.zip
-sdk.mac_bytes=19657927
-sdk.mac_checksum=b08512765aa9b0369bb9b8fecdf763e3
+sdk.mac_download=android-sdk_r05-mac_86.zip
+sdk.mac_bytes=19871714
+sdk.mac_checksum=6fcfeed0e1c36624c926551637eb3308
 
-sdk.linux_download=android-sdk_r04-linux_86.tgz
-sdk.linux_bytes=15984887
-sdk.linux_checksum=ef84b08fd9da84f4c4ae77564fe4eaee
+sdk.linux_download=android-sdk_r05-linux_86.tgz
+sdk.linux_bytes=16208523
+sdk.linux_checksum=1d695d6a31310406f5d49092a1bd9850
 
 @jd:body
 
@@ -22,69 +20,52 @@
 
 <p>The steps below provide an overview of how to get started with the Android
 SDK. For detailed instructions, start with the <a
-href="{@docRoot}sdk/installing.html">Installing</a> guide. </p>
+href="{@docRoot}sdk/installing.html">Installing the SDK</a> guide. </p>
 
-<p><strong>0. Prepare your development computer</strong></p>
+<p><strong>1. Prepare your development computer</strong></p>
 
 <p>Read the <a href="{@docRoot}sdk/requirements.html">System Requirements</a>
 document and make sure that your development computer meets the hardware and
 software requirements for the Android SDK. Install any additional software
-needed before downloading the Android SDK. In particular, if you plan to develop
-Android applications in the Eclipse IDE using the ADT Plugin (see below), make
-sure that you have the correct version of Eclipse installed. 
+needed before downloading the Android SDK. In particular, you may need to
+install the <a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>
+ (version 5 or 6 required) and <a href="http://www.eclipse.org/downloads/">Eclipse</a>
+ (version 3.4 or 3.5, needed only if you want develop using the ADT Plugin).
 
-<p><strong>1. Download and install the SDK starter package</strong></p>
+<p><strong>2. Download and install the SDK starter package</strong></p>
 
 <p>Select a starter package from the table at the top of this page and download
 it to your development computer. To install the SDK, simply unpack the starter
 package to a safe location and then add the location to your PATH. </p>
 
-<p><strong>2. Install the ADT Plugin for Eclipse</strong></p>
+<p><strong>3. Install the ADT Plugin for Eclipse</strong></p>
 
-<p>If you are developing in Eclipse, set up a remote update site and install the
-Android Development Tools (ADT) plugin. For detailed instructions, see <a
-href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
+<p>If you are developing in Eclipse, set up a remote update site at
+<code>https://dl-ssl.google.com/android/eclipse/</code>. Install the Android 
+Development Tools (ADT) Plugin, restart Eclipse, and set the "Android" 
+preferences in Eclipse to point to the SDK install location. For detailed
+instructions, see <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin 
+for Eclipse</a>.</p>
 
-<p><strong>3. Add Android platforms to your SDK</strong></p>
+<p><strong>4. Add Android platforms and other components to your SDK</strong></p>
 
 <p>Use the Android SDK and AVD Manager, included in the SDK starter package, to
-add one or more Android platforms (for example, Android 1.6 or Android 2.0) to
-your SDK. In most cases, you will want to download multiple platforms, so that
-you can build your application on the lowest version you want to support, but
-test against higher versions that you intend the application to run on.
-Information about each platform is available at left, under "Downloadable SDK
-Components."</p>
+add one or more Android platforms (for example, Android 1.6 or Android 2.0) and
+other components to your SDK. If you aren't sure what to add, see <a
+href="installing.html#which">Which components do I need?</a></p>
 
 <p>To launch the Android SDK and AVD Manager on Windows, execute <code>SDK
 Setup.exe</code>, at the root of the SDK directory. On Mac OS X or Linux,
 execute the <code>android</code> tool in the <code>&lt;sdk&gt;/tools/</code>
-folder. For more information about how to add platforms and other components,
-see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
-</p>
+folder. For detailed instructions, see <a
+href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
 
-<p><strong>4. Get the latest documentation</strong></p>
-
-<p>If you develop while offline, use the Android SDK and AVD Manager to download
-the latest documentation package. The documentation covers all versions of the
-API and lets you filter out those versions that your application won't support.
-Once installed, the documentation is also available to you directly from the
-Eclipse IDE. When you are online, you can always access the latest documentation
-at the Android Developers site.</p>
-
-<p><strong>5. Download other SDK components</strong></p>
-
-<p>You can use the Android SDK and AVD Manager to download other SDK components,
-such as the SDK add-ons. An SDK add-on provides a development environment for an
-Android external library or a customized Android system image. For example, the
-Google APIs Add-On lets you develop an application that takes advantage of the
-Google Maps external library. </p>
-
-<p><strong>6. Get started with an application project</strong></p>
-
-<p>Once you've set up your SDK, the next step is to start a new application
-project or move existing applications into the new SDK.</p>
+<p><strong>Done!</strong></p>
 
 <p>If you are new to Android, you can use the <a
 href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> tutorial to
 get started quickly. <a href="{@docRoot}sdk/installing.html#NextSteps">Next
-Steps</a> offers other suggestions of how to begin. Welcome!</p>
+Steps</a> offers other suggestions of how to begin.</p>
+
+<p>For a more detailed guide to installing and setting up the SDK, read <a 
+href="installing.html">Installing the SDK</a>.</p>
diff --git a/docs/html/sdk/installing.jd b/docs/html/sdk/installing.jd
index 7b98e7f..abf36c7 100644
--- a/docs/html/sdk/installing.jd
+++ b/docs/html/sdk/installing.jd
@@ -1,4 +1,4 @@
-page.title=Installing the Android SDK
+page.title=Installing the SDK
 sdk.preview=0
 
 @jd:body
@@ -8,25 +8,28 @@
 
   <h2>In this document</h2>
   <ol>
-    <li><a href="#Preparing">Prepare for Installation</a></li>
-    <li><a href="#Installing">Install the SDK</a></li>
-    <li><a href="#InstallingADT">Install the ADT Plugin for Eclipse</a></li>
-    <li><a href="#components">Add Platforms and Other SDK Components</a></li>
-    <li><a href="#sdkContents">Explore the SDK</a></li>
+    <li><a href="#Preparing">Preparing Your Development Computer</a></li>
+    <li><a href="#Installing">Downloading the SDK Starter Package</a></li>
+    <li><a href="#InstallingADT">Installing the ADT Plugin for Eclipse</a></li>
+    <li><a href="#components">Adding Platforms and Other Components</a>
+    <ol>
+    <li><a href="#which">Which components do I need?</a></li>
+    </ol></li>
+    <li><a href="#sdkContents">Exploring the SDK</a></li>
     <li><a href="#NextSteps">Next Steps</a></li>
     <li><a href="#troubleshooting">Troubleshooting</a></li>
   </ol>
 
 <h2>See also</h2>
   <ol>
-    <li><a href="{@docRoot}sdk/eclipse-adt.html">Installing ADT</a></li>
+    <li><a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
     <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
   </ol>
 
 </div>
 </div>
 
-<p>This page describes how to install the latest version of the Android SDK 
+<p>This page describes how to install the Android SDK 
 and set up your development environment for the first time.</p>
 
 <p>If you encounter any problems during installation, see the 
@@ -35,40 +38,51 @@
 
 <h4>Updating?</h4>
 
-<p>If you are currently using the Android 1.6 SDK, you do not necessarily need
-to install a newer SDK, since you can already update the platforms, tools, and
-other components using the Android SDK and AVD Manager tool. To develop against
-the latest Android platform, for example, you could just download the latest SDK
-Tools and then add the new Android platform into your existing SDK.</p>
+<p>If you are currently using the Android 1.6 SDK or later and want to update 
+to the latest tools or platforms, you do not need to install a new SDK. Instead, 
+you can simply update the individual components in your SDK using the 
+Android SDK and AVD Manager tool. For information about how to do that, see <a 
+href="{@docRoot}sdk/adding-components.html#UpdatingComponents">Updating SDK 
+Components</a></p>
 
-<p>If you are using Android 1.5 SDK or older, you should install the new SDK as
+<p>If you are using Android 1.5 SDK or earlier, you should install a new SDK as
 described in this document and move your application projects to the new
 SDK environment. </p>
 
-<h2 id="Preparing">Prepare for Installation</h2>
 
-<p>Before you begin, take a moment to confirm that your development machine
-meets the <a href="requirements.html">System Requirements</a>.</p>
+<h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
+
+<p>Before getting started with the Android SDK, take a moment to confirm that
+your development computer meets the <a href="requirements.html">System
+Requirements</a>. In particular, you may need to install the <a 
+href="http://java.sun.com/javase/downloads/index.jsp">JDK</a> before 
+continuing, if it's not already installed on your computer. </p>
 
 <p>If you will be developing in Eclipse with the Android Development
 Tools (ADT) Plugin &mdash; the recommended path if you are new to
 Android &mdash; make sure that you have a suitable version of Eclipse
 installed on your computer (3.4 or newer is recommended). If you need 
-to install Eclipse, you can download it from this location: </p>
-
+to install Eclipse, you can download it from this location: </p> 
+ 
 <p style="margin-left:2em;"><a href=
-"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
-
+"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p> 
+ 
 <p>A Java or RCP version of Eclipse is recommended. For Eclipse 3.5, the 
-"Eclipse Classic" version is recommended.</p>
+"Eclipse Classic" version is recommended.</p> 
 
-<h2 id="Installing">Download and Install the SDK</h2>
 
-<p>Download the SDK package that is appropriate for your development computer.
-You can get the latest version from the <a href="{@docRoot}sdk/index.html">SDK
-download page</a>.</p>
+<h2 id="Installing">Step 2. Downloading the SDK Starter Package</h2>
 
-<p>After downloading, unpack the Android SDK archive to a suitable location on your
+<p>The first step in setting up your environment for developing Android applications
+is downloading the Android SDK starter package. The starter package is not a full
+development environment &mdash; it includes only the core SDK Tools, which you can 
+use to download the rest of the SDK components. </p>
+
+<p>You can get the latest version of the SDK starter package from the <a
+href="{@docRoot}sdk/index.html">SDK download page</a>. Make sure to download the
+package that is appropriate for your development computer.</p>
+
+<p>After downloading, unpack the Android SDK archive to a safe location on your
 machine. By default, the SDK files are unpacked into a directory named
 <code>android-sdk-&lt;machine-platform&gt;</code>. Make a note of the name and
 location of the unpacked SDK directory on your system &mdash; you will need to
@@ -101,71 +115,80 @@
   <code>tools/</code> directory to the path. </li>
   </ul>
 
-<p>If you will be using the Eclipse IDE as your development environment,
-the next section describes how to install the Android Development Tools (ADT) plugin and set up Eclipse. 
-If you choose not to use Eclipse, you can 
-develop Android applications in an IDE of your choice and then compile, debug and deploy using
-the tools included in the SDK (skip to <a href="#NextSteps">Next Steps</a>).</p>
+<p>If you will be using the Eclipse IDE as your development environment, the
+next section describes how to install the Android Development Tools (ADT) plugin
+and set up Eclipse. If you choose not to use Eclipse, you can develop Android
+applications in an IDE of your choice and then compile, debug and deploy using
+the tools included in the SDK (skip to <a href="#components">Adding Platforms
+and Other Components</a>).</p>
 
 
-<h2 id="InstallingADT">Install the ADT Plugin for Eclipse</h2>
+<h2 id="InstallingADT">Step 3. Installing the ADT Plugin for Eclipse</h2>
 
 <p>Android offers a custom plugin for the Eclipse IDE, called Android
-Development Tools (ADT), that is designed to give you a powerful,
-integrated environment in which to build Android applications. It
-extends the capabilites of Eclipse to let you quickly set up new Android
-projects, create an application UI, add components based on the Android
-Framework API, debug your applications using the Android SDK tools, and even export
-signed (or unsigned) APKs in order to distribute your application.</p>
+Development Tools (ADT), that is designed to give you a powerful, integrated
+environment in which to build Android applications. It extends the capabilites
+of Eclipse to let you quickly set up new Android projects, create an application
+UI, add components based on the Android Framework API, debug your applications
+using the Android SDK tools, and even export signed (or unsigned) APKs in order
+to distribute your application. In general, developing in Eclipse with ADT is a
+highly recommended approach and is the fastest way to get started with Android.
+</p>
 
-<p>In general, using Eclipse with ADT is a highly recommended approach to
-Android development and is the fastest way to get started. For complete 
-information about how to install ADT, see 
-<a href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
+<p>If you'd like to use ADT for developing Android applications, install it now.
+Read <a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a> for
+step-by-step installation instructions, then return here to continue with the
+last step in setting up your SDK: adding platforms and other
+components.</p>
 
 <p>If you prefer to work in an IDE other than Eclipse, you do not need to
 install Eclipse or ADT, instead, you can directly use the SDK tools to build and
 debug your application.</p>
 
 
-<h2 id="components">Add Android Platforms and Other Components</h2>
+<h2 id="components">Step 4. Adding Android Platforms and Other Components</h2>
 
-<div class="sidebox-wrapper">
-<div class="sidebox">
-<p>The <strong>Android SDK and AVD Manager</strong> tool is pre-installed in
-your SDK. Using the tool is a key part of performing the initial setup of your
-SDK, as well as keeping it up-to-date with the latest platforms, tools, and
-other components. </p>
+<div class="sidebox-wrapper" style="margin-right:2.5em;">
+<div class="sidebox"> <h2>Using the Android SDK and AVD Manager</h2>
 
-<p style="margin-top:.75em;">For full instructions on how to use the tool, see 
-<a href="/sdk/adding-components.html#installingComponents">Adding SDK
-Components</a>.</p> 
+<p>The <em>Android SDK and AVD Manager</em> is a tool that you will use often,
+to add components to your SDK environment and manage Android Virtual Devices.
+</p>
+
+<p style="margin-top:.5em;">The tool is pre-installed in your SDK. See <a
+href="adding-components.html">Adding SDK Components</a> for details on how to
+launch and use the tool.</p>
 </div>
 </div>
 
-<p>The Android SDK uses a modular structure that separates the major parts of
-the SDK &mdash; platforms, add-ons, tools, and the API documentation &mdash;
-into a set of separately installable components. The SDK components are
-available to you for individual download, as needed, from the Android SDK
-repository site. </p>
+<p>The last step in setting up your SDK is using a tool included the SDK starter
+package &mdash; the <em>Android SDK and AVD Manager</em> &mdash; to download
+essential components into your development environment. Read the information
+below to understand what components you'll need, then see <a
+href="adding-components.html">Adding SDK Components</a> for step-by-step
+instructions on how to launch the Android SDK and AVD Manager and download the
+components into your environment.</p>
 
-<p>The Android SDK starter package includes only a single component: the latest
-version of the SDK Tools. Included in that component is a tool called <em>Android
-SDK and AVD Manager</em> that you can use to download other components from the SDK
-repository site. The tool provides a graphical UI that lets you browse the
-repository, select new or updated components for download, and then install them
-in your SDK. </p>
+<p>The SDK uses a modular structure that separates the major parts of the SDK
+&mdash; Android platform versions, add-ons, tools, samples, and the API
+documentation &mdash; into a set of separately installable components. The SDK
+starter package, which you've already downloaded, includes only a single
+component: the latest version of the SDK Tools. To develop any Android
+application, you also need to download at least one Android platform into your
+environment, although downloading additional components is highly recommended.
+See <a href="#which">Which components do I need?</a> for information about
+which components are required and which are optional.</p>
 
-<p>There are several types of SDK components available:</p>
+<p>The SDK repository offers these types of components:</p>
 
 <ul>
-<li><strong>SDK Tools</strong> (available pre-installed in the Android SDK
+<li><strong>SDK Tools</strong> (pre-installed in the Android SDK starter
 package) &mdash; Contains the full set of SDK tools for developing, debugging,
 and testing your application code and UI. You can read about the tools in the <a
 href="{@docRoot}guide/developing/tools/index.html">Dev Guide</a> and access them
 in the <code>&lt;sdk&gt;/tools/</code> directory. </li>
 
-<li><strong>Android platforms</strong> &mdash; An SDK platform component is
+<li><strong>Android platforms</strong> &mdash; An SDK platform is
 available for every production Android platform deployable to Android-powered
 devices. Each platform component includes a fully compliant Android library and
 system image, sample code, emulator skins, and any version specific tools. For
@@ -180,30 +203,133 @@
 <code>com.google.android.maps</code> library. You can also add additional
 repositories, so that you can download other SDK add-ons, where available. </li>
 
+<li><strong>USB Driver for Windows</strong> &mdash; Contains driver files 
+that you can install on your Windows computer, so that you can run and debug
+your applications on an actual device. You <em>do not</em> need the USB driver unless
+you plan to debug your application on an actual Android-powered device. If you
+develop on Mac OS X or Linux, you do not need a special driver to debug 
+your application on an Android-powered device.</li>
+
+<li><strong>Samples</strong> &mdash; Contains the sample code and apps available
+for each Android development platform. If you are just getting started with
+Android development, make sure to download the samples to your SDK. <!--The download
+includes not only a set of very useful sample apps, but also the source for <a
+href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> and other
+tutorials. --></li>
+
 <li><strong>Documentation</strong> &mdash; Contains a local copy of the latest
-multiversion documentation for the Android framework API. 
-</li>
+multiversion documentation for the Android framework API. </li>
 </ul>
 
-<p>To develop <em>any</em> Android application, even if you are following the <a
-href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> tutorial, you
-<strong>must download at least one Android platform</strong> into your SDK.
-Typically, you will want to download multiple platforms, so that you can build
-your application on the lowest version you want to support, but test against
+<p>To download components, use the graphical UI of the Android SDK and AVD
+Manager, shown in Figure 1, to browse the SDK repository, select new or updated
+components for download, and then install the selected components in your SDK
+environment. </p>
+
+<div style="TEXT-ALIGN:left;width:600px;"> 
+<img src="/images/sdk_manager_packages.png" 
+style="padding-bottom:0;margin-bottom:0;" /> 
+<p class="caption" style="margin:0 0 1.5em 1em;padding:0 0 0
+1em;"><strong>Figure 1.</strong> The Android SDK and AVD Manager's 
+<strong>Available Packages</strong>
+panel, which shows the SDK components that are
+available for you to download into your environment. </p>
+</div> 
+
+
+<h3 id="which">Which components do I need?</h3>
+
+<p>The SDK repository contains a range of components that you can download.
+Use the table below to determine which components you need, based on whether you
+want to set up a basic (but functionnal) development environment or a
+recommended or full development environment: </p>
+
+<table style="width:95%">
+
+<tr>
+<th>Environment</th>
+<th>SDK&nbsp;Component</th>
+<th>Comments</th>
+</tr>
+
+<tr>
+<td rowspan="2" style="font-size:.9em;background-color:#FFE;">Basic</td>
+<td style="font-size:.9em;background-color:#FFE;color:gray">SDK Tools</td>
+<td style="font-size:.9em;background-color:#FFE;color:gray">If you've installed
+the SDK starter package, then you already have this component preinstalled. The
+SDK Tools component is required &mdash; you can't develop or build an application 
+without it. </td>
+</tr>
+
+<tr>
+<td style="font-size:.9em;background-color:#FFE;">SDK platform</td>
+<td style="font-size:.9em;background-color:#FFE;">You need to download <strong
+style="color:red">at least one platform</strong> into your environment, so that
+you will be able to compile your application and set up an Android Virtual
+Device (AVD) to run it on (in the emulator). To start with, just download the
+latest version of the platform. Later, if you plan to publish your application,
+you will want to download other platforms as well, so that you can test your
+application on the full range of Android platform versions that your customers
+are using.</td>
+</tr>
+<tr>
+<td colspan="3" style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td>
+</tr>
+<tr>
+<td rowspan="3">Recommended</td>
+<td>Documentation</td>
+<td>The Documentation component is useful because it lets you work offline and
+also look up API reference information from inside Eclipse.</td>
+</tr>
+
+<tr>
+<td>Samples</td>
+<td>The Samples components give you source code that you can use to learn about
+Android, load as a project and run, or reuse in your own app. Note that multiple
+samples components are available &mdash; one for each Android platform version. When
+you are choosing a samples component to download, select the one whose API Level
+matches the API Level of the Android platform that you plan to use.</td>
+</tr>
+<tr>
+<td>Usb Driver</td>
+<td>The Usb Driver component is needed only if you are developing on Windows and
+have an Android-powered device on which you want to install your application for
+debugging and testing. For Mac OS X and Linux platforms, no
+special driver is needed.</td>
+</tr>
+<tr>
+<td colspan="3" style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td>
+</tr>
+<tr>
+<td rowspan="3">Full</td>
+<td>Google APIs</td>
+<td>The Google APIs add-on gives your application access to the Maps external
+library, which makes it easy to display and manipulate Maps data in your
+application. </td>
+</tr>
+<tr>
+<td>Additional SDK Platforms</td>
+<td>If you plan to publish your application, you will want to download
+additional platforms corresponding to the Android platform versions on which you
+want the application to run. The recommended approach is to compile your
+application against the lowest version you want to support, but test it against
 higher versions that you intend the application to run on. You can test your
-applications on different platforms by running in an 
-Android Virtual Device (AVD) on the Android emulator. </p>
+applications on different platforms by running in an Android Virtual Device
+(AVD) on the Android emulator.</td>
+</tr>
+
+</table>
 
 <p>For step-by-step instructions on how to use the Android SDK and AVD Manager
 to add components, see the <a href="{@docRoot}sdk/adding-components.html">Adding
 SDK Components</a> document. </p>
 
-<p>For release notes and other detailed information about individual SDK 
+<p>For revision notes and other detailed information about individual SDK 
 components, see the documents listed under "Downloadable SDK Components" in 
 the navigation at left.</p>
 
 
-<h2 id="sdkContents">Explore the SDK</h2>
+<h2 id="sdkContents">Step 5. Exploring the SDK</h2>
 
 <p>Once you've installed the SDK and downloaded the platforms, documentation,
 and add-ons that you need, open the SDK directory and take a look at what's
@@ -236,7 +362,7 @@
 <tr>
 <td style="width:2em;border-bottom-color:white;"></td>
 <td colspan="2"><code>&lt;platform&gt;/</code></td>
-<td>Platform version directory, for example "Android 1.6". All platform version 
+<td>Platform version directory, for example "android-1.6". All platform version 
 directories contain a similar set of files and subdirectory structure.</td>
 </tr>
 
@@ -257,13 +383,6 @@
 <tr>
 <td style="width:2em;border-bottom-color:white;"></td>
 <td style="width:2em;border-bottom-color:white;"></td>
-<td><code>samples/</code></td>
-<td>Contains a wide variety of sample applications that you can load as projects
-into your development environment, compile, and run on the emulator.</td>
-</tr>
-<tr>
-<td style="width:2em;border-bottom-color:white;"></td>
-<td style="width:2em;border-bottom-color:white;"></td>
 <td><code>skins/</code></td>
 <td>A set of emulator skins available for the platform version. Each skin is
 designed for a specific screen resolution.</td>
@@ -288,6 +407,9 @@
 version.</td>
 </tr>
 <tr>
+<td colspan="3"><code>samples/</code></td>
+<td>Sample code and apps that are specific to platform version.</td>
+</tr>
 <td colspan="3"><code>tools/</code></td>
 <td>Contains the set of development and profiling tools available to you, such
 as the emulator, the <code>android</code> tool, adb, ddms, and more.</td>
@@ -300,7 +422,7 @@
 </tr>
 <tr>
 <td colspan="3"><code>SDK Setup.exe</code></td>
-<td>For Windows SDK only. A shortcut that launches the Android SDK and AVD 
+<td>Windows SDK only. A shortcut that launches the Android SDK and AVD 
 Manager tool, which you use to add components to your SDK. </td>
 </tr>
 <!--<tr>
@@ -315,6 +437,19 @@
 <p>Once you have completed installation, you are ready to
 begin developing applications. Here are a few ways you can get started: </p>
 
+<p><strong>Set up the Hello World application</strong></p>
+<ul>
+  <li>If you have just installed the SDK for the first time, <a 
+  href="{@docRoot}resources/tutorials/hello-world.html">go to the Hello
+  World tutorial</a>. The tutorial takes you step-by-step through the process
+  of setting up your first Android project, including setting up an Android
+  Virtual Device (AVD) on which to run the application. 
+</li>
+</ul>
+
+<p class="caution">Following the Hello World tutorial is an essential 
+first step in getting started with Android development. </p>
+
 <p><strong>Learn about Android</strong></p>
 <ul>
   <li>Take a look at the <a href="{@docRoot}guide/index.html">Dev
@@ -329,7 +464,7 @@
   href="{@docRoot}reference/packages.html">Reference</a> tab</li>
 </ul>
 
-<p><strong>Explore the SDK</strong></p>
+<p><strong>Explore the development tools</strong></p>
 <ul>
   <li>Get an overview of the <a
   href="{@docRoot}guide/developing/tools/index.html">development
@@ -340,15 +475,28 @@
   </li>
 </ul>
 
-<p><strong>Explore some code</strong></p>
+<p><strong>Follow the Notepad tutorial</strong></p>
+
 <ul>
-  <li>Set up a <a href="{@docRoot}resources/tutorials/hello-world.html">Hello
-  World application</a> (highly recommended, especially for Eclipse users)</li>
-  <li>Follow the <a href="{@docRoot}resources/tutorials/notepad/index.html">
-  Notepad Tutorial</a> to build a full Android application </li>
-  <li>Create a new project for one of the other sample applications
-  included in <code><em>&lt;sdk&gt;</em>/platforms/<em>&lt;platform&gt;</em>/samples</code>, 
-  then compile and run it in your development environment</li>
+  <li>The <a href="{@docRoot}resources/tutorials/notepad/index.html">
+  Notepad Tutorial</a> shows you how to build a full Android application 
+  and provides  helpful commentary on the Android system and API. The 
+  Notepad tutorial helps you bring together the important design
+  and architectural concepts in a moderately complex application. 
+  </li>
+</ul>
+<p class="caution">Following the Notepad tutorial is an excellent 
+second step in getting started with Android development. </p>
+
+<p><strong>Explore some code</strong></p>
+
+<ul>
+  <li>The Android SDK includes sample code and applications for each platform
+version. You can browse the samples in the <a 
+href="{@docRoot}resources/index.html">Resources</a> tab or download them
+into your SDK using the Android SDK and AVD Manager. Once you've downloaded the
+samples, you'll find them in
+<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;/</em></code>. </li>
 </ul>
 
 <p><strong>Visit the Android developer groups</strong></p>
@@ -361,7 +509,6 @@
   community is like.</li>
 </ul>
 
-
 <h2 id="troubleshooting">Troubleshooting</h2>
 
 <h3>Ubuntu Linux Notes</h3>
@@ -402,4 +549,4 @@
   in the <a href="requirements.html">System Requirements</a>.
   In particular, note that some Linux distributions may include JDK 1.4 or Gnu
   Compiler for Java, both of which are not supported for Android development.</li>
-</ul>
\ No newline at end of file
+</ul>
diff --git a/docs/html/sdk/ndk/1.5_r1/index.jd b/docs/html/sdk/ndk/1.5_r1/index.jd
index 16d543d..4c70a8a 100644
--- a/docs/html/sdk/ndk/1.5_r1/index.jd
+++ b/docs/html/sdk/ndk/1.5_r1/index.jd
@@ -1,337 +1,6 @@
-ndk=true
-ndk.version=1.5
-ndk.rel.id=1
-ndk.date=June 2009
-
-ndk.win_download=android-ndk-1.5_r1-windows.zip
-ndk.win_bytes=22500667
-ndk.win_checksum=e5c53915903d8b81f3e2ea422e2e2717
-
-ndk.mac_download=android-ndk-1.5_r1-darwin-x86.zip
-ndk.mac_bytes=17215303
-ndk.mac_checksum=1931f0e182798a4c98924fd87380b5b8
-
-ndk.linux_download=android-ndk-1.5_r1-linux-x86.zip
-ndk.linux_bytes=16025885
-ndk.linux_checksum=80a4e14704ca84c21bf1824cb25fbd8b
-
 page.title=Android 1.5 NDK, Release 1
+sdk.redirect=true
+sdk.redirect.path=ndk/index.html
+
 @jd:body
 
-<h2 id="overview">What is the Android NDK?</h2>
-
-<p>The Android NDK provides tools that allow Android application developers
-to embed components that make use of native code in their Android applications.
-</p>
-
-<p>Android applications run in the Dalvik virtual machine. The NDK allows 
-developers to implement parts of their applications using native-code languages 
-such as C and C++. This can provide benefits to certain classes of applications, 
-in the form of reuse of existing code and in some cases increased speed.</p>
-
-<p>The NDK provides:</p>
-
-<ul>
-<li>A set of tools and build files used to generate native code libraries from C
-and C++ sources</li>
-<li>A way to embed the corresponding native libraries into application package
-files (.apks) that can be deployed on Android devices</li>
-<li>A set of native system headers and libraries that will be supported in all
-future versions of the Android platform, starting from Android 1.5 </li>
-<li>Documentation, samples, and tutorials</li>
-</ul>
-
-<p>This release of the NDK supports the ARMv5TE machine instruction set
-and provides stable headers for libc (the C library), libm (the Math library), 
-the JNI interface, and other libraries.</p>
-
-<p>The NDK will not benefit most applications. As a developer, you will need 
-to balance its benefits against its drawbacks; notably, using native code does 
-not result in an automatic performance increase, but does always increase 
-application complexity. Typical good candidates for the NDK are self-contained,
-CPU-intensive operations that don't allocate much memory, such as signal processing,
-physics simulation, and so on. Simply re-coding a method to run in C usually does 
-not result in a large performance increase. The NDK can, however, can be 
-an effective way to reuse a large corpus of existing C/C++ code.</p>
-
-<p>Please note that the NDK <em>does not</em> enable you to develop native-only
-applications. Android's primary runtime remains the Dalvik virtual machine.</p>
-
-<h2 id="contents">Contents of the NDK</h2>
-
-<h4>Development tools</h4>
-
-<p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that
-can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin)
-platforms.</p>
-
-<p>It provides a set of system headers for stable native APIs that are
-guaranteed to be supported in all later releases of the platform:</p>
-
-<ul>
-<li>libc (C library) headers</li>
-<li>libm (math library) headers</li>
-<li>JNI interface headers</li>
-<li>libz (Zlib compression) headers</li>
-<li>liblog (Android logging) header</li>
-<li>A Minimal set of headers for C++ support</li>
-</ul>
-
-<p>The NDK also provides a build system that lets you work efficiently with your
-sources, without having to handle the toolchain/platform/CPU/ABI details. You
-create very short build files to describe which sources to compile and which
-Android application will use them &mdash; the build system compiles the sources
-and places the shared libraries directly in your application project. </p>
-
-<p class="caution"><strong>Important:</strong> With the exception of the
-libraries listed above, native system libraries in the Android 1.5 platform are
-<em>not</em> stable and may change in future platform versions.
-Your applications should <em>only</em> make use of the stable native system
-libraries provided in this NDK. </p>
-
-<h4>Documentation</h4>
-
-<p>The NDK package includes a set of documentation that describes the
-capabilities of the NDK and how to use it to create shared libraries for your
-Android applications. In this release, the documentation is provided only in the
-downloadable NDK package. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
-
-<ul>
-<li>INSTALL.TXT &mdash; describes how to install the NDK and configure it for
-your host system</li>
-<li>OVERVIEW.TXT &mdash; provides an overview of the NDK capabilities and
-usage</li>
-<li>ANDROID-MK.TXT &mdash; describes the use of the Android.mk file, which
-defines the native sources you want to compile</li>
-<li>APPLICATION-MK.TXT &mdash; describes the use of the Application.mk file,
-which describes the native sources required by your Android application</li>
-<li>HOWTO.TXT &mdash; information about common tasks associated with NDK 
-development.</li>
-<li>SYSTEM-ISSUES.TXT &mdash; known issues in the Android system images 
-that you should be aware of, if you are developing using the NDK. </li>
-<li>STABLE-APIS.TXT &mdash; a complete list of the stable APIs exposed
-by headers in the NDK.</li>
-</ul>
-
-<p>Additionally, the package includes detailed information about the "bionic"
-C library provided with the Android platform that you should be aware of, if you
-are developing using the NDK. You can find the documentation in the 
-<code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
-
-<ul>
-<li>OVERVIEW.TXT &mdash; provides an overview of the "bionic" C library and the 
-features it offers.</li>
-</ul>
-
-<h4>Sample applications</h4>
-
-<p>The NDK includes two sample Android applications that illustrate how to use
-native code in your Android applications:</p>
-
-<ul>
-<li><code>hello-jni</code> &mdash; A simple application that loads a string from
-a native method implemented in a shared library and then displays it in the
-application UI. </li>
-<li><code>two-libs</code> &mdash; A simple application that loads a shared
-library dynamically and calls a native method provided by the library. In this
-case, the method is implemented in a static library that is imported by the 
-shared library. </li>
-</ul>
-
-<p>For more information, see <a href="#samples">Using the Sample
-Applications</a>.</p>
-
-<h2 id="requirements">System and Software Requirements</h2>
-
-<p>The sections below describe the system and software requirements for using
-the Android NDK, as well as platform compatibility considerations that affect
-applications using libraries produced with the NDK. </p>
-
-<h4>The Android SDK</h4>
-<ul>
-  <li>A complete Android SDK installation (including all dependencies) is
-required.</li>
-  <li>Android 1.5 SDK or later version is required.</li>
-</ul>
-
-<h4>Supported operating systems</h4>
-<ul>
-  <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
-  <li>Mac OS X 10.4.8 or later (x86 only)</li>
-  <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
-</ul>
-
-<h4>Required development tools</h4>
-<ul>
-  <li>For all development platforms, GNU Make 3.81 or later is required. Earlier
-versions of GNU Make might work but have not been tested.</li>
-  <li>For Windows, a recent release of <a
-href="http://www.cygwin.com">Cygwin</a>, including both the gmake and gcc 
-packages, is required. </li>
-</ul>
-
-<h4>Android platform compatibility</h4>
-<ul>
-  <li>The native libraries created by the Android NDK can only be used on
-devices running the Android 1.5 platform version or later. This is due to 
-toolchain and ABI related changes that make the native libraries incompatible
-with 1.0 and 1.1 system images.</li>
-  <li>For this reason, you should use native libraries produced with the NDK in
-applications that are deployable to devices running the Android 1.5 platform
-version or later. To ensure compatibility, an application using a native library
-produced with the NDK must declare a <code>&lt;uses-library&gt;</code> element
-in its manifest file, with the attribute
-<code>android:minSdkVersion="3"</code>.</li>
-</ul>
-
-<h2 id="installing">Installing the NDK</h2>
-
-<p>Installing the NDK on your development computer is straightforward and
-involves extracting the NDK from its download package and running a host-setup
-script. </p>
-
-<p>Before you get started make sure that you have downloaded the latest <a
-href="{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications
-and environment as needed. The NDK will not work with older versions of the
-Android SDK. Also, take a moment to review the <a href="#requirements">System
-and Software Requirements</a> for the NDK, if you haven't already. </p>
-
-<p>To install the NDK, follow these steps:</p>
-
-<ol>
-<li>From the table at the top of this page, select the NDK package that is
-appropriate for your development computer and download the package.</li>
-<li>Uncompress the NDK download package using tools available on your computer.
-When uncompressed, the NDK files are contained in a directory called
-<code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if
-necessary and you can move it to any location on your computer. This
-documentation refers to the NDK directory as <code>&lt;ndk&gt;</code>.  </li>
-<li>Open a terminal, change to the NDK directory, and run the host-setup script.
-The script sets up your environment and generates a host configuration file used
-later, when building your shared libraries. The path to the host-setup script
-is:
-
-<p><code>&lt;ndk&gt;/build/host-setup.sh</code></p>
-
-<p>If the script completes successfully, it prints a "Host setup complete."
-message. If it fails, it prints instructions that you can follow to correct any
-problems. </p>
-</li>
-</ol>
-
-<p>Once you have run the host-setup script, you are ready start working with the
-NDK. </p>
-
-<h2 id="gettingstarted">Getting Started with the NDK</h2>
-
-<p>Once you've installed the NDK successfully, take a few minutes to read the
-documentation included in the NDK. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. In particular, please read the
-OVERVIEW.TXT document completely, so that you understand the intent of the NDK
-and how to use it.</p>
-
-<p>Here's the general outline of how you work with the NDK tools:</p>
-
-<ol>
-<li>Place your native sources under
-<code>&lt;ndk&gt;/sources/&lt;my_src&gt;/...</code>. If you want, you can place
-a symlink to your sources, rather than the sources themselves. The sources you
-reference here are not strictly associated with a specific shared library or
-Android application. Instead, they are accessible to any build configuration and
-can be used to produce any number of shared libraries that can be used by any
-Android application.</li>
-<li>Create <code>&lt;ndk&gt;/sources/&lt;my_src&gt;/Android.mk</code> to
-describe your native sources to the NDK build system</li>
-<li>Create <code>&lt;ndk&gt;/apps/&lt;my_app&gt;/Application.mk</code> to
-describe your Android application and native sources it needs to the NDK build
-system. This file sets up the link between an Android SDK application project
-and any number of shared libraries defined in the
-<code>&lt;ndk&gt;/sources/</code> folder and it specifies the path to the
-application project that will receive the shared library built from the
-sources.</li>
-<li>Build your native code by running this make command from the top-level NDK
-directory:
-
-<p><code>$ make APP=&lt;my_app&gt;</code></p>
-
-<p>The build tools copy the stripped, shared libraries needed by your
-application to the proper location in the application's project directory.</p>
-</li>
-
-<li>Finally, compile your application using the SDK tools in the usual way. The
-SDK build tools will package the shared libraries in the application's
-deployable .apk file. </p></li>
-
-</ol>
-
-<p>For complete information on all of the steps listed above, please see the
-documentation included with the NDK package. </p>
-
-
-<h2 id="samples">Using the Sample Applications</h2>
-
-<p>The NDK includes two sample applications that illustrate how to use native
-code in your Android applications:</p>
-
-<ul>
-<li><code>hello-jni</code> &mdash; A simple application that loads a string from
-a native method implemented in a shared library and then displays it in the
-application UI. </li>
-<li><code>two-libs</code> &mdash; A simple application that loads a shared
-library dynamically and calls a native method provided by the library. In this
-case, the method is implemented in a static library imported by the shared
-library. </li>
-</ul>
-
-<p>For each sample, the NDK includes an Android application project, as well as
-the corresponding C source code and the necessary Android.mk and Application.mk
-files. The application projects are provided in
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code> and the C source for
-each application is provided in
-<code>&lt;ndk&gt;/sources/samples/&lt;library&gt;/</code>.</p>
-
-<p>Once you have installed the NDK, you can build the shared libraries from the
-NDK by using these commands from the root of the NDK directory:</p>
-<ul>
-<li><code>$ make APP=hello-jni</code> &mdash; compiles
-<code>&lt;ndk&gt;/sources/samples/hello-jni/hello-jni.c</code> and outputs a
-shared library to
-<code>&lt;ndk&gt;/apps/hello-jni/project/libs/armeabi/libhello-jni.so</code>.
-</li>
-<li><code>$ make APP=two-libs</code> &mdash; compiles
-<code>&lt;ndk&gt;/sources/samples/two-libs/second.c</code> and
-<code>first.c</code> and outputs a shared library to
-<code>&lt;ndk&gt;/apps/two-libs/project/libs/armeabi/libtwolib-second.so</code>.
-</li>
-</ul>
-
-<p>Next, build the sample Android applications that use the shared
-libraries:</p>
-
-<ul>
-<li>If you are developing in Eclipse with ADT, use the New Project Wizard to
-create a new Android project for each sample, using the "Import from Existing
-Source" option and importing the source from 
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then, set up an AVD, if
-necessary, and build/run the application in the emulator. For more information
-about creating a new Android project in Eclipse, see <a
-href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
-Eclipse</a>.</li>
-<li>If you are developing with Ant, use the <code>android</code> tool to create
-the build file for each of the sample projects at
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then set up an AVD, if
-necessary, build your project in the usual way, and run it in the emulator. 
-For more information, see <a
-href="{@docRoot}guide/developing/other-ide.html">Developing in Other
-IDEs</a>.</li>
-</ul>
-
-<h2>Discussion Forum and Mailing List</h2>
-
-<p>If you have questions about the NDK or would like to read or contribute to
-discussions about it, please visit the <a
-href="http://groups.google.com/group/android-ndk">android-ndk</a> group and 
-mailing list.</p>
-
-
diff --git a/docs/html/sdk/ndk/1.6_r1/index.jd b/docs/html/sdk/ndk/1.6_r1/index.jd
index e066f95..090dcdc 100644
--- a/docs/html/sdk/ndk/1.6_r1/index.jd
+++ b/docs/html/sdk/ndk/1.6_r1/index.jd
@@ -1,360 +1,5 @@
-ndk=true
-ndk.version=1.6
-ndk.rel.id=1
-ndk.date=September 2009
-
-ndk.win_download=android-ndk-1.6_r1-windows.zip
-ndk.win_bytes=25896444
-ndk.win_checksum=a213c9592f24c61620755c6c43f85210
-
-ndk.mac_download=android-ndk-1.6_r1-darwin-x86.zip
-ndk.mac_bytes=20611080
-ndk.mac_checksum=93c5b8b92a1f7b1cdadf267cab8ec403
-
-ndk.linux_download=android-ndk-1.6_r1-linux-x86.zip
-ndk.linux_bytes=19421662
-ndk.linux_checksum=464d3dc02739b82917e6f0591e17edd1
-
 page.title=Android 1.6 NDK, Release 1
+sdk.redirect=true
+sdk.redirect.path=ndk/index.html
+
 @jd:body
-
-<h2 id="overview">What is the Android NDK?</h2>
-
-<p>The Android NDK provides tools that allow Android application developers
-to embed components that make use of native code in their Android applications.
-</p>
-
-<p>Android applications run in the Dalvik virtual machine. The NDK allows 
-developers to implement parts of their applications using native-code languages 
-such as C and C++. This can provide benefits to certain classes of applications, 
-in the form of reuse of existing code and in some cases increased speed.</p>
-
-<p>The NDK provides:</p>
-
-<ul>
-<li>A set of tools and build files used to generate native code libraries from C
-and C++ sources</li>
-<li>A way to embed the corresponding native libraries into application package
-files (.apks) that can be deployed on Android devices</li>
-<li>A set of native system headers and libraries that will be supported in all
-future versions of the Android platform, starting from Android 1.5 </li>
-<li>Documentation, samples, and tutorials</li>
-</ul>
-
-<p>This release of the NDK supports the ARMv5TE machine instruction set
-and provides stable headers for libc (the C library), libm (the Math library), 
-OpenGL ES 1.1 (3D graphics library), the JNI interface, and other libraries.</p>
-
-<p>The NDK will not benefit most applications. As a developer, you will need 
-to balance its benefits against its drawbacks; notably, using native code does 
-not result in an automatic performance increase, but does always increase 
-application complexity. Typical good candidates for the NDK are self-contained,
-CPU-intensive operations that don't allocate much memory, such as signal processing,
-physics simulation, and so on. Simply re-coding a method to run in C usually does 
-not result in a large performance increase. The NDK can, however, can be 
-an effective way to reuse a large corpus of existing C/C++ code.</p>
-
-<p>Please note that the NDK <em>does not</em> enable you to develop native-only
-applications. Android's primary runtime remains the Dalvik virtual machine.</p>
-
-<h2 id="contents">Contents of the NDK</h2>
-
-<h4>Development tools</h4>
-
-<p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that
-can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin)
-platforms.</p>
-
-<p>It provides a set of system headers for stable native APIs that are
-guaranteed to be supported in all later releases of the platform:</p>
-
-<ul>
-<li>libc (C library) headers</li>
-<li>libm (math library) headers</li>
-<li>JNI interface headers</li>
-<li>libz (Zlib compression) headers</li>
-<li>liblog (Android logging) header</li>
-<li>OpenGL ES 1.1 (3D graphics library) headers</li>
-<li>A Minimal set of headers for C++ support</li>
-</ul>
-
-<p>The NDK also provides a build system that lets you work efficiently with your
-sources, without having to handle the toolchain/platform/CPU/ABI details. You
-create very short build files to describe which sources to compile and which
-Android application will use them &mdash; the build system compiles the sources
-and places the shared libraries directly in your application project. </p>
-
-<p class="caution"><strong>Important:</strong> With the exception of the
-libraries listed above, native system libraries in the Android platform are
-<em>not</em> stable and may change in future platform versions.
-Your applications should <em>only</em> make use of the stable native system
-libraries provided in this NDK. </p>
-
-<h4>Documentation</h4>
-
-<p>The NDK package includes a set of documentation that describes the
-capabilities of the NDK and how to use it to create shared libraries for your
-Android applications. In this release, the documentation is provided only in the
-downloadable NDK package. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
-
-<ul>
-<li>INSTALL.TXT &mdash; describes how to install the NDK and configure it for
-your host system</li>
-<li>OVERVIEW.TXT &mdash; provides an overview of the NDK capabilities and
-usage</li>
-<li>ANDROID-MK.TXT &mdash; describes the use of the Android.mk file, which
-defines the native sources you want to compile</li>
-<li>APPLICATION-MK.TXT &mdash; describes the use of the Application.mk file,
-which describes the native sources required by your Android application</li>
-<li>HOWTO.TXT &mdash; information about common tasks associated with NDK 
-development.</li>
-<li>SYSTEM-ISSUES.TXT &mdash; known issues in the Android system images 
-that you should be aware of, if you are developing using the NDK. </li>
-<li>STABLE-APIS.TXT &mdash; a complete list of the stable APIs exposed
-by headers in the NDK.</li>
-<li>CHANGES.TXT &mdash; a complete list of changes to the NDK across all 
-releases.</li>
-</ul>
-
-<p>Additionally, the package includes detailed information about the "bionic"
-C library provided with the Android platform that you should be aware of, if you
-are developing using the NDK. You can find the documentation in the 
-<code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
-
-<ul>
-<li>OVERVIEW.TXT &mdash; provides an overview of the "bionic" C library and the 
-features it offers.</li>
-</ul>
-
-<h4>Sample applications</h4>
-
-<p>The NDK includes three sample Android applications that illustrate how to use
-native code in your Android applications:</p>
-
-<ul>
-<li><code>hello-jni</code> &mdash; A simple application that loads a string from
-a native method implemented in a shared library and then displays it in the
-application UI. </li>
-<li><code>two-libs</code> &mdash; A simple application that loads a shared
-library dynamically and calls a native method provided by the library. In this
-case, the method is implemented in a static library that is imported by the 
-shared library. </li>
-<li><code>san-angeles</code> &mdash; A simple application that renders 3D 
-graphics through the native OpenGL ES APIs, while managing activity lifecycle 
-with a {@link android.opengl.GLSurfaceView GLSurfaceView} object. </li>
-</ul>
-
-<p>For more information, see <a href="#samples">Using the Sample
-Applications</a>.</p>
-
-<h2 id="requirements">System and Software Requirements</h2>
-
-<p>The sections below describe the system and software requirements for using
-the Android NDK, as well as platform compatibility considerations that affect
-appplications using libraries produced with the NDK. </p>
-
-<h4>The Android SDK</h4>
-<ul>
-  <li>A complete Android SDK installation (including all dependencies) is
-required.</li>
-  <li>Android 1.5 SDK or later version is required.</li>
-</ul>
-
-<h4>Supported operating systems</h4>
-<ul>
-  <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
-  <li>Mac OS X 10.4.8 or later (x86 only)</li>
-  <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
-</ul>
-
-<h4>Required development tools</h4>
-<ul>
-  <li>For all development platforms, GNU Make 3.81 or later is required. Earlier
-versions of GNU Make might work but have not been tested.</li>
-  <li>For Windows, a recent release of <a
-href="http://www.cygwin.com">Cygwin</a> is required. </li>
-</ul>
-
-<h4>Android platform compatibility</h4>
-<ul>
-  <li>The native libraries created by the Android NDK can only be used on
-devices running the Android 1.5 platform version or later. This is due to 
-toolchain and ABI related changes that make the native libraries incompatible
-with 1.0 and 1.1 system images.</li>
-  <li>For this reason, you should use native libraries produced with the NDK in
-applications that are deployable to devices running the Android 1.5 platform
-version or later. 
-  <li>To ensure compatibility, an application using a native library
-produced with the NDK <em>must</em> declare a <code>&lt;uses-library&gt;</code> 
-element in its manifest file, with an <code>android:minSdkVersion</code> attribute 
-value of "3" or higher. For example:
-
-<pre>&lt;manifest&gt;
-  ...
-  &lt;uses-sdk android:minSdkVersion="3" /&gt;
-  ...
-&lt;/manifest&gt;</pre>
-
-<p>Additionally, if you use this NDK to create a native library that uses the
-OpenGL ES APIs, the application containing the library can be deployed only to
-devices running Android 1.6 or later. To ensure compatibility in this case, 
-the application <em>must</em> declare an <code>android:minSdkVersion</code>
-attribute value of "4" or higher. </p>
-
-<p>For more information about API Level and its relationship to Android 
-platform versions, see <a href="{@docRoot}guide/appendix/api-levels.html">
-Android API Levels</a>.</p></li>
-</ul>
-
-<h2 id="installing">Installing the NDK</h2>
-
-<p>Installing the NDK on your development computer is straightforward and
-involves extracting the NDK from its download package and running a host-setup
-script. </p>
-
-<p>Before you get started make sure that you have downloaded the latest <a
-href="{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications
-and environment as needed. The NDK will not work with older versions of the
-Android SDK. Also, take a moment to review the <a href="#requirements">System
-and Software Requirements</a> for the NDK, if you haven't already. </p>
-
-<p>To install the NDK, follow these steps:</p>
-
-<ol>
-<li>From the table at the top of this page, select the NDK package that is
-appropriate for your development computer and download the package.</li>
-<li>Uncompress the NDK download package using tools available on your computer.
-When uncompressed, the NDK files are contained in a directory called
-<code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if
-necessary and you can move it to any location on your computer. This
-documentation refers to the NDK directory as <code>&lt;ndk&gt;</code>.  </li>
-<li>Open a terminal, change to the NDK directory, and run the host-setup script.
-The script sets up your environment and generates a host configuration file used
-later, when building your shared libraries. The path to the host-setup script
-is:
-
-<p><code>&lt;ndk&gt;/build/host-setup.sh</code></p>
-
-<p>If the script completes successfully, it prints a "Host setup complete."
-message. If it fails, it prints instructions that you can follow to correct any
-problems. </p>
-</li>
-</ol>
-
-<p>Once you have run the host-setup script, you are ready start working with the
-NDK. </p>
-
-<h2 id="gettingstarted">Getting Started with the NDK</h2>
-
-<p>Once you've installed the NDK successfully, take a few minutes to read the
-documentation included in the NDK. You can find the documentation in the
-<code>&lt;ndk&gt;/docs/</code> directory. In particular, please read the
-OVERVIEW.TXT document completely, so that you understand the intent of the NDK
-and how to use it.</p>
-
-<p>If you used a previous version of the NDK, take a moment to review the 
-list of NDK changes in the CHANGES.TXT document. </p>
-
-<p>Here's the general outline of how you work with the NDK tools:</p>
-
-<ol>
-<li>Place your native sources under
-<code>&lt;project&gt;/jni/...</code></li>
-<li>Create <code>&lt;project&gt;/jni/Android.mk</code> to
-describe your native sources to the NDK build system</li>
-<li>Create <code>&lt;ndk&gt;/apps/&lt;my_app&gt;/Application.mk</code> to
-describe your Android application and native sources it needs to the NDK build
-system. This file sets up the link between an Android SDK application project
-and any number of shared libraries defined in the
-<code>&lt;project&gt;/jni/</code> folder and it specifies the path to the
-application project that will receive the shared library built from the
-sources.</li>
-<li>Build your native code by running this make command from the top-level NDK
-directory:
-
-<p><code>$ make APP=&lt;my_app&gt;</code></p>
-
-<p>The build tools copy the stripped, shared libraries needed by your
-application to the proper location in the application's project directory.</p>
-</li>
-
-<li>Finally, compile your application using the SDK tools in the usual way. The
-SDK build tools will package the shared libraries in the application's
-deployable .apk file. </p></li>
-
-</ol>
-
-<p>For complete information on all of the steps listed above, please see the
-documentation included with the NDK package. </p>
-
-
-<h2 id="samples">Using the Sample Applications</h2>
-
-<p>The NDK includes three sample applications that illustrate how to use native
-code in your Android applications:</p>
-
-<ul>
-<li><code>hello-jni</code> &mdash; A simple application that loads a string from
-a native method implemented in a shared library and then displays it in the
-application UI. </li>
-<li><code>two-libs</code> &mdash; A simple application that loads a shared
-library dynamically and calls a native method provided by the library. In this
-case, the method is implemented in a static library imported by the shared
-library. </li>
-<li><code>san-angeles</code> &mdash; A simple application that renders 3D 
-graphics through the native OpenGL ES APIs, while managing activity lifecycle 
-with a {@link android.opengl.GLSurfaceView GLSurfaceView} object. </li>
-</ul>
-
-<p>For each sample, the NDK includes an Android application project, as well as
-the corresponding C source code and the necessary Android.mk and Application.mk
-files. The application projects are provided in
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code> and the C source for
-each application is provided in
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/jni/</code>.</p>
-
-<p>Once you have installed the NDK, you can build the shared libraries from the
-NDK by using these commands from the root of the NDK directory:</p>
-<ul>
-<li><code>$ make APP=hello-jni</code> &mdash; compiles
-<code>&lt;ndk&gt;/apps/hello-jni/project/jni/hello-jni.c</code> and outputs a
-shared library to
-<code>&lt;ndk&gt;/apps/hello-jni/project/libs/armeabi/libhello-jni.so</code>.
-</li>
-<li><code>$ make APP=two-libs</code> &mdash; compiles
-<code>&lt;ndk&gt;/apps/two-libs/project/jni/second.c</code> and
-<code>first.c</code> and outputs a shared library to
-<code>&lt;ndk&gt;/apps/two-libs/project/libs/armeabi/libtwolib-second.so</code>.
-</li>
-</ul>
-
-<p>Next, build the sample Android applications that use the shared
-libraries:</p>
-
-<ul>
-<li>If you are developing in Eclipse with ADT, use the New Project Wizard to
-create a new Android project for each sample, using the "Import from Existing
-Source" option and importing the source from 
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then, set up an AVD, if
-necessary, and build/run the application in the emulator. For more information
-about creating a new Android project in Eclipse, see <a
-href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
-Eclipse</a>.</li>
-<li>If you are developing with Ant, use the <code>android</code> tool to create
-the build file for each of the sample projects at
-<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then set up an AVD, if
-necessary, build your project in the usual way, and run it in the emulator. 
-For more information, see <a
-href="{@docRoot}guide/developing/other-ide.html">Developing in Other
-IDEs</a>.</li>
-</ul>
-
-<h2>Discussion Forum and Mailing List</h2>
-
-<p>If you have questions about the NDK or would like to read or contribute to
-discussions about it, please visit the <a
-href="http://groups.google.com/group/android-ndk">android-ndk</a> group and 
-mailing list.</p>
-
-
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/sdk/ndk/index.jd
new file mode 100644
index 0000000..fa2e712
--- /dev/null
+++ b/docs/html/sdk/ndk/index.jd
@@ -0,0 +1,477 @@
+ndk=true
+
+ndk.win_download=android-ndk-r3-windows.zip
+ndk.win_bytes=36473391
+ndk.win_checksum=4ce5c93a15f261b6dcade1b69da00902
+
+ndk.mac_download=android-ndk-r3-darwin-x86.zip
+ndk.mac_bytes=38258228
+ndk.mac_checksum=a083ccc36aa9a3a35404861e7d51d1ae
+
+ndk.linux_download=android-ndk-r3-linux-x86.zip
+ndk.linux_bytes=37403241
+ndk.linux_checksum=f3b1700a195aae3a6e9b5637e5c49359
+
+page.title=Android NDK
+@jd:body
+
+<h2 id="notes">Revisions</h2>
+
+<p>The sections below provide information and notes about successive releases of
+the NDK, as denoted by revision number. </p>
+
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", "/assets/images/triangle-opened.png");
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", "/assets/images/triangle-closed.png");
+  }
+  return false;
+}
+</script>
+<style>
+
+.toggleable {
+padding: .25em 1em;
+xfont-size:.95em;
+}
+
+.toggleme {
+  xmargin:1em;
+  padding: 1em 1em 0 2em;
+line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+
+<div class="toggleable open">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+Android NDK, Revision 3</a> <em>(March 2010)</em>
+  <div class="toggleme">
+
+<dl>
+<dt>General notes:</dt>
+
+<dd>
+<ul>
+<li>Adds OpenGL ES 2.0 native library support.</li>
+<li>Adds a sample application,<code>hello-gl2</code>, that illustrates the use of
+OpenGL ES 2.0 vertex and fragment shaders.</li>
+<li>The toolchain binaries have been refreshed for this release with GCC 4.4.0, which should generate slightly more compact and efficient machine code than the previous one (4.2.1). The NDK also still provides the 4.2.1 binaries, which you can optionally use to build your machine code.</li>
+</ul>
+</dd>
+</dl>
+</div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+Android NDK, Revision 2</a> <em>(September 2009)</em>
+  <div class="toggleme">
+
+<p>Originally released as "Android 1.6 NDK, Release 1".</p>
+<dl>
+<dt>General notes:</dt>
+<dd>
+<ul>
+<li>Adds OpenGL ES 1.1 native library support.</li>
+<li>Adds a sample application, <code>san-angeles</code>, that renders 3D 
+graphics through the native OpenGL ES APIs, while managing activity 
+lifecycle with a {@link android.opengl.GLSurfaceView} object.
+</li>
+</ul>
+</dd>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+Android NDK, Revision 1</a> <em>(June 2009)</em>
+  <div class="toggleme">
+
+<p>Originally released as "Android 1.5 NDK, Release 1".</p>
+<dl>
+<dt>General notes:</dt>
+<dd>
+<ul>
+<li>Includes compiler support (GCC) for ARMv5TE instructions, including Thumb-1
+instructions. </li>
+<li>Includes system headers for stable native APIs, documentation, and sample
+applications.</li>
+</ul>
+</dd>
+
+</dl>
+ </div>
+</div>
+
+
+<h2 id="overview">What is the Android NDK?</h2>
+
+<p>The Android NDK is a toolset that lets you embed components that make use
+of native code in your Android applications.
+</p>
+
+<p>Android applications run in the Dalvik virtual machine. The NDK allows 
+you to implement parts of your applications using native-code languages 
+such as C and C++. This can provide benefits to certain classes of applications, 
+in the form of reuse of existing code and in some cases increased speed.</p>
+
+<p>The NDK provides:</p>
+
+<ul>
+<li>A set of tools and build files used to generate native code libraries from C
+and C++ sources</li>
+<li>A way to embed the corresponding native libraries into application package
+files (.apks) that can be deployed on Android devices</li>
+<li>A set of native system headers and libraries that will be supported in all
+future versions of the Android platform, starting from Android 1.5 </li>
+<li>Documentation, samples, and tutorials</li>
+</ul>
+
+<p>This release of the NDK supports the ARMv5TE machine instruction set and
+provides stable headers for libc (the C library), libm (the Math library),
+OpenGL ES (3D graphics library), the JNI interface, and other libraries, as
+listed in the section below.</p>
+
+<p>The NDK will not benefit most applications. As a developer, you will need 
+to balance its benefits against its drawbacks; notably, using native code does 
+not result in an automatic performance increase, but does always increase 
+application complexity. Typical good candidates for the NDK are self-contained,
+CPU-intensive operations that don't allocate much memory, such as signal processing,
+physics simulation, and so on. Simply re-coding a method to run in C usually does 
+not result in a large performance increase. The NDK can, however, can be 
+an effective way to reuse a large corpus of existing C/C++ code.</p>
+
+<p>Please note that the NDK <em>does not</em> enable you to develop native-only
+applications. Android's primary runtime remains the Dalvik virtual machine.</p>
+
+<h2 id="contents">Contents of the NDK</h2>
+
+<h4>Development tools</h4>
+
+<p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that
+can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin)
+platforms.</p>
+
+<p>It provides a set of system headers for stable native APIs that are
+guaranteed to be supported in all later releases of the platform:</p>
+
+<ul>
+<li>libc (C library) headers</li>
+<li>libm (math library) headers</li>
+<li>JNI interface headers</li>
+<li>libz (Zlib compression) headers</li>
+<li>liblog (Android logging) header</li>
+<li>OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers</li>
+<li>A Minimal set of headers for C++ support</li>
+</ul>
+
+<p>The NDK also provides a build system that lets you work efficiently with your
+sources, without having to handle the toolchain/platform/CPU/ABI details. You
+create very short build files to describe which sources to compile and which
+Android application will use them &mdash; the build system compiles the sources
+and places the shared libraries directly in your application project. </p>
+
+<p class="caution"><strong>Important:</strong> With the exception of the
+libraries listed above, native system libraries in the Android platform are
+<em>not</em> stable and may change in future platform versions.
+Your applications should <em>only</em> make use of the stable native system
+libraries provided in this NDK. </p>
+
+<h4>Documentation</h4>
+
+<p>The NDK package includes a set of documentation that describes the
+capabilities of the NDK and how to use it to create shared libraries for your
+Android applications. In this release, the documentation is provided only in the
+downloadable NDK package. You can find the documentation in the
+<code>&lt;ndk&gt;/docs/</code> directory. Included are these files:</p>
+
+<ul>
+<li>INSTALL.TXT &mdash; describes how to install the NDK and configure it for
+your host system</li>
+<li>OVERVIEW.TXT &mdash; provides an overview of the NDK capabilities and
+usage</li>
+<li>ANDROID-MK.TXT &mdash; describes the use of the Android.mk file, which
+defines the native sources you want to compile</li>
+<li>APPLICATION-MK.TXT &mdash; describes the use of the Application.mk file,
+which describes the native sources required by your Android application</li>
+<li>HOWTO.TXT &mdash; information about common tasks associated with NDK 
+development.</li>
+<li>SYSTEM-ISSUES.TXT &mdash; known issues in the Android system images 
+that you should be aware of, if you are developing using the NDK. </li>
+<li>STABLE-APIS.TXT &mdash; a complete list of the stable APIs exposed
+by headers in the NDK.</li>
+<li>CPU-ARCH-ABIS.TXT &mdash; a description of supported CPU architectures 
+and how to target them. </li>
+<li>CHANGES.TXT &mdash; a complete list of changes to the NDK across all 
+releases.</li>
+</ul>
+
+<p>Additionally, the package includes detailed information about the "bionic"
+C library provided with the Android platform that you should be aware of, if you
+are developing using the NDK. You can find the documentation in the 
+<code>&lt;ndk&gt;/docs/system/libc/</code> directory:</p>
+
+<ul>
+<li>OVERVIEW.TXT &mdash; provides an overview of the "bionic" C library and the 
+features it offers.</li>
+</ul>
+
+<h4>Sample applications</h4>
+
+<p>The NDK includes sample Android applications that illustrate how to use
+native code in your Android applications. For more information, see 
+<a href="#samples">Using the Sample Applications</a>.</p>
+
+<h2 id="requirements">System and Software Requirements</h2>
+
+<p>The sections below describe the system and software requirements for using
+the Android NDK, as well as platform compatibility considerations that affect
+appplications using libraries produced with the NDK. </p>
+
+<h4>The Android SDK</h4>
+<ul>
+  <li>A complete Android SDK installation (including all dependencies) is
+required.</li>
+  <li>Android 1.5 SDK or later version is required.</li>
+</ul>
+
+<h4>Supported operating systems</h4>
+<ul>
+  <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
+  <li>Mac OS X 10.4.8 or later (x86 only)</li>
+  <li>Linux (32- or 64-bit, tested on Linux Ubuntu Dapper Drake)</li>
+</ul>
+
+<h4>Required development tools</h4>
+<ul>
+  <li>For all development platforms, GNU Make 3.81 or later is required. Earlier
+versions of GNU Make might work but have not been tested.</li>
+  <li>For Windows, a recent release of <a
+href="http://www.cygwin.com">Cygwin</a> is required. </li>
+</ul>
+
+<h4>Android platform compatibility</h4>
+<ul>
+  <li>The native libraries created by the Android NDK can only be used on
+devices running the Android 1.5 platform version or later. This is due to 
+toolchain and ABI related changes that make the native libraries incompatible
+with 1.0 and 1.1 system images.</li>
+  <li>For this reason, you should use native libraries produced with the NDK in
+applications that are deployable to devices running the Android 1.5 platform
+version or later. </li>
+  <li>To ensure compatibility, an application using a native library
+produced with the NDK <em>must</em> declare a <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
+element in its manifest file, with an <code>android:minSdkVersion</code> attribute 
+value of "3" or higher. For example:
+
+<pre style="margin:1em;">&lt;manifest&gt;
+  ...
+  &lt;uses-sdk android:minSdkVersion="3" /&gt;
+  ...
+&lt;/manifest&gt;</pre>
+</li>
+
+<li>Additionally, if you use this NDK to create a native library that uses the
+OpenGL ES APIs, the application containing the library can be deployed only to
+devices running the minimum platform versions described in the table below.
+To ensure compatibility, make sure that your application declares the proper
+<code>android:minSdkVersion</code></a> attribute value, as given in the table.</p>
+
+<table style="margin:1em;">
+<tr>
+<th>OpenGL ES Version Used</th>
+<th>Compatible Android Platform(s)</th>
+<th>Required uses-sdk Attribute</th>
+</tr>
+<tr><td>OpenGL ES 1.1</td><td>Android 1.6 and higher</td><td><code>android:minSdkVersion="4"</code></td></tr>
+<tr><td>OpenGL ES 2.0</td><td>Android 2.0 and higher</td><td><code>android:minSdkVersion="5"</code></td></tr>
+</table>
+
+<p>For more information about API Level and its relationship to Android 
+platform versions, see <a href="{@docRoot}guide/appendix/api-levels.html">
+Android API Levels</a>.</p></li>
+</ul>
+
+<h2 id="installing">Installing the NDK</h2>
+
+<p>Installing the NDK on your development computer is straightforward and
+involves extracting the NDK from its download package and running a host-setup
+script. </p>
+
+<p>Before you get started make sure that you have downloaded the latest <a
+href="{@docRoot}sdk/index.html">Android SDK</a> and upgraded your applications
+and environment as needed. The NDK will not work with older versions of the
+Android SDK. Also, take a moment to review the <a href="#requirements">System
+and Software Requirements</a> for the NDK, if you haven't already. </p>
+
+<p>To install the NDK, follow these steps:</p>
+
+<ol>
+<li>From the table at the top of this page, select the NDK package that is
+appropriate for your development computer and download the package.</li>
+<li>Uncompress the NDK download package using tools available on your computer.
+When uncompressed, the NDK files are contained in a directory called
+<code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if
+necessary and you can move it to any location on your computer. This
+documentation refers to the NDK directory as <code>&lt;ndk&gt;</code>.  </li>
+<li>Open a terminal, change to the NDK directory, and run the host-setup script.
+The script sets up your environment and generates a host configuration file used
+later, when building your shared libraries. The path to the host-setup script
+is:
+
+<p><code>&lt;ndk&gt;/build/host-setup.sh</code></p>
+
+<p>If the script completes successfully, it prints a "Host setup complete."
+message. If it fails, it prints instructions that you can follow to correct any
+problems. </p>
+</li>
+</ol>
+
+<p>Once you have run the host-setup script, you are ready start working with the
+NDK. </p>
+
+<h2 id="gettingstarted">Getting Started with the NDK</h2>
+
+<p>Once you've installed the NDK successfully, take a few minutes to read the
+documentation included in the NDK. You can find the documentation in the
+<code>&lt;ndk&gt;/docs/</code> directory. In particular, please read the
+OVERVIEW.TXT document completely, so that you understand the intent of the NDK
+and how to use it.</p>
+
+<p>If you used a previous version of the NDK, take a moment to review the 
+list of NDK changes in the CHANGES.TXT document. </p>
+
+<p>Here's the general outline of how you work with the NDK tools:</p>
+
+<ol>
+<li>Place your native sources under
+<code>&lt;project&gt;/jni/...</code></li>
+<li>Create <code>&lt;project&gt;/jni/Android.mk</code> to
+describe your native sources to the NDK build system</li>
+<li>Create <code>&lt;ndk&gt;/apps/&lt;my_app&gt;/Application.mk</code> to
+describe your Android application and native sources it needs to the NDK build
+system. This file sets up the link between an Android SDK application project
+and any number of shared libraries defined in the
+<code>&lt;project&gt;/jni/</code> folder and it specifies the path to the
+application project that will receive the shared library built from the
+sources.</li>
+<li>Build your native code by running this make command from the top-level NDK
+directory:
+
+<p><code>$ make APP=&lt;my_app&gt;</code></p>
+
+<p>The build tools copy the stripped, shared libraries needed by your
+application to the proper location in the application's project directory.</p>
+</li>
+
+<li>Finally, compile your application using the SDK tools in the usual way. The
+SDK build tools will package the shared libraries in the application's
+deployable .apk file. </p></li>
+
+</ol>
+
+<p>For complete information on all of the steps listed above, please see the
+documentation included with the NDK package. </p>
+
+
+<h2 id="samples">Using the Sample Applications</h2>
+
+<p>The NDK includes four sample applications that illustrate how to use native
+code in your Android applications:</p>
+
+<ul>
+<li><code>hello-jni</code> &mdash; a simple application that loads a string from
+a native method implemented in a shared library and then displays it in the
+application UI. </li>
+<li><code>two-libs</code> &mdash; a simple application that loads a shared
+library dynamically and calls a native method provided by the library. In this
+case, the method is implemented in a static library imported by the shared
+library. </li>
+<li><code>san-angeles</code> &mdash; a simple application that renders 3D 
+graphics through the native OpenGL ES APIs, while managing activity lifecycle 
+with a {@link android.opengl.GLSurfaceView} object. </li>
+<li><code>hello-gl2</code> &mdash; a simple application that renders a triangle
+using OpenGL ES 2.0 vertex and fragment shaders.</li>
+</ul>
+
+<p>For each sample, the NDK includes an Android application project, as well as
+the corresponding C source code and the necessary Android.mk and Application.mk
+files. The application projects are provided in
+<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code> and the C source for
+each application is provided in
+<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/jni/</code>.</p>
+
+<p>Once you have installed the NDK and run <code>$ build/host-setup.sh</code> from
+the root of the NDK directory, you can build the shared libraries for the
+sample apps by using these commands:</p>
+<ul>
+<li><code>$ make APP=hello-jni</code> &mdash; compiles
+<code>hello-jni.c</code> and outputs a shared library to
+<code>&lt;ndk&gt;/apps/hello-jni/project/libs/armeabi/libhello-jni.so</code>.
+</li>
+<li><code>$ make APP=two-libs</code> &mdash; compiles
+<code>first.c</code> and <code>second.c</code> and outputs a shared library to
+<code>&lt;ndk&gt;/apps/two-libs/project/libs/armeabi/libtwolib-second.so</code>.
+</li>
+<li><code>$ make APP=san-angeles</code> &mdash; compiles
+<code>importgl.c</code>, <code>demo.c</code>,and <code>app-android.c</code> and 
+outputs a shared library to <code>&lt;ndk&gt;/apps/san-angeles/project/libs/armeabi/libsangeles.so</code>.
+</li>
+<li><code>$ make APP=hello-gl2</code> &mdash; compiles
+<code>gl_code.cpp</code> and outputs a shared library to 
+<code>&lt;ndk&gt;/apps/hello-gl2/project/libs/armeabi/libgl2jni.so</code>.
+</li>
+</ul>
+
+<p>Next, build the sample Android applications that use the shared
+libraries:</p>
+
+<ul>
+<li>If you are developing in Eclipse with ADT, use the New Project Wizard to
+create a new Android project for each sample, using the "Import from Existing
+Source" option and importing the source from 
+<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then, set up an AVD, if
+necessary, and build/run the application in the emulator. For more information
+about creating a new Android project in Eclipse, see <a
+href="{@docRoot}guide/developing/eclipse-adt.html">Developing in
+Eclipse</a>.</li>
+<li>If you are developing with Ant, use the <code>android</code> tool to create
+the build file for each of the sample projects at
+<code>&lt;ndk&gt;/apps/&lt;app_name&gt;/project/</code>. Then set up an AVD, if
+necessary, build your project in the usual way, and run it in the emulator. 
+For more information, see <a
+href="{@docRoot}guide/developing/other-ide.html">Developing in Other
+IDEs</a>.</li>
+</ul>
+
+<h2>Discussion Forum and Mailing List</h2>
+
+<p>If you have questions about the NDK or would like to read or contribute to
+discussions about it, please visit the <a
+href="http://groups.google.com/group/android-ndk">android-ndk</a> group and 
+mailing list.</p>
+
+
diff --git a/docs/html/sdk/requirements.jd b/docs/html/sdk/requirements.jd
index c1f74ad..cb9cdf3 100644
--- a/docs/html/sdk/requirements.jd
+++ b/docs/html/sdk/requirements.jd
@@ -2,48 +2,56 @@
 @jd:body
 
 <p>The sections below describe the system and software requirements for developing 
-Android applications using the Android Development Tools, revision 3. </p>
+Android applications using the Android SDK. </p>
 
 <h3>Supported Operating Systems</h3>
 <ul>
   <li>Windows XP (32-bit) or Vista (32- or 64-bit)</li>
-  <li>Mac OS X 10.4.8 or later (x86 only)</li>
+  <li>Mac OS X 10.5.8 or later (x86 only)</li>
   <li>Linux (tested on Linux Ubuntu Hardy Heron)
     <ul>
       <li>64-bit distributions must be capable of running 32-bit applications. 
       For information about how to add support for 32-bit applications, see
-      the <a href="installing.html#troublehooting">Ubuntu Linux
+      the <a href="installing.html#troubleshooting">Ubuntu Linux
 installation notes</a>.</li>
     </ul>
   </li>
 </ul>
 
 <h3>Supported Development Environments</h3>
-<ul>
-  <li>Eclipse IDE
+
+<h4 style="margin-top:.25em"><em>Eclipse IDE</em></h4>
     <ul>
-      <li><a href="http://www.eclipse.org/downloads/">Eclipse</a> 3.4 (Ganymede) or 3.5 (Galileo)
-        <ul>
-        <li>Note: Eclipse 3.3 has not been tested with the latest version of 
-ADT and support can no longer be guaranteed. We suggest you upgrade to Eclipse
-3.4 or 3.5.</li>
-        <li>Recommended Eclipse IDE packages: Eclipse IDE for Java EE
-Developers, Eclipse IDE for Java Developers, Eclipse for RCP/Plug-in
-Developers, or Eclipse Classic (3.5.1+)</li>
-        <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin
-(included in most Eclipse IDE packages) </li>
-        </ul>
-      </li>     
-      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK 6</a> (JRE alone is not sufficient)</li>
-      <li><a href="eclipse-adt.html">Android Development Tools
-plugin</a> (optional)</li>
+      <li>Eclipse 3.4 (Ganymede) or 3.5 (Galileo)
+      <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
+in most Eclipse IDE packages) </li>
+      <li>If you need to install or update Eclipse, you can download it from <a
+href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>. 
+
+      <p>Several types of Eclipse packages are available for each platform. For
+developing Android applications, we recommend that you install one of these
+packages: </p>
+         <ul>
+           <li>Eclipse IDE for Java EE Developers</li>
+           <li>Eclipse IDE for Java Developers</li>
+           <li>Eclipse for RCP/Plug-in Developers</li>
+           <li>Eclipse Classic (versions 3.5.1 and higher)</li>
+         </ul>
+      </li>
+      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+6</a> (JRE alone is not sufficient)</li>
+      <li><a href="eclipse-adt.html">Android Development Tools plugin</a>
+(optional)</li>
       <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
     </ul>
-  </li>
-  <li>Other development environments or IDEs
+
+
+<h4><em>Other development environments or IDEs</em></h4>
     <ul>
-      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK 6</a> (JRE alone is not sufficient)</li>
-      <li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later for Linux and Mac, 1.7 or later for Windows</li>
+      <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+6</a> (JRE alone is not sufficient)</li>
+      <li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later for
+Linux and Mac, 1.7 or later for Windows</li>
       <li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
     </ul>
   </li>
@@ -53,7 +61,47 @@
 particular, note that some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development. </p>
 
 <h3>Hardware requirements</h3>
-<ul>
-  <li>For the base SDK package, at least 600MB of available disk space. For each platform downloaded into the SDK, an additional 100MB is needed. </li>
-</ul>
+
+<p>The Android SDK requires disk storage for all of the components that you choose to install. The table below provides a rough idea of the disk-space requirements to expect, based on the components that you plan to use. </p>
+
+<table>
+<tr>
+<th>Component type</th>
+<th>Approximate size</th>
+<th>Comments</th>
+</tr>
+<tr>
+<td>SDK Tools</td>
+<td>50 MB</td>
+<td>Required.</td>
+</tr>
+<tr>
+<td>Android platform (each)</td>
+<td>150 MB</td>
+<td>At least one platform is required.</td>
+</tr>
+<tr>
+<td>SDK Add-on (each)</td>
+<td>100 MB</td>
+<td>Optional.</td>
+</tr>
+<tr>
+<td>USB Driver for Windows</td>
+<td>10 MB</td>
+<td>Optional. For Windows only.</td>
+</tr>
+<tr>
+<td>Samples (per platform)</td>
+<td>10M</td>
+<td>Optional.</td>
+</tr>
+<tr>
+<td>Offline documentation</td>
+<td>250 MB</td>
+<td>Optional.</td>
+</tr>
+</table>
+
+<p>Note that the disk-space requirements above are <em>in addition to</em> those of the Eclipse IDE, JDK, or other prerequisite tools that you may need to install on your development computer.</p>
+
 
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 556f781..a845e55 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -24,7 +24,7 @@
           <span style="display:none" class="zh-TW">下載</span>
         </a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing.html">
-          <span class="en">Installing</span>
+          <span class="en">Installing the SDK</span>
           <span style="display:none" class="de">Installieren</span>
           <span style="display:none" class="es">Instalación</span>
           <span style="display:none" class="fr">Installation</span>
@@ -82,10 +82,9 @@
       </li>
     </ul>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r4</a>
-      </li>
+      <li><a href="<?cs var:toroot ?>sdk/tools-notes.html">SDK Tools, r5</a> <span class="new">new!</span></li>
       <li><a href="<?cs var:toroot ?>sdk/win-usb.html">USB Driver for
-Windows, r3</a> <span class="new">new!</span>
+      Windows, r3</a>
       </li>
     </ul>
   </li>
@@ -101,7 +100,8 @@
       <span style="display:none" class="zh-TW"></span>
       </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">Installing and Updating
+      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT
+      <?cs var:adt.zip.version ?></a>  <span class="new">new!</span>
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
       <span style="display:none" class="fr"></span>
@@ -110,9 +110,6 @@
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span></a>
       </li>
-      <li><a href="<?cs var:toroot ?>sdk/adt-notes.html">ADT <?cs var:adt.zip.version ?> 
-          </a>
-      </li>
     </ul>
   </li>
   <li>
@@ -126,7 +123,8 @@
       <span style="display:none" class="zh-TW"></span>
     </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/ndk/1.6_r1/index.html">Android 1.6 NDK, r1</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r3</a>
+      <span class="new">new!</span></li>
     </ul>
   </li>
   <li>
@@ -143,8 +141,8 @@
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/requirements.html">SDK System Requirements</a></li>
       <li><a href="<?cs var:toroot ?>sdk/terms.html">SDK Terms and Conditions</a></li>
-      <li><a href="<?cs var:toroot ?>sdk/RELEASENOTES.html">SDK Release
-            Notes</a></li>
+      <!-- <li><a href="<?cs var:toroot ?>sdk/RELEASENOTES.html">SDK Release
+            Notes</a></li> -->
       <li><a href="<?cs var:toroot ?>sdk/older_releases.html">SDK
             Archives</a></li>
 
diff --git a/docs/html/sdk/tools-notes.jd b/docs/html/sdk/tools-notes.jd
index 1b0d8f0..c60782f 100644
--- a/docs/html/sdk/tools-notes.jd
+++ b/docs/html/sdk/tools-notes.jd
@@ -1,39 +1,133 @@
-page.title=SDK Tools Notes
+page.title=SDK Tools
 @jd:body
 
-<p>SDK Tools is a downloadable component for the Android SDK. It
-includes the complete set of development and debugging tools for the Android
-SDK.</p>
+<p>SDK Tools is a downloadable component for the Android SDK. It includes the
+complete set of development and debugging tools for the Android SDK. </p>
 
-<p>This document provides version-specific information about SDK Tools
-releases. To keep up-to-date on new releases, make sure that you view this page
-at <a
-href="http://developer.android.com/sdk/tools-notes.html">http://developer.
-android.com/sdk/tools-notes.html</a>.</p>
+<p>If you are new to the Android SDK, the <a 
+href="{@docRoot}sdk/index.html">SDK starter package</a> installs the
+latest revision of the SDK Tools in the <code>&lt;sdk&gt;/tools</code> directory.</p>
 
-<p>To install SDK Tools in your SDK environment (and replace the
-existing tools), use the Android SDK and AVD Manager. For more information, see
-<a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. </p>
+<p>If you are already using the SDK and you want to update to the latest version
+of the SDK Tools, use the <em>Android SDK and AVD Manager</em> to get the
+update, rather than downloading a new SDK starter package. For more information
+about how to update, see <a
+href="{@docRoot}sdk/adding-components.html#UpdatingComponents">Updating SDK
+Components</a>. </p>
 
-<h2 id="4">SDK Tools, Revision 4</h2>
+<h2 id="notes">Revisions</h2>
 
-<p>December 2009. SDK Tools r4 provides several new features for developers and includes
-fixes for several issues, as described below. </p>
+<p>The sections below provide notes about successive releases of
+the SDK Tools, as denoted by revision number. To determine what revision of the SDK
+Tools you are using, refer to the "Installed Packages" listing in the Android SDK
+and AVD Manager. </p>
 
-<h3>Dependencies</h3>
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+SDK Tools, Revision 5</a> <em>(March 2010)</em>
+  <div class="toggleme">
 
-<p>SDK Tools r4 is compatible with ADT 0.9.5 and later, but not
+<dl>
+<dt>Dependencies:</dt>
+<dd><ul>
+<li>If you are developing in Eclipse with ADT, note that SDK Tools r5 is
+designed for use with ADT 0.9.6 and later. After installing SDK Tools r5, we
+highly recommend updating your ADT Plugin to 0.9.6.</li>
+<li>For Mac OS platforms, OS X 10.4.x (Tiger) is no longer
+officially supported. </li>
+</ul>
+</dd>
+
+<dt>SDK and AVD Manager:</dt>
+<dd>
+<ul>
+<li>Fixes SSL download for the standalone version of the SDK Updater.</li>
+<li>Fixes issue with 64-bit JVM on Windows.</li>
+<li>Adds support for platform samples components.</li>
+<li>Improves support for dependency between components.</li>
+<li>AVDs now sorted by API level.</li>
+<li>The AVD creation dialog now enforces a minimum SD card size of 9MB.</li>
+<li>Prevents deletion of running AVDs.</li>
+<li>Settings are now automatically saved, no need to click "Apply".</li>
+</ul>
+</dd>
+
+<dt>Emulator:</dt>
+<dd>
+<ul>
+<li>Emulator now requires SD card to be 9MB or more.</li>
+</ul>
+</dd>
+
+<dt>Layoutopt:</dt>
+<dd>
+<ul>
+<li>Fixes <code>layoutopt.bat</code> to execute correctly on Windows.</li>
+</ul>
+</dd>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+SDK Tools, Revision 4</a> <em>(December 2009)</em>
+  <div class="toggleme">
+
+<dl>
+<dt>Dependencies:</dt>
+<dd><p>SDK Tools r4 is compatible with ADT 0.9.5 and later, but not
 compatible with earlier versions. If you are developing in Eclipse with ADT, you
 <strong>must</strong> update your ADT plugin to version 0.9.5 or higher if you
-install SDK Tools r4 in your SDK. </p>
+install SDK Tools r4 in your SDK. </p></dd>
 
-<h3>General notes</h3>
+<dt>General notes:</dt>
+<dd>
 <ul>
 <li>Launcher script now forces GDK_NATIVE_WINDOW=true (linux only), to fix a 
 compatibility issue between GTK and SWT.</li>
 </ul>
+</dd>
 
-<h3>Android SDK and AVD Manager</h3>
+<dt>Android SDK and AVD Manager:</dt>
+<dd>
 <ul>
 <li>AVD Launch dialog now shows scale value.</li>
 <li>Fixes potential NPE in SDK Manager on AVD launch, for older AVD with no 
@@ -41,38 +135,50 @@
 <li>Fixes XML validation issue in on older Java versions.</li>
 <li>No longer forces the use of Java 1.5 on Mac OS X.</li>
 </ul>
+</dd>
 
-<h3>Emulator</h3>
+<dt>Emulator:</dt>
+<dd>
 <ul>
 <li>No longer limits the size of the system partition.</li>
 </ul>
+</dd>
 
-<h3>Ant build tools</h3>
+<dt>Ant build tools:</dt>
+<dd>
 <ul>
 <li>.apk packaging now properly ignores vi swap files as well as hidden files.</li>
 </ul>
+</dd>
+</dl>
+ </div>
+</div>
 
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+SDK Tools, Revision 3</a> <em>(October 2009)</em>
+  <div class="toggleme">
 
-<h2 id="3">SDK Tools, Revision 3</h2>
-
-<p>October 2009. SDK Tools r3 provides several new features for developers and includes
-fixes for several tools issues, as described below. </p>
-
-<h3>Dependencies</h3>
-
-<p>SDK Tools r3 is compatible with ADT 0.9.4 and later, but not
+<dl>
+<dt>Dependencies:</dt>
+<dd><p>SDK Tools r3 is compatible with ADT 0.9.4 and later, but not
 compatible with earlier versions. If you are developing in Eclipse with ADT, you
 <strong>must</strong> update your ADT plugin to version 0.9.4 or higher if you
-install SDK Tools r3 in your SDK. </p>
+install SDK Tools r3 in your SDK.</p>
+</dd>
 
-<h3>Android tool</h3>
+<dt>Android tool:</dt>
+<dd>
 <ul>
 <li>Adds new <code>android create test-project</code> and <code>android update
 test-project</code> commands to allow for greater flexibility in the location of the
 main and test projects.</li>
 </ul>
+</dd>
 
-<h3>DDMS</h3>
+<dt>DDMS:</dt>
+<dd>
 <ul>
 <li>Adds a button to dump HPROF file for running appplications (app must be able
 to write to the sdcard).</li>
@@ -83,8 +189,10 @@
 10.6.</li>
 <li>Fixed screenshot support for devices running 32-bit framebuffer.</li>
 </ul>
+</dd>
 
-<h3>Android SDK and AVD Manager</h3>
+<dt>Android SDK and AVD Manager:</dt>
+<dd>
 <ul>
 <li>Provides a new UI that lets you set options for controlling
 the emulator skin, screen size/density, and scale factor used when launching 
@@ -94,14 +202,17 @@
 <li>Now enforces dependencies between platforms and tools components, and
 between SDK add-ons and platforms.</li>
 </ul>
+</dd>
 
-<h3>Layoutopt, a new tool for optimizing layouts</h3>
+<dt>Layoutopt, a new tool for optimizing layouts:</dt>
 
-<p>The SDK Tools r3 package includes <code>layoutopt</code>, a new command-line 
+<dd><p>The SDK Tools r3 package includes <code>layoutopt</code>, a new command-line 
 tool that helps you optimize your layout hierarchies. When run against your 
 layout files, the tool analyzes their hierarchies and notifies you of 
 inefficiencies and other potential issues. The tool also provides simple 
 solutions for the issues it finds. For usage, see <a 
-href="{@docRoot}guide/developing/tools/layoutopt.html">layoutopt</a>.
-</p>
-
+href="/guide/developing/tools/layoutopt.html">layoutopt</a>.</p>
+</dd>
+</dl>
+ </div>
+</div>
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index d3dce9e..38b34ed 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -5,7 +5,7 @@
 <div id="qv">
   <h2>In this document</h2>
   <ol>
-    <li><a href="#RevisionNotes">Revision Notes</a></li>
+    <li><a href="#notes">Revisions</a></li>
     <li><a href="#WinUsbDriver">Installing the USB Driver for Windows</a></li>
   </ol>
   <h2>See also</h2>
@@ -34,18 +34,86 @@
 href="{@docRoot}guide/developing/device.html#setting-up">Setting up a
 Device</a> to start development with a device.</p>
 
-<h2 id="RevisionNotes">Revision Notes</h2>
+<h2 id="notes">Revisions</h2>
 
-<h4>Revision 3</h4>
-<p>Adds support for the Nexus One. Released January 2010.</p>
+<p>The sections below provide notes about successive revisions of the USB Driver
+for Windows, as denoted by revision number. To determine what revision of the
+USB Driver for Windows you are using, refer to the "Installed Packages" listing
+in the Android SDK and AVD Manager.</p>
 
-<h4>Revision 2</h4>
-<p>Adds support for the Verizon Droid (or similar hardware on
-other carriers). Released November 2009.</p>
+<script type="text/javascript">
+function toggleDiv(link) {
+  var toggleable = $(link).parent();
+  if (toggleable.hasClass("closed")) {
+    //$(".toggleme", toggleable).slideDown("fast");
+    toggleable.removeClass("closed");
+    toggleable.addClass("open");
+    $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
+  } else {
+    //$(".toggleme", toggleable).slideUp("fast");
+    toggleable.removeClass("open");
+    toggleable.addClass("closed");
+    $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
+  }
+  return false;
+}
+</script>
+<style>
+.toggleable {
+padding: .25em 1em;
+}
+.toggleme {
+  padding: 1em 1em 0 2em;
+  line-height:1em;
+}
+.toggleable a {
+  text-decoration:none;
+}
+.toggleable.closed .toggleme {
+  display:none;
+}
+#jd-content .toggle-img {
+  margin:0;
+}
+</style>
 
-<h4>Revision 1</h4>
-<p>This was the initial release of the WinUsb-based driver, with support
-for the T-Mobile G1 and myTouch 3G (and similar devices).</p>
+<div class="toggleable opened">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px" />
+USB Driver for Windows, Revision 3</a> <em>(January 2010)</em>
+  <div class="toggleme">
+
+<dl>
+<dt><p>Adds support for the Nexus One.</p></dt>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+USB Driver for Windows, Revision 2</a> <em>(November 2009)</em>
+  <div class="toggleme">
+
+<dl>
+<dt><p>Adds support for the Verizon Droid (or similar hardware on
+other carriers).</p></dt>
+</dl>
+ </div>
+</div>
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
+USB Driver for Windows, Revision 1</a> <em>(October 2009)</em>
+  <div class="toggleme">
+
+<dl>
+<dt><p>Initial release of the WinUsb-based driver, with support
+for the T-Mobile G1 and myTouch 3G (and similar devices).</p></dt>
+</dl>
+ </div>
+</div>
 
 <h2 id="WinUsbDriver">Installing the USB Driver for Windows</h2>
 
@@ -66,21 +134,37 @@
 </div>
 </div>
 
-<p>Before you perform the installation below, you must have the USB
-driver saved to your development computer. To get the USB driver, use
-the AVD and SDK Manager included with the SDK Tools to download the USB driver
-as an SDK component. For more information, read <a
-href="adding-components.html">Adding SDK Components</a>.</p>
 
-<p>Once you have the USB driver saved to your computer, select the
-appropriate procedure below, based on your operating system and whether you're
-installing for the first time or upgrading.</p>
+<p>The sections below provide instructions on how to download the USB Driver
+for Windows and install it on your development computer. </p>
 
-<p>If you are connecting an Android-powered
-device to your computer for the first time, follow the below procedure to
-"Perform a fresh installation." If you have installed one of the older
-USB drivers and would like to upgrade to the latest version, follow the
-procedure to "Upgrade an existing driver."</p>
+<h3>Downloading the USB Driver for Windows</h3>
+
+<p>The USB Driver for Windows is available for download as an optional SDK
+component. You need the driver only if you are developing on Windows and 
+want to connect an Android-powered device to your development environment
+over USB. </p>
+
+<p>To install the driver or upgrade your existing driver to the latest
+revision, you must first download the driver to your development computer. </p>
+
+<p>To download the driver, use the Android SDK and AVD Manager tool that is
+included with the Android SDK. If you haven't yet installed the Android SDK, as
+described in <a href="installing.html">Installing the Android SDK</a>, please do
+so before continuing with the driver installation. </p>
+
+<p>When you are ready to download the driver, follow the instructions given in
+<a href="adding-components.html">Adding SDK Components</a> to launch the Android
+SDK and AVD Manager. From the <strong>Available Packages</strong> panel, select
+"Usb Driver Package" and download it to your computer. The driver files are
+downloaded into the <code>&lt;sdk&gt;\usb_driver</code> directory.</p>
+
+<p>After the download, follow the instructions below to install or upgrade the
+driver, based on your needs and Windows operating system version. If you are
+connecting an Android-powered device to your computer for the first time, follow
+the below procedure to "Perform a fresh installation." If you have installed one
+of the older USB drivers and would like to upgrade to the latest version, follow
+the procedure to "Upgrade an existing driver."</p>
 
 <p>Once you've completed the USB driver installation,
 please see <a
diff --git a/docs/html/sitemap.txt b/docs/html/sitemap.txt
index 5039dfc..b0ec7c9 100644
--- a/docs/html/sitemap.txt
+++ b/docs/html/sitemap.txt
@@ -74,7 +74,6 @@
 http://developer.android.com/sdk/tools-notes.html
 http://developer.android.com/sdk/win-usb.html
 http://developer.android.com/sdk/eclipse-adt.html
-http://developer.android.com/sdk/adt-notes.html
 http://developer.android.com/sdk/ndk/1.6_r1/index.html
 http://developer.android.com/sdk/requirements.html
 http://developer.android.com/sdk/RELEASENOTES.html
diff --git a/libs/camera/ICamera.cpp b/libs/camera/ICamera.cpp
index 724bd20..13673b5 100644
--- a/libs/camera/ICamera.cpp
+++ b/libs/camera/ICamera.cpp
@@ -208,7 +208,7 @@
     }
     virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
     {
-        LOGD("sendCommand");
+        LOGV("sendCommand");
         Parcel data, reply;
         data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
         data.writeInt32(cmd);
diff --git a/libs/utils/VectorImpl.cpp b/libs/utils/VectorImpl.cpp
index 2c2d667..0322af7 100644
--- a/libs/utils/VectorImpl.cpp
+++ b/libs/utils/VectorImpl.cpp
@@ -173,9 +173,10 @@
                     if (!array) return NO_MEMORY;
                     temp = malloc(mItemSize);
                     if (!temp) return NO_MEMORY;
-                    _do_construct(temp, 1);
                     item = reinterpret_cast<char*>(array) + mItemSize*(i);
                     curr = reinterpret_cast<char*>(array) + mItemSize*(i-1);
+                } else {
+                    _do_destroy(temp, 1);
                 }
 
                 _do_copy(temp, item, 1);
@@ -183,12 +184,14 @@
                 ssize_t j = i-1;
                 void* next = reinterpret_cast<char*>(array) + mItemSize*(i);                    
                 do {
+                    _do_destroy(next, 1);
                     _do_copy(next, curr, 1);
                     next = curr;
                     --j;
                     curr = reinterpret_cast<char*>(array) + mItemSize*(j);                    
                 } while (j>=0 && (cmp(curr, temp, state) > 0));
 
+                _do_destroy(next, 1);
                 _do_copy(next, temp, 1);
             }
             i++;
diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp
index 6307bc5..e62d501 100644
--- a/media/libstagefright/TimedEventQueue.cpp
+++ b/media/libstagefright/TimedEventQueue.cpp
@@ -24,6 +24,7 @@
 
 #include "include/TimedEventQueue.h"
 
+#include <sys/prctl.h>
 #include <sys/time.h>
 
 #include <media/stagefright/MediaDebug.h>
@@ -182,7 +183,7 @@
     struct timeval tv;
     gettimeofday(&tv, NULL);
 
-    return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
+    return (int64_t)tv.tv_sec * 1000000ll + tv.tv_usec;
 }
 
 // static
@@ -211,8 +212,10 @@
 }
 
 void TimedEventQueue::threadEntry() {
+    prctl(PR_SET_NAME, (unsigned long)"TimedEventQueue", 0, 0, 0);
+
     for (;;) {
-        int64_t now_us;
+        int64_t now_us = 0;
         sp<Event> event;
 
         {
@@ -228,6 +231,11 @@
 
             List<QueueItem>::iterator it;
             for (;;) {
+                if (mQueue.empty()) {
+                    // The only event in the queue could have been cancelled
+                    // while we were waiting for its scheduled time.
+                    break;
+                }
                 it = mQueue.begin();
 
                 now_us = getRealTimeUs();
@@ -244,10 +252,25 @@
                     break;
                 }
 
-                status_t err = mQueueHeadChangedCondition.waitRelative(
-                        mLock, delay_us * 1000);
+                static int64_t kMaxTimeoutUs = 10000000ll;  // 10 secs
+                bool timeoutCapped = false;
+                if (delay_us > kMaxTimeoutUs) {
+                    LOGW("delay_us exceeds max timeout: %lld us", delay_us);
 
-                if (err == -ETIMEDOUT) {
+                    // We'll never block for more than 10 secs, instead
+                    // we will split up the full timeout into chunks of
+                    // 10 secs at a time. This will also avoid overflow
+                    // when converting from us to ns.
+                    delay_us = kMaxTimeoutUs;
+                    timeoutCapped = true;
+                }
+
+                status_t err = mQueueHeadChangedCondition.waitRelative(
+                        mLock, delay_us * 1000ll);
+
+                if (!timeoutCapped && err == -ETIMEDOUT) {
+                    // We finally hit the time this event is supposed to
+                    // trigger.
                     now_us = getRealTimeUs();
                     break;
                 }
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index b263238..d688e2c 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -28,6 +28,8 @@
 
 namespace android {
 
+static const size_t kMaxMetadataSize = 3 * 1024 * 1024;
+
 ID3::ID3(const sp<DataSource> &source)
     : mIsValid(false),
       mData(NULL),
@@ -111,6 +113,11 @@
         size = (size << 7) | header.enc_size[i];
     }
 
+    if (size > kMaxMetadataSize) {
+        LOGE("skipping huge ID3 metadata of size %d", size);
+        return false;
+    }
+
     mData = (uint8_t *)malloc(size);
 
     if (mData == NULL) {
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 0f79b15..5ad0361 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -156,11 +156,11 @@
  */
 public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
     private final static boolean LOG_THREADS = false;
-    private final static boolean LOG_PAUSE_RESUME = true;
-    private final static boolean LOG_SURFACE = true;
-    private final static boolean LOG_RENDERER = true;
+    private final static boolean LOG_PAUSE_RESUME = false;
+    private final static boolean LOG_SURFACE = false;
+    private final static boolean LOG_RENDERER = false;
     private final static boolean LOG_RENDERER_DRAW_FRAME = false;
-    private final static boolean LOG_EGL = true;
+    private final static boolean LOG_EGL = false;
     // Work-around for bug 2263168
     private final static boolean DRAW_TWICE_AFTER_SIZE_CHANGED = true;
     /**
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index b8e3283..924737e 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -114,6 +114,6 @@
 {
     GLeglImageOES implImage = 
         (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
-    __glEGLImageTargetRenderbufferStorageOES(target, image);
+    __glEGLImageTargetRenderbufferStorageOES(target, implImage);
 }
 
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index e7757a8..d71ff76 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -185,6 +185,6 @@
 {
     GLeglImageOES implImage = 
         (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image);
-    __glEGLImageTargetRenderbufferStorageOES(target, image);
+    __glEGLImageTargetRenderbufferStorageOES(target, implImage);
 }
 
diff --git a/opengl/tests/testPauseResume/Android.mk b/opengl/tests/testPauseResume/Android.mk
new file mode 100644
index 0000000..450473a
--- /dev/null
+++ b/opengl/tests/testPauseResume/Android.mk
@@ -0,0 +1,22 @@
+#########################################################################
+# OpenGL ES JNI sample
+# This makefile builds both an activity and a shared library.
+#########################################################################
+ifneq ($(TARGET_SIMULATOR),true) # not 64 bit clean
+
+TOP_LOCAL_PATH:= $(call my-dir)
+
+# Build activity
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := TestEGL
+
+include $(BUILD_PACKAGE)
+
+endif # TARGET_SIMULATOR
diff --git a/opengl/tests/testPauseResume/AndroidManifest.xml b/opengl/tests/testPauseResume/AndroidManifest.xml
new file mode 100644
index 0000000..3e8e7e7
--- /dev/null
+++ b/opengl/tests/testPauseResume/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 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.
+*/
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.test">
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <application
+            android:label="@string/test_activity">
+        <activity android:name="TestActivity"
+                android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+            	android:launchMode="singleTask"
+            	android:screenOrientation="landscape"
+            	android:configChanges="orientation|keyboardHidden">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/opengl/tests/testPauseResume/README b/opengl/tests/testPauseResume/README
new file mode 100644
index 0000000..87db74a
--- /dev/null
+++ b/opengl/tests/testPauseResume/README
@@ -0,0 +1,37 @@
+Repro steps:
+
+build, install and run the attached test program TestEgl.apk
+
+The program does not draw anything to the screen, it just prints to the log, so use adb logcat to watch the output.
+
+Expected behavior:
+
+constantly increasing "step" count:
+
+
+W/TestActivity( 1885): ****** step 235 resume
+W/TestActivity( 1885): step 236 pause
+W/TestActivity( 1885): ****** step 236 resume
+
+and so on.
+
+Actual behavior:
+
+W/TestActivity( 1466): ****** step 25 resume
+W/TestActivity( 1466): step 26 pause
+W/TestActivity( 1466): ****** step 26 resume
+W/dalvikvm( 1466): threadid=8: thread exiting with uncaught exception (group=0x4001d7f0)
+E/AndroidRuntime( 1466): FATAL EXCEPTION: GLThread 9
+E/AndroidRuntime( 1466): java.lang.RuntimeException: createContext failed: EGL_BAD_ALLOC
+E/AndroidRuntime( 1466):        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1067)
+E/AndroidRuntime( 1466):        at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1059)
+E/AndroidRuntime( 1466):        at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:925)
+E/AndroidRuntime( 1466):        at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1236)
+E/AndroidRuntime( 1466):        at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1106)
+W/TestActivity( 1466): step 27 pause
+W/TestActivity( 1466): ****** step 27 resume
+W/TestActivity( 1466): step 28 pause
+W/TestActivity( 1466): ****** step 28 resume
+
+
+See http://b/issue?id=2550745 for further details.
diff --git a/opengl/tests/testPauseResume/res/values/strings.xml b/opengl/tests/testPauseResume/res/values/strings.xml
new file mode 100644
index 0000000..208fe15
--- /dev/null
+++ b/opengl/tests/testPauseResume/res/values/strings.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2006, 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 file contains resource definitions for displayed strings, allowing
+     them to be changed based on the locale and options. -->
+
+<resources>
+    <!-- Simple strings. -->
+    <string name="test_activity">Test Egl</string>
+
+</resources>
+
diff --git a/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java b/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java
new file mode 100644
index 0000000..9dc71321
--- /dev/null
+++ b/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+package com.android.test;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+
+public class TestActivity extends Activity {
+    private final static String TAG = "TestActivity";
+    TestView mView;
+    boolean mToggle;
+    int mCount;
+    final static int PAUSE_DELAY = 100;
+    Runnable mRunnable = new Runnable() {
+        public void run() {
+        if (mToggle) {
+            Log.w(TAG, "****** step " + mCount + " resume");
+            mCount++;
+            mView.onResume();
+        } else {
+            Log.w(TAG, "step " + mCount + " pause");
+            mView.onPause();
+        }
+        mToggle = ! mToggle;
+        mView.postDelayed(mRunnable, PAUSE_DELAY);
+        }
+    };
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        mView = new TestView(getApplication());
+	    mView.setFocusableInTouchMode(true);
+	    setContentView(mView);
+        mView.postDelayed(mRunnable, PAUSE_DELAY);
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        mView.onPause();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mView.onResume();
+    }
+}
diff --git a/opengl/tests/testPauseResume/src/com/android/test/TestView.java b/opengl/tests/testPauseResume/src/com/android/test/TestView.java
new file mode 100644
index 0000000..8c28f13
--- /dev/null
+++ b/opengl/tests/testPauseResume/src/com/android/test/TestView.java
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+package com.android.test;
+/*
+ * 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 android.content.Context;
+import android.opengl.GLSurfaceView;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+
+import javax.microedition.khronos.egl.EGL10;
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
+/**
+ * An implementation of SurfaceView that uses the dedicated surface for
+ * displaying an OpenGL animation.  This allows the animation to run in a
+ * separate thread, without requiring that it be driven by the update mechanism
+ * of the view hierarchy.
+ *
+ * The application-specific rendering code is delegated to a GLView.Renderer
+ * instance.
+ */
+class TestView extends GLSurfaceView {
+    TestView(Context context) {
+        super(context);
+        init();
+    }
+
+    public TestView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    private void init() {
+        setRenderer(new Renderer());
+    }
+
+    private class Renderer implements GLSurfaceView.Renderer {
+        private static final String TAG = "Renderer";
+        public void onDrawFrame(GL10 gl) {
+            // Do nothing.
+        }
+
+        public void onSurfaceChanged(GL10 gl, int width, int height) {
+            // Do nothing.
+        }
+
+        public void onSurfaceCreated(GL10 gl, EGLConfig config) {
+            // Do nothing.
+        }
+    }
+}
+
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
index d5c9855a..b98071e 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -32,7 +32,7 @@
 
 import android.app.backup.BackupDataInput;
 import android.app.backup.BackupDataOutput;
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.content.ContentValues;
 import android.content.Context;
 import android.database.Cursor;
@@ -49,7 +49,7 @@
  * Performs backup and restore of the System and Secure settings.
  * List of settings that are backed up are stored in the Settings.java file
  */
-public class SettingsBackupAgent extends BackupHelperAgent {
+public class SettingsBackupAgent extends BackupAgentHelper {
     private static final boolean DEBUG = false;
 
     private static final String KEY_SYSTEM = "system";
diff --git a/preloaded-classes b/preloaded-classes
index 5672c66..a2c1f68 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -468,6 +468,7 @@
 android.text.style.TextAppearanceSpan
 android.text.util.Linkify
 android.util.AttributeSet
+android.util.Base64$Encoder
 android.util.DisplayMetrics
 android.util.EventLog
 android.util.EventLog$Event
@@ -481,7 +482,6 @@
 android.util.TypedValue
 android.util.Xml
 android.util.Xml$Encoding
-android.util.base64.Base64$Encoder
 android.view.AbsSavedState
 android.view.ContextThemeWrapper
 android.view.Display
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 3e1adf1..44c6018 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -39,7 +39,6 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
 import android.database.ContentObserver;
-import android.media.AsyncPlayer;
 import android.media.AudioManager;
 import android.net.Uri;
 import android.os.BatteryManager;
@@ -98,7 +97,7 @@
     private int mDefaultNotificationLedOff;
 
     private NotificationRecord mSoundNotification;
-    private AsyncPlayer mSound;
+    private NotificationPlayer mSound;
     private boolean mSystemReady;
     private int mDisabledNotifications;
 
@@ -413,7 +412,7 @@
         mContext = context;
         mLightsService = lights;
         mAm = ActivityManagerNative.getDefault();
-        mSound = new AsyncPlayer(TAG);
+        mSound = new NotificationPlayer(TAG);
         mSound.setUsesWakeLock(context);
         mToastQueue = new ArrayList<ToastRecord>();
         mHandler = new WorkerHandler();
diff --git a/services/java/com/android/server/NotificationPlayer.java b/services/java/com/android/server/NotificationPlayer.java
new file mode 100644
index 0000000..4c4da5a
--- /dev/null
+++ b/services/java/com/android/server/NotificationPlayer.java
@@ -0,0 +1,313 @@
+/*
+ * 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.server;
+
+import android.content.Context;
+import android.media.AudioManager;
+import android.media.MediaPlayer;
+import android.media.MediaPlayer.OnCompletionListener;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.os.PowerManager;
+import android.os.SystemClock;
+import android.util.Log;
+
+import java.io.IOException;
+import java.lang.IllegalStateException;
+import java.lang.Thread;
+import java.util.LinkedList;
+
+/**
+ * @hide
+ * This class is provides the same interface and functionality as android.media.AsyncPlayer
+ * with the following differences: 
+ * - whenever audio is played, audio focus is requested,
+ * - whenever audio playback is stopped or the playback completed, audio focus is abandoned.
+ */
+public class NotificationPlayer implements OnCompletionListener {
+    private static final int PLAY = 1;
+    private static final int STOP = 2;
+    private static final boolean mDebug = false;
+
+    private static final class Command {
+        int code;
+        Context context;
+        Uri uri;
+        boolean looping;
+        int stream;
+        long requestTime;
+
+        public String toString() {
+            return "{ code=" + code + " looping=" + looping + " stream=" + stream
+                    + " uri=" + uri + " }";
+        }
+    }
+
+    private LinkedList<Command> mCmdQueue = new LinkedList();
+
+    private Looper mLooper;
+
+    /*
+     * Besides the use of audio focus, the only implementation difference between AsyncPlayer and
+     * NotificationPlayer resides in the creation of the MediaPlayer. For the completion callback,
+     * OnCompletionListener, to be called at the end of the playback, the MediaPlayer needs to
+     * be created with a looper running so its event handler is not null.
+     */
+    private final class PlayerCreationThread extends Thread {
+        public Command mCmd;
+        public PlayerCreationThread(Command cmd) {
+            super();
+            mCmd = cmd;
+        }
+
+        public void run() {
+            Looper.prepare();
+            mLooper = Looper.myLooper();
+            synchronized(this) {
+                AudioManager audioManager =
+                    (AudioManager) mCmd.context.getSystemService(Context.AUDIO_SERVICE);
+                try {
+                    MediaPlayer player = new MediaPlayer();
+                    player.setAudioStreamType(mCmd.stream);
+                    player.setDataSource(mCmd.context, mCmd.uri);
+                    player.setLooping(mCmd.looping);
+                    player.prepare();
+                    if (mCmd.looping) {
+                        audioManager.requestAudioFocus(null, mCmd.stream,
+                                AudioManager.AUDIOFOCUS_GAIN);
+                    } else {
+                        audioManager.requestAudioFocus(null, mCmd.stream,
+                                AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK);
+                    }
+                    player.start();
+                    if (mPlayer != null) {
+                        mPlayer.release();
+                    }
+                    mPlayer = player;
+                }
+                catch (Exception e) {
+                    Log.w(mTag, "error loading sound for " + mCmd.uri, e);
+                }
+                mAudioManager = audioManager;
+                this.notify();
+            }
+            Looper.loop();
+        }
+    };
+
+    private void startSound(Command cmd) {
+        // Preparing can be slow, so if there is something else
+        // is playing, let it continue until we're done, so there
+        // is less of a glitch.
+        try {
+            if (mDebug) Log.d(mTag, "Starting playback");
+            //-----------------------------------
+            // This is were we deviate from the AsyncPlayer implementation and create the
+            // MediaPlayer in a new thread with which we're synchronized
+            PlayerCreationThread t = new PlayerCreationThread(cmd);
+            synchronized(t) {
+                t.start();
+                t.wait();
+            }
+            mPlayer.setOnCompletionListener(this);
+            //-----------------------------------
+
+            long delay = SystemClock.uptimeMillis() - cmd.requestTime;
+            if (delay > 1000) {
+                Log.w(mTag, "Notification sound delayed by " + delay + "msecs");
+            }
+        }
+        catch (Exception e) {
+            Log.w(mTag, "error loading sound for " + cmd.uri, e);
+        }
+    }
+
+    private final class CmdThread extends java.lang.Thread {
+        CmdThread() {
+            super("NotificationPlayer-" + mTag);
+        }
+
+        public void run() {
+            while (true) {
+                Command cmd = null;
+
+                synchronized (mCmdQueue) {
+                    if (mDebug) Log.d(mTag, "RemoveFirst");
+                    cmd = mCmdQueue.removeFirst();
+                }
+
+                switch (cmd.code) {
+                case PLAY:
+                    if (mDebug) Log.d(mTag, "PLAY");
+                    startSound(cmd);
+                    break;
+                case STOP:
+                    if (mDebug) Log.d(mTag, "STOP");
+                    if (mPlayer != null) {
+                        long delay = SystemClock.uptimeMillis() - cmd.requestTime;
+                        if (delay > 1000) {
+                            Log.w(mTag, "Notification stop delayed by " + delay + "msecs");
+                        }
+                        mPlayer.stop();
+                        mPlayer.release();
+                        mPlayer = null;
+                        mAudioManager.abandonAudioFocus(null);
+                        mAudioManager = null;
+                        mLooper.quit();
+                    } else {
+                        Log.w(mTag, "STOP command without a player");
+                    }
+                    break;
+                }
+
+                synchronized (mCmdQueue) {
+                    if (mCmdQueue.size() == 0) {
+                        // nothing left to do, quit
+                        // doing this check after we're done prevents the case where they
+                        // added it during the operation from spawning two threads and
+                        // trying to do them in parallel.
+                        mThread = null;
+                        releaseWakeLock();
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    public void onCompletion(MediaPlayer mp) {
+        if (mAudioManager != null) {
+            mAudioManager.abandonAudioFocus(null);
+        }
+    }
+
+    private String mTag;
+    private CmdThread mThread;
+    private MediaPlayer mPlayer;
+    private PowerManager.WakeLock mWakeLock;
+    private AudioManager mAudioManager;
+
+    // The current state according to the caller.  Reality lags behind
+    // because of the asynchronous nature of this class.
+    private int mState = STOP;
+
+    /**
+     * Construct a NotificationPlayer object.
+     *
+     * @param tag a string to use for debugging
+     */
+    public NotificationPlayer(String tag) {
+        if (tag != null) {
+            mTag = tag;
+        } else {
+            mTag = "NotificationPlayer";
+        }
+    }
+
+    /**
+     * Start playing the sound.  It will actually start playing at some
+     * point in the future.  There are no guarantees about latency here.
+     * Calling this before another audio file is done playing will stop
+     * that one and start the new one.
+     *
+     * @param context Your application's context.
+     * @param uri The URI to play.  (see {@link MediaPlayer#setDataSource(Context, Uri)})
+     * @param looping Whether the audio should loop forever.
+     *          (see {@link MediaPlayer#setLooping(boolean)})
+     * @param stream the AudioStream to use.
+     *          (see {@link MediaPlayer#setAudioStreamType(int)})
+     */
+    public void play(Context context, Uri uri, boolean looping, int stream) {
+        Command cmd = new Command();
+        cmd.requestTime = SystemClock.uptimeMillis();
+        cmd.code = PLAY;
+        cmd.context = context;
+        cmd.uri = uri;
+        cmd.looping = looping;
+        cmd.stream = stream;
+        synchronized (mCmdQueue) {
+            enqueueLocked(cmd);
+            mState = PLAY;
+        }
+    }
+
+    /**
+     * Stop a previously played sound.  It can't be played again or unpaused
+     * at this point.  Calling this multiple times has no ill effects.
+     */
+    public void stop() {
+        synchronized (mCmdQueue) {
+            // This check allows stop to be called multiple times without starting
+            // a thread that ends up doing nothing.
+            if (mState != STOP) {
+                Command cmd = new Command();
+                cmd.requestTime = SystemClock.uptimeMillis();
+                cmd.code = STOP;
+                enqueueLocked(cmd);
+                mState = STOP;
+            }
+        }
+    }
+
+    private void enqueueLocked(Command cmd) {
+        mCmdQueue.add(cmd);
+        if (mThread == null) {
+            acquireWakeLock();
+            mThread = new CmdThread();
+            mThread.start();
+        }
+    }
+
+    /**
+     * We want to hold a wake lock while we do the prepare and play.  The stop probably is
+     * optional, but it won't hurt to have it too.  The problem is that if you start a sound
+     * while you're holding a wake lock (e.g. an alarm starting a notification), you want the
+     * sound to play, but if the CPU turns off before mThread gets to work, it won't.  The
+     * simplest way to deal with this is to make it so there is a wake lock held while the
+     * thread is starting or running.  You're going to need the WAKE_LOCK permission if you're
+     * going to call this.
+     *
+     * This must be called before the first time play is called.
+     *
+     * @hide
+     */
+    public void setUsesWakeLock(Context context) {
+        if (mWakeLock != null || mThread != null) {
+            // if either of these has happened, we've already played something.
+            // and our releases will be out of sync.
+            throw new RuntimeException("assertion failed mWakeLock=" + mWakeLock
+                    + " mThread=" + mThread);
+        }
+        PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mTag);
+    }
+
+    private void acquireWakeLock() {
+        if (mWakeLock != null) {
+            mWakeLock.acquire();
+        }
+    }
+
+    private void releaseWakeLock() {
+        if (mWakeLock != null) {
+            mWakeLock.release();
+        }
+    }
+}
+
diff --git a/services/java/com/android/server/SystemBackupAgent.java b/services/java/com/android/server/SystemBackupAgent.java
index 86b9df6..fff1874 100644
--- a/services/java/com/android/server/SystemBackupAgent.java
+++ b/services/java/com/android/server/SystemBackupAgent.java
@@ -21,7 +21,7 @@
 import android.app.backup.BackupDataInputStream;
 import android.app.backup.BackupDataOutput;
 import android.app.backup.BackupHelper;
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.content.Context;
 import android.os.ParcelFileDescriptor;
 import android.os.ServiceManager;
@@ -34,7 +34,7 @@
 /**
  * Backup agent for various system-managed data, currently just the system wallpaper
  */
-public class SystemBackupAgent extends BackupHelperAgent {
+public class SystemBackupAgent extends BackupAgentHelper {
     private static final String TAG = "SystemBackupAgent";
 
     // These paths must match what the WallpaperManagerService uses
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index e4d7623..76e0d74 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -268,7 +268,7 @@
         boolean wifiEnabled = getPersistedWifiEnabled() || testAndClearWifiSavedState();
         Slog.i(TAG, "WifiService starting up with Wi-Fi " +
                 (wifiEnabled ? "enabled" : "disabled"));
-        setWifiEnabledBlocking(wifiEnabled, true, Process.myUid());
+        setWifiEnabled(wifiEnabled);
     }
 
     private void updateTetherState(ArrayList<String> available, ArrayList<String> tethered) {
@@ -1857,10 +1857,10 @@
             switch (msg.what) {
 
                 case MESSAGE_ENABLE_WIFI:
+                    setWifiEnabledBlocking(true, msg.arg1 == 1, msg.arg2);
                     if (mWifiWatchdogService == null) {
                         mWifiWatchdogService = new WifiWatchdogService(mContext, mWifiStateTracker);
                     }
-                    setWifiEnabledBlocking(true, msg.arg1 == 1, msg.arg2);
                     sWakeLock.release();
                     break;
 
@@ -1878,10 +1878,7 @@
                     // a non-zero msg.arg1 value means the "enabled" setting
                     // should be persisted
                     setWifiEnabledBlocking(false, msg.arg1 == 1, msg.arg2);
-                    if (mWifiWatchdogService != null) {
-                        mWifiWatchdogService.quit();
-                        mWifiWatchdogService = null;
-                    }
+                    mWifiWatchdogService = null;
                     sWakeLock.release();
                     break;
 
diff --git a/services/java/com/android/server/WifiWatchdogService.java b/services/java/com/android/server/WifiWatchdogService.java
index e2c523d..87f8a6e 100644
--- a/services/java/com/android/server/WifiWatchdogService.java
+++ b/services/java/com/android/server/WifiWatchdogService.java
@@ -251,7 +251,6 @@
     private void registerForWifiBroadcasts() {
         IntentFilter intentFilter = new IntentFilter();
         intentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        intentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION);
         intentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
         mContext.registerReceiver(mReceiver, intentFilter);
     }
@@ -276,7 +275,7 @@
     /**
      * Unregister broadcasts and quit the watchdog thread
      */
-    public void quit() {
+    private void quit() {
         unregisterForWifiBroadcasts();
         mContext.getContentResolver().unregisterContentObserver(mContentObserver);
         mHandler.removeAllActions();
@@ -1117,9 +1116,6 @@
             if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
                 handleNetworkStateChanged(
                         (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO));
-            } else if (action.equals(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION)) {
-                handleSupplicantConnectionChanged(
-                        intent.getBooleanExtra(WifiManager.EXTRA_SUPPLICANT_CONNECTED, false));
             } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
                 handleWifiStateChanged(intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
                         WifiManager.WIFI_STATE_UNKNOWN));
@@ -1153,15 +1149,9 @@
             }
         }
 
-        private void handleSupplicantConnectionChanged(boolean connected) {
-            if (!connected) {
-                onDisconnected();
-            }
-        }
-        
         private void handleWifiStateChanged(int wifiState) {
             if (wifiState == WifiManager.WIFI_STATE_DISABLED) {
-                onDisconnected();
+                quit();
             } else if (wifiState == WifiManager.WIFI_STATE_ENABLED) {
                 onEnabled();
             }
diff --git a/tests/backup/src/com/android/backuptest/BackupTestAgent.java b/tests/backup/src/com/android/backuptest/BackupTestAgent.java
index 3fdd96b..edc54a4 100644
--- a/tests/backup/src/com/android/backuptest/BackupTestAgent.java
+++ b/tests/backup/src/com/android/backuptest/BackupTestAgent.java
@@ -16,11 +16,11 @@
 
 package com.android.backuptest;
 
-import android.app.backup.BackupHelperAgent;
+import android.app.backup.BackupAgentHelper;
 import android.app.backup.FileBackupHelper;
 import android.app.backup.SharedPreferencesBackupHelper;
 
-public class BackupTestAgent extends BackupHelperAgent
+public class BackupTestAgent extends BackupAgentHelper
 {
     public void onCreate() {
         addHelper("data_files", new FileBackupHelper(this, BackupTestActivity.FILE_NAME));