Merge "Doc Update: Fixing images" into jb-dev-docs
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index cb83dc2..11d46c6 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -94,16 +94,16 @@
 
     /**
      * A timestamp related to this notification, in milliseconds since the epoch.
-     * 
+     *
      * Default value: {@link System#currentTimeMillis() Now}.
      *
      * Choose a timestamp that will be most relevant to the user. For most finite events, this
      * corresponds to the time the event happened (or will happen, in the case of events that have
      * yet to occur but about which the user is being informed). Indefinite events should be
-     * timestamped according to when the activity began. 
-     * 
+     * timestamped according to when the activity began.
+     *
      * Some examples:
-     * 
+     *
      * <ul>
      *   <li>Notification of a new chat message should be stamped when the message was received.</li>
      *   <li>Notification of an ongoing file download (with a progress bar, for example) should be stamped when the download started.</li>
@@ -111,8 +111,8 @@
      *   <li>Notification of an upcoming meeting should be stamped with the time the meeting will begin (that is, in the future).</li>
      *   <li>Notification of an ongoing stopwatch (increasing timer) should be stamped with the watch's start time.
      *   <li>Notification of an ongoing countdown timer should be stamped with the timer's end time.
-     * </ul> 
-     * 
+     * </ul>
+     *
      */
     public long when;
 
@@ -134,13 +134,13 @@
     /**
      * The number of events that this notification represents. For example, in a new mail
      * notification, this could be the number of unread messages.
-     * 
+     *
      * The system may or may not use this field to modify the appearance of the notification. For
      * example, before {@link android.os.Build.VERSION_CODES#HONEYCOMB}, this number was
      * superimposed over the icon in the status bar. Starting with
      * {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
      * {@link Notification.Builder} has displayed the number in the expanded notification view.
-     * 
+     *
      * If the number is 0 or negative, it is never shown.
      */
     public int number;
@@ -342,7 +342,7 @@
 
     /**
      * Obsolete flag indicating high-priority notifications; use the priority field instead.
-     * 
+     *
      * @deprecated Use {@link #priority} with a positive value.
      */
     public static final int FLAG_HIGH_PRIORITY      = 0x00000080;
@@ -383,15 +383,15 @@
 
     /**
      * Relative priority for this notification.
-     * 
+     *
      * Priority is an indication of how much of the user's valuable attention should be consumed by
      * this notification. Low-priority notifications may be hidden from the user in certain
      * situations, while the user might be interrupted for a higher-priority notification. The
-     * system will make a determination about how to interpret notification priority as described in 
+     * system will make a determination about how to interpret notification priority as described in
      * MUMBLE MUMBLE.
      */
     public int priority;
-    
+
     /**
      * @hide
      * Notification type: incoming call (voice or video) or similar synchronous communication request.
@@ -642,7 +642,7 @@
         that.flags = this.flags;
 
         that.priority = this.priority;
-        
+
         final String[] thiskind = this.kind;
         if (thiskind != null) {
             final int N = thiskind.length;
@@ -741,9 +741,9 @@
         }
 
         parcel.writeInt(priority);
-        
+
         parcel.writeStringArray(kind); // ok for null
-        
+
         if (extras != null) {
             parcel.writeInt(1);
             extras.writeToParcel(parcel, 0);
@@ -895,16 +895,16 @@
 
     /**
      * Builder class for {@link Notification} objects.
-     * 
+     *
      * Provides a convenient way to set the various fields of a {@link Notification} and generate
      * content views using the platform's notification layout template. If your app supports
      * versions of Android as old as API level 4, you can instead use
      * {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder},
      * available in the <a href="{@docRoot}tools/extras/support-library.html">Android Support
      * library</a>.
-     * 
+     *
      * <p>Example:
-     * 
+     *
      * <pre class="prettyprint">
      * Notification noti = new Notification.Builder(mContext)
      *         .setContentTitle(&quot;New mail from &quot; + sender.toString())
@@ -993,8 +993,8 @@
 
         /**
          * Show the {@link Notification#when} field as a stopwatch.
-         * 
-         * Instead of presenting <code>when</code> as a timestamp, the notification will show an 
+         *
+         * Instead of presenting <code>when</code> as a timestamp, the notification will show an
          * automatically updating display of the minutes and seconds since <code>when</code>.
          *
          * Useful when showing an elapsed time (like an ongoing phone call).
@@ -1060,7 +1060,7 @@
         }
 
         /**
-         * Set the third line of text in the platform notification template. 
+         * Set the third line of text in the platform notification template.
          * Don't use if you're also using {@link #setProgress(int, int, boolean)}; they occupy the same location in the standard template.
          */
         public Builder setSubText(CharSequence text) {
@@ -1322,12 +1322,12 @@
             mPriority = pri;
             return this;
         }
-        
+
         /**
          * @hide
-         * 
+         *
          * Add a kind (category) to this notification. Optional.
-         * 
+         *
          * @see Notification#kind
          */
         public Builder addKind(String k) {
@@ -1353,6 +1353,8 @@
         /**
          * Add an action to this notification. Actions are typically displayed by
          * the system as a button adjacent to the notification content.
+         * <br>
+         * A notification displays up to 3 actions, from left to right in the order they were added.
          *
          * @param icon Resource ID of a drawable that represents the action.
          * @param title Text describing the action.
@@ -1532,7 +1534,7 @@
 
         private RemoteViews generateActionButton(Action action) {
             final boolean tombstone = (action.actionIntent == null);
-            RemoteViews button = new RemoteViews(mContext.getPackageName(), 
+            RemoteViews button = new RemoteViews(mContext.getPackageName(),
                     tombstone ? R.layout.notification_action_tombstone
                               : R.layout.notification_action);
             button.setTextViewCompoundDrawables(R.id.action0, action.icon, 0, 0, 0);
@@ -1691,7 +1693,7 @@
 
     /**
      * Helper class for generating large-format notifications that include a large image attachment.
-     * 
+     *
      * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
      * <pre class="prettyprint">
      * Notification noti = new Notification.BigPictureStyle(
@@ -1703,7 +1705,7 @@
      *      .bigPicture(aBigBitmap)
      *      .build();
      * </pre>
-     * 
+     *
      * @see Notification#bigContentView
      */
     public static class BigPictureStyle extends Style {
@@ -1774,7 +1776,7 @@
 
     /**
      * Helper class for generating large-format notifications that include a lot of text.
-     * 
+     *
      * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
      * <pre class="prettyprint">
      * Notification noti = new Notification.BigPictureStyle(
@@ -1786,7 +1788,7 @@
      *      .bigText(aVeryLongString)
      *      .build();
      * </pre>
-     * 
+     *
      * @see Notification#bigContentView
      */
     public static class BigTextStyle extends Style {
@@ -1831,7 +1833,7 @@
             mBuilder.mContentText = null;
 
             RemoteViews contentView = getStandardView(R.layout.notification_template_big_text);
-            
+
             if (hadThreeLines) {
                 // vertical centering
                 contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
@@ -1855,7 +1857,7 @@
 
     /**
      * Helper class for generating large-format notifications that include a list of (up to 5) strings.
-     * 
+     *
      * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
      * <pre class="prettyprint">
      * Notification noti = new Notification.InboxStyle(
@@ -1870,7 +1872,7 @@
      *      .setSummaryText(&quot;+3 more&quot;)
      *      .build();
      * </pre>
-     * 
+     *
      * @see Notification#bigContentView
      */
     public static class InboxStyle extends Style {
diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd
index 04bf015..c0b07b5 100644
--- a/docs/html/guide/google/gcm/gcm.jd
+++ b/docs/html/guide/google/gcm/gcm.jd
@@ -668,8 +668,8 @@
     <td>How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number). </td>
   </tr>
 <tr>
-  <td><code>category</code></td>
-  <td>A string containing the package name of your application. When set, messages will only be sent to registration IDs that match the category. Optional.
+  <td><code>restricted_package_name</code></td>
+  <td>A string containing the package name of your application. When set, messages will only be sent to registration IDs that match the package name. Optional.
   </td>
 </tr>
 <tr>
@@ -707,7 +707,7 @@
     <td>Same as JSON (see previous table). Optional.</td>
   </tr>
 <tr>
-  <td><code>category</code></td>
+  <td><code>restricted_package_name</code></td>
   <td>Same as JSON (see previous table). Optional.
   </td>
 </tr>
@@ -956,11 +956,11 @@
 object in the results array is <code>InternalServerError</code>.
 </dd>
 
-<dt id="invalid_category"><strong>Invalid Category</strong></dt>
+<dt id="restricted_package_name"><strong>Invalid Package Name</strong></dt>
 
 <dd>
-A message was addressed to a registration ID whose category did not match the value passed in the request. Happens when error code is 
-<code>InvalidCategory</code>.
+A message was addressed to a registration ID whose package name did not match the value passed in the request. Happens when error code is 
+<code>InvalidPackageName</code>.
 </dd>
 
 
diff --git a/docs/html/guide/google/play/expansion-files.jd b/docs/html/guide/google/play/expansion-files.jd
index f5cda06..9cd1bb1 100644
--- a/docs/html/guide/google/play/expansion-files.jd
+++ b/docs/html/guide/google/play/expansion-files.jd
@@ -114,9 +114,10 @@
 
 <h3 id="Filename">File name format</h3>
 
-<p>Each expansion file you upload can be any format you choose (ZIP, PDF, MP4, etc.). Regardless of
-the file type, Google Play considers them opaque binary blobs and renames the files
-using the following scheme:</p>
+<p>Each expansion file you upload can be any format you choose (ZIP, PDF, MP4, etc.). You can also
+use the <a href="{@docRoot}tools/help/jobb.html">JOBB</a> tool to encapsulate and encrypt a set
+of resource files and subsequent patches for that set. Regardless of the file type, Google Play
+considers them opaque binary blobs and renames the files using the following scheme:</p>
 
 <pre class="classic no-pretty-print">
 [main|patch].&lt;expansion-version&gt;.&lt;package-name&gt;.obb
@@ -136,7 +137,7 @@
     <p>"First" is emphasized because although the Developer Console allows you to
 re-use an uploaded expansion file with a new APK, the expansion file's name does not change&mdash;it
 retains the version applied to it when you first uploaded the file.</p></dd>
-  <dt>{@code &lt;package-name&gt;}</dt> 
+  <dt>{@code &lt;package-name&gt;}</dt>
     <dd>Your application's Java-style package name.</dd>
 </dl>
 
@@ -253,7 +254,7 @@
   <li>Develop your application such that it uses the resources from your expansion files in the
 device's <a href="#StorageLocation">shared storage location</a>.
     <p>Remember that you must not delete, move, or rename the expansion files.</p>
-    <p>If your application doesn't demand a specific format, we suggest you create ZIP files for 
+    <p>If your application doesn't demand a specific format, we suggest you create ZIP files for
 your expansion files, then read them using the <a href="#ZipLib">APK Expansion Zip
 Library</a>.</p>
   </li>
@@ -347,7 +348,7 @@
         <ol>
           <li>Perform a request using Google Play's <a
 href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> to get your
-app's expansion file names, sizes, and URLs.</li> 
+app's expansion file names, sizes, and URLs.</li>
           <li>Use the URLs provided by Google Play to download the expansion files and save
 the expansion files. You <strong>must</strong> save the files to the <a
 href="#StorageLocation">shared storage location</a>
@@ -651,7 +652,7 @@
                     SampleDownloaderService.class);
         } catch (NameNotFoundException e) {
             e.printStackTrace();
-        }      
+        }
     }
 }
 </pre>
@@ -698,7 +699,7 @@
             return false;
     }
     return true;
-}        
+}
 </pre>
     <p>In this case, each {@code XAPKFile} object holds the version number and file size of a known
 expansion file and a boolean as to whether it's the main expansion file. (See the sample
@@ -749,7 +750,7 @@
         ...
         PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
                 notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-        
+
         // Start the download service (if required)
         int startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(this,
                         pendingIntent, SampleDownloaderService.class);
@@ -1050,9 +1051,9 @@
 <dl>
   <dt>{@code APKExpansionSupport}</dt>
     <dd>Provides some methods to access expansion file names and ZIP files:
-      
+
       <dl style="margin-top:1em">
-        <dt>{@code getAPKExpansionFiles()}</dt> 
+        <dt>{@code getAPKExpansionFiles()}</dt>
           <dd>The same method shown above that returns the complete file path to both expansion
 files.</dd>
         <dt>{@code getAPKExpansionZipFile(Context ctx, int mainVersion, int
@@ -1063,7 +1064,7 @@
 all the data, with the patch file's data merged on top of the main file.</dd>
       </dl>
     </dd>
-    
+
   <dt>{@code ZipResourceFile}</dt>
     <dd>Represents a ZIP file on the shared storage and performs all the work to provide a virtual
 file system based on your ZIP files. You can get an instance using {@code
@@ -1083,7 +1084,7 @@
 android.content.res.AssetFileDescriptor}, such as some {@link android.media.MediaPlayer} APIs.</dd>
       </dl>
     </dd>
-    
+
   <dt>{@code APEZProvider}</dt>
     <dd>Most applications don't need to use this class. This class defines a {@link
 android.content.ContentProvider} that marshals the data from the ZIP files through a content
@@ -1101,7 +1102,7 @@
 // Get a ZipResourceFile representing a merger of both the main and patch files
 ZipResourceFile expansionFile = APKExpansionSupport.getAPKExpansionZipFile(appContext,
         mainVersion, patchVersion);
-        
+
 // Get an input stream for a known file inside the expansion file ZIPs
 InputStream fileStream = expansionFile.getInputStream(pathToFileInsideZip);
 </pre>
@@ -1254,7 +1255,7 @@
 
 
 <!-- Tools are not ready.
-     
+
 <h3>Using OBB tool and APIs</h3>
 
 <pre>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 46c4398..d875f47 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -529,25 +529,6 @@
       <li><a href="<?cs var:toroot ?>guide/practices/tablets-and-handsets.html">
             <span class="en">Supporting Tablets and Handsets</span>
           </a></li>
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/practices/performance.html">
-            <span class="en">Designing for Performance</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>guide/practices/jni.html">
-                <span class="en">JNI Tips</span>
-              </a></li>
-        </ul>
-      </li>
-      <li><a href="<?cs var:toroot ?>guide/practices/responsiveness.html">
-            <span class="en">Designing for Responsiveness</span>
-          </a></li>
-      <li><a href="<?cs var:toroot ?>guide/practices/seamlessness.html">
-            <span class="en">Designing for Seamlessness</span>
-          </a></li>
-        <li><a href="<?cs var:toroot ?>guide/practices/security.html">
-            <span class="en">Designing for Security</span>
-          </a></li>
 
     </ul>
   </li>
diff --git a/docs/html/guide/practices/app-design/performance.jd b/docs/html/guide/practices/app-design/performance.jd
deleted file mode 100644
index 078999b..0000000
--- a/docs/html/guide/practices/app-design/performance.jd
+++ /dev/null
@@ -1,410 +0,0 @@
-page.title=Designing for Performance
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-<ol>
-  <li><a href="#intro">Introduction</a></li>
-  <li><a href="#optimize_judiciously">Optimize Judiciously</a></li>
-  <li><a href="#object_creation">Avoid Creating Unnecessary Objects</a></li>
-  <li><a href="#myths">Performance Myths</a></li>
-  <li><a href="#prefer_static">Prefer Static Over Virtual</a></li>
-  <li><a href="#internal_get_set">Avoid Internal Getters/Setters</a></li>
-  <li><a href="#use_final">Use Static Final For Constants</a></li>
-  <li><a href="#foreach">Use Enhanced For Loop Syntax</a></li>
-  <li><a href="#package_inner">Consider Package Instead of Private Access with Inner Classes</a></li>
-  <li><a href="#avoidfloat">Use Floating-Point Judiciously</a> </li>
-  <li><a href="#library">Know And Use The Libraries</a></li>
-  <li><a href="#native_methods">Use Native Methods Judiciously</a></li>
-  <li><a href="#closing_notes">Closing Notes</a></li>
-</ol>
-
-</div>
-</div>
-
-<p>An Android application will run on a mobile device with limited computing
-power and storage, and constrained battery life. Because of
-this, it should be <em>efficient</em>. Battery life is one reason you might
-want to optimize your app even if it already seems to run "fast enough".
-Battery life is important to users, and Android's battery usage breakdown
-means users will know if your app is responsible draining their battery.</p>
-
-<p>Note that although this document primarily covers micro-optimizations,
-these will almost never make or break your software. Choosing the right
-algorithms and data structures should always be your priority, but is
-outside the scope of this document.</p>
-
-<a name="intro" id="intro"></a>
-<h2>Introduction</h2>
-
-<p>There are two basic rules for writing efficient code:</p>
-<ul>
-    <li>Don't do work that you don't need to do.</li>
-    <li>Don't allocate memory if you can avoid it.</li>
-</ul>
-
-<h2 id="optimize_judiciously">Optimize Judiciously</h2>
-
-<p>This document is about Android-specific micro-optimization, so it assumes
-that you've already used profiling to work out exactly what code needs to be
-optimized, and that you already have a way to measure the effect (good or bad)
-of any changes you make. You only have so much engineering time to invest, so
-it's important to know you're spending it wisely.
-
-<p>(See <a href="#closing_notes">Closing Notes</a> for more on profiling and
-writing effective benchmarks.)
-
-<p>This document also assumes that you made the best decisions about data
-structures and algorithms, and that you've also considered the future
-performance consequences of your API decisions. Using the right data
-structures and algorithms will make more difference than any of the advice
-here, and considering the performance consequences of your API decisions will
-make it easier to switch to better implementations later (this is more
-important for library code than for application code).
-
-<p>(If you need that kind of advice, see Josh Bloch's <em>Effective Java</em>,
-item 47.)</p>
-
-<p>One of the trickiest problems you'll face when micro-optimizing an Android
-app is that your app is pretty much guaranteed to be running on multiple
-hardware platforms. Different versions of the VM running on different
-processors running at different speeds. It's not even generally the case
-that you can simply say "device X is a factor F faster/slower than device Y",
-and scale your results from one device to others. In particular, measurement
-on the emulator tells you very little about performance on any device. There
-are also huge differences between devices with and without a JIT: the "best"
-code for a device with a JIT is not always the best code for a device
-without.</p>
-
-<p>If you want to know how your app performs on a given device, you need to
-test on that device.</p>
-
-<a name="object_creation"></a>
-<h2>Avoid Creating Unnecessary Objects</h2>
-
-<p>Object creation is never free. A generational GC with per-thread allocation
-pools for temporary objects can make allocation cheaper, but allocating memory
-is always more expensive than not allocating memory.</p>
-
-<p>If you allocate objects in a user interface loop, you will force a periodic
-garbage collection, creating little "hiccups" in the user experience. The
-concurrent collector introduced in Gingerbread helps, but unnecessary work
-should always be avoided.</p>
-
-<p>Thus, you should avoid creating object instances you don't need to.  Some
-examples of things that can help:</p>
-
-<ul>
-    <li>If you have a method returning a string, and you know that its result
-    will always be appended to a StringBuffer anyway, change your signature
-    and implementation so that the function does the append directly,
-    instead of creating a short-lived temporary object.</li>
-    <li>When extracting strings from a set of input data, try
-    to return a substring of the original data, instead of creating a copy.
-    You will create a new String object, but it will share the char[]
-    with the data. (The trade-off being that if you're only using a small
-    part of the original input, you'll be keeping it all around in memory
-    anyway if you go this route.)</li>
-</ul>
-
-<p>A somewhat more radical idea is to slice up multidimensional arrays into
-parallel single one-dimension arrays:</p>
-
-<ul>
-    <li>An array of ints is a much better than an array of Integers,
-    but this also generalizes to the fact that two parallel arrays of ints
-    are also a <strong>lot</strong> more efficient than an array of (int,int)
-    objects.  The same goes for any combination of primitive types.</li>
-    <li>If you need to implement a container that stores tuples of (Foo,Bar)
-    objects, try to remember that two parallel Foo[] and Bar[] arrays are
-    generally much better than a single array of custom (Foo,Bar) objects.
-    (The exception to this, of course, is when you're designing an API for
-    other code to access;  in those cases, it's usually better to trade
-    good API design for a small hit in speed. But in your own internal
-    code, you should try and be as efficient as possible.)</li>
-</ul>
-
-<p>Generally speaking, avoid creating short-term temporary objects if you
-can.  Fewer objects created mean less-frequent garbage collection, which has
-a direct impact on user experience.</p>
-
-<a name="avoid_enums" id="avoid_enums"></a>
-<a name="myths" id="myths"></a>
-<h2>Performance Myths</h2>
-
-<p>Previous versions of this document made various misleading claims. We
-address some of them here.</p>
-
-<p>On devices without a JIT, it is true that invoking methods via a
-variable with an exact type rather than an interface is slightly more
-efficient. (So, for example, it was cheaper to invoke methods on a
-<code>HashMap map</code> than a <code>Map map</code>, even though in both
-cases the map was a <code>HashMap</code>.) It was not the case that this
-was 2x slower; the actual difference was more like 6% slower. Furthermore,
-the JIT makes the two effectively indistinguishable.</p>
-
-<p>On devices without a JIT, caching field accesses is about 20% faster than
-repeatedly accesssing the field. With a JIT, field access costs about the same
-as local access, so this isn't a worthwhile optimization unless you feel it
-makes your code easier to read. (This is true of final, static, and static
-final fields too.)
-
-<a name="prefer_static" id="prefer_static"></a>
-<h2>Prefer Static Over Virtual</h2>
-
-<p>If you don't need to access an object's fields, make your method static.
-Invocations will be about 15%-20% faster.
-It's also good practice, because you can tell from the method
-signature that calling the method can't alter the object's state.</p>
-
-<a name="internal_get_set" id="internal_get_set"></a>
-<h2>Avoid Internal Getters/Setters</h2>
-
-<p>In native languages like C++ it's common practice to use getters (e.g.
-<code>i = getCount()</code>) instead of accessing the field directly (<code>i
-= mCount</code>). This is an excellent habit for C++, because the compiler can
-usually inline the access, and if you need to restrict or debug field access
-you can add the code at any time.</p>
-
-<p>On Android, this is a bad idea.  Virtual method calls are expensive,
-much more so than instance field lookups.  It's reasonable to follow
-common object-oriented programming practices and have getters and setters
-in the public interface, but within a class you should always access
-fields directly.</p>
-
-<p>Without a JIT, direct field access is about 3x faster than invoking a
-trivial getter. With the JIT (where direct field access is as cheap as
-accessing a local), direct field access is about 7x faster than invoking a
-trivial getter. This is true in Froyo, but will improve in the future when
-the JIT inlines getter methods.</p>
-
-<p>Note that if you're using ProGuard, you can have the best
-of both worlds because ProGuard can inline accessors for you.</p>
-
-<a name="use_final" id="use_final"></a>
-<h2>Use Static Final For Constants</h2>
-
-<p>Consider the following declaration at the top of a class:</p>
-
-<pre>static int intVal = 42;
-static String strVal = "Hello, world!";</pre>
-
-<p>The compiler generates a class initializer method, called
-<code>&lt;clinit&gt;</code>, that is executed when the class is first used.
-The method stores the value 42 into <code>intVal</code>, and extracts a
-reference from the classfile string constant table for <code>strVal</code>.
-When these values are referenced later on, they are accessed with field
-lookups.</p>
-
-<p>We can improve matters with the "final" keyword:</p>
-
-<pre>static final int intVal = 42;
-static final String strVal = "Hello, world!";</pre>
-
-<p>The class no longer requires a <code>&lt;clinit&gt;</code> method,
-because the constants go into static field initializers in the dex file.
-Code that refers to <code>intVal</code> will use
-the integer value 42 directly, and accesses to <code>strVal</code> will
-use a relatively inexpensive "string constant" instruction instead of a
-field lookup. (Note that this optimization only applies to primitive types and
-<code>String</code> constants, not arbitrary reference types. Still, it's good
-practice to declare constants <code>static final</code> whenever possible.)</p>
-
-<a name="foreach" id="foreach"></a>
-<h2>Use Enhanced For Loop Syntax</h2>
-
-<p>The enhanced for loop (also sometimes known as "for-each" loop) can be used
-for collections that implement the Iterable interface and for arrays.
-With collections, an iterator is allocated to make interface calls
-to hasNext() and next(). With an ArrayList, a hand-written counted loop is
-about 3x faster (with or without JIT), but for other collections the enhanced
-for loop syntax will be exactly equivalent to explicit iterator usage.</p>
-
-<p>There are several alternatives for iterating through an array:</p>
-
-<pre>    static class Foo {
-        int mSplat;
-    }
-    Foo[] mArray = ...
-
-    public void zero() {
-        int sum = 0;
-        for (int i = 0; i &lt; mArray.length; ++i) {
-            sum += mArray[i].mSplat;
-        }
-    }
-
-    public void one() {
-        int sum = 0;
-        Foo[] localArray = mArray;
-        int len = localArray.length;
-
-        for (int i = 0; i &lt; len; ++i) {
-            sum += localArray[i].mSplat;
-        }
-    }
-
-    public void two() {
-        int sum = 0;
-        for (Foo a : mArray) {
-            sum += a.mSplat;
-        }
-    }
-</pre>
-
-<p><strong>zero()</strong> is slowest, because the JIT can't yet optimize away
-the cost of getting the array length once for every iteration through the
-loop.</p>
-
-<p><strong>one()</strong> is faster. It pulls everything out into local
-variables, avoiding the lookups. Only the array length offers a performance
-benefit.</p>
-
-<p><strong>two()</strong> is fastest for devices without a JIT, and
-indistinguishable from <strong>one()</strong> for devices with a JIT.
-It uses the enhanced for loop syntax introduced in version 1.5 of the Java
-programming language.</p>
-
-<p>To summarize: use the enhanced for loop by default, but consider a
-hand-written counted loop for performance-critical ArrayList iteration.</p>
-
-<p>(See also <em>Effective Java</em> item 46.)</p>
-
-<a name="package_inner" id="package_inner"></a>
-<h2>Consider Package Instead of Private Access with Private Inner Classes</h2>
-
-<p>Consider the following class definition:</p>
-
-<pre>public class Foo {
-    private class Inner {
-        void stuff() {
-            Foo.this.doStuff(Foo.this.mValue);
-        }
-    }
-
-    private int mValue;
-
-    public void run() {
-        Inner in = new Inner();
-        mValue = 27;
-        in.stuff();
-    }
-
-    private void doStuff(int value) {
-        System.out.println("Value is " + value);
-    }
-}</pre>
-
-<p>The key things to note here are that we define a private inner class
-(<code>Foo$Inner</code>) that directly accesses a private method and a private
-instance field in the outer class. This is legal, and the code prints "Value is
-27" as expected.</p>
-
-<p>The problem is that the VM considers direct access to <code>Foo</code>'s
-private members from <code>Foo$Inner</code> to be illegal because
-<code>Foo</code> and <code>Foo$Inner</code> are different classes, even though
-the Java language allows an inner class to access an outer class' private
-members. To bridge the gap, the compiler generates a couple of synthetic
-methods:</p>
-
-<pre>/*package*/ static int Foo.access$100(Foo foo) {
-    return foo.mValue;
-}
-/*package*/ static void Foo.access$200(Foo foo, int value) {
-    foo.doStuff(value);
-}</pre>
-
-<p>The inner class code calls these static methods whenever it needs to
-access the <code>mValue</code> field or invoke the <code>doStuff</code> method
-in the outer class. What this means is that the code above really boils down to
-a case where you're accessing member fields through accessor methods.
-Earlier we talked about how accessors are slower than direct field
-accesses, so this is an example of a certain language idiom resulting in an
-"invisible" performance hit.</p>
-
-<p>If you're using code like this in a performance hotspot, you can avoid the
-overhead by declaring fields and methods accessed by inner classes to have
-package access, rather than private access. Unfortunately this means the fields
-can be accessed directly by other classes in the same package, so you shouldn't
-use this in public API.</p>
-
-<a name="avoidfloat" id="avoidfloat"></a>
-<h2>Use Floating-Point Judiciously</h2>
-
-<p>As a rule of thumb, floating-point is about 2x slower than integer on
-Android devices. This is true on a FPU-less, JIT-less G1 and a Nexus One with
-an FPU and the JIT. (Of course, absolute speed difference between those two
-devices is about 10x for arithmetic operations.)</p>
-
-<p>In speed terms, there's no difference between <code>float</code> and
-<code>double</code> on the more modern hardware. Space-wise, <code>double</code>
-is 2x larger. As with desktop machines, assuming space isn't an issue, you
-should prefer <code>double</code> to <code>float</code>.</p>
-
-<p>Also, even for integers, some chips have hardware multiply but lack
-hardware divide. In such cases, integer division and modulus operations are
-performed in software &mdash; something to think about if you're designing a
-hash table or doing lots of math.</p>
-
-<a name="library" id="library"></a>
-<h2>Know And Use The Libraries</h2>
-
-<p>In addition to all the usual reasons to prefer library code over rolling
-your own, bear in mind that the system is at liberty to replace calls
-to library methods with hand-coded assembler, which may be better than the
-best code the JIT can produce for the equivalent Java. The typical example
-here is <code>String.indexOf</code> and friends, which Dalvik replaces with
-an inlined intrinsic. Similarly, the <code>System.arraycopy</code> method
-is about 9x faster than a hand-coded loop on a Nexus One with the JIT.</p>
-
-<p>(See also <em>Effective Java</em> item 47.)</p>
-
-<a name="native_methods" id="native_methods"></a>
-<h2>Use Native Methods Judiciously</h2>
-
-<p>Native code isn't necessarily more efficient than Java. For one thing,
-there's a cost associated with the Java-native transition, and the JIT can't
-optimize across these boundaries. If you're allocating native resources (memory
-on the native heap, file descriptors, or whatever), it can be significantly
-more difficult to arrange timely collection of these resources. You also
-need to compile your code for each architecture you wish to run on (rather
-than rely on it having a JIT). You may even have to compile multiple versions
-for what you consider the same architecture: native code compiled for the ARM
-processor in the G1 can't take full advantage of the ARM in the Nexus One, and
-code compiled for the ARM in the Nexus One won't run on the ARM in the G1.</p>
-
-<p>Native code is primarily useful when you have an existing native codebase
-that you want to port to Android, not for "speeding up" parts of a Java app.</p>
-
-<p>If you do need to use native code, you should read our
-<a href="{@docRoot}guide/practices/jni.html">JNI Tips</a>.</p>
-
-<p>(See also <em>Effective Java</em> item 54.)</p>
-
-<a name="closing_notes" id="closing_notes"></a>
-<h2>Closing Notes</h2>
-
-<p>One last thing: always measure. Before you start optimizing, make sure you
-have a problem. Make sure you can accurately measure your existing performance,
-or you won't be able to measure the benefit of the alternatives you try.</p>
-
-<p>Every claim made in this document is backed up by a benchmark. The source
-to these benchmarks can be found in the <a href="http://code.google.com/p/dalvik/source/browse/#svn/trunk/benchmarks">code.google.com "dalvik" project</a>.</p>
-
-<p>The benchmarks are built with the
-<a href="http://code.google.com/p/caliper/">Caliper</a> microbenchmarking
-framework for Java. Microbenchmarks are hard to get right, so Caliper goes out
-of its way to do the hard work for you, and even detect some cases where you're
-not measuring what you think you're measuring (because, say, the VM has
-managed to optimize all your code away). We highly recommend you use Caliper
-to run your own microbenchmarks.</p>
-
-<p>You may also find
-<a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a> useful
-for profiling, but it's important to realize that it currently disables the JIT,
-which may cause it to misattribute time to code that the JIT may be able to win
-back. It's especially important after making changes suggested by Traceview
-data to ensure that the resulting code actually runs faster when run without
-Traceview.
diff --git a/docs/html/guide/practices/app-design/responsiveness.jd b/docs/html/guide/practices/app-design/responsiveness.jd
deleted file mode 100644
index a00e3aa..0000000
--- a/docs/html/guide/practices/app-design/responsiveness.jd
+++ /dev/null
@@ -1,140 +0,0 @@
-page.title=Designing for Responsiveness
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-<ol>
-  <li><a href="#anr">What Triggers ANR?</a></li>
-  <li><a href="#avoiding">How to Avoid ANR</a></li>
-  <li><a href="#reinforcing">Reinforcing Responsiveness</a></li>
-</ol>
-
-</div>
-</div>
-
-<div class="figure">
-<img src="{@docRoot}images/anr.png" alt="Screenshot of ANR dialog box" width="240" height="320"/>
-<p><strong>Figure 1.</strong> An ANR dialog displayed to the user.</p>
-</div>
-
-<p>It's possible to write code that wins every performance test in the world,
-but still sends users in a fiery rage when they try to use the application.
-These are the applications that aren't <em>responsive</em> enough &mdash; the
-ones that feel sluggish, hang or freeze for significant periods, or take too
-long to process input. </p>
-
-<p>In Android, the system guards against applications that are insufficiently
-responsive for a period of time by displaying a dialog to the user, called the
-Application Not Responding (ANR) dialog, shown at right in Figure 1. The user
-can choose to let the application continue, but the user won't appreciate having
-to act on this dialog every time he or she uses your application. It's critical
-to design responsiveness into your application, so that the system never has
-cause to display an ANR dialog to the user. </p>
-
-<p>Generally, the system displays an ANR if an application cannot respond to
-user input. For example, if an  application blocks on some I/O operation
-(frequently a network access), then the main application thread won't be able to
-process incoming user input events. After a time, the system concludes that the
-application is frozen, and displays the ANR to give the user the option to kill
-it. </p>
-
-<p>Similarly, if your application spends too much time building an elaborate in-memory
-structure, or perhaps computing the next move in a game, the system will 
-conclude that your application has hung. It's always important to make
-sure these computations are efficient using the techniques above, but even the
-most efficient code still takes time to run.</p>
-
-<p>In both of these cases, the recommended approach is to create a child thread and do
-most of your work there. This keeps the main thread (which drives the user
-interface event loop) running and prevents the system from concluding that your code
-has frozen. Since such threading usually is accomplished at the class
-level, you can think of responsiveness as a <em>class</em> problem. (Compare
-this with basic performance, which was described above as a <em>method</em>-level
-concern.)</p>
-
-<p>This document describes how the Android system determines whether an
-application is not responding and provides guidelines for ensuring that your
-application stays responsive. </p>
-
-<h2 id="anr">What Triggers ANR?</h2>
-
-<p>In Android, application responsiveness is monitored by the Activity Manager
-and Window Manager system services. Android will display the ANR dialog
-for a particular application when it detects one of the following
-conditions:</p>
-<ul>  
-    <li>No response to an input event (e.g. key press, screen touch) 
-    within 5 seconds</li>
-    <li>A {@link android.content.BroadcastReceiver BroadcastReceiver} 
-    hasn't finished executing within 10 seconds</li>
-</ul>
-
-<h2 id="avoiding">How to Avoid ANR</h2>
-
-<p>Given the above definition for ANR, let's examine why this can occur in
-Android applications and how best to structure your application to avoid ANR.</p>
-
-<p>Android applications normally run entirely on a single (i.e. main) thread.
-This means that anything your application is doing in the main thread that
-takes a long time to complete can trigger the ANR dialog because your
-application is not giving itself a chance to handle the input event or Intent
-broadcast.</p>
-
-<p>Therefore any method that runs in the main thread should do as little work
-as possible. In particular, Activities should do as little as possible to set
-up in key life-cycle methods such as <code>onCreate()</code> and
-<code>onResume()</code>. Potentially long running operations such as network
-or database operations, or computationally expensive calculations such as
-resizing bitmaps should be done in a child thread (or in the case of databases
-operations, via an asynchronous request). However, this does not mean that
-your main thread should block while waiting for the child thread to
-complete &mdash; nor should you call <code>Thread.wait()</code> or
-<code>Thread.sleep()</code>. Instead of blocking while waiting for a child
-thread to complete, your main thread should provide a {@link
-android.os.Handler Handler} for child threads to post back to upon completion.
-Designing your application in this way will allow your main thread to remain
-responsive to input and thus avoid ANR dialogs caused by the 5 second input
-event timeout. These same practices should be followed for any other threads
-that display UI, as they are also subject to the same timeouts.</p>
-
-<p>You can use {@link android.os.StrictMode} to help find potentially
-long running operations such as network or database operations that
-you might accidentally be doing your main thread.</p>
-
-<p>The specific constraint on IntentReceiver execution time emphasizes what
-they were meant to do: small, discrete amounts of work in the background such
-as saving a setting or registering a Notification. So as with other methods
-called in the main thread, applications should avoid potentially long-running
-operations or calculations in BroadcastReceivers. But instead of doing intensive
-tasks via child threads (as the life of a BroadcastReceiver is short), your
-application should start a {@link android.app.Service Service} if a
-potentially long running action needs to be taken in response to an Intent
-broadcast. As a side note, you should also avoid starting an Activity from an
-Intent Receiver, as it will spawn a new screen that will steal focus from
-whatever application the user is currently has running. If your application
-has something to show the user in response to an Intent broadcast, it should
-do so using the {@link android.app.NotificationManager Notification
-Manager}.</p>
-
-<h2 id="reinforcing">Reinforcing Responsiveness</h2>
-
-<p>Generally, 100 to 200ms is the threshold beyond which users will perceive
-lag (or lack of "snappiness," if you will) in an application. As such, here
-are some additional tips beyond what you should do to avoid ANR that will help
-make your application seem responsive to users.</p>
-
-<ul>
-    <li>If your application is doing work in the background in response to
-    user input, show that progress is being made ({@link
-    android.widget.ProgressBar ProgressBar} and {@link
-    android.app.ProgressDialog ProgressDialog} are useful for this).</li>
-    <li>For games specifically, do calculations for moves in a child
-    thread.</li>
-    <li>If your application has a time-consuming initial setup phase, consider
-    showing a splash screen or rendering the main view as quickly as possible
-    and filling in the information asynchronously. In either case, you should
-    indicate somehow that progress is being made, lest the user perceive that
-    the application is frozen.</li>
-</ul>
diff --git a/docs/html/guide/practices/performance.jd b/docs/html/guide/practices/performance.jd
deleted file mode 100644
index 078999b..0000000
--- a/docs/html/guide/practices/performance.jd
+++ /dev/null
@@ -1,410 +0,0 @@
-page.title=Designing for Performance
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-<ol>
-  <li><a href="#intro">Introduction</a></li>
-  <li><a href="#optimize_judiciously">Optimize Judiciously</a></li>
-  <li><a href="#object_creation">Avoid Creating Unnecessary Objects</a></li>
-  <li><a href="#myths">Performance Myths</a></li>
-  <li><a href="#prefer_static">Prefer Static Over Virtual</a></li>
-  <li><a href="#internal_get_set">Avoid Internal Getters/Setters</a></li>
-  <li><a href="#use_final">Use Static Final For Constants</a></li>
-  <li><a href="#foreach">Use Enhanced For Loop Syntax</a></li>
-  <li><a href="#package_inner">Consider Package Instead of Private Access with Inner Classes</a></li>
-  <li><a href="#avoidfloat">Use Floating-Point Judiciously</a> </li>
-  <li><a href="#library">Know And Use The Libraries</a></li>
-  <li><a href="#native_methods">Use Native Methods Judiciously</a></li>
-  <li><a href="#closing_notes">Closing Notes</a></li>
-</ol>
-
-</div>
-</div>
-
-<p>An Android application will run on a mobile device with limited computing
-power and storage, and constrained battery life. Because of
-this, it should be <em>efficient</em>. Battery life is one reason you might
-want to optimize your app even if it already seems to run "fast enough".
-Battery life is important to users, and Android's battery usage breakdown
-means users will know if your app is responsible draining their battery.</p>
-
-<p>Note that although this document primarily covers micro-optimizations,
-these will almost never make or break your software. Choosing the right
-algorithms and data structures should always be your priority, but is
-outside the scope of this document.</p>
-
-<a name="intro" id="intro"></a>
-<h2>Introduction</h2>
-
-<p>There are two basic rules for writing efficient code:</p>
-<ul>
-    <li>Don't do work that you don't need to do.</li>
-    <li>Don't allocate memory if you can avoid it.</li>
-</ul>
-
-<h2 id="optimize_judiciously">Optimize Judiciously</h2>
-
-<p>This document is about Android-specific micro-optimization, so it assumes
-that you've already used profiling to work out exactly what code needs to be
-optimized, and that you already have a way to measure the effect (good or bad)
-of any changes you make. You only have so much engineering time to invest, so
-it's important to know you're spending it wisely.
-
-<p>(See <a href="#closing_notes">Closing Notes</a> for more on profiling and
-writing effective benchmarks.)
-
-<p>This document also assumes that you made the best decisions about data
-structures and algorithms, and that you've also considered the future
-performance consequences of your API decisions. Using the right data
-structures and algorithms will make more difference than any of the advice
-here, and considering the performance consequences of your API decisions will
-make it easier to switch to better implementations later (this is more
-important for library code than for application code).
-
-<p>(If you need that kind of advice, see Josh Bloch's <em>Effective Java</em>,
-item 47.)</p>
-
-<p>One of the trickiest problems you'll face when micro-optimizing an Android
-app is that your app is pretty much guaranteed to be running on multiple
-hardware platforms. Different versions of the VM running on different
-processors running at different speeds. It's not even generally the case
-that you can simply say "device X is a factor F faster/slower than device Y",
-and scale your results from one device to others. In particular, measurement
-on the emulator tells you very little about performance on any device. There
-are also huge differences between devices with and without a JIT: the "best"
-code for a device with a JIT is not always the best code for a device
-without.</p>
-
-<p>If you want to know how your app performs on a given device, you need to
-test on that device.</p>
-
-<a name="object_creation"></a>
-<h2>Avoid Creating Unnecessary Objects</h2>
-
-<p>Object creation is never free. A generational GC with per-thread allocation
-pools for temporary objects can make allocation cheaper, but allocating memory
-is always more expensive than not allocating memory.</p>
-
-<p>If you allocate objects in a user interface loop, you will force a periodic
-garbage collection, creating little "hiccups" in the user experience. The
-concurrent collector introduced in Gingerbread helps, but unnecessary work
-should always be avoided.</p>
-
-<p>Thus, you should avoid creating object instances you don't need to.  Some
-examples of things that can help:</p>
-
-<ul>
-    <li>If you have a method returning a string, and you know that its result
-    will always be appended to a StringBuffer anyway, change your signature
-    and implementation so that the function does the append directly,
-    instead of creating a short-lived temporary object.</li>
-    <li>When extracting strings from a set of input data, try
-    to return a substring of the original data, instead of creating a copy.
-    You will create a new String object, but it will share the char[]
-    with the data. (The trade-off being that if you're only using a small
-    part of the original input, you'll be keeping it all around in memory
-    anyway if you go this route.)</li>
-</ul>
-
-<p>A somewhat more radical idea is to slice up multidimensional arrays into
-parallel single one-dimension arrays:</p>
-
-<ul>
-    <li>An array of ints is a much better than an array of Integers,
-    but this also generalizes to the fact that two parallel arrays of ints
-    are also a <strong>lot</strong> more efficient than an array of (int,int)
-    objects.  The same goes for any combination of primitive types.</li>
-    <li>If you need to implement a container that stores tuples of (Foo,Bar)
-    objects, try to remember that two parallel Foo[] and Bar[] arrays are
-    generally much better than a single array of custom (Foo,Bar) objects.
-    (The exception to this, of course, is when you're designing an API for
-    other code to access;  in those cases, it's usually better to trade
-    good API design for a small hit in speed. But in your own internal
-    code, you should try and be as efficient as possible.)</li>
-</ul>
-
-<p>Generally speaking, avoid creating short-term temporary objects if you
-can.  Fewer objects created mean less-frequent garbage collection, which has
-a direct impact on user experience.</p>
-
-<a name="avoid_enums" id="avoid_enums"></a>
-<a name="myths" id="myths"></a>
-<h2>Performance Myths</h2>
-
-<p>Previous versions of this document made various misleading claims. We
-address some of them here.</p>
-
-<p>On devices without a JIT, it is true that invoking methods via a
-variable with an exact type rather than an interface is slightly more
-efficient. (So, for example, it was cheaper to invoke methods on a
-<code>HashMap map</code> than a <code>Map map</code>, even though in both
-cases the map was a <code>HashMap</code>.) It was not the case that this
-was 2x slower; the actual difference was more like 6% slower. Furthermore,
-the JIT makes the two effectively indistinguishable.</p>
-
-<p>On devices without a JIT, caching field accesses is about 20% faster than
-repeatedly accesssing the field. With a JIT, field access costs about the same
-as local access, so this isn't a worthwhile optimization unless you feel it
-makes your code easier to read. (This is true of final, static, and static
-final fields too.)
-
-<a name="prefer_static" id="prefer_static"></a>
-<h2>Prefer Static Over Virtual</h2>
-
-<p>If you don't need to access an object's fields, make your method static.
-Invocations will be about 15%-20% faster.
-It's also good practice, because you can tell from the method
-signature that calling the method can't alter the object's state.</p>
-
-<a name="internal_get_set" id="internal_get_set"></a>
-<h2>Avoid Internal Getters/Setters</h2>
-
-<p>In native languages like C++ it's common practice to use getters (e.g.
-<code>i = getCount()</code>) instead of accessing the field directly (<code>i
-= mCount</code>). This is an excellent habit for C++, because the compiler can
-usually inline the access, and if you need to restrict or debug field access
-you can add the code at any time.</p>
-
-<p>On Android, this is a bad idea.  Virtual method calls are expensive,
-much more so than instance field lookups.  It's reasonable to follow
-common object-oriented programming practices and have getters and setters
-in the public interface, but within a class you should always access
-fields directly.</p>
-
-<p>Without a JIT, direct field access is about 3x faster than invoking a
-trivial getter. With the JIT (where direct field access is as cheap as
-accessing a local), direct field access is about 7x faster than invoking a
-trivial getter. This is true in Froyo, but will improve in the future when
-the JIT inlines getter methods.</p>
-
-<p>Note that if you're using ProGuard, you can have the best
-of both worlds because ProGuard can inline accessors for you.</p>
-
-<a name="use_final" id="use_final"></a>
-<h2>Use Static Final For Constants</h2>
-
-<p>Consider the following declaration at the top of a class:</p>
-
-<pre>static int intVal = 42;
-static String strVal = "Hello, world!";</pre>
-
-<p>The compiler generates a class initializer method, called
-<code>&lt;clinit&gt;</code>, that is executed when the class is first used.
-The method stores the value 42 into <code>intVal</code>, and extracts a
-reference from the classfile string constant table for <code>strVal</code>.
-When these values are referenced later on, they are accessed with field
-lookups.</p>
-
-<p>We can improve matters with the "final" keyword:</p>
-
-<pre>static final int intVal = 42;
-static final String strVal = "Hello, world!";</pre>
-
-<p>The class no longer requires a <code>&lt;clinit&gt;</code> method,
-because the constants go into static field initializers in the dex file.
-Code that refers to <code>intVal</code> will use
-the integer value 42 directly, and accesses to <code>strVal</code> will
-use a relatively inexpensive "string constant" instruction instead of a
-field lookup. (Note that this optimization only applies to primitive types and
-<code>String</code> constants, not arbitrary reference types. Still, it's good
-practice to declare constants <code>static final</code> whenever possible.)</p>
-
-<a name="foreach" id="foreach"></a>
-<h2>Use Enhanced For Loop Syntax</h2>
-
-<p>The enhanced for loop (also sometimes known as "for-each" loop) can be used
-for collections that implement the Iterable interface and for arrays.
-With collections, an iterator is allocated to make interface calls
-to hasNext() and next(). With an ArrayList, a hand-written counted loop is
-about 3x faster (with or without JIT), but for other collections the enhanced
-for loop syntax will be exactly equivalent to explicit iterator usage.</p>
-
-<p>There are several alternatives for iterating through an array:</p>
-
-<pre>    static class Foo {
-        int mSplat;
-    }
-    Foo[] mArray = ...
-
-    public void zero() {
-        int sum = 0;
-        for (int i = 0; i &lt; mArray.length; ++i) {
-            sum += mArray[i].mSplat;
-        }
-    }
-
-    public void one() {
-        int sum = 0;
-        Foo[] localArray = mArray;
-        int len = localArray.length;
-
-        for (int i = 0; i &lt; len; ++i) {
-            sum += localArray[i].mSplat;
-        }
-    }
-
-    public void two() {
-        int sum = 0;
-        for (Foo a : mArray) {
-            sum += a.mSplat;
-        }
-    }
-</pre>
-
-<p><strong>zero()</strong> is slowest, because the JIT can't yet optimize away
-the cost of getting the array length once for every iteration through the
-loop.</p>
-
-<p><strong>one()</strong> is faster. It pulls everything out into local
-variables, avoiding the lookups. Only the array length offers a performance
-benefit.</p>
-
-<p><strong>two()</strong> is fastest for devices without a JIT, and
-indistinguishable from <strong>one()</strong> for devices with a JIT.
-It uses the enhanced for loop syntax introduced in version 1.5 of the Java
-programming language.</p>
-
-<p>To summarize: use the enhanced for loop by default, but consider a
-hand-written counted loop for performance-critical ArrayList iteration.</p>
-
-<p>(See also <em>Effective Java</em> item 46.)</p>
-
-<a name="package_inner" id="package_inner"></a>
-<h2>Consider Package Instead of Private Access with Private Inner Classes</h2>
-
-<p>Consider the following class definition:</p>
-
-<pre>public class Foo {
-    private class Inner {
-        void stuff() {
-            Foo.this.doStuff(Foo.this.mValue);
-        }
-    }
-
-    private int mValue;
-
-    public void run() {
-        Inner in = new Inner();
-        mValue = 27;
-        in.stuff();
-    }
-
-    private void doStuff(int value) {
-        System.out.println("Value is " + value);
-    }
-}</pre>
-
-<p>The key things to note here are that we define a private inner class
-(<code>Foo$Inner</code>) that directly accesses a private method and a private
-instance field in the outer class. This is legal, and the code prints "Value is
-27" as expected.</p>
-
-<p>The problem is that the VM considers direct access to <code>Foo</code>'s
-private members from <code>Foo$Inner</code> to be illegal because
-<code>Foo</code> and <code>Foo$Inner</code> are different classes, even though
-the Java language allows an inner class to access an outer class' private
-members. To bridge the gap, the compiler generates a couple of synthetic
-methods:</p>
-
-<pre>/*package*/ static int Foo.access$100(Foo foo) {
-    return foo.mValue;
-}
-/*package*/ static void Foo.access$200(Foo foo, int value) {
-    foo.doStuff(value);
-}</pre>
-
-<p>The inner class code calls these static methods whenever it needs to
-access the <code>mValue</code> field or invoke the <code>doStuff</code> method
-in the outer class. What this means is that the code above really boils down to
-a case where you're accessing member fields through accessor methods.
-Earlier we talked about how accessors are slower than direct field
-accesses, so this is an example of a certain language idiom resulting in an
-"invisible" performance hit.</p>
-
-<p>If you're using code like this in a performance hotspot, you can avoid the
-overhead by declaring fields and methods accessed by inner classes to have
-package access, rather than private access. Unfortunately this means the fields
-can be accessed directly by other classes in the same package, so you shouldn't
-use this in public API.</p>
-
-<a name="avoidfloat" id="avoidfloat"></a>
-<h2>Use Floating-Point Judiciously</h2>
-
-<p>As a rule of thumb, floating-point is about 2x slower than integer on
-Android devices. This is true on a FPU-less, JIT-less G1 and a Nexus One with
-an FPU and the JIT. (Of course, absolute speed difference between those two
-devices is about 10x for arithmetic operations.)</p>
-
-<p>In speed terms, there's no difference between <code>float</code> and
-<code>double</code> on the more modern hardware. Space-wise, <code>double</code>
-is 2x larger. As with desktop machines, assuming space isn't an issue, you
-should prefer <code>double</code> to <code>float</code>.</p>
-
-<p>Also, even for integers, some chips have hardware multiply but lack
-hardware divide. In such cases, integer division and modulus operations are
-performed in software &mdash; something to think about if you're designing a
-hash table or doing lots of math.</p>
-
-<a name="library" id="library"></a>
-<h2>Know And Use The Libraries</h2>
-
-<p>In addition to all the usual reasons to prefer library code over rolling
-your own, bear in mind that the system is at liberty to replace calls
-to library methods with hand-coded assembler, which may be better than the
-best code the JIT can produce for the equivalent Java. The typical example
-here is <code>String.indexOf</code> and friends, which Dalvik replaces with
-an inlined intrinsic. Similarly, the <code>System.arraycopy</code> method
-is about 9x faster than a hand-coded loop on a Nexus One with the JIT.</p>
-
-<p>(See also <em>Effective Java</em> item 47.)</p>
-
-<a name="native_methods" id="native_methods"></a>
-<h2>Use Native Methods Judiciously</h2>
-
-<p>Native code isn't necessarily more efficient than Java. For one thing,
-there's a cost associated with the Java-native transition, and the JIT can't
-optimize across these boundaries. If you're allocating native resources (memory
-on the native heap, file descriptors, or whatever), it can be significantly
-more difficult to arrange timely collection of these resources. You also
-need to compile your code for each architecture you wish to run on (rather
-than rely on it having a JIT). You may even have to compile multiple versions
-for what you consider the same architecture: native code compiled for the ARM
-processor in the G1 can't take full advantage of the ARM in the Nexus One, and
-code compiled for the ARM in the Nexus One won't run on the ARM in the G1.</p>
-
-<p>Native code is primarily useful when you have an existing native codebase
-that you want to port to Android, not for "speeding up" parts of a Java app.</p>
-
-<p>If you do need to use native code, you should read our
-<a href="{@docRoot}guide/practices/jni.html">JNI Tips</a>.</p>
-
-<p>(See also <em>Effective Java</em> item 54.)</p>
-
-<a name="closing_notes" id="closing_notes"></a>
-<h2>Closing Notes</h2>
-
-<p>One last thing: always measure. Before you start optimizing, make sure you
-have a problem. Make sure you can accurately measure your existing performance,
-or you won't be able to measure the benefit of the alternatives you try.</p>
-
-<p>Every claim made in this document is backed up by a benchmark. The source
-to these benchmarks can be found in the <a href="http://code.google.com/p/dalvik/source/browse/#svn/trunk/benchmarks">code.google.com "dalvik" project</a>.</p>
-
-<p>The benchmarks are built with the
-<a href="http://code.google.com/p/caliper/">Caliper</a> microbenchmarking
-framework for Java. Microbenchmarks are hard to get right, so Caliper goes out
-of its way to do the hard work for you, and even detect some cases where you're
-not measuring what you think you're measuring (because, say, the VM has
-managed to optimize all your code away). We highly recommend you use Caliper
-to run your own microbenchmarks.</p>
-
-<p>You may also find
-<a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a> useful
-for profiling, but it's important to realize that it currently disables the JIT,
-which may cause it to misattribute time to code that the JIT may be able to win
-back. It's especially important after making changes suggested by Traceview
-data to ensure that the resulting code actually runs faster when run without
-Traceview.
diff --git a/docs/html/guide/practices/responsiveness.jd b/docs/html/guide/practices/responsiveness.jd
deleted file mode 100644
index a00e3aa..0000000
--- a/docs/html/guide/practices/responsiveness.jd
+++ /dev/null
@@ -1,140 +0,0 @@
-page.title=Designing for Responsiveness
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-<ol>
-  <li><a href="#anr">What Triggers ANR?</a></li>
-  <li><a href="#avoiding">How to Avoid ANR</a></li>
-  <li><a href="#reinforcing">Reinforcing Responsiveness</a></li>
-</ol>
-
-</div>
-</div>
-
-<div class="figure">
-<img src="{@docRoot}images/anr.png" alt="Screenshot of ANR dialog box" width="240" height="320"/>
-<p><strong>Figure 1.</strong> An ANR dialog displayed to the user.</p>
-</div>
-
-<p>It's possible to write code that wins every performance test in the world,
-but still sends users in a fiery rage when they try to use the application.
-These are the applications that aren't <em>responsive</em> enough &mdash; the
-ones that feel sluggish, hang or freeze for significant periods, or take too
-long to process input. </p>
-
-<p>In Android, the system guards against applications that are insufficiently
-responsive for a period of time by displaying a dialog to the user, called the
-Application Not Responding (ANR) dialog, shown at right in Figure 1. The user
-can choose to let the application continue, but the user won't appreciate having
-to act on this dialog every time he or she uses your application. It's critical
-to design responsiveness into your application, so that the system never has
-cause to display an ANR dialog to the user. </p>
-
-<p>Generally, the system displays an ANR if an application cannot respond to
-user input. For example, if an  application blocks on some I/O operation
-(frequently a network access), then the main application thread won't be able to
-process incoming user input events. After a time, the system concludes that the
-application is frozen, and displays the ANR to give the user the option to kill
-it. </p>
-
-<p>Similarly, if your application spends too much time building an elaborate in-memory
-structure, or perhaps computing the next move in a game, the system will 
-conclude that your application has hung. It's always important to make
-sure these computations are efficient using the techniques above, but even the
-most efficient code still takes time to run.</p>
-
-<p>In both of these cases, the recommended approach is to create a child thread and do
-most of your work there. This keeps the main thread (which drives the user
-interface event loop) running and prevents the system from concluding that your code
-has frozen. Since such threading usually is accomplished at the class
-level, you can think of responsiveness as a <em>class</em> problem. (Compare
-this with basic performance, which was described above as a <em>method</em>-level
-concern.)</p>
-
-<p>This document describes how the Android system determines whether an
-application is not responding and provides guidelines for ensuring that your
-application stays responsive. </p>
-
-<h2 id="anr">What Triggers ANR?</h2>
-
-<p>In Android, application responsiveness is monitored by the Activity Manager
-and Window Manager system services. Android will display the ANR dialog
-for a particular application when it detects one of the following
-conditions:</p>
-<ul>  
-    <li>No response to an input event (e.g. key press, screen touch) 
-    within 5 seconds</li>
-    <li>A {@link android.content.BroadcastReceiver BroadcastReceiver} 
-    hasn't finished executing within 10 seconds</li>
-</ul>
-
-<h2 id="avoiding">How to Avoid ANR</h2>
-
-<p>Given the above definition for ANR, let's examine why this can occur in
-Android applications and how best to structure your application to avoid ANR.</p>
-
-<p>Android applications normally run entirely on a single (i.e. main) thread.
-This means that anything your application is doing in the main thread that
-takes a long time to complete can trigger the ANR dialog because your
-application is not giving itself a chance to handle the input event or Intent
-broadcast.</p>
-
-<p>Therefore any method that runs in the main thread should do as little work
-as possible. In particular, Activities should do as little as possible to set
-up in key life-cycle methods such as <code>onCreate()</code> and
-<code>onResume()</code>. Potentially long running operations such as network
-or database operations, or computationally expensive calculations such as
-resizing bitmaps should be done in a child thread (or in the case of databases
-operations, via an asynchronous request). However, this does not mean that
-your main thread should block while waiting for the child thread to
-complete &mdash; nor should you call <code>Thread.wait()</code> or
-<code>Thread.sleep()</code>. Instead of blocking while waiting for a child
-thread to complete, your main thread should provide a {@link
-android.os.Handler Handler} for child threads to post back to upon completion.
-Designing your application in this way will allow your main thread to remain
-responsive to input and thus avoid ANR dialogs caused by the 5 second input
-event timeout. These same practices should be followed for any other threads
-that display UI, as they are also subject to the same timeouts.</p>
-
-<p>You can use {@link android.os.StrictMode} to help find potentially
-long running operations such as network or database operations that
-you might accidentally be doing your main thread.</p>
-
-<p>The specific constraint on IntentReceiver execution time emphasizes what
-they were meant to do: small, discrete amounts of work in the background such
-as saving a setting or registering a Notification. So as with other methods
-called in the main thread, applications should avoid potentially long-running
-operations or calculations in BroadcastReceivers. But instead of doing intensive
-tasks via child threads (as the life of a BroadcastReceiver is short), your
-application should start a {@link android.app.Service Service} if a
-potentially long running action needs to be taken in response to an Intent
-broadcast. As a side note, you should also avoid starting an Activity from an
-Intent Receiver, as it will spawn a new screen that will steal focus from
-whatever application the user is currently has running. If your application
-has something to show the user in response to an Intent broadcast, it should
-do so using the {@link android.app.NotificationManager Notification
-Manager}.</p>
-
-<h2 id="reinforcing">Reinforcing Responsiveness</h2>
-
-<p>Generally, 100 to 200ms is the threshold beyond which users will perceive
-lag (or lack of "snappiness," if you will) in an application. As such, here
-are some additional tips beyond what you should do to avoid ANR that will help
-make your application seem responsive to users.</p>
-
-<ul>
-    <li>If your application is doing work in the background in response to
-    user input, show that progress is being made ({@link
-    android.widget.ProgressBar ProgressBar} and {@link
-    android.app.ProgressDialog ProgressDialog} are useful for this).</li>
-    <li>For games specifically, do calculations for moves in a child
-    thread.</li>
-    <li>If your application has a time-consuming initial setup phase, consider
-    showing a splash screen or rendering the main view as quickly as possible
-    and filling in the information asynchronously. In either case, you should
-    indicate somehow that progress is being made, lest the user perceive that
-    the application is frozen.</li>
-</ul>
diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd
deleted file mode 100644
index ce59a9d..0000000
--- a/docs/html/guide/practices/security.jd
+++ /dev/null
@@ -1,767 +0,0 @@
-page.title=Designing for Security
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-<li><a href="#Dalvik">Using Davlik Code</a></li>
-<li><a href="#Native">Using Native Code</a></li>
-<li><a href="#Data">Storing Data</a></li>
-<li><a href="#IPC">Using IPC</a></li>
-<li><a href="#Permissions">Using Permissions</a></li>
-<li><a href="#Networking">Using Networking</a></li>
-<li><a href="#DynamicCode">Dynamically Loading Code</a></li>
-<li><a href="#Input">Performing Input Validation</a></li>
-<li><a href="#UserData">Handling User Data</a></li>
-<li><a href="#Crypto">Using Cryptography</a></li>
-</ol>
-<h2>See also</h2>
-<ol>
-<li><a href="http://source.android.com/tech/security/index.html">Android
-Security Overview</a></li>
-<li><a href="{@docRoot}guide/topics/security/permissions.html">Permissions</a></li>
-</ol>
-</div></div>
-<p>Android was designed so that most developers will be able to build
-applications using the default settings and not be confronted with difficult
-decisions about security.  Android also has a number of security features built
-into the operating system that significantly reduce the frequency and impact of
-application security issues.</p>
-
-<p>Some of the security features that help developers build secure applications
-include:
-<ul>
-<li>The Android Application Sandbox that isolates data and code execution on a
-per-application basis.</li>
-<li>Android application framework with robust implementations of common
-security functionality such as cryptography, permissions, and secure IPC.</li>
-<li>Technologies like ASLR, NX, ProPolice, safe_iop, OpenBSD dlmalloc, OpenBSD
-calloc, and Linux mmap_min_addr to mitigate risks associated with common memory
-management errors</li>
-<li>An encrypted filesystem that can be enabled to protect data on lost or
-stolen devices.</li>
-</ul></p>
-
-<p>Nevertheless, it is important for developers to be familiar with Android
-security best practices to make sure they take advantage of these capabilities
-and to reduce the likelihood of inadvertently introducing security issues that
-can affect their applications.</p>
-
-<p>This document is organized around common APIs and development techniques
-that can have security implications for your application and its users. As
-these best practices are constantly evolving, we recommend you check back
-occasionally throughout your application development process.</p>
-
-<a name="Dalvik"></a>
-<h2>Using Dalvik Code</h2>
-<p>Writing secure code that runs in virtual machines is a well-studied topic
-and many of the issues are not specific to Android.  Rather than attempting to
-rehash these topics, we’d recommend that you familiarize yourself with the
-existing literature. Two of the more popular resources are:
-<ul>
-<li><a href="http://www.securingjava.com/toc.html">
-http://www.securingjava.com/toc.html</a></li>
-<li><a
-href="https://www.owasp.org/index.php/Java_Security_Resources">
-https://www.owasp.org/index.php/Java_Security_Resources</a></li>
-</ul></p>
-
-<p>This document is focused on the areas which are Android specific and/or
-different from other environments.  For developers experienced with VM
-programming in other environments, there are two broad issues that may be
-different about writing apps for Android:
-<ul>
-<li>Some virtual machines, such as the JVM or .net runtime, act as a security
-boundary, isolating code from the underlying operating system capabilities.  On
-Android, the Dalvik VM is not a security boundary -- the application sandbox is
-implemented at the OS level, so Dalvik can interoperate with native code in the
-same application without any security constraints.</li>
-<li>Given the limited storage on mobile devices, it’s common for developers
-to want to build modular applications and use dynamic class loading.  When
-doing this consider both the source where you retrieve your application logic
-and where you store it locally. Do not use dynamic class loading from sources
-that are not verified, such as unsecured network sources or external storage,
-since that code can be modified to include malicious behavior.</li>
-</ul></p>
-
-<a name="Native"></a>
-<h2>Using Native Code</h2>
-
-<p>In general, we encourage developers to use the Android SDK for most
-application development, rather than using native code.   Applications built
-with native code are more complex, less portable, and more like to include
-common memory corruption errors such as buffer overflows.</p>
-
-<p>Android is built using the Linux kernel and being familiar with Linux
-development security best practices is especially useful if you are going to
-use native code. This document is too short to discuss all of those best
-practices, but one of the most popular resources is  “Secure Programming for
-Linux and Unix HOWTO”, available at <a
-href="http://www.dwheeler.com/secure-programs">
-http://www.dwheeler.com/secure-programs</a>.</p>
-
-<p>An important difference between Android and most Linux environments is the
-Application Sandbox.  On Android, all applications run in the Application
-Sandbox, including those written with native code.  At the most basic level, a
-good way to think about it for developers familiar with Linux is to know that
-every application is given a unique UID with very limited permissions. This is
-discussed in more detail in the <a
-href="http://source.android.com/tech/security/index.html">Android Security
-Overview</a> and you should be familiar with application permissions even if
-you are using native code.</p>
-
-<a name="Data"></a>
-<h2>Storing Data</h2>
-
-<h3>Using internal files</h3>
-
-<p>By default, files created on <a
-href="{@docRoot}guide/topics/data/data-storage.html#filesInternal">internal
-storage</a> are only accessible to the application that created the file. This
-protection is implemented by Android and is sufficient for most
-applications.</p>
-
-<p>Use of <a
-href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_WRITEABLE">
-world writable</a> or <a
-href="{@docRoot}reference/android/content/Context.html#MODE_WORLD_READABLE">world
-readable</a> files for IPC is discouraged because it does not provide
-the ability to limit data access to particular applications, nor does it
-provide any control on data format. As an alternative, you might consider using
-a ContentProvider which provides read and write permissions, and can make
-dynamic permission grants on a case-by-case basis.</p>
-
-<p>To provide additional protection for sensitive data, some applications
-choose to encrypt local files using a key that is not accessible to the
-application. (For example, a key can be placed in a {@link java.security.KeyStore}
-and protected with a user password that is not stored on the device).  While this
-does not protect data from a root compromise that can monitor the user
-inputting the password,  it can provide protection for a lost device without <a
-href="http://source.android.com/tech/encryption/index.html">file system
-encryption</a>.</p>
-
-<h3>Using external storage</h3>
-
-<p>Files created on <a
-href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">external
-storage</a>, such as SD Cards, are globally readable and writable.  Since
-external storage can be removed by the user and also modified by any
-application,  applications should not store sensitive information using
-external storage.</p>
-
-<p>As with data from any untrusted source, applications should perform input
-validation when handling data from external storage (see Input Validation
-section).  We strongly recommend that applications not store executables or
-class files on external storage prior to dynamic loading.  If an application
-does retrieve executable files from external storage they should be signed and
-cryptographically verified prior to dynamic loading.</p>
-
-<h3>Using content providers</h3>
-
-<p>ContentProviders provide a structured storage mechanism that can be limited
-to your own application, or exported to allow access by other applications. By
-default, a <code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code> is
-<a href="{@docRoot}guide/topics/manifest/provider-element.html#exported">exported
-</a> for use by other applications.  If you do not intend to provide other
-applications with access to your<code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code>, mark them as <code><a
-href="{@docRoot}guide/topics/manifest/provider-element.html#exported">
-android:exported=false</a></code> in the application manifest.</p>
-
-<p>When creating a <code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">ContentProvider
-</a></code> that will be exported for use by other applications, you can specify
-a single
-<a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">permission
-</a> for reading and writing, or distinct permissions for reading and writing
-within the manifest. We recommend that you limit your permissions to those
-required to accomplish the task at hand. Keep in mind that it’s usually
-easier to add permissions later to expose new functionality than it is to take
-them away and break existing users.</p>
-
-<p>If you are using a <code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code> for sharing data between applications built by the
-same developer, it is preferable to use
-<a href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
-level permissions</a>.  Signature permissions do not require user confirmation,
-so they provide a better user experience and more controlled access to the
-<code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code>.</p>
-
-<p>ContentProviders can also provide more granular access by declaring the <a
-href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
-grantUriPermissions</a> element and using the <code><a
-href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION">FLAG_GRANT_READ_URI_PERMISSION</a></code>
-and <code><a
-href="{@docRoot}reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION">FLAG_GRANT_WRITE_URI_PERMISSION</a></code>
-flags in the Intent object
-that activates the component.  The scope of these permissions can be further
-limited by the <code><a
-href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
-grant-uri-permission element</a></code>.</p>
-
-<p>When accessing a <code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code>, use parameterized query methods such as <code>
-<a href="{@docRoot}reference/android/content/ContentProvider.html#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)">query()</a></code>, <code><a
-href="{@docRoot}reference/android/content/ContentProvider.html#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])">update()</a></code>, and <code><a
-href="{@docRoot}reference/android/content/ContentProvider.html#delete(android.net.Uri,%20java.lang.String,%20java.lang.String[])">delete()</a></code> to avoid
-potential <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL
-Injection</a> from untrusted data. Note that using parameterized methods is not
-sufficient if the <code>selection</code> is built by concatenating user data
-prior to submitting it to the method.</p>
-
-<p>Do not have a false sense of security about the write permission.  Consider
-that the write permission allows SQL statements which make it possible for some
-data to be confirmed using creative <code>WHERE</code> clauses and parsing the
-results. For example, an attacker might probe for presence of a specific phone
-number in a call-log by modifying a row only if that phone number already
-exists. If the content provider data has predictable structure, the write
-permission may be equivalent to providing both reading and writing.</p>
-
-<a name="IPC"></a>
-<h2>Using Interprocess Communication (IPC)</h2>
-
-<p>Some Android applications attempt to implement IPC using traditional Linux
-techniques such as network sockets and shared files.  We strongly encourage the
-use of Android system functionality for IPC such as Intents, Binders, Services,
-and Receivers.  The Android IPC mechanisms allow you to verify the identity of
-the application connecting to your IPC and set security policy for each IPC
-mechanism.</p>
-
-<p>Many of the security elements are shared across IPC mechanisms. <a
-href="{@docRoot}reference/android/content/BroadcastReceiver.html">
-Broadcast Receivers</a>, <a
-href="{@docRoot}reference/android/R.styleable.html#AndroidManifestActivity">
-Activities</a>, and <a
-href="{@docRoot}reference/android/R.styleable.html#AndroidManifestService">
-Services</a> are all declared in the application manifest.  If your IPC mechanism is
-not intended for use by other applications, set the <a
-href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code android:exported}</a>
-property to false.  This is useful for applications that consist of multiple processes
-within the same UID, or if you decide late in development that you do not
-actually want to expose functionality as IPC but you don’t want to rewrite
-the code.</p>
-
-<p>If your IPC is intended to be accessible to other applications, you can
-apply a security policy by using the <a
-href="{@docRoot}reference/android/R.styleable.html#AndroidManifestPermission">
-Permission</a> tag. If IPC is between applications built by the same developer,
-it is preferable to use <a
-href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
-level permissions</a>.  Signature permissions do not require user confirmation,
-so they provide a better user experience and more controlled access to the IPC
-mechanism.</p>
-
-<p>One area that can introduce confusion is the use of intent filters. Note
-that Intent filters should not be considered a security feature -- components
-can be invoked directly and may not have data that would conform to the intent
-filter. You should perform input validation within your intent receiver to
-confirm that it is properly formatted for the invoked receiver, service, or
-activity.</p>
-
-<h3>Using intents</h3>
-
-<p>Intents are the preferred mechanism for asynchronous IPC in Android.
-Depending on your application requirements, you might use <code><a
-href="{@docRoot}reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast()</a></code>, 
-<code><a
-href="{@docRoot}reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent,%20java.lang.String)">sendOrderedBroadcast()</a></code>,
-or direct an intent to a specific application component.</p>
-
-<p>Note that ordered broadcasts can be “consumed” by a recipient, so they
-may not be delivered to all applications.  If you are sending an Intent where
-delivery to a specific receiver is required, the intent must be delivered
-directly to the receiver.</p>
-
-<p>Senders of an intent can verify that the recipient has a permission
-specifying a non-Null Permission upon sending.  Only applications with that
-Permission will receive the intent.  If data within a broadcast intent may be
-sensitive, you should consider applying a permission to make sure that
-malicious applications cannot register to receive those messages without
-appropriate permissions.  In those circumstances, you may also consider
-invoking the receiver directly, rather than raising a broadcast.</p>
-
-<h3>Using binder and AIDL interfaces</h3>
-
-<p><a href="{@docRoot}reference/android/os/Binder.html">Binders</a> are the
-preferred mechanism for RPC-style IPC in Android. They provide a well-defined
-interface that enables mutual authentication of the endpoints, if required.</p>
-
-<p>We strongly encourage designing interfaces in a manner that does not require
-interface specific permission checks. Binders are not declared within the
-application manifest, and therefore you cannot apply declarative permissions
-directly to a Binder.  Binders generally inherit permissions declared in the
-application manifest for the Service or Activity within which they are
-implemented.  If you are creating an interface that requires authentication
-and/or access controls on a specific binder interface, those controls must be
-explicitly added as code in the interface.</p>
-
-<p>If providing an interface that does require access controls, use <code><a
-href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
-to verify whether the
-caller of the Binder has a required permission. This is especially important
-before accessing a Service on behalf of the caller, as the identify of your
-application is passed to other interfaces.  If invoking an interface provided
-by a Service, the <code><a
-href="{@docRoot}reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int)">bindService()</a></code>
- invocation may fail if you do not have permission to access the given Service.
- If calling an interface provided locally by your own application, it may be
-useful to use the <code><a
-href="{@docRoot}reference/android/os/Binder.html#clearCallingIdentity()">
-clearCallingIdentity()</a></code> to satisfy internal security checks.</p>
-
-<h3>Using broadcast receivers</h3>
-
-<p>Broadcast receivers are used to handle asynchronous requests initiated via
-an intent.</p>
-
-<p>By default, receivers are exported and can be invoked by any other
-application. If your <code><a
-href="{@docRoot}reference/android/content/BroadcastReceiver.html">
-BroadcastReceivers</a></code> is intended for use by other applications, you
-may want to apply security permissions to receivers using the <code><a
-href="{@docRoot}guide/topics/manifest/receiver-element.html">
-&lt;receiver&gt;</a></code> element within the application manifest.  This will
-prevent applications without appropriate permissions from sending an intent to
-the <code><a
-href="{@docRoot}reference/android/content/BroadcastReceiver.html">
-BroadcastReceivers</a></code>.</p>
-
-<h3>Using Services</h3>
-
-<p>Services are often used to supply functionality for other applications to
-use. Each service class must have a corresponding <service> declaration in its
-package's AndroidManifest.xml.</p>
-
-<p>By default, Services are exported and can be invoked by any other
-application.  Services can be protected using the <a
-href="{@docRoot}guide/topics/manifest/service-element.html#prmsn">{@code android:permission}</a>
-attribute
-within the manifest’s <code><a
-href="{@docRoot}guide/topics/manifest/service-element.html">
-&lt;service&gt;</a></code> tag. By doing so, other applications will need to declare
-a corresponding <code><a
-href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a>
-</code> element in their own manifest to be
-able to start, stop, or bind to the service.</p>
-
-<p>A Service can protect individual IPC calls into it with permissions, by
-calling <code><a
-href="{@docRoot}reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission()</a></code>
-before executing
-the implementation of that call.  We generally recommend using the
-declarative permissions in the manifest, since those are less prone to
-oversight.</p>
-
-<h3>Using Activities</h3>
-
-<p>Activities are most often used for providing the core user-facing
-functionality of an application. By default, Activities are exported and
-invokable by other applications only if they have an intent filter or binder
-declared.  In general, we recommend that you specifically declare a Receiver or
-Service to handle IPC, since this modular approach reduces the risk of exposing
-functionality that is not intended for use by other applications.</p>
-
-<p>If you do expose an Activity for purposes of IPC, the  <code><a
-href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">android:permission</a></code>
-attribute in the  <code><a
-href="{@docRoot}guide/topics/manifest/activity-element.html">
-&lt;activity&gt;</a></code> declaration in the application manifest can be used to
-restrict access to only those applications which have the stated
-permissions.</p>
-
-<a name="Permissions"></a>
-<h2>Using Permissions</h2>
-
-<h3>Requesting Permissions</h3>
-
-<p>We recommend minimizing the number of permissions requested by an
-application. Not having access to sensitive permissions reduces the risk of
-inadvertently misusing those permissions, can improve user adoption, and makes
-applications less attractive targets for attackers.</p>
-
-<p>If it is possible to design your application in a way that does not require
-a permission, that is preferable.  For example, rather than requesting access
-to device information to create an identifier, create a <a
-href="{@docRoot}reference/java/util/UUID.html">GUID</a> for your application.
-(This specific example is also discussed in Handling User Data) Or, rather than
-using external storage, store data in your application directory.</p>
-
-<p>If a permission is not required, do not request it.  This sounds simple, but
-there has been quite a bit of research into the frequency of over-requesting
-permissions. If you’re interested in the subject you might start with this
-research paper published by U.C. Berkeley: <a
-href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS-2011-48.pdf">
-http://www.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS-2011-48.pdf</a></p>
-
-<p>In addition to requesting permissions, your application can use <a
-href="{@docRoot}guide/topics/manifest/permission-element.html">permissions</a>
-to protect IPC that is security sensitive and will be exposed to other
-applications -- such as a <code><a
-href="{@docRoot}reference/android/content/ContentProvider.html">
-ContentProvider</a></code>.  In general, we recommend using access controls
-other than user confirmed permissions where possible since permissions can
-be confusing for users. For example, consider using the <a
-href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
-protection level</a> on permissions for IPC communication between applications
-provided by a single developer.</p>
-
-<p>Do not cause permission re-delegation.  This occurs when an app exposes data
-over IPC that is only available because it has a specific permission, but does
-not require that permission of any clients of it’s IPC interface. More
-details on the potential impacts, and frequency of this type of problem is
-provided in this research paper published at USENIX: <a
-href="http://www.cs.berkeley.edu/~afelt/felt_usenixsec2011.pdf">http://www.cs.be
-rkeley.edu/~afelt/felt_usenixsec2011.pdf</a></p>
-
-<h3>Creating Permissions</h3>
-
-<p>Generally, you should strive to create as few permissions as possible while
-satisfying your security requirements.  Creating a new permission is relatively
-uncommon for most applications, since <a
-href="{@docRoot}reference/android/Manifest.permission.html">system-defined
-permissions</a> cover many situations.  Where appropriate,
-perform access checks using existing permissions.</p>
-
-<p>If you must create a new permission, consider whether you can accomplish
-your task with a Signature permission.  Signature permissions are transparent
-to the user and only allow access by applications signed by the same developer
-as application performing the permission check.  If you create a Dangerous
-permission, then the user needs to decide whether to install the application.
-This can be confusing for other developers, as well as for users.</p>
-
-<p>If you create a Dangerous permission, there are a number of complexities
-that you need to consider.
-<ul>
-<li>The permission must have a string that concisely expresses to a user the
-security decision they will be required to make.</li>
-<li>The permission string must be localized to many different languages.</li>
-<li>Uses may choose not to install an application because a permission is
-confusing or perceived as risky.</li>
-<li>Applications may request the permission when the creator of the permission
-has not been installed.</li>
-</ul></p>
-
-<p>Each of these poses a significant non-technical challenge for an application
-developer, which is why we discourage the use of Dangerous permission.</p>
-
-<a name="Networking"></a>
-<h2>Using Networking</h2>
-
-<h3>Using IP Networking</h3>
-
-<p>Networking on Android is not significantly different from Linux
-environments.  The key consideration is making sure that appropriate protocols
-are used for sensitive data, such as <a
-href="{@docRoot}reference/javax/net/ssl/HttpsURLConnection.html">HTTPS</a> for
-web traffic.   We prefer use of HTTPS over HTTP anywhere that HTTPS is
-supported on the server, since mobile devices frequently connect on networks
-that are not secured, such as public WiFi hotspots.</p>
-
-<p>Authenticated, encrypted socket-level communication can be easily
-implemented using the <code><a
-href="{@docRoot}reference/javax/net/ssl/SSLSocket.html">SSLSocket</a></code>
-class.  Given the frequency with which Android devices connect to unsecured
-wireless networks using WiFi, the use of secure networking is strongly
-encouraged for all applications.</p>
-
-<p>We have seen some applications use <a
-href="http://en.wikipedia.org/wiki/Localhost">localhost</a> network ports for
-handling sensitive IPC.  We discourage this approach since these interfaces are
-accessible by other applications on the device.  Instead, use an Android IPC
-mechanism where authentication is possible such as a Service and Binder.  (Even
-worse than using loopback is to bind to INADDR_ANY since then your application
-may receive requests from anywhere.  We’ve seen that, too.)</p>
-
-<p>Also, one common issue that warrants repeating is to make sure that you do
-not trust data downloaded from HTTP or other insecure protocols.  This includes
-validation of input in <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code> and
-any responses to intents issued against HTTP.</p>
-
-<h3>Using Telephony Networking</h3>
-
-<p>SMS is the telephony protocol most frequently used by Android developers.
-Developers should keep in mind that this protocol was primarily designed for
-user-to-user communication and is not well-suited for some application
-purposes. Due to the limitations of SMS, we strongly recommend the use of <a
-href="http://code.google.com/android/c2dm/">C2DM</a> and IP networking for
-sending data messages to devices.</p>
-
-<p>Many developers do not realize that SMS is not encrypted or strongly
-authenticated on the network or on the device.  In particular, any SMS receiver
-should expect that a malicious user may have sent the SMS to your application
--- do not rely on unauthenticated SMS data to perform sensitive commands.
-Also, you should be aware that SMS may be subject to spoofing and/or
-interception on the network.  On the Android-powered device itself, SMS
-messages are transmitted as Broadcast intents, so they may be read or captured
-by other applications that have the READ_SMS permission.</p>
-
-<a name="DynamicCode"></a>
-<h2>Dynamically Loading Code</h2>
-
-<p>We strongly discourage loading code from outside of the application APK.
-Doing so significantly increases the likelihood of application compromise due
-to code injection or code tampering.  It also adds complexity around version
-management and application testing.  Finally, it can make it impossible to
-verify the behavior of an application, so it may be prohibited in some
-environments.</p>
-
-<p>If your application does dynamically load code, the most important thing to
-keep in mind about dynamically loaded code is that it runs with the same
-security permissions as the application APK.  The user made a decision to
-install your application based on your identity, and they are expecting that
-you provide any code run within the application, including code that is
-dynamically loaded.</p>
-
-<p>The major security risk associated with dynamically loading code is that the
-code needs to come from a verifiable source. If the modules are included
-directly within your APK, then they cannot be modified by other applications.
-This is true whether the code is a native library or a class being loaded using
-<a href="{@docRoot}reference/dalvik/system/DexClassLoader.html">
-<code>DexClassLoader</code></a>.  We have seen many instances of applications
-attempting to load code from insecure locations, such as downloaded from the
-network over unencrypted protocols or from world writable locations such as
-external storage. These locations could allow someone on the network to modify
-the content in transit, or another application on a users device to modify the
-content, respectively.</p>
-
-
-<h3>Using WebView</h3>
-
-<p>Since WebView consumes web content that can include HTML and JavaScript,
-improper use can introduce common web security issues such as <a
-href="http://en.wikipedia.org/wiki/Cross_site_scripting">cross-site-scripting</a
-> (JavaScript injection).  Android includes a number of mechanisms to reduce
-the scope of these potential issues by limiting the capability of WebView to
-the minimum functionality required by your application.</p>
-
-<p>If your application does not directly use JavaScript within a <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, do
-not call
-<a href="{@docRoot}reference/android/webkit/WebSettings.html#setJavaScriptEnabled(boolean)">
-<code>setJavaScriptEnabled()</code></a>. We have seen this method invoked
-in sample code that might be repurposed in production application -- so
-remove it if necessary. By default, <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code> does
-not execute JavaScript so cross-site-scripting is not possible.</p>
-
-<p>Use <code><a
-href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> with
-particular care because it allows JavaScript to invoke operations that are
-normally reserved for Android applications.  Only expose <code><a
-href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
-sources from which all input is trustworthy.  If untrusted input is allowed,
-untrusted JavaScript may be able to invoke Android methods.  In general, we
-recommend only exposing <code><a
-href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> to
-JavaScript that is contained within your application APK.</p>
-
-<p>Do not trust information downloaded over HTTP, use HTTPS instead.  Even if
-you are connecting only to a single website that you trust or control, HTTP is
-subject to <a
-href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">MiTM</a> attacks
-and interception of data.  Sensitive capabilities using <code><a
-href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code> should
-not ever be exposed to unverified script downloaded over HTTP. Note that even
-with the use of HTTPS,
-<code><a
-href="{@docRoot}reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)">addJavaScriptInterface()</a></code>
-increases the attack surface of your application to include the server
-infrastructure and all CAs trusted by the Android-powered device.</p>
-
-<p>If your application accesses sensitive data with a <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, you
-may want to use the <code><a
-href="{@docRoot}reference/android/webkit/WebView.html#clearCache(boolean)">
-clearCache()</a></code> method to delete any files stored locally. Server side
-headers like no-cache can also be used to indicate that an application should
-not cache particular content.</p>
-
-<a name="Input"></a>
-<h2>Performing Input Validation</h2>
-
-<p>Insufficient input validation is one of the most common security problems
-affecting applications, regardless of what platform they run on. Android does
-have platform-level countermeasures that reduce the exposure of applications to
-input validation issues, you should use those features where possible. Also
-note that selection of type-safe languages tends to reduce the likelihood of
-input validation issues.  We strongly recommend building your applications with
-the Android SDK.</p>
-
-<p>If you are using native code, then any data read from files, received over
-the network, or received from an IPC has the potential to introduce a security
-issue.  The most common problems are <a
-href="http://en.wikipedia.org/wiki/Buffer_overflow">buffer overflows</a>, <a
-href="http://en.wikipedia.org/wiki/Double_free#Use_after_free">use after
-free</a>, and <a
-href="http://en.wikipedia.org/wiki/Off-by-one_error">off-by-one errors</a>.
-Android provides a number of technologies like ASLR and DEP that reduce the
-exploitability of these errors, but they do not solve the underlying problem.
-These can be prevented by careful handling of pointers and managing of
-buffers.</p>
-
-<p>Dynamic, string based languages such as JavaScript and SQL are also subject
-to input validation problems due to escape characters and <a
-href="http://en.wikipedia.org/wiki/Code_injection">script injection</a>.</p>
-
-<p>If you are using data within queries that are submitted to SQL Database or a
-Content Provider, SQL Injection may be an issue.  The best defense is to use
-parameterized queries, as is discussed in the ContentProviders section.
-Limiting permissions to read-only or write-only can also reduce the potential
-for harm related to SQL Injection.</p>
-
-<p>If you are using <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, then
-you must consider the possibility of XSS.  If your application does not
-directly use JavaScript within a <code><a
-href="{@docRoot}reference/android/webkit/WebView.html">WebView</a></code>, do
-not call setJavaScriptEnabled() and XSS is no longer possible. If you must
-enable JavaScript then the WebView section provides other security best
-practices.</p>
-
-<p>If you cannot use the security features above, we strongly recommend the use
-of well-structured data formats and verifying that the data conforms to the
-expected format. While blacklisting of characters or character-replacement can
-be an effective strategy, these techniques are error-prone in practice and
-should be avoided when possible.</p>
-
-<a name="UserData"></a>
-<h2>Handling User Data</h2>
-
-<p>In general, the best approach is to minimize use of APIs that access
-sensitive or personal user data. If you have access to data and can avoid
-storing or transmitting the information, do not store or transmit the data.
-Finally, consider if there is a way that your application logic can be
-implemented using a hash or non-reversible form of the data.  For example, your
-application might use the hash of an an email address as a primary key, to
-avoid transmitting or storing the email address.  This reduces the chances of
-inadvertently exposing data, and it also reduces the chance of attackers
-attempting to exploit your application.</p>
-
-<p>If your application accesses personal information such as passwords or
-usernames, keep in mind that some jurisdictions may require you to provide a
-privacy policy explaining your use and storage of that data.  So following the
-security best practice of minimizing access to user data may also simplify
-compliance.</p>
-
-<p>You should also consider whether your application might be inadvertently
-exposing personal information to other parties such as third-party components
-for advertising or third-party services used by your application. If you don't
-know why a component or service requires a personal information, don’t
-provide it.  In general, reducing the access to personal information by your
-application will reduce the potential for problems in this area.</p>
-
-<p>If access to sensitive data is required, evaluate whether that information
-must be transmitted to a server, or whether the operation can be performed on
-the client.  Consider running any code using sensitive data on the client to
-avoid transmitting user data.</p>
-
-<p>Also, make sure that you do not inadvertently expose user data to other
-application on the device through overly permissive IPC, world writable files,
-or network sockets. This is a special case of permission redelegation,
-discussed in the Requesting Permissions section.</p>
-
-<p>If a GUID is required, create a large, unique number and store it.  Do not
-use phone identifiers such as the phone number or IMEI which may be associated
-with personal information.  This topic is discussed in more detail in the <a
-href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">Android Developer Blog</a>.</p>
-
-<p>Application developers should be careful writing to on-device logs.
-In Android, logs are a shared resource, and are available
-to an application with the
-<a href="{@docRoot}reference/android/Manifest.permission.html#READ_LOGS">
-<code>READ_LOGS</code></a> permission. Even though the phone log data
-is temporary and erased on reboot, inappropriate logging of user information
-could inadvertently leak user data to other applications.</p>
-
-
-<h3>Handling Credentials</h3>
-
-<p>In general, we recommend minimizing the frequency of asking for user
-credentials -- to make phishing attacks more conspicuous, and less likely to be
-successful.  Instead use an authorization token and refresh it.</p>
-
-<p>Where possible, username and password should not be stored on the device.
-Instead, perform initial authentication using the username and password
-supplied by the user, and then use a short-lived, service-specific
-authorization token.</p>
-
-<p>Services that will be accessible to multiple applications should be accessed
-using <code>
-<a href="{@docRoot}reference/android/accounts/AccountManager.html">
-AccountManager</a></code>. If possible, use the <code><a
-href="{@docRoot}reference/android/accounts/AccountManager.html">
-AccountManager</a></code> class to invoke a cloud-based service and do not store
-passwords on the device.</p>
-
-<p>After using <code><a
-href="{@docRoot}reference/android/accounts/AccountManager.html">
-AccountManager</a></code> to retrieve an Account, check the <code><a
-href="{@docRoot}reference/android/accounts/Account.html#CREATOR">CREATOR</a>
-</code> before passing in any credentials, so that you do not inadvertently pass
-credentials to the wrong application.</p>
-
-<p>If credentials are to be used only by applications that you create, then you
-can verify the application which accesses the <code><a
-href="{@docRoot}reference/android/accounts/AccountManager.html">
-AccountManager</a></code> using <code><a
-href="{@docRoot}reference/android/content/pm/PackageManager.html#checkSignatures(java.lang.String,%20java.lang.String)">checkSignature()</a></code>.
-Alternatively, if only one application will use the credential, you might use a
-{@link java.security.KeyStore} for
-storage.</p>
-
-<a name="Crypto"></a>
-<h2>Using Cryptography</h2>
-
-<p>In addition to providing data isolation, supporting full-filesystem
-encryption, and providing secure communications channels Android provides a
-wide array of algorithms for protecting data using cryptography.</p>
-
-<p>In general, try to use the highest level of pre-existing framework
-implementation that can  support your use case.  If you need to securely
-retrieve a file from a known location, a simple HTTPS URI may be adequate and
-require no knowledge of cryptography on your part.  If you need a secure
-tunnel, consider using
-<a href="{@docRoot}reference/javax/net/ssl/HttpsURLConnection.html">
-<code>HttpsURLConnection</code></a> or <code><a
-href="{@docRoot}reference/javax/net/ssl/SSLSocket.html">SSLSocket</a></code>,
-rather than writing your own protocol.</p>
-
-<p>If you do find yourself needing to implement your own protocol, we strongly
-recommend that you not implement your own cryptographic algorithms. Use
-existing cryptographic algorithms such as those in the implementation of AES or
-RSA provided in the <code><a
-href="{@docRoot}reference/javax/crypto/Cipher.html">Cipher</a></code> class.</p>
-
-<p>Use a secure random number generator (
-<a href="{@docRoot}reference/java/security/SecureRandom.html">
-<code>SecureRandom</code></a>) to initialize any cryptographic keys (<a
-href="{@docRoot}reference/javax/crypto/KeyGenerator.html">
-<code>KeyGenerator</code></a>). Use of a key that is not generated with a secure random
-number generator significantly weakens the strength of the algorithm, and may
-allow offline attacks.</p>
-
-<p>If you need to store a key for repeated use, use a mechanism like
-  {@link java.security.KeyStore} that
-provides a mechanism for long term storage and retrieval of cryptographic
-keys.</p>
-
-<h2>Conclusion</h2>
-
-<p>Android provides developers with the ability to design applications with a
-broad range of security requirements.  These best practices will help you make
-sure that your application takes advantage of the security benefits provided by
-the platform.</p>
-
-<p>You can receive more information on these topics and discuss security best
-practices with other developers in the <a
-href="http://groups.google.com/group/android-security-discuss">Android Security
-Discuss</a> Google Group</p>
diff --git a/docs/html/images/anr.png b/docs/html/images/anr.png
index f6e16ef..46520ef 100644
--- a/docs/html/images/anr.png
+++ b/docs/html/images/anr.png
Binary files differ
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index cf85a34..c77687d 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -2,95 +2,317 @@
 header.hide=1
 page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
 
-sdk.win_installer=installer_r20.0.3-windows.exe
-sdk.win_installer_bytes=70495456
-sdk.win_installer_checksum=cf23b95d0c9cd57fac3c3be253171af4
+sdk.win_bundle_download=adt-bundle-windows.zip
+sdk.win_bundle_bytes=417851515
+sdk.win_bundle_checksum=73bdd1168fce0e36a27255a4335c865d
 
-sdk.win_download=android-sdk_r20.0.3-windows.zip
-sdk.win_bytes=90379469
-sdk.win_checksum=cd895c79201f7f02507eb3c3868a1c5e
+sdk.mac_bundle_download=adt-bundle-mac.zip
+sdk.mac_bundle_bytes=382957959
+sdk.mac_bundle_checksum=a320f8bbaee8572a36e68c434564bdd0
 
-sdk.mac_download=android-sdk_r20.0.3-macosx.zip
-sdk.mac_bytes=58218455
-sdk.mac_checksum=07dc88ba2c0817ef178a665d002831bf
+sdk.linux_bundle_download=adt-bundle-linux.zip
+sdk.linux_bundle_bytes=411217430
+sdk.linux_bundle_checksum=b0590fe9c1533da9b20ea65525b77677
 
-sdk.linux_download=android-sdk_r20.0.3-linux.tgz
-sdk.linux_bytes=82616305
-sdk.linux_checksum=0d53c2c31d6b5d0cf7385bccd0b06c27
+
+
+sdk.win_installer=installer_r21-windows.exe
+sdk.win_installer_bytes=77523031
+sdk.win_installer_checksum=29ca8cb8f0bc8db627fa2adc2139a3cc
+
+sdk.win_download=android-sdk_r21-windows.zip
+sdk.win_bytes=99093893
+sdk.win_checksum=7311452823470365f7975a545f8a2be4
+
+sdk.mac_download=android-sdk_r21-macosx.zip
+sdk.mac_bytes=65792626
+sdk.mac_checksum=67e46adca90dd18d7291443f6c15d6af
+
+sdk.linux_download=android-sdk_r21-linux.tgz
+sdk.linux_bytes=91378351
+sdk.linux_checksum=7f8d73b629f808cdcfc9f9900bbd7580
+
+
+
+
 
 @jd:body
 
 <style type="text/css">
-  .offline { display:none; }
+  .offline {display:none;}
 </style>
 
-<div class="wrap">
 
-<div class="col-13">&nbsp;</div><!-- provides top margin for content -->
+<div style="position:relative;height:660px;">
 
-<div class="col-7" style="margin-left:0">
-  <img src="{@docRoot}images/sdk-cube.png" alt="" />
+
+<div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
+<div class="col-13" style="margin:0;">&nbsp;</div><!-- provides top margin for content -->
+
+<h1 id="tos-header" style="margin-top:0">Get the Android SDK</h1>
+
+
+
+<p class="sdk-terms-intro">Before installing the Android SDK, you must agree to the following terms and conditions.</p>
+
+<div class="sdk-terms" onfocus="this.blur()">
+<h2 class="norule">Terms and Conditions</h2>
+This is the Android Software Development Kit License Agreement
+
+<h3>1. Introduction</h3>
+1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
+
+1.2 “Android” means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+
+<h3>2. Accepting this License Agreement</h3>
+2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
+
+2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
+
+2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
+
+2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
+
+
+<h3>3. SDK License from Google</h3>
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement.  Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.
+
+3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
+
+3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
+
+
+<h3>4. Use of the SDK by You</h3>
+4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+
+<h3>5. Your Developer Credentials</h3>
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+
+<h3>6. Privacy and Information</h3>
+6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
+
+
+<h3>7. Third Party Applications</h3>
+7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
+
+
+<h3>8. Using Android APIs</h3>
+8.1 Google Data APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+
+<h3>9. Terminating this License Agreement</h3>
+9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
+
+9.3 Google may at any time, terminate this License Agreement with you if:
+(A) you have breached any provision of this License Agreement; or
+(B) Google is required to do so by law; or
+(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
+(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
+
+9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
+
+
+<h3>10. DISCLAIMER OF WARRANTIES</h3>
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+
+<h3>11. LIMITATION OF LIABILITY</h3>
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+
+<h3>12. Indemnification</h3>
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
+
+
+<h3>13. Changes to the License Agreement</h3>
+13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
+
+
+<h3>14. General Legal Terms</h3>
+14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
+
+14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+
+<em>November 13, 2012</em>
 </div>
 
 
-<div class="col-6" style="margin-right:0;">
-  
-<div id="intro" style="position:absolute;width:inherit">
+
+
+<div id="next-steps" style="display:none;position:absolute;width:inherit">
+  <p>Now that you've downloaded the Android SDK, you don't need to return here
+  for SDK updates. The SDK tools allow you to
+  install additional packages and future updates from the SDK Manager.</p>
+  <p>For instructions about setting up your Android SDK for the first time,
+  read <a id="next-link" href="{@docRoot}sdk/installing/bundle.html">Setting
+  Up the ADT Bundle</a>.</p>
+
+</div><!-- end next-steps -->
+
+
+
+<div id="sdk-terms-form">
+<p>
+<input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
+<label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
+</p>
+<p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
+</div>
+
+
+
+</div><!-- end TOS -->
+
+
+
+<div class="wrap" id="landing">
+
+<div class="col-13">&nbsp;</div><!-- provides top margin for content -->
+
+<div class="col-6" style="margin-left:0">
+
 <h1 style="margin-top:0">Get the Android SDK</h1>
 
   
 <p>The Android SDK provides you the API libraries and developer tools necessary to build, test,
   and debug apps for Android.</p>
 
+<p>If you're a new Android developer, we recommend you download the ADT Bundle
+to quickly start developing apps. It includes the essential
+Android SDK components and a version of the Eclipse IDE with built-in
+<b>ADT (Android Developer Tools)</b> to
+streamline your Android app development.</p>
+
+<p>With a single download, the ADT Bundle
+includes everything you need to begin developing apps:</p>
+<ul>
+<li>Eclipse + ADT plugin</li>
+<li>Android SDK Tools</li>
+<li>Android Platform-tools</li>
+<li>The latest Android platform</li>
+<li>The latest Android system image for the emulator</li>
+</ul>
+
+
 <!-- this appears when viewing the offline docs -->
 <p class="offline">
-To get the latest Android SDK, please visit the web site at <a
+To get the ADT Bundle or stand-alone SDK Tools, please visit the web site at <a
 href="http://developer.android.com/sdk/index.html">developer.android.com/sdk/</a>
 </p>
 
+</div>
+
+
+
+
+<div class="col-7" style="margin-right:0;">
+  <img src="{@docRoot}images/sdk-cube.png" alt="" />
+
 <!-- this appears when viewing the online docs -->
 <div class="online">
-<a class="big button" id="download-button" href="" style="display:none" ></a>
+
+<a class="big button subtitle" id="download-bundle-button"
+href="" style="display:none;width:265px;margin:0 auto;display:block" ></a>
+
 <p id="not-supported">Choose the SDK package for your OS from the table below.</p>
 
-<p style="margin-top:20px;font-size:12px"><a href='' onclick="
-  if ($('.pax').is(':visible')) {
-    $('.pax').slideUp();
-  } else {
-    $('.reqs').slideUp();
-    $('.pax').slideDown();
-  }return false;">Other platforms</a> | 
-  <a href='' onclick="
-  if ($('.reqs').is(':visible')) {
-    $('.reqs').slideUp();
-  } else {
-    $('.pax').slideUp();
-    $('.reqs').slideDown();
-  }return false;">System requirements</a></p>
-</div><!-- end online -->
+</div>
+<!-- end online -->
 
-</div><!-- end intro -->
+</div><!-- end col-7 -->
 
 
 
-<div id="next-steps" class="online" style="display:none;position:absolute;width:inherit">
-  <h1 style="margin-top:0">Get ready to code!</h1>
-  <p><em><span id="filename"></span></em> is now downloading...</p>
-  <p>You'll soon be developing apps for Android! Once the download completes,
-    you need to follow a few steps to set up your environment.</p>
-  <p>To continue, follow the guide to <a href="{@docRoot}sdk/installing/index.html">Installing
-the SDK</a>.</p>
-  
-</div><!-- end next-steps -->
-
-</div><!-- end col-6 -->
-
-
-<div class="col-13">&nbsp;</div><!-- provides padding -->
  
 
-<div class="col-6 reqs" style="margin-left:0;display:none;font-size:12px">
-<h3>Operating Systems</h3>
+<!-- alternative SDK options -->
+<div class="col-13" style="margin:0;">
+
+<p>If you prefer to use an existing version of Eclipse or another IDE,
+you can instead take a more customized approach to installing
+the Android SDK. See the following instructions.</p>
+
+
+<h4 id="ExistingIDE"><a href='' class="expandable"
+  onclick="toggleExpandable(this,'.myide');hideExpandable('.pax,.reqs');return false;"
+  >USE AN EXISTING IDE</a></h4>
+
+<div class="col-13 myide" style="margin:0 0 15px;display:none;">
+
+<p>If you already have an IDE you want to use for Android app development,
+setting up a new SDK requires that you download the SDK Tools, then
+select additional Android SDK packages to install (such as the Android platform
+and system image). If you'll be using an existing version of Eclipse, then you can add
+the ADT plugin to it.</p>
+  <p>
+<a class="button subtitle" id="download-tools-button" href="" style="display:none" ></a>
+  </p>
+
+
+</div>
+
+
+
+
+
+<h4 id="Requirements"><a href='' class="expandable"
+  onclick="toggleExpandable(this,'.reqs');hideExpandable('.pax,.myide');return false;"
+  >SYSTEM REQUIREMENTS</a></h4>
+
+<div class="col-6 reqs" style="margin:0 0 15px;display:none;font-size:12px">
+<h5>Operating Systems</h5>
 <ul>
   <li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
   <li>Mac OS X 10.5.8 or later (x86 only)</li>
@@ -104,10 +326,10 @@
 </ul>
 </div>
 
-<div class="col-7 reqs" style="margin-right:0;display:none;font-size:12px">
-<h3>Eclipse IDE</h3>
+<div class="col-7 reqs" style="margin:0 0 15px;display:none;font-size:12px">
+<h5>Eclipse IDE</h5>
     <ul>
-      <li>Eclipse 3.6.2 (Helios) or greater
+      <li><a href="http://eclipse.org/mobile/">Eclipse</a> 3.6.2 (Helios) or greater
 <p class="note"><strong>Note:</strong> Eclipse 3.5 (Galileo) is no longer
 supported with the latest version of ADT.</p></li>
       <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
@@ -120,7 +342,7 @@
     </ul>
 
 
-<h3>Other development environments</h3>
+<h5>Other development environments</h5>
     <ul>
       <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
         (JRE alone is not sufficient)</li>
@@ -132,13 +354,21 @@
 
 <p class="note"><strong>Note:</strong> Some Linux distributions may include JDK 1.4 or Gnu Compiler
 for Java, both of which are <em>not</em> supported for Android development. </p>
-</div>
+</div><!-- end col-7 reqs -->
 
-</div>
+
+
+<h4><a href='' class="expandable"
+  onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
+  >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
+
+</div><!-- end col-13 for lower-half content -->
 
 <script>
   if (location.hash == "#Requirements") {
     $('.reqs').show();
+  } else if (location.hash == "#ExistingIDE") {
+	 $('.ide').show();
   }
 </script>
 
diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd
index 65c5d94..2853db1 100644
--- a/docs/html/sdk/installing/adding-packages.jd
+++ b/docs/html/sdk/installing/adding-packages.jd
@@ -1,5 +1,4 @@
 page.title=Adding Platforms and Packages
-walkthru=1
 
 @jd:body
 
@@ -9,8 +8,8 @@
 SDK package you've downloaded includes only the SDK Tools. To develop an Android app,
 you also need to download at least one Android platform and the latest SDK Platform-tools.</p>
 
-<p>You can update and install SDK packages at any time using the Android SDK Manager.</p>
-
+<ol>
+<li>Launch the SDK Manager.
 <p>If you've used the Windows installer to install the SDK tools, you should already have the
 Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following
 ways:</p>
@@ -20,14 +19,18 @@
   <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
 Android SDK, then execute <code>android sdk</code>.</li>
 </ul>
+</li>
 
-<p>When you open the Android SDK Manager, it automatically selects a set of recommended packages.
+<li>When the Android SDK Manager opens, it automatically selects a set of recommended packages,
+as shown in figure 1.
 Simply click <strong>Install</strong> to install the recommended packages. The Android SDK Manager
 installs the selected packages into
-your Android SDK environment. The following sections describe some of the available SDK
-packages and more about which ones we recommend you install.</p>
+your Android SDK environment.</li>
+</ol>
 
-<p>Once you have installed your packages, continue to the next page.</p>
+<p>If you install the recommended packages, you're now ready to start developing apps!
+To start developing, read <a href="{@docRoot}training/basics/firstapp/index.html"
+>Building Your First App</a>.</p>
 
 <img src="/images/sdk_manager_packages.png" alt="" />
 <p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
@@ -35,49 +38,17 @@
 
 
 
+<h3>Additional information</h3>
 
-<h2 id="Recommended">Recommended Packages</h2>
+<p>For more information about using the SDK Manager and some of the available packages,
+see the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> document.</p>
 
-<p>Here's an outlines of the packages required and those we recommend you use:
-</p>
-
-<dl>
-  <dt>SDK Tools</dt>
-  <dd><strong>Required.</strong> Your new SDK installation already has the latest version. Make sure
-you keep this up to date.</dd>
-  <dt>SDK Platform-tools</dt>
-  <dd><strong>Required.</strong> You must install this package when you install the SDK for
-the first time.</dd>
-  <dt>SDK Platform</dt>
-  <dd><strong>Required.</strong>You must download <em>at least one platform</em> into your
-environment so you're able to compile your application. In order to provide the best user experience
-on the latest devices, we recommend that you use the latest platform version as your build target.
-You'll still be able to run your app on older versions, but you must build against the latest
-version in order to use new features when running on devices with the latest version of Android.
-  <p>To get started, download the latest Android version, plus the lowest version you plan
-  to support (we recommend Android 2.2 for your lowest version).</p></dd>
-  <dt>System Image</dt>
-  <dd>Recommended. Although you might have one or more Android-powered devices on which to test
- your app, it's unlikely you have a device for every version of Android your app supports. It's
-a good practice to download system images for all versions of Android your app supports and test
-your app running on them with the <a href="{@docRoot}tools/devices/emulator.html">Android emulator</a>.</dd>
-  <dt>Android Support</dt>
-  <dd>Recommended. Includes a static library that allows you to use some of the latest
-Android APIs (such as <a href="{@docRoot}guide/components/fragments.html">fragments</a>,
-plus others not included in the framework at all) on devices running
-a platform version as old as Android 1.6. All of the activity templates available when creating
-a new project with the <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a>
-require this. For more information, read <a
-href="{@docRoot}tools/extras/support-library.html">Support Library</a>.</dd>
-  <dt>SDK Samples</dt>
-  <dd>Recommended. The samples 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 packages are available &mdash; one for each Android platform version. When
-you are choosing a samples package to download, select the one whose API Level
-matches the API Level of the Android platform that you plan to use.</dd>
-</dl>
+<p>Everything you need to develop Android apps is on this web site, including <a
+href="{@docRoot}design/index.html">design guidelines</a>,
+<a href="{@docRoot}training/index.html">developer training</a>, <a
+href="{@docRoot}reference/packages.html">API reference</a>, and information
+about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>.
+For additional resources about developing and distributing your app, see the
+<a href="{@docRoot}support.html">Developer Support Resources</a>.</p>
 
 
-<p class="note"><strong>Tip:</strong> For easy access to the SDK tools from a command line, add the
-location of the SDK's <code>tools/</code> and
-<code>platform-tools</code> to your <code>PATH</code> environment variable.</p>
diff --git a/docs/html/sdk/installing/bundle.jd b/docs/html/sdk/installing/bundle.jd
new file mode 100644
index 0000000..243c03d
--- /dev/null
+++ b/docs/html/sdk/installing/bundle.jd
@@ -0,0 +1,44 @@
+page.title=Setting Up the ADT Bundle
+
+@jd:body
+
+
+<p>The ADT Bundle provides everything you need to start developing apps, including
+a powerful IDE based on Eclipse called ADT (Android Developer Tools).
+If you haven't already, go download the <a href="{@docRoot}sdk/index.html"
+>Android ADT Bundle</a>. (If you downloaded the SDK Tools only, for use with an
+existing IDE, you should instead read
+<a href="{@docRoot}sdk/installing/index.html">Setting Up an Existing IDE</a>.)</p>
+
+<h3>Install the SDK and Eclipse IDE</h3>
+<ol>
+<li>Unpack the ZIP file
+(named {@code adt-bundle-&lt;os_platform>.zip}) and save it to an appropriate location,
+such as a "Development" directory in your home directory.</li>
+<li>Open the {@code adt-bundle-&lt;os_platform>/eclipse/} directory and launch
+<strong>eclipse</strong>.</li>
+</ol>
+
+<p>That's it! The IDE is already loaded with the Android Developer Tools plugin and
+the SDK is ready to go. To start developing, read <a href="{@docRoot}training/basics/firstapp/index.html"
+>Building Your First App</a>.</p>
+
+<p class="caution"><strong>Caution:</strong> Do not move any of the files or directories
+from the {@code adt-bundle-&lt;os_platform>} directory. If you move the {@code eclipse}
+or {@code sdk} directory, ADT will not be able to locate the SDK and you'll
+need to manually update the ADT preferences.</p>
+
+<h3>Additional information</h3>
+
+<p>As you continue developing apps, you may need to install additional versions
+of Android for the emulator and other packages such as the library for
+Google Play In-app Billing. To install more packages, use
+the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</p>
+
+<p>Everything you need to develop Android apps is on this web site, including <a
+href="{@docRoot}design/index.html">design guidelines</a>,
+<a href="{@docRoot}training/index.html">developer training</a>, <a
+href="{@docRoot}reference/packages.html">API reference</a>, and information
+about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>.
+For additional resources about developing and distributing your app, see the
+<a href="{@docRoot}support.html">Developer Support Resources</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
index f049191..24d86cf 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -1,30 +1,37 @@
-page.title=Installing the SDK
-walkthru=1
+page.title=Setting Up an Existing IDE
 
 @jd:body
 
 
-<p>You should have already downloaded the <a href="{@docRoot}sdk/index.html">Android SDK</a>. Now
-you need to set up your development environment.</p>
+<p>You should have already downloaded the <a href="{@docRoot}sdk/index.html#ExistingIDE"
+>Android SDK Tools</a>. (If you downloaded the ADT Bundle, you should instead read
+<a href="{@docRoot}sdk/installing/bundle.html">Setting Up the ADT Bundle</a>.)</p>
 
-<p>The SDK you've downloaded is not the complete SDK environment. It includes only the core SDK tools, which you can
+<p>The SDK Tools package is not the complete SDK environment. It includes only the core SDK tools, which you can
 use to download the rest of the SDK packages (such as the latest system image).</p>
 
 
 <div id="win" class="docs" style="display:none">
-  
+
 <h3>Getting started on Windows</h3>
 <p>Your download package is an executable file that starts an installer. The installer checks your machine
   for required tools, such as the proper Java SE Development Kit (JDK) and installs it if necessary.
   The installer then saves the Android SDK Tools into a default location (or you can specify the location).</p>
 
-<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
+<ol>
+<li>Double-click the executable ({@code .exe} file) to start the install.</li>
+<li>Make a note of the name and location in which it saves the SDK on your system&mdash;you will need to
 refer to the SDK directory later, when setting up the ADT plugin and when using
-the SDK tools from the command line.</p>
-
-<p>Once the tools are installed, the installer offers to start the Android SDK Manager. Start it and
-continue with the installation guide by clicking the
-<strong>Next</strong> link on the right.</p>
+the SDK tools from the command line.</li>
+<li>Once the installation completes. the installer offers to start the Android SDK Manager.
+If you'll be using Eclipse, <strong>do not</strong> start the Android SDK Manager,
+and instead move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
+>Installing the Eclipse Plugin</a>.
+<p>If you're using a different IDE,
+start the SDK Manager and read <a href="{@docRoot}sdk/installing/adding-packages.html"
+>Adding Platforms and Packages</a>.</p>
+</li>
+</ol>
 
 </div>
 
@@ -34,16 +41,20 @@
   
 <h3>Getting started on Mac</h3>
 
-<p>Your download package is {@code .zip}.
-  Unpack it to a safe location on your machine. By default, the SDK files are unpacked
-into a directory named <code>android-sdk-mac_x86</code>.</p>
+<ol>
+<li>Unpack the ZIP file you've downloaded. By default, it's unpacked
+into a directory named <code>android-sdk-mac_x86</code>. Move it to an appropriate location on your machine,
+such as a "Development" directory in your home directory.
 
 <p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
 refer to the SDK directory later, when setting up the ADT plugin and when using
 the SDK tools from the command line.</p>
-
-<p>Now continue with the installation guide by clicking the
-<strong>Next</strong> link on the right.</p>
+</li>
+<li>If you're using Eclipse, move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
+>Installing the Eclipse Plugin</a>. Otherwise, if you're using a different IDE,
+read <a href="{@docRoot}sdk/installing/adding-packages.html"
+>Adding Platforms and Packages</a>.</li>
+</ol>
 
 </div>
 
@@ -54,20 +65,27 @@
   
 <h3>Getting started on Linux</h3>
 
-<p>Your download package is a {@code .tgz}.
-  Unpack it to a safe location on your machine. By default, the SDK files are unpacked
-into a directory named <code>android-sdk-linux_x86</code>.</p>
+<ol>
+<li>Unpack the {@code .tgz} file you've downloaded. By default, the SDK files are unpacked
+into a directory named <code>android-sdk-linux_x86</code>. Move it to an appropriate location on your machine,
+such as a "Development" directory in your home directory.
 
 <p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
 refer to the SDK directory later, when setting up the ADT plugin and when using
 the SDK tools from the command line.</p>
-
-<p>Now continue with the installation guide by clicking the
-<strong>Next</strong> link on the right.</p>
+</li>
+<li>If you're using Eclipse, move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
+>Installing the Eclipse Plugin</a>. Otherwise, if you're using a different IDE,
+read <a href="{@docRoot}sdk/installing/adding-packages.html"
+>Adding Platforms and Packages</a>.</li>
+</ol>
 
 
-<h4 id="Troubleshooting">Troubleshooting Ubuntu</h4>
+<h5 id="Troubleshooting"><a href='' class="expandable"
+  onclick="toggleExpandable(this,'#ubuntu-trouble');return false;"
+  >Troubleshooting Ubuntu</a></h5>
 
+<div id="ubuntu-trouble" style="display:none">
 <ul>
   <li>If you need help installing and configuring Java on your
     development machine, you might find these resources helpful:
@@ -95,10 +113,12 @@
     </ol>
   </li>
 </ul>
+</div><!-- end ubuntu trouble -->
+
 
 </div>
 
-<p><a href='' onclick='showAll();return false;'>Other platforms</a></p>
+<p style="margin-top:2em;"><a href='' onclick='showAll();return false;'>Information for other platforms</a></p>
 
 <script>
   var $osDocs;
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index feec56df..93d1db6 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,36 +1,27 @@
 page.title=Installing the Eclipse Plugin
-walkthru=1
-adt.zip.version=20.0.3
-adt.zip.download=ADT-20.0.3.zip
-adt.zip.bytes=12390954
-adt.zip.checksum=869a536b1c56d0cd920ed9ae259ae619
+adt.zip.version=21.0.0
+adt.zip.download=ADT-21.0.0.zip
+adt.zip.bytes=13556487
+adt.zip.checksum=7db4eaae5df6a34fd853317a2bd8250b
 
 @jd:body
 
 
 
 <p>Android offers a custom plugin for the Eclipse IDE, called Android
-Development Tools (ADT). This plugin is designed to give you a powerful, integrated
+Development Tools (ADT). This plugin provides a powerful, integrated
 environment in which to develop Android apps. It extends the capabilities
 of Eclipse to let you quickly set up new Android projects, build an app
 UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
 </p>
 
-<p>If you will be developing in Eclipse with the ADT Plugin, first make sure that you have a
-suitable version of Eclipse
-installed on your computer as described by the 
-<a href="{@docRoot}sdk/index.html#Requirements">system requirements</a>.</p>
-
 <p>If you need to install Eclipse, you can download it from <a href=
-"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.
-We recommend the "Eclipse Classic" version. Otherwise, you should use a Java or
-RCP version of Eclipse.</p>
+"http://eclipse.org/mobile/">eclipse.org/mobile</a>.</p>
 
 
 <p class="note"><strong>Note:</strong> If you prefer to work in a different IDE, you do not need to
 install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
-debug your application. So if you're not using Eclipse, continue to the next page by clicking
-the <strong>Next</strong> link on the right.</p>
+debug your application.</p>
 
 
 
@@ -70,59 +61,21 @@
     <li>In the "Welcome to Android Development" window that appears, select <strong>Use
 existing SDKs</strong>.</li>
     <li>Browse and select the location of the Android SDK directory you recently
-downloaded.</li>
+downloaded and unpacked.</li>
     <li>Click <strong>Next</strong>.</li>
 </ol>
 
-
-<p>If you haven't encountered any errors, you're done setting up ADT
-  and can continue to <a href="{@docRoot}sdk/installing/next.html">Next Steps</a>.</p>
+<p>Your Eclipse IDE is now set up to develop Android apps, but you need to add
+the latest SDK platform tools and an Android platform to your environment.
+To get these packages for your SDK, continue to
+<a href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
 
 
 
 
-<h2 id="Updating">Updating the ADT Plugin</h2>
-
-<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 package of the SDK after installing the new revision of
-ADT. To update the SDK Tools package, use the Android SDK Manager, as
-described in <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</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>
-
-<ol>
-    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
-      <p>If there are no updates available, a dialog will say so and you're done.</p></li>
-    <li>If there are updates available, select Android DDMS, Android Development Tools,
-      and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
-    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
-    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
-      This will download and install the latest version of Android DDMS and
-      Android Development Tools.</li>
-    <li>Restart Eclipse.</li>
-</ol>
 
 
-<p>If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then
-perform a fresh installation, using the instructions for <a href="#installing">Installing the ADT
-Plugin</a>.</p>
-
-
-
-<h2 id="Troubleshooting">Troubleshooting</h2>
+<h2 id="Troubleshooting">Troubleshooting Installation</h2>
 
 <p> If you are having trouble downloading the ADT plugin after following the
 steps above, here are some suggestions: </p>
diff --git a/docs/html/sdk/installing/next.jd b/docs/html/sdk/installing/next.jd
index b1da7c6..cb974a4 100644
--- a/docs/html/sdk/installing/next.jd
+++ b/docs/html/sdk/installing/next.jd
@@ -1,5 +1,4 @@
 page.title=Next Steps
-walkthru=1
 
 @jd:body
 
diff --git a/docs/html/sdk/terms.jd b/docs/html/sdk/terms.jd
index 2b92a6f..74e5254 100644
--- a/docs/html/sdk/terms.jd
+++ b/docs/html/sdk/terms.jd
@@ -1,207 +1,142 @@
 page.title=Terms and Conditions
 hide_license_footer=true
+fullpage=1
 @jd:body
 
-<p>This is the Android Software Development Kit License Agreement.</p>
+<div class="wrap" style="width:940px;">
 
-<h2>
-	1. Introduction
-</h2>
-<p>
-	1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
+<div class="sdk-terms fullsize" onfocus="this.blur()">
+<h1>Terms and Conditions</h1>
 
-</p>
-<p>
-	1.2 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-</p>
-<h2>
-	2. Accepting this License Agreement
-</h2>
-<p>
-	2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
-</p>
-<p>
-	2.2 You can accept this License Agreement by:
-</p>
-<p>
-	(A) clicking to accept or agree to this License Agreement, where this option is made available to you; or
-</p>
-<p>
-	(B) by actually using the SDK. In this case, you agree that use of the SDK constitutes acceptance of the Licensing Agreement from that point onwards.
-</p>
-<p>
-	2.3 You may not use the SDK and may not accept the Licensing Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
-</p>
-<p>
-	2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the Licensing Agreement or use the SDK on behalf of your employer or other entity.
-</p>
-<h2>
-	3. SDK License from Google
-</h2>
-<p>
-	3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non- assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
-</p>
-<p>
-	3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. 
+This is the Android Software Development Kit License Agreement
 
-</p>
-<p>
-	3.3 Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK. Except to the extent required by applicable third party licenses, you may not load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK. 
-</p>
-<p>
-	3.4 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-</p>
-<p>
-	3.5 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-</p>
-<p>
-	3.6 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-</p>
-<p>
-	3.7 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
-</p>
-<h2>
-	4. Use of the SDK by You
-</h2>
-<p>
-	4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications. 
-</p>
-<p>
-	4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-</p>
-<p>
-	4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, your must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-</p>
-<p>
-	4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
-</p>
-<p>
-	4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through the Android platform and/or applications for the Android platform, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-</p>
-<p>
-	4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-</p>
-<h2>
-	5. Your Developer Credentials
-</h2>
-<p>
-	5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-</p>
-<h2>
-	6. Privacy and Information
-</h2>
-<p>
-	6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-</p>
-<p>
-	6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
-</p>
-<h2>
-	7. Third Party Applications for the Android Platform
-</h2>
-<p>
-	7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-</p>
-<p>
-	7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-</p>
-<p>
-	7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-</p>
-<h2>
-	8. Using Android APIs
-</h2>
-<p>
-	8.1 Google Data APIs
-</p>
-<p>
-	8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-</p>
-<p>
-	8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. 
+<h3>1. Introduction</h3>
+1.1 The Android Software Development Kit (referred to in this License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
 
-</p>
-<h2>
-	9. Terminating this License Agreement
-</h2>
-<p>
-	9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-</p>
-<p>
-	9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
-</p>
-<p>
-	9.3 Google may at any time, terminate this License Agreement with you if:
-</p>
-<p>
-	(A) you have breached any provision of this License Agreement; or
-</p>
-<p>
-	(B) Google is required to do so by law; or
-</p>
-<p>
-	(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-</p>
-<p>
-	(D) Google decides to no longer providing the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-</p>
-<p>
-	9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-</p>
-<h2>
-	10. DISCLAIMER OF WARRANTIES
-</h2>
-<p>
-	10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-</p>
-<p>
-	10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-</p>
-<p>
-	10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-</p>
-<h2>
-	11. LIMITATION OF LIABILITY
-</h2>
-<p>
-	11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-</p>
-<h2>
-	12. Indemnification
-</h2>
-<p>
-	12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-</p>
-<h2>
-	13. Changes to the License Agreement
-</h2>
-<p>
-	13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-</p>
-<h2>
-	14. General Legal Terms
-</h2>
-<p>
-	14.1 This License Agreement constitute the whole legal agreement between you and Google and govern your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the SDK.
-</p>
-<p>
-	14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-</p>
-<p>
-	14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-</p>
-<p>
-	14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-</p>
-<p>
-	14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-</p>
-<p>
-	14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-</p>
-<p>
-	14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-</p>
-<p>
-	<em>April 10, 2009</em>
-</p>
\ No newline at end of file
+1.2 “Android” means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+
+<h3>2. Accepting this License Agreement</h3>
+2.1 In order to use the SDK, you must first agree to this License Agreement. You may not use the SDK if you do not accept this License Agreement.
+
+2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
+
+2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries including the country in which you are resident or from which you use the SDK.
+
+2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
+
+
+<h3>3. SDK License from Google</h3>
+3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the SDK solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the SDK for any purpose not expressly permitted by this License Agreement.  Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the SDK.
+
+3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
+
+3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
+
+
+<h3>4. Use of the SDK by You</h3>
+4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+
+<h3>5. Your Developer Credentials</h3>
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+
+<h3>6. Privacy and Information</h3>
+6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
+
+
+<h3>7. Third Party Applications</h3>
+7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
+
+
+<h3>8. Using Android APIs</h3>
+8.1 Google Data APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+
+<h3>9. Terminating this License Agreement</h3>
+9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
+
+9.3 Google may at any time, terminate this License Agreement with you if:
+(A) you have breached any provision of this License Agreement; or
+(B) Google is required to do so by law; or
+(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
+(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
+
+9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
+
+
+<h3>10. DISCLAIMER OF WARRANTIES</h3>
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+
+<h3>11. LIMITATION OF LIABILITY</h3>
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+
+<h3>12. Indemnification</h3>
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
+
+
+<h3>13. Changes to the License Agreement</h3>
+13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
+
+
+<h3>14. General Legal Terms</h3>
+14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
+
+14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+
+
+<em>November 13, 2012</em>
+</div>
+
+</div>
\ No newline at end of file
diff --git a/docs/html/sitemap.txt b/docs/html/sitemap.txt
index 6924ef3..a3e17a6 100644
--- a/docs/html/sitemap.txt
+++ b/docs/html/sitemap.txt
@@ -450,7 +450,6 @@
 http://developer.android.com/sdk/installing/index.html
 http://developer.android.com/sdk/installing/adding-packages.html
 http://developer.android.com/sdk/installing/installing-adt.html
-http://developer.android.com/sdk/installing/next.html
 http://developer.android.com/sdk/exploring.html
 http://developer.android.com/tools/sdk/ndk/index.html
 http://developer.android.com/tools/workflow/index.html
diff --git a/docs/html/tools/devices/managing-avds.jd b/docs/html/tools/devices/managing-avds.jd
index 412bd91..10633d2 100644
--- a/docs/html/tools/devices/managing-avds.jd
+++ b/docs/html/tools/devices/managing-avds.jd
@@ -20,8 +20,9 @@
   <p>The AVD Manager is an easy to use user interface to manage your AVD (Android Virtual Device)
   configurations. An AVD is a device configuration for the Android emulator that allows you to
   model different configurations of Android-powered devices. When you start the AVD Manager in Eclipse 
-  or run the <code>android</code> tool on the command line, you will see the AVD Manager as shown in
-  figure 1:</p>
+  or navigate to your SDK's {@code tools/} directory and execute
+  <code>android avd</code>. You will see the AVD Manager as shown in
+  figure 1.</p>
   
   <img src="{@docRoot}images/avd-manager.png">
   
diff --git a/docs/html/tools/help/adt.jd b/docs/html/tools/help/adt.jd
index cd5bc67..18e7443 100644
--- a/docs/html/tools/help/adt.jd
+++ b/docs/html/tools/help/adt.jd
@@ -23,6 +23,7 @@
         </li>
 
         <li><a href="#refactoring">Layout Factoring Support</a></li>
+        <li><a href="#Updating">Updating the ADT Plugin</h2>
 
       </ol>
 
@@ -525,3 +526,46 @@
     as a string, place the text cursor in the string and press Ctrl-1 to see the refactoring context
     menu.</dd>
   </dl>
+
+
+
+
+
+<h2 id="Updating">Updating the ADT Plugin</h2>
+
+<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 package of the SDK after installing the new revision of
+ADT. To update the SDK Tools package, use the Android SDK Manager, as
+described in <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</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>
+
+<ol>
+    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
+      <p>If there are no updates available, a dialog will say so and you're done.</p></li>
+    <li>If there are updates available, select Android DDMS, Android Development Tools,
+      and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
+    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
+    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
+      This will download and install the latest version of Android DDMS and
+      Android Development Tools.</li>
+    <li>Restart Eclipse.</li>
+</ol>
+
+
+<p>If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then
+perform a fresh installation, using the instructions for <a href="#installing">Installing the ADT
+Plugin</a>.</p>
diff --git a/docs/html/tools/help/avd-manager.jd b/docs/html/tools/help/avd-manager.jd
new file mode 100644
index 0000000..ed90f43
--- /dev/null
+++ b/docs/html/tools/help/avd-manager.jd
@@ -0,0 +1,19 @@
+page.title=AVD Manager
+@jd:body
+
+
+<p>The AVD Manager provides a graphical user interface in which you can create
+and manage Android Virtual Devices (AVDs), which are required by the
+<a href="{@docRoot}tools/help/emulator.html">Android Emulator</a>.</p>
+
+<p>You can launch the AVD Manager in one of the following ways:</p>
+<ul>
+  <li>In Eclipse: select <strong>Window &gt; AVD Manager</strong>, or click
+  the AVD Manager icon in the Eclipse toolbar.</li>
+
+  <li>In other IDEs: Navigate to your SDK's <code>tools/</code> directory and execute
+  <code>android avd</code>.</li>
+</ul>
+
+<p>For more information, see <a href="{@docRoot}tools/devices/managing-avds.html">Managing
+AVDs with AVD Manager</a>.
diff --git a/docs/html/tools/help/jobb.jd b/docs/html/tools/help/jobb.jd
new file mode 100644
index 0000000..d390ac9
--- /dev/null
+++ b/docs/html/tools/help/jobb.jd
@@ -0,0 +1,102 @@
+page.title=JOBB
+@jd:body
+
+
+<p>The {@code jobb} tool allows you to build encrypted and unencrypted APK expansion files in
+  Opaque Binary Blob (OBB) format. You can download and mount these expansion files in your
+  application using {@link android.os.storage.StorageManager} on devices with Android 2.3 (API
+  Level 9) or higher. OBB files are used to provide additional file assets for Android applications
+  (such as graphics, sounds and video), separate from an application's APK file. For more
+  information on using expansion files, see
+  <a href="{@docRoot}guide/google/play/expansion-files.html">APK Expansion Files</a>.</p>
+
+
+<h2 id="usage">Usage</h2>
+
+<p>The syntax for running {@code jobb} is as follows:</p>
+
+<pre>
+jobb [-d &lt;directory&gt;][-o &lt;filename&gt;][-pn &lt;package&gt;][-pv &lt;version&gt;] \
+     [-k &lt;key&gt;][-ov][-dump &lt;filename&gt;][-v][-about]
+</pre>
+
+<p>You can use the {@code jobb} tool to create an OBB file or extract the contents of an
+existing OBB. The following example command creates an OBB file from source files.</p>
+
+<pre>
+$ jobb -d /temp/assets/ -o my-app-assets.obb -k secret-key -pn com.my.app.package -pv 11
+</pre>
+
+<p>This example shows how to dump (extract) the contents of an existing OBB file:</p>
+
+<pre>
+$ jobb -d /temp/obb-output/ -o my-app-assets.obb -k secret-key
+</pre>
+
+
+<h2 id="options">Options</h2>
+
+<p>The table below lists the command line options for the {@code jobb} tool.</p>
+
+<table>
+  <tr>
+    <th>Option</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>{@code -d &lt;directory&gt;}</td>
+    <td>Set the input directory for creating an OBB file, or the output directory when extracting
+      ({@code -dump}) an existing file. When creating an OBB file, the contents of the specified
+      directory and all its sub-directories are included in the OBB file system.
+    </td>
+  </tr>
+  <tr>
+    <td>{@code -o &lt;filename&gt;}</td>
+    <td>Specify the filename for the OBB file. This parameter is required when
+    creating an OBB and extracting (dumping) its contents.</td>
+  </tr>
+  <tr>
+    <td>{@code -pn &lt;package&gt;}</td>
+    <td>Specify the package name for the application that mounts the OBB file, which corresponds
+    to the {@code package} value specified in your application's manifest. This parameter is
+    required when creating an OBB file.</td>
+  </tr>
+  <tr>
+    <td>{@code -pv &lt;version&gt;}</td>
+    <td>Set the minimum version for the application that can mount the OBB file, which corresponds
+    to the {@code android:versionCode} value in your application's manifest. This parameter is
+    required when creating an OBB file.</td>
+  </tr>
+  <tr>
+    <td>{@code -k &lt;key&gt;}</td>
+    <td>Specify a password for encrypting a new OBB file or decrypting an existing, encypted
+      OBB file.</td>
+  </tr>
+  <tr>
+    <td>{@code -ov}</td>
+    <td>Create OBB file that is an overlay of an existing OBB file structure. This option allows
+      the new package contents to be mounted into the same location as a previous package and is
+      intended for creating patch versions of previously generated OBB files. Files within an
+      overlay OBB file replace files that have the same path.</td>
+  </tr>
+  <tr>
+    <td style="white-space: nowrap">{@code -dump &lt;filename&gt;}</td>
+    <td><p>Extract the contents of the specified OBB file. When using this option, you must also
+      specify the output directory for the contents using the {@code -d &lt;directory&gt;}
+      parameter.</p>
+
+      <p class="note"><strong>Note:</strong> When dumping an existing OBB file, you can omit the
+      {@code -d &lt;directory&gt;} parameter to get a listing of the directories inside the file,
+      without extracting the contents.</p>
+    </td>
+  </tr>
+  <tr>
+    <td>{@code -v}</td>
+    <td>Set verbose output for the tool.</td>
+  </tr>
+  <tr>
+    <td>{@code -about}</td>
+    <td>Display version and help information for the {@code jobb} tool.</td>
+  </tr>
+
+</table>
diff --git a/docs/html/tools/help/sdk-manager.jd b/docs/html/tools/help/sdk-manager.jd
new file mode 100644
index 0000000..4852b21
--- /dev/null
+++ b/docs/html/tools/help/sdk-manager.jd
@@ -0,0 +1,67 @@
+page.title=SDK Manager
+@jd:body
+
+
+<p>The Android SDK separates tools, platforms, and other components into packages you can
+  download using the SDK Manager.</p>
+
+<p>You can launch the SDK Manager in one of the following ways:</p>
+<ul>
+  <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
+SDK directory.</li>
+  <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
+Android SDK, then execute <code>android sdk</code>.</li>
+</ul>
+
+<p>You can select which packages you want to download by toggling the checkboxes on the left, then
+click <strong>Install</strong> to install the selected packages.</p>
+
+<img src="{@docRoot}images/sdk_manager_packages.png" alt="" />
+<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
+SDK packages that are available, already installed, or for which an update is available.</p>
+
+
+<h2 id="Recommended">Recommended Packages</h2>
+
+<p>Here's an outline of the packages required and those we recommend you use:
+</p>
+
+<dl>
+  <dt>SDK Tools</dt>
+  <dd><strong>Required.</strong> Your new SDK installation already has the latest version. Make sure
+you keep this up to date.</dd>
+  <dt>SDK Platform-tools</dt>
+  <dd><strong>Required.</strong> You must install this package when you install the SDK for
+the first time.</dd>
+  <dt>SDK Platform</dt>
+  <dd><strong>Required.</strong>You must download <em>at least one platform</em> into your
+environment so you're able to compile your application. In order to provide the best user experience
+on the latest devices, we recommend that you use the latest platform version as your build target.
+You'll still be able to run your app on older versions, but you must build against the latest
+version in order to use new features when running on devices with the latest version of Android.
+  <p>To get started, download the latest Android version, plus the lowest version you plan
+  to support (we recommend Android 2.2 for your lowest version).</p></dd>
+  <dt>System Image</dt>
+  <dd>Recommended. Although you might have one or more Android-powered devices on which to test
+ your app, it's unlikely you have a device for every version of Android your app supports. It's
+a good practice to download system images for all versions of Android your app supports and test
+your app running on them with the <a href="{@docRoot}tools/devices/emulator.html">Android emulator</a>.</dd>
+  <dt>Android Support</dt>
+  <dd>Recommended. Includes a static library that allows you to use some of the latest
+Android APIs (such as <a href="{@docRoot}guide/components/fragments.html">fragments</a>,
+plus others not included in the framework at all) on devices running
+a platform version as old as Android 1.6. All of the activity templates available when creating
+a new project with the <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a>
+require this. For more information, read <a
+href="{@docRoot}tools/extras/support-library.html">Support Library</a>.</dd>
+  <dt>SDK Samples</dt>
+  <dd>Recommended. The samples 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 packages are available &mdash; one for each Android platform version. When
+you are choosing a samples package to download, select the one whose API Level
+matches the API Level of the Android platform that you plan to use.</dd>
+</dl>
+
+<p class="note"><strong>Tip:</strong> For easy access to the SDK tools from a command line, add the
+location of the SDK's <code>tools/</code> and
+<code>platform-tools</code> to your <code>PATH</code> environment variable.</p>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index 10c622b..f2ff07c 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -53,52 +53,135 @@
 <p>For a summary of all known issues in ADT, see <a
 href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</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: 5px 0 0;
-}
-.toggleme {
-  padding: 10px 0 0 20px;
-}
-.toggleable a {
-  text-decoration:none;
-}
-.toggleme a {
-  text-decoration:underline;
-}
-.toggleable.closed .toggleme {
-  display:none;
-}
-#jd-content .toggle-img {
-  margin:0 5px 3px 0;
-}
-</style>
+<div class="toggle-content opened">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>ADT 21.0.0</a> <em>(November 2012)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
+<dl>
+  <dt>Dependencies:</dt>
 
-<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"/>
-ADT 20.0.3</a> <em>(August 2012)</em>
-  <div class="toggleme">
+  <dd>
+    <ul>
+      <li>Java 1.6 or higher is required for ADT 20.0.3.</li>
+      <li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 21.0.0.</li>
+      <li>ADT 21.0.0 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK
+      Tools r21</a>. If you haven't already installed SDK Tools r21.0.0 into your SDK, use the
+      Android SDK Manager to do so.</li>
+    </ul>
+  </dd>
+
+  <dt>General improvements:</dt>
+  <dd>
+    <ul>
+      <li>Layout Editor
+        <ul>
+          <li>Added multi-configuration editing feature that was previewed at Google I/O
+            developer tools talk in June. For an overview, see the
+            <a href="https://www.youtube.com/watch?v=Erd2k6EKxCQ">session recording</a>
+            (starting at: 20:30).</li>
+          <li>Modified the layout logic so that setting a {@link android.app.Fragment} layout or
+            a {@link android.widget.ListView} preview layout is now applied not
+            only to the current layout but to all other configurations of the same layout.</li>
+          <li>Updated the editor to include resources from library projects in the resource chooser,
+            XML code completion, Go To Declaration and other editing contexts.</li>
+          <li>Updated the editor so that it  no longer forces all variations of a single
+            layout into a single editor. You can, for example, open both the landscape and portrait
+            versions of a layout as separate editors and quickly switch between them, or even
+            re-dock your editors to edit them simultaneously. If you prefer the previous behavior,
+            set the new option in <strong>Preferences &gt; Android &gt; Editors</strong> to use the
+            old behavior.</li>
+          <li>Improved the handling of {@link android.widget.RelativeLayout} in the layout editor,
+            so that dragging widgets around and deleting them should now result in the layout
+            working more intuitively. In particular, deleting a widget causes the constraints
+            flowing through the deleted widgets to be intelligently adjusted, and when moving
+            widgets the constraints are preserved whenever possible.</li>
+          <li>Added the ability to specify a default action in Layout Editor views, which you can
+            invoke with the <em>F2</em> key. For example, after dropping a button or text view,
+            you can press <em>F2</em> to edit its text.</li>
+          <li>Added renaming of an ID (changing the {@code android:id} attribute) by invoking the
+            <strong>Rename</strong> shortcut.</li>
+          <li>Adding a new locale is now easier with the new <strong>Add Locale...</strong> action
+            in the locale menu. In addition to creating the new values folder, it lets you edit an
+            initial set of translations for the new locale.</li>
+          <li>Updated the editor so that when a custom view (or incorrectly configured view)
+            throws an exception during initialization or painting, part of the relevant stack trace
+            is shown inline in the layout editor, and you can click on the stack frames to jump to
+            the relevant location</li>
+          <li>Improved the editor error display to show the relevant part of a stack trace
+            when a custom view throws exceptions during rendering or construction, and provides
+            hyperlinks to the stack frames.</li>
+          <li>Improved the stack trace display for exceptions for custom views that are generated
+            during rendering.</li>
+          <li>Updated the configuration chooser so that it shows full language and region names (not
+            just 2-letter codes) in menus, in the configuration dialog and other editing contexts.
+            </li>
+          <li>Improved the device menu in the configuration chooser.</li>
+        </ul>
+      </li>
+      <li>Lint
+        <ul>
+          <li>Added over 25 new lint rules for resources, locale settings, layout
+            files, incorrect use of {@link android.util.SparseArray} and
+            {@link android.os.PowerManager.WakeLock} and manifest issues.</li>
+          <li>Improved the XML export function to support the
+            <a href="https://wiki.jenkins-ci.org/display/JENKINS/Android+Lint+Plugin">Jenkins Lint
+            plugin</a>.
+          </li>
+        </ul>
+      </li>
+      <li>Editors
+        <ul>
+          <li>Modified the plugin to remember which editor mode (text or graphical) you were last
+            using for each type of editor (layout, manifest or values) and uses that mode for newly
+            opened files. This means that if you prefer to work with just XML, the editors start
+            showing you XML text editors after you have switched to them for each type of editor.</li>
+          <li>Updated XML code completion so that it completes (and shows documentation for) theme
+            references, such as {@code ?android:attr/dividerHeight}.</li>
+        </ul>
+      </li>
+      <li>Android Virtual Devices (AVD)
+        <ul>
+          <li>Added new <strong>Device Definitions</strong> tab in the AVD Manager for configuring
+            standard size and Nexus virtual devices.</li>
+          <li>Improved emulators so that they launch with a skin that is dynamically generated and
+            reflects the actual hardware configured in the AVD Manager.</li>
+        </ul>
+      </li>
+      <li>Improved the new template mechanism, cleaned up the existing templates and added
+        several new templates</li>
+      <li>Added ability to export images and frames in the Tracer for OpenGL ES tool.</li>
+      <li>Integrated the Systrace tool into the DDMS perspective.</li>
+      <li>Improved the JUnit test runner to allow a test to be run on all connected devices
+        simultaneously.</li>
+    </ul>
+  </dd>
+
+  <dt>Bug fixes:</dt>
+  <dd>
+    <ul>
+      <li>Fixed the editors so that attributes and resources specified by XML files in the
+        {@code /values} directory are validated when files are saved.</li>
+      <li>Added a workaround for a bug in Eclipse on Mac OS X 10.8 where the Property Sheet was not
+        working properly.</li>
+    </ul>
+  </dd>
+
+</dl>
+
+</div>
+</div>
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 20.0.3</a> <em>(August 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -126,12 +209,13 @@
 </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 20.0.2</a> <em>(July 2012)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 20.0.2</a> <em>(July 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -149,7 +233,8 @@
   <dd>
     <ul>
       <li>Fixed keybindings in various XML editors for Eclipse 4.x.</li>
-      <li>Fixed bug when creating layout configurations that already exist.</li>
+      <li>Fixed a bug that occurs when you try to create layout configurations that already
+        exist.</li>
     </ul>
   </dd>
 
@@ -159,12 +244,13 @@
 </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 20.0.1</a> <em>(July 2012)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 20.0.1</a> <em>(July 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -199,12 +285,13 @@
 </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 20.0.0</a> <em>(June 2012)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 20.0.0</a> <em>(June 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -321,12 +408,13 @@
 </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 18.0.0</a> <em>(April 2012)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 18.0.0</a> <em>(April 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -355,12 +443,13 @@
 </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 17.0.0</a> <em>(March 2012)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 17.0.0</a> <em>(March 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -444,10 +533,10 @@
         (<a href="http://code.google.com/p/android/issues/detail?id=23940">Issue 23940</a>)</li>
       <li>Fixed a locale bug affecting Turkish locales in particular.
         (<a href="http://code.google.com/p/android/issues/detail?id=23747">Issue 23747</a>)</li>
-      <li>Fixed issue where dex complains about duplicate classes in cases where a Library
+      <li>Fixed an issue where dex complains about duplicate classes in cases where a Library
         Project depends on the same jar files or Java-only projects.</li>
-      <li>Fixed issue where test projects had to independently reference the library projects used
-        by an app project. Now referencing only the app project is enough.</li>
+      <li>Fixed an issue where test projects had to independently reference the library projects
+        used by an app project. Now referencing only the app project is enough.</li>
     </ul>
   </dd>
 
@@ -456,12 +545,13 @@
 </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 16.0.1</a> <em>(December 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 16.0.1</a> <em>(December 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -489,12 +579,13 @@
 </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 16.0.0</a> <em>(December 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 16.0.0</a> <em>(December 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -521,12 +612,13 @@
 </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 15.0.1</a> <em>(November 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 15.0.1</a> <em>(November 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
   <dt>Dependencies:</dt>
 
@@ -554,12 +646,13 @@
 
 
 
-<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 15.0.0</a> <em>(October 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 15.0.0</a> <em>(October 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -577,7 +670,7 @@
   <li>Fixed issues in the SDK Manager
     (<a href="http://code.google.com/p/android/issues/detail?id=20939">Issue 20939</a>,
     <a href="http://code.google.com/p/android/issues/detail?id=20607">Issue 20607</a>).</li>
-  <li>Fixed scrolling issue in the new Logcat panel of DDMS.</li>
+  <li>Fixed a scrolling issue in the new Logcat panel of DDMS.</li>
 </ul>
 </dd>
 </dl>
@@ -585,12 +678,13 @@
 </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 14.0.0</a> <em>(October 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 14.0.0</a> <em>(October 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -703,12 +797,13 @@
 
 
 
-<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 12.0.0</a> <em>(July 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 12.0.0</a> <em>(July 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -755,13 +850,13 @@
 </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 11.0.0</a> <em>(June 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 11.0.0</a> <em>(June 2011)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -891,12 +986,13 @@
 
 
 
-<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 10.0.1</a> <em>(March 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 10.0.1</a> <em>(March 2011)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 
 <dl>
 
@@ -911,7 +1007,7 @@
   <ul>
     <li>Temporary work-around to resolve the rare cases in which the layout editor will
 not open.</li>
-    <li>Fix issue in which ADT 10.0.0 would install on Eclipse 3.4 and lower, even though ADT
+    <li>Fixed an issue in which ADT 10.0.0 would install on Eclipse 3.4 and lower, even though ADT
 requires Eclipse 3.5 or higher (as of 10.0.0).</li>
   </ul>
 </dd>
@@ -921,13 +1017,13 @@
 
 
 
-<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 10.0.0</a> <em>(February 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 10.0.0</a> <em>(February 2011)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -971,13 +1067,13 @@
 </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 9.0.0</a> <em>(January 2011)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 9.0.0</a> <em>(January 2011)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -1080,13 +1176,13 @@
 
 
 
-<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 8.0.1</a> <em>(December 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 8.0.1</a> <em>(December 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -1109,13 +1205,13 @@
 </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 8.0.0</a> <em>(December 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 8.0.0</a> <em>(December 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -1146,9 +1242,9 @@
       <li>Contextual menu with enum/flag type properties.</li>
       <li>New zoom controls.</li>
     </ul></li>
-  <li>New HierarchyViewer plug-in integrated in Eclipse.</li>
-  <li>Android launch configurations don't recompile the whole workspace on launch anymore.</li>
-  <li><code>android.jar</code> source and javadoc location can now be configured.</li>
+  <li>New HierarchyViewer plugin for Eclipse.</li>
+  <li>Android launch configurations no longer recompile the whole workspace on launch.</li>
+  <li>The location of <code>android.jar</code> source and javadoc can now be configured.</li>
 </ul>
 </dd>
 </dl>
@@ -1156,12 +1252,13 @@
 </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.9</a> <em>(September 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.9</a> <em>(September 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 
 <dt>Dependencies:</dt>
@@ -1183,13 +1280,13 @@
  </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.8</a> <em>(September 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.8</a> <em>(September 2010)</em>
+  </p>
 
-
+  <div class="toggle-content-toggleme">
 </ul>
 </dd>
 
@@ -1223,7 +1320,7 @@
 Multiple Screens</a> are now available.</li>
 <li>Fixes problems with handling of library project names that
 contain characters that are incompatible with the Eclipse path variable.
-Now properly sets up the link between the main project and the library
+Now it properly sets up the link between the main project and the library
 project.</li>
 </ul>
 </dd>
@@ -1232,12 +1329,13 @@
 </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.7</a> <em>(May 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.7</a> <em>(May 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Library projects:</dt>
 <dd>
@@ -1257,12 +1355,13 @@
 </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.6</a> <em>(March 2010)</em>
-  <div class="toggleme">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.6</a> <em>(March 2010)</em>
+  </p>
 
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 
@@ -1316,20 +1415,22 @@
 <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
+<li>Fixes an issue where add-ons without an optional library would not show up as valid
 targets for application launches.</li>
-<li>Resolves possible crash when launching applications.</li>
+<li>Resolves a 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">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.5</a> <em>(December 2009)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 
@@ -1342,9 +1443,10 @@
 <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>The AVD Launch dialog now allows you to set the scale value.</li>
+<li>Fixes a potential NullPointerException in the SDK Manager when you launch an AVD that does not
+  have a skin name specified.</li>
+<li>Fixes an XML validation issue in older Java versions.</li>
 <li>.apk packaging now properly ignores vi swap files as well as hidden files.</li>
 </ul>
 </dd>
@@ -1352,11 +1454,13 @@
  </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">
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt=""/>ADT 0.9.4</a> <em>(October 2009)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
 <dl>
 <dt>Dependencies:</dt>
 
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index 064b2c3..7c8ca71 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
 ndk=true
 
-ndk.win_download=android-ndk-r8b-windows.zip
-ndk.win_bytes=188724991
-ndk.win_checksum=6d290d4f2729ef2063c5ae5b1e335622
+ndk.win_download=android-ndk-r8c-windows.zip
+ndk.win_bytes=233787657
+ndk.win_checksum=3ff1570fa4ea865b7702507ea43dbae4
 
-ndk.mac_download=android-ndk-r8b-darwin-x86.tar.bz2
-ndk.mac_bytes=181255568
-ndk.mac_checksum=94fe392194ea41f8a70cfce0dee3870f
+ndk.mac_download=android-ndk-r8c-darwin-x86.tar.bz2
+ndk.mac_bytes=214270840
+ndk.mac_checksum=74a23e9e058512121835e0d6932e72d5
 
-ndk.linux_download=android-ndk-r8b-linux-x86.tar.bz2
-ndk.linux_bytes=160466240
-ndk.linux_checksum=6694ccc04d543500f0661a75f6c46526
+ndk.linux_download=android-ndk-r8c-linux-x86.tar.bz2
+ndk.linux_bytes=179945337
+ndk.linux_checksum=b0851346ff90c9266bc050016a228319
 
 page.title=Android NDK
 
@@ -44,8 +44,8 @@
 
   <p>The NDK is a toolset that allows you to implement parts
   of your app using native-code languages such as C and C++. For certain types of apps,
-  this can be helpful so that you may reuse existing code libraries written in these
-  languages and possibly increased performance.</p>
+  this can be helpful so you can reuse existing code libraries written in these
+  languages, but most apps do not need the Android NDK.</p>
 
   <p>Before downloading the NDK, you should understand that <strong>the NDK
    will not benefit most apps</strong>. As a developer, you need to balance its benefits
@@ -73,51 +73,325 @@
 <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", "{@docRoot}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: 5px 0 0;
-}
-.toggleme {
-  padding: 10px 0 0 20px;
-}
-.toggleable a {
-  text-decoration:none;
-}
-.toggleme a {
-  text-decoration:underline;
-}
-.toggleable.closed .toggleme {
-  display:none;
-}
-#jd-content .toggle-img {
-  margin:0 5px 3px 0;
-}
-</style>
+<div class="toggle-content opened">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 8c</a> <em>(November 2012)</em>
+  </p>
 
-<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 8b</a> <em>(July 2012)</em>
+  <div class="toggle-content-toggleme">
+    <dl>
+      <dt>Important changes:</dt>
 
-  <div class="toggleme">
+      <dd>
+        <ul>
+          <li>Added the Clang 3.1 compiler to the NDK. The GNU Compiler Collection (GCC) 4.6 is
+          still the default, so you must explicitly enable the Clang compiler option as follows:
+            <ul>
+              <li>For {@code ndk-build}, export {@code NDK_TOOLCHAIN_VERSION=clang3.1} <em>or</em>
+                add this environment variable setting to {@code Application.mk}.</li>
+              <li>For standalone builds, add {@code --llvm-version=3.1} to
+                {@code make-standalone-toolchain.sh} and replace {@code CC} and {@code CXX} in your
+                makefile with {@code &lt;tool-path&gt;/bin/clang} and
+                {@code &lt;tool-path&gt;/bin/clang++}. See {@code STANDALONE-TOOLCHAIN.html} for
+                details.</li>
+            </ul>
+            <p class="note"><strong>Note:</strong> This feature is experimental. Please try it and
+            <a href="http://code.google.com/p/android/issues/list">report any issues</a>.</p></li>
+          <li>Added Gold linker {@code ld.gold} for the Windows toolchain. Gold linker is also the
+            default for ARM and X86 on all hosts. You may override it to use the {@code ld.bfd}
+            linker by adding {@code LOCAL_LDFLAGS += -fuse-ld=bfd} to {@code Android.mk}, or by passing
+            {@code -fuse-ld=bfd} to the g++/clang++ command line that does the linking.</li>
+          <li>Added checks for spaces in the NDK path to the {@code ndk-build[.cmd]} and
+            {@code ndk-gdb} scripts, to prevent build errors that are difficult to diagnose.</li>
+          <li>Made the following changes to API level handling:
+            <ul>
+              <li>Modified build logic so that projects that specify {@code android-10} through
+                {@code android-13} in {@code APP_PLATFORM}, {@code project.properties} or
+                {@code default.properties} link against {@code android-9} instead of
+                {@code android-14}.
+              <li>Updated build so that executables using android-16 (Jelly Bean) or higher are
+                compiled with the {@code -fPIE} option for position-independent executables (PIE).
+                A new {@code APP_PIE} option allows you to control this behavior. See {@code
+                APPLICATION-MK.html} for details.
+                <p class="note">
+                  <strong>Note:</strong> All API levels above 14 still link against {@code
+                  platforms/android-14} and no new {@code platforms/android-N} have been added.
+                </p></li>
+              <li>Modified {@code ndk-build} to provide warnings if the adjusted API level is larger
+              than {@code android:minSdkVersion} in the project's {@code AndroidManifest.xml}.</li>
+            </ul>
+          </li>
+          <li>Updated the {@code cpu-features} helper library to include more ARM-specific features.
+          See {@code sources/android/cpufeatures/cpu-features.h} for details.</li>
+          <li>Modified the long double on the X86 platform to be 8 bytes. This data type is now the
+          same size as a double, but is still treated as a distinct type.</li>
+          <li>Updated build for {@code APP_ABI=armeabi-v7a}:
+            <ul>
+              <li>Modified this build type to pass the {@code -march=armv7-a} parameter
+              to the linker. This change ensures that v7-specific libraries and {@code crt*.o} are
+              linked correctly.</li>
+              <li>Added {@code -mfpu=vfpv3-d16} to {@code ndk-build} instead of the
+              {@code -mfpu=vfp} option used in previous releases.</li>
+            </ul>
+          </li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Important bug fixes:</dt>
+
+      <dd>
+        <ul>
+          <li>Fixed an issue where running {@code make-standalone-toolchain.sh} with root privileges
+            resulted in the stand alone tool chain being inaccessible to some users.
+            (<a href="http://code.google.com/p/android/issues/detail?id=35279">Issue 35279</a>)
+            <ul>
+              <li>All files and executables in the NDK release package are set to have read and
+                execute permissions for all.</li>
+              <li>The ownership/group of {@code libstdc++.a} is now preserved when copied.</li>
+            </ul>
+          </li>
+          <li>Removed redundant {@code \r} from Windows prebuilt {@code echo.exe}. The redundant
+          {@code \r} caused {@code gdb.setup} to fail in the GNU Debugger (GDB) because it
+          incorrectly became part of the path.
+          (<a href="http://code.google.com/p/android/issues/detail?id=36054">Issue 36054</a>)</li>
+          <li>Fixed Windows parallel builds that sometimes failed due to timing issues in the
+          {@code host-mkdir} implementation.
+          (<a href="http://code.google.com/p/android/issues/detail?id=25875">Issue 25875</a>)</li>
+          <li>Fixed GCC 4.4.3 GNU {@code libstdc++} to <em>not</em> merge {@code typeinfo} names by
+          default. For more details, see
+          {@code toolchain repo gcc/gcc-4.4.3/libstdc++-v3/libsupc++/typeinfo}.
+          (<a href="http://code.google.com/p/android/issues/detail?id=22165">Issue 22165</a>)</li>
+          <li>Fixed problem on {@code null} context in GCC 4.6
+          {@code cp/mangle.c::write_unscoped_name}, where GCC may crash when the context is
+          {@code null} and dereferenced in {@code TREE_CODE}.</li>
+          <li>Fixed GCC 4.4.3 crashes on ARM NEON-specific type definitions for floats.
+          (<a href="http://code.google.com/p/android/issues/detail?id=34613">Issue 34613</a>)</li>
+          <li>Fixed the {@code STLport} internal {@code _IteWrapper::operator*()} implementation
+          where a stale stack location holding the dereferenced value was returned and caused
+          runtime crashes.
+          (<a href="http://code.google.com/p/android/issues/detail?id=38630">Issue 38630</a>)</li>
+
+          <li>ARM-specific fixes:
+            <ul>
+              <li>Fixed ARM GCC 4.4.3/4.6 {@code g++} to not warn that the <em>mangling of
+              &lt;va_list&gt; was changed in GCC 4.4</em>. The workaround using the
+              {@code -Wno-psabi} switch to avoid this warning is no longer required.</li>
+              <li>Fixed an issue when a project with {@code .arm} or {@code .neon} suffixes in
+              {@code LOCAL_SRC_FILES} also used {@code APP_STL}. With {@code APP_STL}, the
+              {@code ndk-build} script searches for C++ files in {@code LOCAL_SRC_FILES} before
+              adding STL {@code header/lib} paths to compilation. Modified {@code ndk-build} to
+              filter out {@code .arm} and {@code .neon} suffixes before the search, otherwise items
+              in {@code LOCAL_SRC_FILES} like {@code myfile.cpp.arm.neon} won't be compiled as C++
+              code.</li>
+              <li>Fixed {@code binutils-2.21/ld.bfd} to be capable of linking object from older
+              binutils without {@code tag_FP_arch}, which was producing <em>assertion fail</em>
+              error messages in GNU Binutils.
+              (<a href="http://code.google.com/p/android/issues/detail?id=35209">Issue 35209</a>)
+              </li>
+              <li>Removed <em>Unknown EABI object attribute 44</em> warning when
+              {@code binutils-2.19/ld} links prebuilt object by newer {@code binutils-2.21}</li>
+              <li>Fixed an issue in GNU {@code stdc++} compilation with both {@code -mthumb} and
+              {@code -march=armv7-a}, by modifying {@code make-standalone-toolchain.sh} to populate
+              {@code headers/libs} in sub-directory {@code armv7-a/thumb}.
+              (<a href="http://code.google.com/p/android/issues/detail?id=35616">Issue 35616</a>)
+              </li>
+              <li>Fixed <em>unresolvable R_ARM_THM_CALL relocation</em> error.
+              (<a href="http://code.google.com/p/android/issues/detail?id=35342">Issue 35342</a>)
+              </li>
+              <li>Fixed internal compiler error at {@code reload1.c:3633}, caused by the ARM
+              back-end expecting the wrong operand type when sign-extend from {@code char}.
+              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50099">GCC Issue 50099</a>)</li>
+              <li>Fixed internal compiler error with negative shift amount.
+              (<a href="http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html">GCC Issue</a>)</li>
+            </ul>
+          </li>
+
+          <li>Fixed {@code -fstack-protector} for X86, which is also the default for the
+          {@code ndk-build} x86 ABI target.</li>
+
+          <li>MIPS-specific fixes:
+            <ul>
+              <li>Fixed {@code STLport} endian-ness by setting {@code _STLP_LITTLE_ENDIAN} to 1 when
+              compiling MIPS {@code libstlport_*}.</li>
+              <li>Fixed GCC {@code __builtin_unreachable} issue when compiling LLVM.
+              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369">GCC Issue 54369</a>)</li>
+              <li>Backported fix for {@code cc1} compile process consuming 100% CPU.
+              (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380">GCC Issue 50380</a>)</li>
+            </ul>
+          </li>
+
+          <li>GNU Debugger-specific fixes:
+            <ul>
+              <li>Disabled Python support in gdb-7.x at build, otherwise the gdb-7.x configure
+              function may pick up whatever Python version is available on the host and build
+              {@code gdb} with a hard-wired dependency on a specific version of Python.
+              (<a href="http://code.google.com/p/android/issues/detail?id=36120">Issue 36120</a>)
+              </li>
+              <li>Fixed {@code ndk-gdb} when {@code APP_ABI} contains {@code all} and matchs none
+              of the known architectures.
+              (<a href="http://code.google.com/p/android/issues/detail?id=35392">Issue 35392</a>)
+              </li>
+              <li>Fixed Windows pathname support, by keeping the {@code :} character if it looks
+              like it could be part of a Windows path starting with a drive letter.
+              (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12843">GDB Issue 12843</a>)
+              </li>
+              <li>Fixed adding of hardware breakpoint support for ARM in {@code gdbserver}.
+              (<a href="http://sourceware.org/ml/gdb-patches/2011-09/msg00200.html">GDB Issue</a>)
+              </li>
+              <li>Added fix to only read the current {@code solibs} when the linker is consistent.
+              This change speeds up {@code solib} event handling.
+              (<a href="http://code.google.com/p/android/issues/detail?id=37677">Issue 37677</a>)
+              </li>
+              <li>Added fix to make repeated attempts to find {@code solib} breakpoints. GDB now
+              retries {@code enable_break()} during every call to {@code svr4_current_sos()} until
+              it succeeds.
+              (<a href="https://android-review.googlesource.com/#/c/43563">Change 43563</a>)</li>
+              <li>Fixed an issue where {@code gdb} would not stop on breakpoints placed in
+              {@code dlopen-ed} libraries.
+              (<a href="http://code.google.com/p/android/issues/detail?id=34856">Issue 34856</a>)
+              </li>
+              <li>Fixed {@code SIGILL} in dynamic linker when calling {@code dlopen()}, on system
+              where {@code /system/bin/linker} is stripped of symbols and
+              {@code rtld_db_dlactivity()} is implemented as {@code Thumb}, due to not preserving
+              {@code LSB} of {@code sym_addr}.
+              (<a href="http://code.google.com/p/android/issues/detail?id=37147">Issue 37147</a>)
+              </li>
+            </ul>
+          </li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Other bug fixes:</dt>
+
+      <dd>
+        <ul>
+          <li>Fixed NDK headers:
+            <ul>
+              <li>Fixed {@code arch-mips/include/asm/*} code that was incorrectly removed from
+              original kernel. (<a href="https://android-review.googlesource.com/#/c/43335">Change
+              43335</a>)</li>
+              <li>Replaced struct member data {@code __unused} with {@code __linux_unused} in
+              {@code linux/sysctl.h} and {@code linux/icmp.h} to avoid conflict with
+              {@code #define __unused} in {@code sys/cdefs.h}.</li>
+              <li>Fixed {@code fenv.h} for enclosed C functions with {@code __BEGIN_DECLS} and
+              {@code __END_DECLS}.</li>
+              <li>Removed unimplemented functions in {@code malloc.h}.</li>
+              <li>Fixed {@code stdint.h} defintion of {@code uint64_t} for ANSI compilers.
+              (<a href="http://code.google.com/p/android/issues/detail?id=1952">Issue 1952</a>)</li>
+              <li>Fixed preprocessor macros in {@code &lt;arch&gt;/include/machine/*}.</li>
+              <li>Replaced {@code link.h} for MIPS with new version supporting all platforms.</li>
+              <li>Removed {@code linux-unistd.h}</li>
+              <li>Move GLibc-specific macros {@code LONG_LONG_MIN}, {@code LONG_LONG_MAX} and
+              {@code ULONG_LONG_MAX} from {@code &lt;pthread.h&gt;} to {@code &lt;limits.h&gt;}.</li>
+            </ul>
+          </li>
+          <li>Fixed a buffer overflow in {@code ndk-stack-parser}.</li>
+          <li>Fixed {@code _STLP_USE_EXCEPTIONS}, when not defined, to omit all declarations
+          and uses of {@code __Named_exception}. Compiling and use of {@code __Named_exception}
+          settings only occurs when {@code STLport} is allowed to use exceptions.</li>
+          <li>Fixed building of Linux-only NDK packages without also building Windows code. Use the
+          following settings to perform this type of build:
+          <pre>./build/tools/make-release.sh --force --systems=linux-x86</pre></li>
+          <li>Fixed {@code libc.so} so it does not export {@code atexit()} and {@code __do_handler}.
+          These symbols are exported for ARM builds by the system version of the C library to
+          support legacy native libraries. NDK-generated should never reference them directly.
+          Instead, each shared library or executable should embed its own version of these symbols,
+          provided by {@code crtbegin_*.o}.
+          <p>If your project is linked with the {@code -nostdlib -Wl,--no-undefined} options, you
+          must provide your own {@code __dso_handle} because {@code crtbegin_so.o} is not linked in
+          this case. The content of {@code __dso_handle} does not matter, as shown in the following
+          example code:</p>
+<pre>
+extern "C" {
+  extern void *__dso_handle __attribute__((__visibility__ ("hidden")));
+  void *__dso_handle;
+}
+</pre>
+          </li>
+          <li>Fixed symbol decoder for ARM used in {@code objdump} for {@code plt} entries to
+          generate a more readable form {@code function@plt}.</li>
+          <li>Removed the following symbols, introduced in GCC 4.6 {@code libgcc.a}, from
+          the X86 platform {@code libc.so} library: {@code __aeabi_idiv0}, {@code __aeabi_ldiv0},
+          {@code __aeabi_unwind_cpp_pr1}, and {@code __aeabi_unwind_cpp_pr2}.</li>
+          <li>Removed unused {@code .ctors}, {@code .dtors}, and {@code .eh_frame} in MIPS
+          {@code crt*_so.S}.</li>
+          <li>Updated {@code ndk-gdb} so that it only takes the last line of output for
+          {@code ndk-build} {@code DUMP_XXXX}. This change ensures that if {@code Application.mk} or
+          {@code Android.mk} print something with {@code $(info ...)} syntax, it does not get
+          injected into the result of {@code DUMP_XXXX}.
+          (<a href="https://groups.google.com/d/msg/android-ndk/-/ew0lTWGr1UEJ">More info</a>)</li>
+        </ul>
+      </dd>
+    </dl>
+
+    <dl>
+      <dt>Other changes:</dt>
+
+      <dd>
+        <ul>
+          <li>Removed {@code arch-x86} and {@code arch-mips} headers from
+          {@code platforms/android-[3,4,5,8]}. Those headers were incomplete, since both X86 and
+          MIPS ABIs are only supported at API 9 or higher.</li>
+          <li>Simplified c++ include path in standalone packages, as shown below.
+          (<a href="http://code.google.com/p/android/issues/detail?id=35279">Issue 35279</a>)
+<pre>
+&lt;path&gt;/arm-linux-androideabi/include/c++/4.6.x-google
+  to:
+&lt;path&gt;/include/c++/4.6/
+</pre></li>
+          <li>Fixed {@code ndk-build} to recognize more C++ file extensions by default:
+          {@code .cc .cp .cxx .cpp .CPP .c++ .C}. You may still use {@code LOCAL_CPP_EXTENSION} to
+          overwrite these extension settings.</li>
+          <li>Fixed an issue in {@code samples/san-angeles} that caused a black screen or freeze
+          frame on re-launch.</li>
+          <li>Replaced deprecated APIs in NDK samples.
+          (<a href="http://code.google.com/p/android/issues/detail?id=20017">Issue 20017</a>)
+            <ul>
+              <li>{@code hello-gl2} from android-5 to android-7</li>
+              <li>{@code native-activity} from android-9 to android-10</li>
+              <li>{@code native-audio} from android-9 to android-10</li>
+              <li>{@code native-plasma} from android-9 to android-10</li>
+            </ul>
+          </li>
+          <li>Added new branding for Android executables with a simpler scheme in section
+          {@code .note.android.ident} (defined in {@code crtbegin_static/dynamic.o}) so that
+          debugging tools can act accordingly. The structure member and values are defined as
+          follows:
+<pre>
+static const struct {
+  int32_t namesz;  /* = 8,  sizeof ("Android") */
+  int32_t descsz;  /* = 1 * sizeof(int32_t) */
+  int32_t type;    /* = 1, ABI_NOTETYPE */
+  char name[sizeof "Android"];  /* = "Android" */
+  int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */
+}
+</pre>
+            <p>The previous branding options in section {@code .note.ABI-tag} are deprecated.</p>
+          </li>
+          <li>Added a new script {@code run-tests-all.sh} which calls {@code run-tests.sh} and
+          {@code standalone/run.sh} with various conditions. The script {@code run-tests.sh} runs
+          without the {@code --abi} option, and is enhanced to compile most of the tests for all
+          supported ABIs and run on all attached devices</li>
+        </ul>
+      </dd>
+    </dl>
+
+  </div>
+</div>
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 8b</a> <em>(July 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
     <p>The main features of this release are a new GNU Compiler Collection (GCC) 4.6 toolchain and
 GNU Debugger (GDB) 7.3.x which adds debugging support for the Android 4.1 (API Level 16) system
 image.</p>
@@ -304,12 +578,13 @@
   </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 8</a> <em>(May 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 8</a> <em>(May 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p>This release of the NDK includes support for MIPS ABI and a few additional fixes.</p>
 
     <dl>
@@ -376,12 +651,13 @@
   </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 7c</a> <em>(April 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 7c</a> <em>(April 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p>This release of the NDK includes an important fix for Tegra2-based devices, and a few
 additional fixes and improvements:</p>
 
@@ -429,12 +705,13 @@
 </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 7b</a> <em>(February 2012)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 7b</a> <em>(February 2012)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p>This release of the NDK includes fixes for native Windows builds, Cygwin and many other
       improvements:</p>
 
@@ -500,7 +777,7 @@
             first process listed by {@code ps}, which is usually a service process.</li>
           <li>Fixed a rare bug where NDK r7 would fail to honor the {@code LOCAL_ARM_MODE} value
             and always compile certain source files (but not all) to 32-bit instructions.</li>
-          <li>{@code stlport}: Refresh the sources to match the Android platform version. This
+          <li>{@code STLport}: Refresh the sources to match the Android platform version. This
             update fixes a few minor bugs:
             <ul>
                <li>Fixed instantiation of an incomplete type</li>
@@ -511,7 +788,7 @@
              </ul>
              <p>For complete details, see the commit log.</p>
           </li>
-          <li>{@code stlport}: Removed 5 unnecessary static initializers from the library.</li>
+          <li>{@code STLport}: Removed 5 unnecessary static initializers from the library.</li>
           <li>The GNU libstdc++ libraries for armeabi-v7a were mistakenly compiled for
             armeabi instead. This change had no impact on correctness, but using the right
             ABI should provide slightly better performance.</li>
@@ -539,12 +816,13 @@
 </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 7</a> <em>(November 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 7</a> <em>(November 2011)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p>This release of the NDK includes new features to support the Android 4.0 platform as well
     as many other additions and improvements:</p>
 
@@ -842,13 +1120,13 @@
 </div>
 
 
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 6b</a> <em>(August 2011)</em>
+  </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 NDK, Revision 6b</a> <em>(August 2011)</em>
-
-   <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>This release of the NDK does not include any new features compared to r6. The r6b release
       addresses the following issues in the r6 release:</p>
       <dl>
@@ -876,12 +1154,13 @@
   </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 6</a> <em>(July 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 6</a> <em>(July 2011)</em>
+  </p>
 
-   <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>This release of the NDK includes support for the x86 ABI and other minor changes.
       For detailed information describing the changes in this release, read the
       <code>CHANGES.HTML</code> document included in the NDK package.
@@ -928,12 +1207,13 @@
     </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 5c</a> <em>(June 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 5c</a> <em>(June 2011)</em>
+  </p>
 
-  <div class="toggleme">
+  <div class="toggle-content-toggleme">
     <p>This release of the NDK does not include any new features compared to r5b. The r5c release
     addresses the following problems in the r5b release:</p>
     <dl>
@@ -1011,14 +1291,13 @@
   </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 5b</a> <em>(January 2011)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 5b</a> <em>(January 2011)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>This release of the NDK does not include any new features compared to r5. The r5b release addresses the
       following problems in the r5 release:
       </p>
@@ -1063,14 +1342,13 @@
   </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 5</a> <em>(December 2010)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 5</a> <em>(December 2010)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>This release of the NDK includes many new APIs, most of which are introduced to
          support the development of games and similar applications that make extensive use
          of native code. Using the APIs, developers have direct native access to events, audio,
@@ -1142,14 +1420,13 @@
     </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 4b</a> <em>(June 2010)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 4b</a> <em>(June 2010)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <dl>
         <dt>NDK r4b notes:</dt>
 
@@ -1216,14 +1493,13 @@
     </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 3</a> <em>(March 2010)</em>
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 3</a> <em>(March 2010)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <dl>
         <dt>General notes:</dt>
 
@@ -1244,14 +1520,13 @@
     </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="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 2</a> <em>(September 2009)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>Originally released as "Android 1.6 NDK, Release 1".</p>
 
       <dl>
@@ -1270,14 +1545,13 @@
     </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="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+      alt="">Android NDK, Revision 1</a> <em>(June 2009)</em>
+  </p>
 
-    <div class="toggleme">
+  <div class="toggle-content-toggleme">
       <p>Originally released as "Android 1.5 NDK, Release 1".</p>
 
       <dl>
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index f8b5d25..c5388d0 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -28,6 +28,89 @@
 <div class="toggle-content opened">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 21</a> <em>(November 2012)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <dl>
+    <dt>Dependencies:</dt>
+    <dd>
+      <ul>
+        <li>Android SDK Platform-tools revision 15 or later.</li>
+        <li>If you are developing in Eclipse with ADT, note that the SDK Tools r21 is designed
+        for use with ADT 21.0.0 and later. If you haven't already, update your
+        <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 21.0.0.</li>
+        <li>If you are developing outside Eclipse, you must have
+          <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+    </ul>
+    </dd>
+    <dt>General Notes:</dt>
+    <dd>
+      <ul>
+        <li>Build System
+          <ul>
+            <li>Added a flag that sets <em>jumbo mode</em> for DEX files, which allows a larger
+              number of strings in the DEX files. Enable this mode by adding the following line to
+              the {@code project.properties} file of your project:
+              <pre>set dex.force.jumbo=true</pre></li>
+            <li>Improved the build time by pre-dexing libraries (both JAR files and library
+              projects).</li>
+            <li>Updated the build to generate {@code R} resource classes for library projects
+              with only the IDs needed by the libraries, reducing the risk of hitting DEX file
+              limits for fields and methods.</li>
+            <li>Improved the build so that several editing features (code completion, resource
+              chooser, go to declaration) properly handle library project resources.</li>
+          </ul>
+        </li>
+        <li>Lint
+          <ul>
+            <li>Added over 25 new lint rules for resources, locale settings, layout
+              files, incorrect use of {@link android.util.SparseArray} and
+              {@link android.os.PowerManager.WakeLock} and manifest issues.</li>
+            <li>Updated reporting to include errors in library projects if the library project is
+              in the list of projects to be checked.</li>
+            <li>Added a new {@code lint} target to the Ant build system for easier
+              integration with continuous build systems.</li>
+            <li>Added new {@code --sources} and {@code --classpath} arguments to point to sources
+              with different directory structures.</li>
+            <li>Improved the XML export function to support the <a
+              href="https://wiki.jenkins-ci.org/display/JENKINS/Android+Lint+Plugin">Jenkins Lint
+              plugin</a>.
+            </li>
+            <li>Added support for class file flow analysis.</li>
+          </ul>
+        </li>
+        <li>Android Virtual Devices (AVD)
+          <ul>
+            <li>Added new <strong>Device Definitions</strong> tab in the AVD Manager for configuring
+              standard size and Nexus virtual devices.</li>
+            <li>Improved emulators so that they launch with a skin that is dynamically generated and
+              reflects the actual hardware configured in the AVD Manager.</li>
+          </ul>
+        </li>
+        <li>Added {@code jobb} tool for creating and encrypting
+          <a href="{@docRoot}guide/google/play/expansion-files.html">APK Expansion Files</a>.
+          (<a href="{@docRoot}tools/help/jobb.html">more info</a>)
+        <li>Improved the Android JUnit test runner to allow a test to be run on all connected
+          devices simultaneously.</li>
+      </ul>
+    </dd>
+
+    <dt>Bug fixes:</dt>
+    <dd>
+      <ul>
+        <li>Fixed manifest merger to properly adapt library classes in the merged manifest.</li>
+      </ul>
+    </dd>
+
+    </dl>
+  </div>
+</div>
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
       alt=""/>SDK Tools, Revision 20.0.3</a> <em>(August 2012)</em>
   </p>
 
@@ -128,12 +211,12 @@
             <li>Added automatic merging of library project manifest files into the including
 project's manifest. Enable this feature with the {@code manifestmerger.enabled} property.</li>
             <li>Added automatic ProGuard support for the {@code aapt -G} flag. This change causes
-the build system to generate a temporary ProGuard keep-rules file containing classes that
-are referenced from XML files (such as custom views) and pass this to ProGuard at shrink-time. This
+the build system to generate a temporary ProGuard {@code keep-rules} file containing classes that
+are referenced from XML files (such as custom views) and pass this to ProGuard at shrink time. This
 can make the resulting APK much smaller when using just a small portion of a large library project
 (such as the Android Support library), since the catch-all rules to keep all custom views from the
 default ProGuard configuration file have also been removed.</li>
-            <li>Added two ProGuard configuration files for use in projects: {@code 
+            <li>Added two ProGuard configuration files for use in projects: {@code
 proguard-android-optimize.txt} which enables optimizations and {@code proguard-android.txt} which
 disables them.</li>
           </ul>
@@ -141,9 +224,8 @@
         <li>SDK Manager
           <ul>
             <li>Improved caching to reduce downloading of repository definitions.</li>
-            <li>Added <strong>Tools > Manage Add-on Sites</strong> option to allow deactivation of
-      third-party sites for improved performance (e.g., if one or more sites are temporarily slow to
-      load.)</li>
+            <li>Added <strong>Tools > Manage Add-on Sites</strong> option to improve performance by
+            allowing temporary deactivation of third-party sites if they are loading slowly.</li>
             <li>Added settings for the SDK Manager download cache (<strong>SDK Manager > Tools >
 Options</strong>).</li>
           </ul>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index cca9433..56bbd5a 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -10,22 +10,22 @@
     <div class="nav-section-header"><a href="<?cs var:toroot
 ?>sdk/index.html"><span class="en">Download</span></a></div>
     <ul>
+	    <li><a href="<?cs var:toroot ?>sdk/installing/bundle.html">
+	        <span class="en">Setting Up the ADT Bundle</span></a></li>
       <li class="nav-section">
         <div class="nav-section-header">
-          <a href="<?cs var:toroot ?>sdk/installing/index.html"><span class="en">Installing
-    the SDK</span></a></div>
+          <a href="<?cs var:toroot ?>sdk/installing/index.html"><span class="en">Setting Up
+    an Existing IDE</span></a></div>
         <ul>
-          <li><a href="<?cs var:toroot ?>sdk/installing/adding-packages.html">
-              <span class="en">Adding Platforms and Packages</span></a></li>
           <li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">
               <span class="en">Installing the Eclipse Plugin</span></a></li>
-          <li><a href="<?cs var:toroot ?>sdk/installing/next.html">
-              <span class="en">Next Steps</span></a></li>
+		    <li><a href="<?cs var:toroot ?>sdk/installing/adding-packages.html">
+		        <span class="en">Adding Platforms and Packages</span></a></li>
         </ul>
       </li>
-          <li><a href="<?cs var:toroot ?>sdk/exploring.html">
-              <span class="en">Exploring the SDK</span></a></li>
-      <li><a href="<?cs var:toroot ?>tools/sdk/ndk/index.html">NDK</a>
+	    <li><a href="<?cs var:toroot ?>sdk/exploring.html">
+	        <span class="en">Exploring the SDK</span></a></li>
+      <li><a href="<?cs var:toroot ?>tools/sdk/ndk/index.html">Download the NDK</a>
       </li>
     </ul>
   </li>
@@ -135,6 +135,7 @@
       <li><a href="<?cs var:toroot ?>tools/help/adb.html">adb</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/adt.html">ADT</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/android.html">android</a></li>
+      <li><a href="<?cs var:toroot ?>tools/help/avd-manager.html">AVD Manager</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/bmgr.html">bmgr</a>
       <li><a href="<?cs var:toroot ?>tools/help/monitor.html">Device Monitor</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/dmtracedump.html">dmtracedump</a></li>
@@ -143,6 +144,7 @@
       <li><a href="<?cs var:toroot ?>tools/help/etc1tool.html">etc1tool</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/hierarchy-viewer.html">Hierarchy Viewer</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/hprof-conv.html">hprof-conv</a></li>
+      <li><a href="<?cs var:toroot ?>tools/help/jobb.html">jobb</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/lint.html">lint</span></a></li>
       <li><a href="<?cs var:toroot ?>tools/help/logcat.html">logcat</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/mksdcard.html">mksdcard</a></li>
@@ -160,6 +162,7 @@
         </ul>
       </li>
        <li><a href="<?cs var:toroot ?>tools/help/proguard.html">ProGuard</a></li>
+       <li><a href="<?cs var:toroot ?>tools/help/sdk-manager.html">SDK Manager</a></li>
        <li><a href="<?cs var:toroot ?>tools/help/systrace.html">Systrace</a></li>
        <li><a href="<?cs var:toroot ?>tools/help/gltracer.html">Tracer for OpenGL ES</a></li>
        <li><a href="<?cs var:toroot ?>tools/help/traceview.html">Traceview</a></li>
diff --git a/docs/html/training/best-performance.jd b/docs/html/training/best-performance.jd
new file mode 100644
index 0000000..8ea6fd5
--- /dev/null
+++ b/docs/html/training/best-performance.jd
@@ -0,0 +1,8 @@
+page.title=Best Practices for Performance
+page.trainingcourse=true
+
+@jd:body
+
+
+<p>These classes and articles help you build an app that's smooth, responsive,
+and uses as little battery as possible.</p>
\ No newline at end of file
diff --git a/docs/html/training/best-security.jd b/docs/html/training/best-security.jd
new file mode 100644
index 0000000..ddd0cf6
--- /dev/null
+++ b/docs/html/training/best-security.jd
@@ -0,0 +1,9 @@
+page.title=Best Practices for Security &amp; Privacy
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes and articles provide information about how to
+keep your app's data secure.</p>
\ No newline at end of file
diff --git a/docs/html/training/best-ux.jd b/docs/html/training/best-ux.jd
new file mode 100644
index 0000000..5f109f6
--- /dev/null
+++ b/docs/html/training/best-ux.jd
@@ -0,0 +1,12 @@
+page.title=Best Practices for User Experience &amp; UI
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes focus on the best Android user experience for your app.
+In some cases, the success of your app on Android is heavily
+affected by whether your app conforms to the user's expectations for
+UI and navigation on an Android device. Follow these recommendations to ensure that
+your app looks and behaves in a way that satisfies Android users.</p>
\ No newline at end of file
diff --git a/docs/html/training/building-connectivity.jd b/docs/html/training/building-connectivity.jd
new file mode 100644
index 0000000..8b145ad
--- /dev/null
+++ b/docs/html/training/building-connectivity.jd
@@ -0,0 +1,10 @@
+page.title=Building Apps with Connectivity &amp; the Cloud
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes teach you how to connect your app to the world beyond the user's device.
+You'll learn how to connect to other devices in the area, connect to the Internet, backup and
+sync your app's data, and more.</p>
\ No newline at end of file
diff --git a/docs/html/training/building-graphics.jd b/docs/html/training/building-graphics.jd
new file mode 100644
index 0000000..ee79a5b
--- /dev/null
+++ b/docs/html/training/building-graphics.jd
@@ -0,0 +1,11 @@
+page.title=Building Apps with Graphics &amp; Animation
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes teach you how to accomplish tasks with graphics
+that can give your app an edge on the competition.
+If you want to go beyond the basic user interface to create a beautiful visual experience,
+these classes will help you get there.</p>
\ No newline at end of file
diff --git a/docs/html/training/building-multimedia.jd b/docs/html/training/building-multimedia.jd
new file mode 100644
index 0000000..95e7811
--- /dev/null
+++ b/docs/html/training/building-multimedia.jd
@@ -0,0 +1,9 @@
+page.title=Building Apps with Multimedia
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes teach you how to
+create rich multimedia apps that behave the way users expect.</p>
\ No newline at end of file
diff --git a/docs/html/training/building-userinfo.jd b/docs/html/training/building-userinfo.jd
new file mode 100644
index 0000000..f9d77f7
--- /dev/null
+++ b/docs/html/training/building-userinfo.jd
@@ -0,0 +1,9 @@
+page.title=Building Apps with User Info &amp; Location
+page.trainingcourse=true
+
+@jd:body
+
+
+<p>These classes teach you how to add user personalization to your app. Some of the ways
+you can do this is by identifying users, providing
+information that's relevant to them, and providing information about the world around them.</p>
\ No newline at end of file
diff --git a/docs/html/training/distribute.jd b/docs/html/training/distribute.jd
new file mode 100644
index 0000000..4b21020
--- /dev/null
+++ b/docs/html/training/distribute.jd
@@ -0,0 +1,9 @@
+page.title=Using Google Play to Distribute &amp; Monetize
+page.trainingcourse=true
+
+@jd:body
+
+
+
+<p>These classes focus on the business aspects of your app strategy, including techniques
+for distributing your app on Google Play and techniques for building revenue.</p>
\ No newline at end of file
diff --git a/docs/html/training/index.jd b/docs/html/training/index.jd
index 3c67af9..85fa19d 100644
--- a/docs/html/training/index.jd
+++ b/docs/html/training/index.jd
@@ -1,14 +1,14 @@
-page.title=Android Training
+page.title=Getting Started
+page.trainingcourse=true
 page.metaDescription=Android Training provides a collection of classes that aim to help you build great apps for Android. Each class explains the steps required to solve a problem or implement a feature using code snippets and sample code for you to use in your apps.
 
 @jd:body
 
-<p>Welcome to Android Training. Here you'll find a collection of classes that aim to help you
-build great apps for Android, using best practices in a variety of framework topics.</p>
 
-<p>Each class explains the steps required to solve a problem or implement a feature using code
-snippets and sample code for you to use in your apps.</p>
+<p>Welcome to Training. Each class provides a series of lessons that
+describe how to accomplish a specific task with code samples you can re-use in your app.
+Classes are organized into several groups you can see at the top-level of the left navigation.</p>
 
-<p>This first section is focused on teaching you the bare essentials. If you're a new developer
-on Android, you should walk through each of these classes, beginning with 
-<a href="{@docRoot}training/basics/firstapp/index.html">Building Your First App</a>.</p></a>
+<p>This first group, <em>Getting Started</em>, teaches you the bare
+essentials for Android app development.
+If you're a new Android app developer, you should complete each of these classes in order:</p>
\ No newline at end of file
diff --git a/docs/html/training/perf-anr.jd b/docs/html/training/perf-anr.jd
new file mode 100644
index 0000000..864fb34
--- /dev/null
+++ b/docs/html/training/perf-anr.jd
@@ -0,0 +1,196 @@
+page.title=Keeping Your App Responsive
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>In this document</h2>
+<ol>
+  <li><a href="#anr">What Triggers ANR?</a></li>
+  <li><a href="#Avoiding">How to Avoid ANRs</a></li>
+  <li><a href="#Reinforcing">Reinforcing Responsiveness</a></li>
+</ol>
+
+</div>
+</div>
+
+<div class="figure" style="width:280px">
+<img src="{@docRoot}images/anr.png" alt=""/>
+<p class="img-caption"><strong>Figure 1.</strong> An ANR dialog displayed to the user.</p>
+</div>
+
+<p>It's possible to write code that wins every performance test in the world,
+but still feels sluggish, hang or freeze for significant periods, or take too
+long to process input. The worst thing that can happen to your app's responsiveness
+is an "Application Not Responding" (ANR) dialog.</p>
+
+<p>In Android, the system guards against applications that are insufficiently
+responsive for a period of time by displaying a dialog that says your app has
+stopped responding, such as the dialog
+in Figure 1. At this point, your app has been unresponsive for a considerable
+period of time so the system offers the user an option to quit the app. It's critical
+to design responsiveness into your application so the system never displays
+an ANR dialog to the user. </p>
+
+<p>This document describes how the Android system determines whether an
+application is not responding and provides guidelines for ensuring that your
+application stays responsive. </p>
+
+
+<h2 id="anr">What Triggers ANR?</h2>
+
+<p>Generally, the system displays an ANR if an application cannot respond to
+user input. For example, if an  application blocks on some I/O operation
+(frequently a network access) on the UI thread so the system can't
+process incoming user input events. Or perhaps the app
+spends too much time building an elaborate in-memory
+structure or computing the next move in a game on the UI thread. It's always important to make
+sure these computations are efficient, but even the
+most efficient code still takes time to run.</p>
+
+<p>In any situation in which your app performs a potentially lengthy operation,
+<strong>you should not perform the work on the UI thread</strong>, but instead create a
+worker thread and do most of the work there. This keeps the UI thread (which drives the user
+interface event loop) running and prevents the system from concluding that your code
+has frozen. Because such threading usually is accomplished at the class
+level, you can think of responsiveness as a <em>class</em> problem. (Compare
+this with basic code performance, which is a <em>method</em>-level
+concern.)</p>
+
+<p>In Android, application responsiveness is monitored by the Activity Manager
+and Window Manager system services. Android will display the ANR dialog
+for a particular application when it detects one of the following
+conditions:</p>
+<ul>  
+    <li>No response to an input event (such as key press or screen touch events) 
+    within 5 seconds.</li>
+    <li>A {@link android.content.BroadcastReceiver BroadcastReceiver} 
+    hasn't finished executing within 10 seconds.</li>
+</ul>
+
+
+
+<h2 id="Avoiding">How to Avoid ANRs</h2>
+
+<p>Android applications normally run entirely on a single thread by default
+the "UI thread" or "main thread").
+This means anything your application is doing in the UI thread that
+takes a long time to complete can trigger the ANR dialog because your
+application is not giving itself a chance to handle the input event or intent
+broadcasts.</p>
+
+<p>Therefore, any method that runs in the UI thread should do as little work
+as possible on that thread. In particular, activities should do as little as possible to set
+up in key life-cycle methods such as {@link android.app.Activity#onCreate onCreate()}
+and {@link android.app.Activity#onResume onResume()}.
+Potentially long running operations such as network
+or database operations, or computationally expensive calculations such as
+resizing bitmaps should be done in a worker thread (or in the case of databases
+operations, via an asynchronous request).</p>
+
+<p>The most effecive way to create a worker thread for longer
+operations is with the {@link android.os.AsyncTask}
+class. Simply extend {@link android.os.AsyncTask} and implement the
+{@link android.os.AsyncTask#doInBackground doInBackground()} method to perform the work.
+To post progress changes to the user, you can call
+ {@link android.os.AsyncTask#publishProgress publishProgress()}, which invokes the
+ {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} callback method. From your
+ implementation of {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} (which
+ runs on the UI thread), you can notify the user. For example:</p>
+ 
+<pre>
+private class DownloadFilesTask extends AsyncTask&lt;URL, Integer, Long> {
+    // Do the long-running work in here
+    protected Long doInBackground(URL... urls) {
+        int count = urls.length;
+        long totalSize = 0;
+        for (int i = 0; i &lt; count; i++) {
+            totalSize += Downloader.downloadFile(urls[i]);
+            publishProgress((int) ((i / (float) count) * 100));
+            // Escape early if cancel() is called
+            if (isCancelled()) break;
+        }
+        return totalSize;
+    }
+
+    // This is called each time you call publishProgress()
+    protected void onProgressUpdate(Integer... progress) {
+        setProgressPercent(progress[0]);
+    }
+
+    // This is called when doInBackground() is finished
+    protected void onPostExecute(Long result) {
+        showNotification("Downloaded " + result + " bytes");
+    }
+}
+</pre>
+ 
+ <p>To execute this worker thread, simply create an instance and
+ call {@link android.os.AsyncTask#execute execute()}:</p>
+ 
+<pre>
+new DownloadFilesTask().execute(url1, url2, url3);
+</pre>
+ 
+
+<p>Although it's more complicated than {@link android.os.AsyncTask}, you might want to instead
+create your own {@link java.lang.Thread} or {@link android.os.HandlerThread} class. If you do,
+you should set the thread priority to "background" priority by calling {@link
+android.os.Process#setThreadPriority Process.setThreadPriority()} and passing {@link
+android.os.Process#THREAD_PRIORITY_BACKGROUND}. If you don't set the thread to a lower priority
+this way, then the thread could still slow down your app because it operates at the same priority
+as the UI thread by default.</p>
+ 
+<p>If you implement {@link java.lang.Thread} or {@link android.os.HandlerThread},
+be sure that your UI thread does not block while waiting for the worker thread to
+complete&mdash;do not call {@link java.lang.Thread#wait Thread.wait()} or
+{@link java.lang.Thread#sleep Thread.sleep()}. Instead of blocking while waiting for a worker
+thread to complete, your main thread should provide a {@link
+android.os.Handler} for the other threads to post back to upon completion.
+Designing your application in this way will allow your app's UI thread to remain
+responsive to input and thus avoid ANR dialogs caused by the 5 second input
+event timeout.</p>
+
+<p>The specific constraint on {@link android.content.BroadcastReceiver} execution time
+emphasizes what broadcast receivers are meant to do:
+small, discrete amounts of work in the background such
+as saving a setting or registering a {@link android.app.Notification}. So as with other methods
+called in the UI thread, applications should avoid potentially long-running
+operations or calculations in a broadcast receiver. But instead of doing intensive
+tasks via worker threads, your
+application should start an {@link android.app.IntentService} if a
+potentially long running action needs to be taken in response to an intent
+broadcast.</p>
+
+<p class="note"><strong>Tip:</strong>
+You can use {@link android.os.StrictMode} to help find potentially
+long running operations such as network or database operations that
+you might accidentally be doing your main thread.</p>
+
+
+
+<h2 id="Reinforcing">Reinforce Responsiveness</h2>
+
+<p>Generally, 100 to 200ms is the threshold beyond which users will perceive
+slowness in an application. As such, here
+are some additional tips beyond what you should do to avoid ANR and
+make your application seem responsive to users:</p>
+
+<ul>
+    <li>If your application is doing work in the background in response to
+    user input, show that progress is being made (such as with a {@link
+    android.widget.ProgressBar} in your UI).</li>
+    
+    <li>For games specifically, do calculations for moves in a worker
+    thread.</li>
+    
+    <li>If your application has a time-consuming initial setup phase, consider
+    showing a splash screen or rendering the main view as quickly as possible, indicate that
+    loading is in progress and fill the information asynchronously. In either case, you should
+    indicate somehow that progress is being made, lest the user perceive that
+    the application is frozen.</li>
+    
+    <li>Use performance tools such as <a href="{@docRoot}tools/help/systrace.html">Systrace</a>
+    and <a href="{@docRoot}tools/help/traceview.html">Traceview</a> to determine bottlenecks
+    in your app's responsiveness.</li>
+</ul>
diff --git a/docs/html/guide/practices/jni.jd b/docs/html/training/perf-jni.jd
similarity index 99%
rename from docs/html/guide/practices/jni.jd
rename to docs/html/training/perf-jni.jd
index ddfa0e3..26b06b4 100644
--- a/docs/html/guide/practices/jni.jd
+++ b/docs/html/training/perf-jni.jd
@@ -1,8 +1,8 @@
 page.title=JNI Tips
 @jd:body
 
-<div id="qv-wrapper">
-<div id="qv">
+<div id="tb-wrapper">
+<div id="tb">
 
 <h2>In this document</h2>
 <ol>
diff --git a/docs/html/training/perf-tips.jd b/docs/html/training/perf-tips.jd
new file mode 100644
index 0000000..33b4b87
--- /dev/null
+++ b/docs/html/training/perf-tips.jd
@@ -0,0 +1,433 @@
+page.title=Performance Tips
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>In this document</h2>
+<ol>
+  <li><a href="#ObjectCreation">Avoid Creating Unnecessary Objects</a></li>
+  <li><a href="#PreferStatic">Prefer Static Over Virtual</a></li>
+  <li><a href="#UseFinal">Use Static Final For Constants</a></li>
+  <li><a href="#GettersSetters">Avoid Internal Getters/Setters</a></li>
+  <li><a href="#Loops">Use Enhanced For Loop Syntax</a></li>
+  <li><a href="#PackageInner">Consider Package Instead of Private Access with Private Inner Classes</a></li>
+  <li><a href="#AvoidFloat">Avoid Using Floating-Point</a></li>
+  <li><a href="#UseLibraries">Know and Use the Libraries</a></li>
+  <li><a href="#NativeMethods">Use Native Methods Carefully</a></li>
+  <li><a href="#library">Know And Use The Libraries</a></li>
+  <li><a href="#native_methods">Use Native Methods Judiciously</a></li>
+  <li><a href="#closing_notes">Closing Notes</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>This document primarily covers micro-optimizations that can improve overall app performance
+when combined, but it's unlikely that these changes will result in dramatic
+performance effects. Choosing the right algorithms and data structures should always be your
+priority, but is outside the scope of this document. You should use the tips in this document
+as general coding practices that you can incorporate into your habits for general code
+efficiency.</p>
+
+<p>There are two basic rules for writing efficient code:</p>
+<ul>
+    <li>Don't do work that you don't need to do.</li>
+    <li>Don't allocate memory if you can avoid it.</li>
+</ul>
+
+<p>One of the trickiest problems you'll face when micro-optimizing an Android
+app is that your app is certain to be running on multiple types of
+hardware. Different versions of the VM running on different
+processors running at different speeds. It's not even generally the case
+that you can simply say "device X is a factor F faster/slower than device Y",
+and scale your results from one device to others. In particular, measurement
+on the emulator tells you very little about performance on any device. There
+are also huge differences between devices with and without a 
+<acronym title="Just In Time compiler">JIT</acronym>: the best
+code for a device with a JIT is not always the best code for a device
+without.</p>
+
+<p>To ensure your app performs well across a wide variety of devices, ensure
+your code is efficient at all levels and agressively optimize your performance.</p>
+
+
+<h2 id="ObjectCreation">Avoid Creating Unnecessary Objects</h2>
+
+<p>Object creation is never free. A generational garbage collector with per-thread allocation
+pools for temporary objects can make allocation cheaper, but allocating memory
+is always more expensive than not allocating memory.</p>
+
+<p>As you allocate more objects in your app, you will force a periodic
+garbage collection, creating little "hiccups" in the user experience. The
+concurrent garbage collector introduced in Android 2.3 helps, but unnecessary work
+should always be avoided.</p>
+
+<p>Thus, you should avoid creating object instances you don't need to.  Some
+examples of things that can help:</p>
+
+<ul>
+    <li>If you have a method returning a string, and you know that its result
+    will always be appended to a {@link java.lang.StringBuffer} anyway, change your signature
+    and implementation so that the function does the append directly,
+    instead of creating a short-lived temporary object.</li>
+    <li>When extracting strings from a set of input data, try
+    to return a substring of the original data, instead of creating a copy.
+    You will create a new {@link java.lang.String} object, but it will share the {@code char[]}
+    with the data. (The trade-off being that if you're only using a small
+    part of the original input, you'll be keeping it all around in memory
+    anyway if you go this route.)</li>
+</ul>
+
+<p>A somewhat more radical idea is to slice up multidimensional arrays into
+parallel single one-dimension arrays:</p>
+
+<ul>
+    <li>An array of {@code int}s is a much better than an array of {@link java.lang.Integer}
+    objects,
+    but this also generalizes to the fact that two parallel arrays of ints
+    are also a <strong>lot</strong> more efficient than an array of {@code (int,int)}
+    objects.  The same goes for any combination of primitive types.</li>
+    
+    <li>If you need to implement a container that stores tuples of {@code (Foo,Bar)}
+    objects, try to remember that two parallel {@code Foo[]} and {@code Bar[]} arrays are
+    generally much better than a single array of custom {@code (Foo,Bar)} objects.
+    (The exception to this, of course, is when you're designing an API for
+    other code to access. In those cases, it's usually better to make a small
+    compromise to the speed in order to achieve a good API design. But in your own internal
+    code, you should try and be as efficient as possible.)</li>
+</ul>
+
+<p>Generally speaking, avoid creating short-term temporary objects if you
+can.  Fewer objects created mean less-frequent garbage collection, which has
+a direct impact on user experience.</p>
+
+
+
+
+<h2 id="PreferStatic">Prefer Static Over Virtual</h2>
+
+<p>If you don't need to access an object's fields, make your method static.
+Invocations will be about 15%-20% faster.
+It's also good practice, because you can tell from the method
+signature that calling the method can't alter the object's state.</p>
+
+
+
+
+
+<h2 id="UseFinal">Use Static Final For Constants</h2>
+
+<p>Consider the following declaration at the top of a class:</p>
+
+<pre>
+static int intVal = 42;
+static String strVal = "Hello, world!";
+</pre>
+
+<p>The compiler generates a class initializer method, called
+<code>&lt;clinit&gt;</code>, that is executed when the class is first used.
+The method stores the value 42 into <code>intVal</code>, and extracts a
+reference from the classfile string constant table for <code>strVal</code>.
+When these values are referenced later on, they are accessed with field
+lookups.</p>
+
+<p>We can improve matters with the "final" keyword:</p>
+
+<pre>
+static final int intVal = 42;
+static final String strVal = "Hello, world!";
+</pre>
+
+<p>The class no longer requires a <code>&lt;clinit&gt;</code> method,
+because the constants go into static field initializers in the dex file.
+Code that refers to <code>intVal</code> will use
+the integer value 42 directly, and accesses to <code>strVal</code> will
+use a relatively inexpensive "string constant" instruction instead of a
+field lookup.</p>
+
+<p class="note"><strong>Note:</strong> This optimization applies only to primitive types and
+{@link java.lang.String} constants, not arbitrary reference types. Still, it's good
+practice to declare constants <code>static final</code> whenever possible.</p>
+
+
+
+
+
+<h2 id="GettersSetters">Avoid Internal Getters/Setters</h2>
+
+<p>In native languages like C++ it's common practice to use getters
+(<code>i = getCount()</code>) instead of accessing the field directly (<code>i
+= mCount</code>). This is an excellent habit for C++ and is often practiced in other
+object oriented languages like C# and Java, because the compiler can
+usually inline the access, and if you need to restrict or debug field access
+you can add the code at any time.</p>
+
+<p>However, this is a bad idea on Android.  Virtual method calls are expensive,
+much more so than instance field lookups.  It's reasonable to follow
+common object-oriented programming practices and have getters and setters
+in the public interface, but within a class you should always access
+fields directly.</p>
+
+<p>Without a <acronym title="Just In Time compiler">JIT</acronym>,
+direct field access is about 3x faster than invoking a
+trivial getter. With the JIT (where direct field access is as cheap as
+accessing a local), direct field access is about 7x faster than invoking a
+trivial getter.</p>
+
+<p>Note that if you're using <a href="{@docRoot}tools/help/proguard.html">ProGuard</a>,
+you can have the best of both worlds because ProGuard can inline accessors for you.</p>
+
+
+
+
+
+<h2 id="Loops">Use Enhanced For Loop Syntax</h2>
+
+<p>The enhanced <code>for</code> loop (also sometimes known as "for-each" loop) can be used
+for collections that implement the {@link java.lang.Iterable} interface and for arrays.
+With collections, an iterator is allocated to make interface calls
+to {@code hasNext()} and {@code next()}. With an {@link java.util.ArrayList},
+a hand-written counted loop is
+about 3x faster (with or without JIT), but for other collections the enhanced
+for loop syntax will be exactly equivalent to explicit iterator usage.</p>
+
+<p>There are several alternatives for iterating through an array:</p>
+
+<pre>
+static class Foo {
+    int mSplat;
+}
+
+Foo[] mArray = ...
+
+public void zero() {
+    int sum = 0;
+    for (int i = 0; i &lt; mArray.length; ++i) {
+        sum += mArray[i].mSplat;
+    }
+}
+
+public void one() {
+    int sum = 0;
+    Foo[] localArray = mArray;
+    int len = localArray.length;
+
+    for (int i = 0; i &lt; len; ++i) {
+        sum += localArray[i].mSplat;
+    }
+}
+
+public void two() {
+    int sum = 0;
+    for (Foo a : mArray) {
+        sum += a.mSplat;
+    }
+}
+</pre>
+
+<p><code>zero()</code> is slowest, because the JIT can't yet optimize away
+the cost of getting the array length once for every iteration through the
+loop.</p>
+
+<p><code>one()</code> is faster. It pulls everything out into local
+variables, avoiding the lookups. Only the array length offers a performance
+benefit.</p>
+
+<p><code>two()</code> is fastest for devices without a JIT, and
+indistinguishable from <strong>one()</strong> for devices with a JIT.
+It uses the enhanced for loop syntax introduced in version 1.5 of the Java
+programming language.</p>
+
+<p>So, you should use the enhanced <code>for</code> loop by default, but consider a
+hand-written counted loop for performance-critical {@link java.util.ArrayList} iteration.</p>
+
+<p class="note"><strong>Tip:</strong>
+Also see Josh Bloch's <em>Effective Java</em>, item 46.</p>
+
+
+
+<h2 id="PackageInner">Consider Package Instead of Private Access with Private Inner Classes</h2>
+
+<p>Consider the following class definition:</p>
+
+<pre>
+public class Foo {
+    private class Inner {
+        void stuff() {
+            Foo.this.doStuff(Foo.this.mValue);
+        }
+    }
+
+    private int mValue;
+
+    public void run() {
+        Inner in = new Inner();
+        mValue = 27;
+        in.stuff();
+    }
+
+    private void doStuff(int value) {
+        System.out.println("Value is " + value);
+    }
+}</pre>
+
+<p>What's important here is that we define a private inner class
+(<code>Foo$Inner</code>) that directly accesses a private method and a private
+instance field in the outer class. This is legal, and the code prints "Value is
+27" as expected.</p>
+
+<p>The problem is that the VM considers direct access to <code>Foo</code>'s
+private members from <code>Foo$Inner</code> to be illegal because
+<code>Foo</code> and <code>Foo$Inner</code> are different classes, even though
+the Java language allows an inner class to access an outer class' private
+members. To bridge the gap, the compiler generates a couple of synthetic
+methods:</p>
+
+<pre>
+/*package*/ static int Foo.access$100(Foo foo) {
+    return foo.mValue;
+}
+/*package*/ static void Foo.access$200(Foo foo, int value) {
+    foo.doStuff(value);
+}</pre>
+
+<p>The inner class code calls these static methods whenever it needs to
+access the <code>mValue</code> field or invoke the <code>doStuff()</code> method
+in the outer class. What this means is that the code above really boils down to
+a case where you're accessing member fields through accessor methods.
+Earlier we talked about how accessors are slower than direct field
+accesses, so this is an example of a certain language idiom resulting in an
+"invisible" performance hit.</p>
+
+<p>If you're using code like this in a performance hotspot, you can avoid the
+overhead by declaring fields and methods accessed by inner classes to have
+package access, rather than private access. Unfortunately this means the fields
+can be accessed directly by other classes in the same package, so you shouldn't
+use this in public API.</p>
+
+
+
+
+<h2 id="AvoidFloat">Avoid Using Floating-Point</h2>
+
+<p>As a rule of thumb, floating-point is about 2x slower than integer on
+Android-powered devices.</p>
+
+<p>In speed terms, there's no difference between <code>float</code> and
+<code>double</code> on the more modern hardware. Space-wise, <code>double</code>
+is 2x larger. As with desktop machines, assuming space isn't an issue, you
+should prefer <code>double</code> to <code>float</code>.</p>
+
+<p>Also, even for integers, some processors have hardware multiply but lack
+hardware divide. In such cases, integer division and modulus operations are
+performed in software&mdash;something to think about if you're designing a
+hash table or doing lots of math.</p>
+
+
+
+
+<h2 id="UseLibraries">Know and Use the Libraries</h2>
+
+<p>In addition to all the usual reasons to prefer library code over rolling
+your own, bear in mind that the system is at liberty to replace calls
+to library methods with hand-coded assembler, which may be better than the
+best code the JIT can produce for the equivalent Java. The typical example
+here is {@link java.lang.String#indexOf String.indexOf()} and
+related APIs, which Dalvik replaces with
+an inlined intrinsic. Similarly, the {@link java.lang.System#arraycopy
+System.arraycopy()} method
+is about 9x faster than a hand-coded loop on a Nexus One with the JIT.</p>
+
+
+<p class="note"><strong>Tip:</strong>
+Also see Josh Bloch's <em>Effective Java</em>, item 47.</p>
+
+
+
+
+<h2 id="NativeMethods">Use Native Methods Carefully</h2>
+
+<p>Developing your app with native code using the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>
+isn't necessarily more efficient than programming with the
+Java language. For one thing,
+there's a cost associated with the Java-native transition, and the JIT can't
+optimize across these boundaries. If you're allocating native resources (memory
+on the native heap, file descriptors, or whatever), it can be significantly
+more difficult to arrange timely collection of these resources. You also
+need to compile your code for each architecture you wish to run on (rather
+than rely on it having a JIT). You may even have to compile multiple versions
+for what you consider the same architecture: native code compiled for the ARM
+processor in the G1 can't take full advantage of the ARM in the Nexus One, and
+code compiled for the ARM in the Nexus One won't run on the ARM in the G1.</p>
+
+<p>Native code is primarily useful when you have an existing native codebase
+that you want to port to Android, not for "speeding up" parts of your Android app
+written with the Java language.</p>
+
+<p>If you do need to use native code, you should read our
+<a href="{@docRoot}guide/practices/jni.html">JNI Tips</a>.</p>
+
+<p class="note"><strong>Tip:</strong>
+Also see Josh Bloch's <em>Effective Java</em>, item 54.</p>
+
+
+
+
+
+<h2 id="Myths">Performance Myths</h2>
+
+
+<p>On devices without a JIT, it is true that invoking methods via a
+variable with an exact type rather than an interface is slightly more
+efficient. (So, for example, it was cheaper to invoke methods on a
+<code>HashMap map</code> than a <code>Map map</code>, even though in both
+cases the map was a <code>HashMap</code>.) It was not the case that this
+was 2x slower; the actual difference was more like 6% slower. Furthermore,
+the JIT makes the two effectively indistinguishable.</p>
+
+<p>On devices without a JIT, caching field accesses is about 20% faster than
+repeatedly accesssing the field. With a JIT, field access costs about the same
+as local access, so this isn't a worthwhile optimization unless you feel it
+makes your code easier to read. (This is true of final, static, and static
+final fields too.)
+
+
+
+<h2 id="Measure">Always Measure</h2>
+
+<p>Before you start optimizing, make sure you have a problem that you
+need to solve. Make sure you can accurately measure your existing performance,
+or you won't be able to measure the benefit of the alternatives you try.</p>
+
+<p>Every claim made in this document is backed up by a benchmark. The source
+to these benchmarks can be found in the <a
+href="http://code.google.com/p/dalvik/source/browse/#svn/trunk/benchmarks">code.google.com
+"dalvik" project</a>.</p>
+
+<p>The benchmarks are built with the
+<a href="http://code.google.com/p/caliper/">Caliper</a> microbenchmarking
+framework for Java. Microbenchmarks are hard to get right, so Caliper goes out
+of its way to do the hard work for you, and even detect some cases where you're
+not measuring what you think you're measuring (because, say, the VM has
+managed to optimize all your code away). We highly recommend you use Caliper
+to run your own microbenchmarks.</p>
+
+<p>You may also find
+<a href="{@docRoot}tools/debugging/debugging-tracing.html">Traceview</a> useful
+for profiling, but it's important to realize that it currently disables the JIT,
+which may cause it to misattribute time to code that the JIT may be able to win
+back. It's especially important after making changes suggested by Traceview
+data to ensure that the resulting code actually runs faster when run without
+Traceview.</p>
+
+<p>For more help profiling and debugging your apps, see the following documents:</p>
+
+<ul>
+  <li><a href="{@docRoot}tools/debugging/debugging-tracing.html">Profiling with
+    Traceview and dmtracedump</a></li>
+  <li><a href="{@docRoot}tools/debugging/systrace.html">Analysing Display and Performance
+    with Systrace</a></li>
+</ul>
+
diff --git a/docs/html/training/security-tips.jd b/docs/html/training/security-tips.jd
new file mode 100644
index 0000000..88d6017
--- /dev/null
+++ b/docs/html/training/security-tips.jd
@@ -0,0 +1,759 @@
+page.title=Security Tips
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>In this document</h2>
+<ol>
+  <li><a href="#StoringData">Storing Data</a></li>
+  <li><a href="#Permissions">Using Permissions</a></li>
+  <li><a href="#Networking">Using Networking</a></li>
+  <li><a href="#InputValidation">Performing Input Validation</a></li>
+  <li><a href="#UserData">Handling User Data</a></li>
+  <li><a href="#WebView">Using WebView</a></li>
+  <li><a href="#Crypto">Using Cryptography</a></li>
+  <li><a href="#IPC">Using Interprocess Communication</a></li>
+  <li><a href="#DynamicCode">Dynamically Loading Code</a></li>
+  <li><a href="#Dalvik">Security in a Virtual Machine</a></li>
+  <li><a href="#Native">Security in Native Code</a></li>
+</ol>
+<h2>See also</h2>
+<ol>
+<li><a href="http://source.android.com/tech/security/index.html">Android
+Security Overview</a></li>
+<li><a href="{@docRoot}guide/topics/security/permissions.html">Permissions</a></li>
+</ol>
+</div></div>
+
+
+<p>Android has security features built
+into the operating system that significantly reduce the frequency and impact of
+application security issues. The system is designed so you can typically build your apps with
+default system and file permissions and avoid difficult decisions about security.</p>
+
+<p>Some of the core security features that help you build secure apps
+include:
+<ul>
+<li>The Android Application Sandbox, which isolates your app data and code execution
+from other apps.</li>
+<li>An application framework with robust implementations of common
+security functionality such as cryptography, permissions, and secure
+<acronym title="Interprocess Communication">IPC</acronym>.</li>
+<li>Technologies like ASLR, NX, ProPolice, safe_iop, OpenBSD dlmalloc, OpenBSD
+calloc, and Linux mmap_min_addr to mitigate risks associated with common memory
+management errors.</li>
+<li>An encrypted filesystem that can be enabled to protect data on lost or
+stolen devices.</li>
+<li>User-granted permissions to restrict access to system features and user data.</li>
+<li>Application-defined permissions to control application data on a per-app basis.</li>
+</ul>
+
+<p>Nevertheless, it is important that you be familiar with the Android
+security best practices in this document. Following these practices as general coding habits
+will reduce the likelihood of inadvertently introducing security issues that
+adversely affect your users.</p>
+
+
+
+<h2 id="StoringData">Storing Data</h2>
+
+<p>The most common security concern for an application on Android is whether the data
+that you save on the device is accessible to other apps. There are three fundamental
+ways to save data on the device:</p>
+
+<h3 id="InternalStorage">Using internal storage</h3>
+
+<p>By default, files that you create on <a
+href="{@docRoot}guide/topics/data/data-storage.html#filesInternal">internal
+storage</a> are accessible only to your app. This
+protection is implemented by Android and is sufficient for most
+applications.</p>
+
+<p>You should generally avoid using the {@link android.content.Context#MODE_WORLD_WRITEABLE} or
+{@link android.content.Context#MODE_WORLD_READABLE} modes for
+<acronym title="Interprocess Communication">IPC</acronym> files because they do not provide
+the ability to limit data access to particular applications, nor do they
+provide any control on data format. If you want to share your data with other
+app processes, you might instead consider using a
+<a href="{@docRoot}guide/topics/providers/content-providers.html">content provider</a>, which
+offers read and write permissions to other apps and can make
+dynamic permission grants on a case-by-case basis.</p>
+
+<p>To provide additional protection for sensitive data, you might
+choose to encrypt local files using a key that is not directly accessible to the
+application. For example, a key can be placed in a {@link java.security.KeyStore}
+and protected with a user password that is not stored on the device.  While this
+does not protect data from a root compromise that can monitor the user
+inputting the password,  it can provide protection for a lost device without <a
+href="http://source.android.com/tech/encryption/index.html">file system
+encryption</a>.</p>
+
+
+<h3 id="ExternalStorage">Using external storage</h3>
+
+<p>Files created on <a
+href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">external
+storage</a>, such as SD Cards, are globally readable and writable.  Because
+external storage can be removed by the user and also modified by any
+application,  you should not store sensitive information using
+external storage.</p>
+
+<p>As with data from any untrusted source, you should <a href="#InputValidation">perform input
+validation</a> when handling data from external storage.
+We strongly recommend that you not store executables or
+class files on external storage prior to dynamic loading.  If your app
+does retrieve executable files from external storage, the files should be signed and
+cryptographically verified prior to dynamic loading.</p>
+
+
+<h3 id="ContentProviders">Using content providers</h3>
+
+<p><a href="{@docRoot}guide/topics/providers/content-providers.html">Content providers</a>
+offer a structured storage mechanism that can be limited
+to your own application or exported to allow access by other applications.
+If you do not intend to provide other
+applications with access to your {@link android.content.ContentProvider}, mark them as <code><a
+href="{@docRoot}guide/topics/manifest/provider-element.html#exported">
+android:exported=false</a></code> in the application manifest. Otherwise, set the <code><a
+href="{@docRoot}guide/topics/manifest/provider-element.html#exported">android:exported</a></code>
+attribute {@code "true"} to allow other apps to access the stored data.
+</p>
+
+<p>When creating a {@link android.content.ContentProvider}
+that will be exported for use by other applications, you can specify a single
+<a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">permission
+</a> for reading and writing, or distinct permissions for reading and writing
+within the manifest. We recommend that you limit your permissions to those
+required to accomplish the task at hand. Keep in mind that it’s usually
+easier to add permissions later to expose new functionality than it is to take
+them away and break existing users.</p>
+
+<p>If you are using a content provider
+for sharing data between only your own apps, it is preferable to use the
+<a href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">{@code
+android:protectionLevel}</a> attribute set to {@code "signature"} protection.
+Signature permissions do not require user confirmation,
+so they provide a better user experience and more controlled access to the
+content provider data when the apps accessing the data are
+<a href="{@docRoot}tools/publishing/app-signing.html">signed</a> with
+the same key.</p>
+
+<p>Content providers can also provide more granular access by declaring the <a
+href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">{@code
+android:grantUriPermissions}</a> attribute and using the {@link
+android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION} and {@link
+android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION} flags in the
+{@link android.content.Intent} object
+that activates the component.  The scope of these permissions can be further
+limited by the <code><a
+href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
+&lt;grant-uri-permission element&gt;</a></code>.</p>
+
+<p>When accessing a content provider, use parameterized query methods such as 
+{@link android.content.ContentProvider#query(Uri,String[],String,String[],String) query()},
+{@link android.content.ContentProvider#update(Uri,ContentValues,String,String[]) update()}, and
+{@link android.content.ContentProvider#delete(Uri,String,String[]) delete()} to avoid
+potential SQL injection from untrusted sources. Note that using parameterized methods is not
+sufficient if the <code>selection</code> argument is built by concatenating user data
+prior to submitting it to the method.</p>
+
+<p>Do not have a false sense of security about the write permission.  Consider
+that the write permission allows SQL statements which make it possible for some
+data to be confirmed using creative <code>WHERE</code> clauses and parsing the
+results. For example, an attacker might probe for presence of a specific phone
+number in a call-log by modifying a row only if that phone number already
+exists. If the content provider data has predictable structure, the write
+permission may be equivalent to providing both reading and writing.</p>
+
+
+
+
+
+
+
+<h2 id="Permissions">Using Permissions</h2>
+
+<p>Because Android sandboxes applications from each other, applications must explicitly
+share resources and data. They do this by declaring the permissions they need for additional
+capabilities not provided by the basic sandbox, including access to device features such as
+the camera.</p>
+
+
+<h3 id="RequestingPermissions">Requesting Permissions</h3>
+
+<p>We recommend minimizing the number of permissions that your app requests
+Not having access to sensitive permissions reduces the risk of
+inadvertently misusing those permissions, can improve user adoption, and makes
+your app less for attackers. Generally,
+if a permission is not required for your app to function, do not request it.</p>
+
+<p>If it's possible to design your application in a way that does not require
+any permissions, that is preferable.  For example, rather than requesting access
+to device information to create a unique identifier, create a <a
+href="{@docRoot}reference/java/util/UUID.html">GUID</a> for your application
+(see the section about <a href="#UserData">Handling User Data</a>). Or, rather than
+using external storage (which requires permission), store data
+on the internal storage.</p>
+
+<p>In addition to requesting permissions, your application can use the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html">{@code &lt;permissions>}</a>
+to protect IPC that is security sensitive and will be exposed to other
+applications, such as a {@link android.content.ContentProvider}.
+In general, we recommend using access controls
+other than user confirmed permissions where possible because permissions can
+be confusing for users. For example, consider using the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">signature
+protection level</a> on permissions for IPC communication between applications
+provided by a single developer.</p>
+
+<p>Do not leak permission-protected data.  This occurs when your app exposes data
+over IPC that is only available because it has a specific permission, but does
+not require that permission of any clients of it’s IPC interface. More
+details on the potential impacts, and frequency of this type of problem is
+provided in this research paper published at USENIX: <a
+href="http://www.cs.berkeley.edu/~afelt/felt_usenixsec2011.pdf">http://www.cs.be
+rkeley.edu/~afelt/felt_usenixsec2011.pdf</a></p>
+
+
+
+<h3 id="CreatingPermissions">Creating Permissions</h3>
+
+<p>Generally, you should strive to define as few permissions as possible while
+satisfying your security requirements.  Creating a new permission is relatively
+uncommon for most applications, because the <a
+href="{@docRoot}reference/android/Manifest.permission.html">system-defined
+permissions</a> cover many situations.  Where appropriate,
+perform access checks using existing permissions.</p>
+
+<p>If you must create a new permission, consider whether you can accomplish
+your task with a <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">"signature"
+protection level</a>.  Signature permissions are transparent
+to the user and only allow access by applications signed by the same developer
+as application performing the permission check.</p>
+
+<p>If you create a permission with the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">"dangerous"
+protection level</a>, there are a number of complexities
+that you need to consider:
+<ul>
+<li>The permission must have a string that concisely expresses to a user the
+security decision they will be required to make.</li>
+<li>The permission string must be localized to many different languages.</li>
+<li>Users may choose not to install an application because a permission is
+confusing or perceived as risky.</li>
+<li>Applications may request the permission when the creator of the permission
+has not been installed.</li>
+</ul>
+
+<p>Each of these poses a significant non-technical challenge for you as the developer
+while also confusing your users,
+which is why we discourage the use of the "dangerous" permission level.</p>
+
+
+
+
+
+<h2 id="Networking">Using Networking</h2>
+
+<p>Network transactions are inherently risky for security, because it involves transmitting
+data that is potentially private to the user. People are increasingly aware of the privacy
+concerns of a mobile device, especially when the device performs network transactions,
+so it's very important that your app implement all best practices toward keeping the user's
+data secure at all times.</p>
+
+<h3 id="IPNetworking">Using IP Networking</h3>
+
+<p>Networking on Android is not significantly different from other Linux
+environments.  The key consideration is making sure that appropriate protocols
+are used for sensitive data, such as {@link javax.net.ssl.HttpsURLConnection} for
+secure web traffic.   We prefer use of HTTPS over HTTP anywhere that HTTPS is
+supported on the server, because mobile devices frequently connect on networks
+that are not secured, such as public Wi-Fi hotspots.</p>
+
+<p>Authenticated, encrypted socket-level communication can be easily
+implemented using the {@link javax.net.ssl.SSLSocket}
+class.  Given the frequency with which Android devices connect to unsecured
+wireless networks using Wi-Fi, the use of secure networking is strongly
+encouraged for all applications that communicate over the network.</p>
+
+<p>We have seen some applications use <a
+href="http://en.wikipedia.org/wiki/Localhost">localhost</a> network ports for
+handling sensitive IPC.  We discourage this approach since these interfaces are
+accessible by other applications on the device.  Instead, you should use an Android IPC
+mechanism where authentication is possible such as with a {@link android.app.Service}.  (Even
+worse than using loopback is to bind to INADDR_ANY since then your application
+may receive requests from anywhere.)</p>
+
+<p>Also, one common issue that warrants repeating is to make sure that you do
+not trust data downloaded from HTTP or other insecure protocols.  This includes
+validation of input in {@link android.webkit.WebView} and
+any responses to intents issued against HTTP.</p>
+
+
+<h3>Using Telephony Networking</h3>
+
+<p>The <acronym title="Short Message Service">SMS</acronym> protocol was primarily designed for
+user-to-user communication and is not well-suited for apps that want to transfer data.
+Due to the limitations of SMS, we strongly recommend the use of <a
+href="{@docRoot}guide/google/gcm/index.html">Google Cloud Messaging</a> (GCM)
+and IP networking for sending data messages from a web server to your app on a user device.</p>
+
+<p>Beware that SMS is neither encrypted nor strongly
+authenticated on either the network or the device.  In particular, any SMS receiver
+should expect that a malicious user may have sent the SMS to your application&mdash;Do
+not rely on unauthenticated SMS data to perform sensitive commands.
+Also, you should be aware that SMS may be subject to spoofing and/or
+interception on the network.  On the Android-powered device itself, SMS
+messages are transmitted as broadcast intents, so they may be read or captured
+by other applications that have the {@link android.Manifest.permission#READ_SMS}
+permission.</p>
+
+
+
+
+
+<h2 id="InputValidation">Performing Input Validation</h2>
+
+<p>Insufficient input validation is one of the most common security problems
+affecting applications, regardless of what platform they run on. Android does
+have platform-level countermeasures that reduce the exposure of applications to
+input validation issues and you should use those features where possible. Also
+note that selection of type-safe languages tends to reduce the likelihood of
+input validation issues.</p>
+
+<p>If you are using native code, then any data read from files, received over
+the network, or received from an IPC has the potential to introduce a security
+issue.  The most common problems are <a
+href="http://en.wikipedia.org/wiki/Buffer_overflow">buffer overflows</a>, <a
+href="http://en.wikipedia.org/wiki/Double_free#Use_after_free">use after
+free</a>, and <a
+href="http://en.wikipedia.org/wiki/Off-by-one_error">off-by-one errors</a>.
+Android provides a number of technologies like <acronym
+title="Address Space Layout Randomization">ASLR</acronym> and <acronym
+title="Data Execution Prevention">DEP</acronym> that reduce the
+exploitability of these errors, but they do not solve the underlying problem.
+You can prevent these vulneratbilities by careful handling pointers and managing
+buffers.</p>
+
+<p>Dynamic, string based languages such as JavaScript and SQL are also subject
+to input validation problems due to escape characters and <a
+href="http://en.wikipedia.org/wiki/Code_injection">script injection</a>.</p>
+
+<p>If you are using data within queries that are submitted to an SQL database or a
+content provider, SQL injection may be an issue.  The best defense is to use
+parameterized queries, as is discussed in the above section about <a
+href="#ContentProviders">content providers</a>.
+Limiting permissions to read-only or write-only can also reduce the potential
+for harm related to SQL injection.</p>
+
+<p>If you cannot use the security features above, we strongly recommend the use
+of well-structured data formats and verifying that the data conforms to the
+expected format. While blacklisting of characters or character-replacement can
+be an effective strategy, these techniques are error-prone in practice and
+should be avoided when possible.</p>
+
+
+
+
+
+<h2 id="UserData">Handling User Data</h2>
+
+<p>In general, the best approach for user data security is to minimize the use of APIs that access
+sensitive or personal user data. If you have access to user data and can avoid
+storing or transmitting the information, do not store or transmit the data.
+Finally, consider if there is a way that your application logic can be
+implemented using a hash or non-reversible form of the data.  For example, your
+application might use the hash of an an email address as a primary key, to
+avoid transmitting or storing the email address.  This reduces the chances of
+inadvertently exposing data, and it also reduces the chance of attackers
+attempting to exploit your application.</p>
+
+<p>If your application accesses personal information such as passwords or
+usernames, keep in mind that some jurisdictions may require you to provide a
+privacy policy explaining your use and storage of that data.  So following the
+security best practice of minimizing access to user data may also simplify
+compliance.</p>
+
+<p>You should also consider whether your application might be inadvertently
+exposing personal information to other parties such as third-party components
+for advertising or third-party services used by your application. If you don't
+know why a component or service requires a personal information, don’t
+provide it.  In general, reducing the access to personal information by your
+application will reduce the potential for problems in this area.</p>
+
+<p>If access to sensitive data is required, evaluate whether that information
+must be transmitted to a server, or whether the operation can be performed on
+the client.  Consider running any code using sensitive data on the client to
+avoid transmitting user data.</p>
+
+<p>Also, make sure that you do not inadvertently expose user data to other
+application on the device through overly permissive IPC, world writable files,
+or network sockets. This is a special case of leaking permission-protected data,
+discussed in the <a href="#RequestingPermissions">Requesting Permissions</a> section.</p>
+
+<p>If a <acronym title="Globally Unique Identifier">GUID</acronym>
+is required, create a large, unique number and store it.  Do not
+use phone identifiers such as the phone number or IMEI which may be associated
+with personal information.  This topic is discussed in more detail in the <a
+href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">Android
+Developer Blog</a>.</p>
+
+<p>Be careful when writing to on-device logs.
+In Android, logs are a shared resource, and are available
+to an application with the {@link android.Manifest.permission#READ_LOGS} permission.
+Even though the phone log data
+is temporary and erased on reboot, inappropriate logging of user information
+could inadvertently leak user data to other applications.</p>
+
+
+
+
+
+
+<h2 id="WebView">Using WebView</h2>
+
+<p>Because {@link android.webkit.WebView} consumes web content that can include HTML and JavaScript,
+improper use can introduce common web security issues such as <a
+href="http://en.wikipedia.org/wiki/Cross_site_scripting">cross-site-scripting</a>
+(JavaScript injection).  Android includes a number of mechanisms to reduce
+the scope of these potential issues by limiting the capability of {@link android.webkit.WebView} to
+the minimum functionality required by your application.</p>
+
+<p>If your application does not directly use JavaScript within a {@link android.webkit.WebView}, do
+<em>not</em> call {@link android.webkit.WebSettings#setJavaScriptEnabled setJavaScriptEnabled()}.
+Some sample code uses this method, which you might repurpose in production
+application, so remove that method call if it's not required. By default,
+{@link android.webkit.WebView} does
+not execute JavaScript so cross-site-scripting is not possible.</p>
+
+<p>Use {@link android.webkit.WebView#addJavascriptInterface
+addJavaScriptInterface()} with
+particular care because it allows JavaScript to invoke operations that are
+normally reserved for Android applications.  If you use it, expose 
+{@link android.webkit.WebView#addJavascriptInterface addJavaScriptInterface()} only to
+web pages from which all input is trustworthy.  If untrusted input is allowed,
+untrusted JavaScript may be able to invoke Android methods within your app.  In general, we
+recommend exposing {@link android.webkit.WebView#addJavascriptInterface
+addJavaScriptInterface()} only to JavaScript that is contained within your application APK.</p>
+
+<p>If your application accesses sensitive data with a 
+{@link android.webkit.WebView}, you may want to use the
+{@link android.webkit.WebView#clearCache clearCache()} method to delete any files stored
+locally. Server-side
+headers like <code>no-cache</code> can also be used to indicate that an application should
+not cache particular content.</p>
+
+
+
+
+<h3 id="Credentials">Handling Credentials</h3>
+
+<p>In general, we recommend minimizing the frequency of asking for user
+credentials&mdash;to make phishing attacks more conspicuous, and less likely to be
+successful.  Instead use an authorization token and refresh it.</p>
+
+<p>Where possible, username and password should not be stored on the device.
+Instead, perform initial authentication using the username and password
+supplied by the user, and then use a short-lived, service-specific
+authorization token.</p>
+
+<p>Services that will be accessible to multiple applications should be accessed
+using {@link android.accounts.AccountManager}. If possible, use the
+{@link android.accounts.AccountManager} class to invoke a cloud-based service and do not store
+passwords on the device.</p>
+
+<p>After using {@link android.accounts.AccountManager} to retrieve an
+{@link android.accounts.Account}, {@link android.accounts.Account#CREATOR}
+before passing in any credentials, so that you do not inadvertently pass
+credentials to the wrong application.</p>
+
+<p>If credentials are to be used only by applications that you create, then you
+can verify the application which accesses the {@link android.accounts.AccountManager} using
+{@link android.content.pm.PackageManager#checkSignatures checkSignature()}.
+Alternatively, if only one application will use the credential, you might use a
+{@link java.security.KeyStore} for storage.</p>
+
+
+
+
+
+<h2 id="Crypto">Using Cryptography</h2>
+
+<p>In addition to providing data isolation, supporting full-filesystem
+encryption, and providing secure communications channels, Android provides a
+wide array of algorithms for protecting data using cryptography.</p>
+
+<p>In general, try to use the highest level of pre-existing framework
+implementation that can  support your use case.  If you need to securely
+retrieve a file from a known location, a simple HTTPS URI may be adequate and
+requires no knowledge of cryptography.  If you need a secure
+tunnel, consider using {@link javax.net.ssl.HttpsURLConnection} or
+{@link javax.net.ssl.SSLSocket}, rather than writing your own protocol.</p>
+
+<p>If you do find yourself needing to implement your own protocol, we strongly
+recommend that you <em>not</em> implement your own cryptographic algorithms. Use
+existing cryptographic algorithms such as those in the implementation of AES or
+RSA provided in the {@link javax.crypto.Cipher} class.</p>
+
+<p>Use a secure random number generator, {@link java.security.SecureRandom},
+to initialize any cryptographic keys, {@link javax.crypto.KeyGenerator}.
+Use of a key that is not generated with a secure random
+number generator significantly weakens the strength of the algorithm, and may
+allow offline attacks.</p>
+
+<p>If you need to store a key for repeated use, use a mechanism like
+  {@link java.security.KeyStore} that
+provides a mechanism for long term storage and retrieval of cryptographic
+keys.</p>
+
+
+
+
+
+<h2 id="IPC">Using Interprocess Communication</h2>
+
+<p>Some apps attempt to implement IPC using traditional Linux
+techniques such as network sockets and shared files.  We strongly encourage you to instead
+use Android system functionality for IPC such as {@link android.content.Intent},
+{@link android.os.Binder} or {@link android.os.Messenger} with a {@link
+android.app.Service}, and {@link android.content.BroadcastReceiver}.
+The Android IPC mechanisms allow you to verify the identity of
+the application connecting to your IPC and set security policy for each IPC
+mechanism.</p>
+
+<p>Many of the security elements are shared across IPC mechanisms.
+If your IPC mechanism is not intended for use by other applications, set the
+{@code android:exported} attribute to {@code "false"} in the component's manifest element,
+such as for the <a
+href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code &lt;service&gt;}</a>
+element.  This is useful for applications that consist of multiple processes
+within the same UID, or if you decide late in development that you do not
+actually want to expose functionality as IPC but you don’t want to rewrite
+the code.</p>
+
+<p>If your IPC is intended to be accessible to other applications, you can
+apply a security policy by using the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html">{@code &lt;permission>}</a>
+element. If IPC is between your own separate apps that are signed with the same key,
+it is preferable to use {@code "signature"} level permission in the <a
+href="{@docRoot}guide/topics/manifest/permission-element.html#plevel">{@code
+android:protectionLevel}</a>.</p>
+
+
+
+
+<h3>Using intents</h3>
+
+<p>Intents are the preferred mechanism for asynchronous IPC in Android.
+Depending on your application requirements, you might use {@link
+android.content.Context#sendBroadcast sendBroadcast()}, {@link
+android.content.Context#sendOrderedBroadcast sendOrderedBroadcast()},
+or an explicit intent to a specific application component.</p>
+
+<p>Note that ordered broadcasts can be “consumed” by a recipient, so they
+may not be delivered to all applications.  If you are sending an intent that muse be delivered
+to a specific receiver, then you must use an explicit intent that declares the receiver
+by nameintent.</p>
+
+<p>Senders of an intent can verify that the recipient has a permission
+specifying a non-Null permission with the method call.  Only applications with that
+permission will receive the intent.  If data within a broadcast intent may be
+sensitive, you should consider applying a permission to make sure that
+malicious applications cannot register to receive those messages without
+appropriate permissions.  In those circumstances, you may also consider
+invoking the receiver directly, rather than raising a broadcast.</p>
+
+<p class="note"><strong>Note:</strong> Intent filters should not be considered
+a security feature&mdash;components
+can be invoked with explicit intents and may not have data that would conform to the intent
+filter. You should perform input validation within your intent receiver to
+confirm that it is properly formatted for the invoked receiver, service, or
+activity.</p>
+
+
+
+
+<h3 id="Services">Using services</h3>
+
+<p>A {@link android.app.Service} is often used to supply functionality for other applications to
+use. Each service class must have a corresponding <a
+href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> declaration in its
+manifest file.</p>
+
+<p>By default, services are not exported and cannot be invoked by any other
+application. However, if you add any intent filters to the service declaration, then it is exported
+by default. It's best if you explicitly declare the <a
+href="{@docRoot}guide/topics/manifest/service-element.html#exported">{@code
+android:exported}</a> attribute to be sure it behaves as you'd like.
+Services can also be protected using the <a
+href="{@docRoot}guide/topics/manifest/service-element.html#prmsn">{@code android:permission}</a>
+attribute. By doing so, other applications will need to declare
+a corresponding <code><a
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a>
+</code> element in their own manifest to be
+able to start, stop, or bind to the service.</p>
+
+<p>A service can protect individual IPC calls into it with permissions, by
+calling {@link android.content.Context#checkCallingPermission
+checkCallingPermission()} before executing
+the implementation of that call.  We generally recommend using the
+declarative permissions in the manifest, since those are less prone to
+oversight.</p>
+
+
+
+<h3>Using binder and messenger interfaces</h3>
+
+<p>Using {@link android.os.Binder} or {@link android.os.Messenger} is the
+preferred mechanism for RPC-style IPC in Android. They provide a well-defined
+interface that enables mutual authentication of the endpoints, if required.</p>
+
+<p>We strongly encourage designing interfaces in a manner that does not require
+interface specific permission checks. {@link android.os.Binder} and
+{@link android.os.Messenger} objects are not declared within the
+application manifest, and therefore you cannot apply declarative permissions
+directly to them.  They generally inherit permissions declared in the
+application manifest for the {@link android.app.Service} or {@link
+android.app.Activity} within which they are
+implemented.  If you are creating an interface that requires authentication
+and/or access controls, those controls must be
+explicitly added as code in the {@link android.os.Binder} or {@link android.os.Messenger}
+interface.</p>
+
+<p>If providing an interface that does require access controls, use {@link
+android.content.Context#checkCallingPermission checkCallingPermission()}
+to verify whether the
+caller has a required permission. This is especially important
+before accessing a service on behalf of the caller, as the identify of your
+application is passed to other interfaces.  If invoking an interface provided
+by a {@link android.app.Service}, the {@link
+android.content.Context#bindService bindService()}
+ invocation may fail if you do not have permission to access the given service.
+ If calling an interface provided locally by your own application, it may be
+useful to use the {@link android.os.Binder#clearCallingIdentity clearCallingIdentity()}
+to satisfy internal security checks.</p>
+
+<p>For more information about performing IPC with a service, see
+<a href="{@docRoot}guide/components/bound-services.html">Bound Services</a>.</p>
+
+
+
+<h3 id="BroadcastReceivers">Using broadcast receivers</h3>
+
+<p>A {@link android.content.BroadcastReceiver} handles asynchronous requests initiated by
+an {@link android.content.Intent}.</p>
+
+<p>By default, receivers are exported and can be invoked by any other
+application. If your {@link android.content.BroadcastReceiver}
+is intended for use by other applications, you
+may want to apply security permissions to receivers using the <code><a
+href="{@docRoot}guide/topics/manifest/receiver-element.html">
+&lt;receiver&gt;</a></code> element within the application manifest.  This will
+prevent applications without appropriate permissions from sending an intent to
+the {@link android.content.BroadcastReceiver}.</p>
+
+
+
+
+
+
+
+
+<h2 id="DynamicCode">Dynamically Loading Code</h2>
+
+<p>We strongly discourage loading code from outside of your application APK.
+Doing so significantly increases the likelihood of application compromise due
+to code injection or code tampering.  It also adds complexity around version
+management and application testing.  Finally, it can make it impossible to
+verify the behavior of an application, so it may be prohibited in some
+environments.</p>
+
+<p>If your application does dynamically load code, the most important thing to
+keep in mind about dynamically loaded code is that it runs with the same
+security permissions as the application APK.  The user made a decision to
+install your application based on your identity, and they are expecting that
+you provide any code run within the application, including code that is
+dynamically loaded.</p>
+
+<p>The major security risk associated with dynamically loading code is that the
+code needs to come from a verifiable source. If the modules are included
+directly within your APK, then they cannot be modified by other applications.
+This is true whether the code is a native library or a class being loaded using
+{@link dalvik.system.DexClassLoader}.  We have seen many instances of applications
+attempting to load code from insecure locations, such as downloaded from the
+network over unencrypted protocols or from world writable locations such as
+external storage. These locations could allow someone on the network to modify
+the content in transit, or another application on a users device to modify the
+content on the device, respectively.</p>
+
+
+
+
+
+<h2 id="Dalvik">Security in a Virtual Machine</h2>
+
+<p>Dalvik is Android's runtime virtual machine (VM). Dalvik was built specifically for Android,
+but many of the concerns regarding secure code in other virtual machines also apply to Android.
+In general, you shouldn't concern yourself with security issues relating to the virtual machine.
+Your application runs in a secure sandbox environment, so other processes on the system cannnot
+access your code or private data.</p>
+
+<p>If you're interested in diving deeper on the subject of virtual machine security,
+we recommend that you familiarize yourself with some
+existing literature on the subject. Two of the more popular resources are:
+<ul>
+<li><a href="http://www.securingjava.com/toc.html">
+http://www.securingjava.com/toc.html</a></li>
+<li><a
+href="https://www.owasp.org/index.php/Java_Security_Resources">
+https://www.owasp.org/index.php/Java_Security_Resources</a></li>
+</ul></p>
+
+<p>This document is focused on the areas which are Android specific or
+different from other VM environments.  For developers experienced with VM
+programming in other environments, there are two broad issues that may be
+different about writing apps for Android:
+<ul>
+<li>Some virtual machines, such as the JVM or .net runtime, act as a security
+boundary, isolating code from the underlying operating system capabilities.  On
+Android, the Dalvik VM is not a security boundary&mdash;the application sandbox is
+implemented at the OS level, so Dalvik can interoperate with native code in the
+same application without any security constraints.</li>
+
+<li>Given the limited storage on mobile devices, it’s common for developers
+to want to build modular applications and use dynamic class loading.  When
+doing this, consider both the source where you retrieve your application logic
+and where you store it locally. Do not use dynamic class loading from sources
+that are not verified, such as unsecured network sources or external storage,
+because that code might be modified to include malicious behavior.</li>
+</ul>
+
+
+
+<h2 id="Native">Security in Native Code</h2>
+
+<p>In general, we encourage developers to use the Android SDK for
+application development, rather than using native code with the
+<a href="{@docRoot}tools/sdk/ndk/index.html">Android NDK</a>.  Applications built
+with native code are more complex, less portable, and more like to include
+common memory corruption errors such as buffer overflows.</p>
+
+<p>Android is built using the Linux kernel and being familiar with Linux
+development security best practices is especially useful if you are going to
+use native code. Linux security practices are beyond the scope of this document,
+but one of the most popular resources is “Secure Programming for
+Linux and Unix HOWTO”, available at <a
+href="http://www.dwheeler.com/secure-programs">
+http://www.dwheeler.com/secure-programs</a>.</p>
+
+<p>An important difference between Android and most Linux environments is the
+Application Sandbox.  On Android, all applications run in the Application
+Sandbox, including those written with native code.  At the most basic level, a
+good way to think about it for developers familiar with Linux is to know that
+every application is given a unique <acronym title="User Identifier">UID</acronym>
+with very limited permissions. This is discussed in more detail in the <a
+href="http://source.android.com/tech/security/index.html">Android Security
+Overview</a> and you should be familiar with application permissions even if
+you are using native code.</p>
+
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 1c85ae8..ece5582 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -4,741 +4,963 @@
   <li class="nav-section">
     <div class="nav-section-header">
       <a href="<?cs var:toroot ?>training/index.html">
-        <span class="en">Get Started</span>
+        Getting Started
       </a>
     </div>
 
     <ul>
       <li class="nav-section">
         <div class="nav-section-header">
-          <a href="<?cs var:toroot ?>training/basics/firstapp/index.html">
-            <span class="en">Building Your First App</span>
-          </a>
+          <a href="<?cs var:toroot ?>training/basics/firstapp/index.html"
+             description=
+             "After you've installed the Android SDK, start with this class
+             to learn the basics about Android app development."
+            >Building Your First App</a>
         </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/firstapp/creating-project.html">
-            <span class="en">Creating an Android Project</span>
+            Creating an Android Project
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/firstapp/running-app.html">
-            <span class="en">Running Your Application</span>
+            Running Your Application
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/firstapp/building-ui.html">
-            <span class="en">Building a Simple User Interface</span>
+            Building a Simple User Interface
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/firstapp/starting-activity.html">
-            <span class="en">Starting Another Activity</span>
+            Starting Another Activity
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html">
-            <span class="en">Managing the Activity Lifecycle</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/activity-lifecycle/index.html"
+             description=
+             "How Android activities live and die and how to create
+             a seamless user experience by implementing lifecycle callback methods."
+            >Managing the Activity Lifecycle</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/starting.html">
-            <span class="en">Starting an Activity</span>
+            Starting an Activity
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/pausing.html">
-            <span class="en">Pausing and Resuming an Activity</span>
+            Pausing and Resuming an Activity
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/stopping.html">
-            <span class="en">Stopping and Restarting an Activity</span>
+            Stopping and Restarting an Activity
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/activity-lifecycle/recreating.html">
-            <span class="en">Recreating an Activity</span>
+            Recreating an Activity
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html">
-            <span class="en">Supporting Different Devices</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/supporting-devices/index.html"
+             description=
+             "How to build your app with alternative resources that provide an
+             optimized user experience on multiple device form factors using a single APK."
+            >Supporting Different Devices</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/languages.html">
-            <span class="en">Supporting Different Languages</span>
+            Supporting Different Languages
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/screens.html">
-            <span class="en">Supporting Different Screens</span>
+            Supporting Different Screens
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/supporting-devices/platforms.html">
-            <span class="en">Supporting Different Platform Versions</span>
+            Supporting Different Platform Versions
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/fragments/index.html">
-            <span class="en">Building a Dynamic UI with Fragments</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/fragments/index.html"
+             description=
+             "How to build a user interface for your app that is flexible enough
+             to present multiple UI components on large screens and a more constrained set of
+             UI components on smaller screens&mdash;essential for building a single APK for both
+             phones and tablets."
+            >Building a Dynamic UI with Fragments</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/fragments/support-lib.html">
-            <span class="en">Using the Support Library</span>
+            Using the Support Library
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/fragments/creating.html">
-            <span class="en">Creating a Fragment</span>
+            Creating a Fragment
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/fragments/fragment-ui.html">
-            <span class="en">Building a Flexible UI</span>
+            Building a Flexible UI
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/fragments/communicating.html">
-            <span class="en">Communicating with Other Fragments</span>
+            Communicating with Other Fragments
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot?>training/basics/data-storage/index.html">
-            <span class="en">Saving Data</span>
-          </a></div>
+        <div class="nav-section-header"><a href="<?cs var:toroot?>training/basics/data-storage/index.html"
+             description=
+             "How to save data on the device, whether it's temporary files, downloaded
+             app assets, user media, structured data, or something else."
+            >Saving Data</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/data-storage/shared-preferences.html">
-            <span class="en">Saving Key-Value Sets</span>
+            Saving Key-Value Sets
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/data-storage/files.html">
-            <span class="en">Saving Files</span>
+            Saving Files
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/data-storage/databases.html">
-            <span class="en">Saving Data in SQL Databases</span>
+            Saving Data in SQL Databases
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/intents/index.html">
-            <span class="en">Interacting with Other Apps</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/intents/index.html"
+             description=
+             "How to build a user experience that leverages other apps available
+             on the device to perform advanced user tasks, such as capture a photo or view
+             an address on a map."
+            >Interacting with Other Apps</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/basics/intents/sending.html">
-            <span class="en">Sending the User to Another App</span>
+            Sending the User to Another App
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/intents/result.html">
-            <span class="en">Getting a Result from the Activity</span>
+            Getting a Result from the Activity
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/basics/intents/filters.html">
-            <span class="en">Allowing Other Apps to Start Your Activity</span>
+            Allowing Other Apps to Start Your Activity
           </a>
           </li>
         </ul>
       </li>
 
-
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/sharing/index.html"
+             description=
+             "How to take your app interaction to the next level by sharing
+             information with other apps, receive information back, and provide a simple and
+             scalable way to perform Share actions with user content."
+            >Sharing Content</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/sharing/send.html">
+            Sending Content to Other Apps
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/sharing/receive.html">
+            Receiving Content from Other Apps
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/sharing/shareaction.html">
+            Adding an Easy Share Action
+          </a>
+          </li>
+        </ul>
+      </li>
     </ul>
-  </li><!-- end basic training -->
+  </li><!-- end getting started -->    
+  
+
   <li class="nav-section">
     <div class="nav-section-header">
-      <a href="<?cs var:toroot ?>training/advanced.html">
-      <span class="en">Advanced Training</span>
+      <a href="<?cs var:toroot ?>training/building-multimedia.html">
+      <span class="small">Building Apps with</span><br/>Multimedia
+      </a>
+    </div>
+    <ul>
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/managing-audio/index.html"
+             description=
+             "How to respond to hardware audio key presses, request audio focus
+             when playing audio, and respond appropriately to changes in audio focus."
+            >Managing Audio Playback</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/volume-playback.html">
+            Controlling Your App's Volume and Playback
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-focus.html">
+            Managing Audio Focus
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-output.html">
+            Dealing with Audio Output Hardware
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/camera/index.html"
+             description=
+             "How to leverage existing camera apps on the user's device to capture
+             photos or control the camera hardware directly and build your own camera app."
+            >Capturing Photos</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/camera/photobasics.html">
+            Taking Photos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/videobasics.html">
+            Recording Videos Simply
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/camera/cameradirect.html">
+            Controlling the Camera
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End multimedia -->
+      
+      
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-graphics.html">
+      <span class="small">Building Apps with</span><br/>Graphics &amp; Animation
+      </a>
+    </div>
+    <ul>
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html"
+             description=
+             "How to load and process bitmaps while keeping your user interface
+             responsive and avoid exceeding memory limits."
+            >Displaying Bitmaps Efficiently</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/load-bitmap.html">
+            Loading Large Bitmaps Efficiently
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/process-bitmap.html">
+            Processing Bitmaps Off the UI Thread
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/cache-bitmap.html">
+            Caching Bitmaps
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/display-bitmap.html">
+            Displaying Bitmaps in Your UI
+          </a></li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot?>training/graphics/opengl/index.html"
+             description=
+             "How to create OpenGL graphics within the Android app framework
+             and respond to touch input."
+            >Displaying Graphics with OpenGL ES</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/environment.html">
+            Building an OpenGL ES Environment
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/shapes.html">
+            Defining Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/draw.html">
+            Drawing Shapes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/projection.html">
+            Applying Projection and Camera Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/motion.html">
+            Adding Motion
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/graphics/opengl/touch.html">
+            Responding to Touch Events
+          </a>
+          </li>
+        </ul>
+      </li>
+      <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/animation/index.html"
+             description=
+             "How to add transitional animations to your user interface.">
+            Adding Animations
+          </a></div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/animation/crossfade.html">
+            Crossfading Two Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/screen-slide.html">
+            Using ViewPager for Screen Slide
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/cardflip.html">
+            Displaying Card Flip Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/zoom.html">
+            Zooming a View
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/animation/layout.html">
+            Animating Layout Changes
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End graphics and animation -->
+      
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-connectivity.html">
+      <span class="small">Building Apps with</span><br/>
+              Connectivity &amp; the Cloud
+      </a>
+    </div>
+    <ul>
+
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html"
+             description=
+             "How to find and connect to local devices using Network Service
+             Discovery and Wi-Fi Direct in order to create peer-to-peer connections."
+             >Connecting Devices Wirelessly</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd.html">
+            Using Network Service Discovery
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/wifi-direct.html">
+            Connecting with Wi-Fi Direct
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd-wifi-direct.html">
+            Using Wi-Fi Direct for Service Discovery
+          </a>
+          </li>
+        </ul>
+      </li>
+      
+       <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/network-ops/index.html"
+             description=
+             "How to create a network connection, monitor the connection for changes
+             in connectivity, and perform transactions with XML data."
+            >Performing Network Operations</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/connecting.html">
+            Connecting to the Network
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/managing.html">
+            Managing Network Usage
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/network-ops/xml.html">
+            Parsing XML Data
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/efficient-downloads/index.html"
+             description=
+             "How to minimize your app's impact on the battery when performing downloads
+             and other network transactions."
+            >Transferring Data Without Draining the Battery</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
+            Optimizing Downloads for Efficient Network Access
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
+            Minimizing the Effect of Regular Updates
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
+            Redundant Downloads are Redundant
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
+            Modifying Patterns Based on the Connectivity Type
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/cloudsync/index.html"
+             description=
+             "How to sync and back up app and user data to remote web services in the
+              cloud and how to restore the data back to multiple devices."
+            >Syncing to the Cloud</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/cloudsync/backupapi.html">
+            Using the Backup API
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/cloudsync/gcm.html">
+            Making the Most of Google Cloud Messaging
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End connectivity and cloud -->
+  
+  
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/building-userinfo.html">
+      <span class="small">Building Apps with</span><br/>
+              User Info &amp; Location
+      </a>
+    </div>
+    <ul>
+    
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/id-auth/index.html"
+             description=
+             "How to remember the user by account, authenticate the user, acquire user permission
+             for the user's online data, and create custom accounts on the device."
+            >Remembering Users</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/id-auth/identify.html">
+            Remembering Your User
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/id-auth/authenticate.html">
+            Authenticating to OAuth2 Services
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/id-auth/custom_auth.html">
+            Creating a Custom Account Type
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/basics/location/index.html"
+             description=
+             "How to add location-aware features to your app by aqcuiring the user's current
+             location."
+            >Making Your App Location Aware</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/basics/location/locationmanager.html">
+            Using the Location Manager
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/location/currentlocation.html">
+            Obtaining the Current Location
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/basics/location/geocoding.html">
+            Displaying a Location Address
+          </a>
+          </li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+  <!-- End privacy and location -->
+      
+      
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-ux.html">
+      <span class="small">Best Practices for</span><br/>
+              User Experience &amp; UI
       </a>
     </div>
     <ul>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/location/index.html">
-            <span class="en">Making Your App Location Aware</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/basics/location/locationmanager.html">
-            <span class="en">Using the Location Manager</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/basics/location/currentlocation.html">
-            <span class="en">Obtaining the Current Location</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/basics/location/geocoding.html">
-            <span class="en">Displaying a Location Address</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/basics/network-ops/index.html">
-            <span class="en">Performing Network Operations</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/basics/network-ops/connecting.html">
-            <span class="en">Connecting to the Network</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/basics/network-ops/managing.html">
-            <span class="en">Managing Network Usage</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/basics/network-ops/xml.html">
-            <span class="en">Parsing XML Data</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/efficient-downloads/index.html">
-            <span class="en">Transferring Data Without Draining the Battery</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/efficient-downloads/efficient-network-access.html">
-            <span class="en">Optimizing Downloads for Efficient Network Access</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/efficient-downloads/regular_updates.html">
-            <span class="en">Minimizing the Effect of Regular Updates</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/efficient-downloads/redundant_redundant.html">
-            <span class="en">Redundant Downloads are Redundant</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/efficient-downloads/connectivity_patterns.html">
-            <span class="en">Modifying Patterns Based on the Connectivity Type</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/cloudsync/index.html">
-            <span class="en">Syncing to the Cloud</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/cloudsync/backupapi.html">
-            <span class="en">Using the Backup API</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/cloudsync/gcm.html">
-            <span class="en">Making the Most of Google Cloud Messaging</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/multiscreen/index.html"
-          zh-CN-lang="针对多种屏幕进行设计"
-          ja-lang="複数画面のデザイン"
-          es-lang="Cómo diseñar aplicaciones para varias pantallas"
-          >Designing for Multiple Screens</a>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/design-navigation/index.html"
+             description=
+             "How to plan your app's screen hierarchy and forms of navigation so users can
+             effectively and intuitively traverse your app content using various navigation
+             patterns."
+            >Designing Effective Navigation</a>
         </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/multiscreen/screensizes.html"
+          <li><a href="<?cs var:toroot ?>training/design-navigation/screen-planning.html">
+            Planning Screens and Their Relationships
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/multiple-sizes.html">
+            Planning for Multiple Touchscreen Sizes
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/descendant-lateral.html">
+            Providing Descendant and Lateral Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/ancestral-temporal.html">
+            Providing Ancestral and Temporal Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/design-navigation/wireframing.html">
+            Putting it All Together: Wireframing the Example App
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/implementing-navigation/index.html"
+             description=
+             "How to implement various navigation patterns such as swipe views and up navigation."
+            >Implementing Effective Navigation</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/lateral.html">
+            Implementing Lateral Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/ancestral.html">
+            Implementing Ancestral Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/temporal.html">
+            Implementing Temporal Navigation
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/implementing-navigation/descendant.html">
+            Implementing Descendant Navigation
+          </a>
+          </li>
+        </ul>
+      </li>
+      
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="/training/multiscreen/index.html"
+             zh-CN-lang="针对多种屏幕进行设计"
+             ja-lang="複数画面のデザイン"
+             es-lang="Cómo diseñar aplicaciones para varias pantallas"
+             description=
+             "How to build a user interface that's flexible enough to
+             fit perfectly on any screen and how to create different interaction
+             patterns that are optimized for different screen sizes."
+            >Designing for Multiple Screens</a>
+        </div>
+        <ul>
+          <li><a href="/training/multiscreen/screensizes.html"
             zh-CN-lang="支持各种屏幕尺寸"
             ko-lang="다양한 화면 크기 지원"
             ja-lang="さまざまな画面サイズのサポート"
-            es-lang="Cómo admitir varios tamaños de pantalla"
-            >Designing for Multiple Screens</a>
+            es-lang="Cómo admitir varios tamaños de pantalla"               
+            >Supporting Different Screen Sizes</a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/multiscreen/screendensities.html"
+          <li><a href="/training/multiscreen/screendensities.html"
             zh-CN-lang="支持各种屏幕密度"
             ja-lang="さまざまな画面密度のサポート"
-            es-lang="Cómo admitir varias densidades de pantalla"
+            es-lang="Cómo admitir varias densidades de pantalla"               
             >Supporting Different Screen Densities</a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/multiscreen/adaptui.html"
+          <li><a href="/training/multiscreen/adaptui.html"
             zh-CN-lang="实施自适应用户界面流程"
             ja-lang="順応性のある UI フローの実装"
-            es-lang="Cómo implementar interfaces de usuario adaptables"
+            es-lang="Cómo implementar interfaces de usuario adaptables"               
             >Implementing Adaptive UI Flows</a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/improving-layouts/index.html">
-            <span class="en">Improving Layout Performance</span>
-          </a></div>
+        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/tv/index.html"
+             description=
+             "How to optimize your app's user interface and user input for
+             the &quot;ten foot experience&quot; of a TV screen."
+            >Designing for TV</a>
+        </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/improving-layouts/optimizing-layout.html">
-            <span class="en">Optimizing Layout Hierarchies</span>
+          <li><a href="<?cs var:toroot ?>training/tv/optimizing-layouts-tv.html">
+            Optimizing Layouts for TV
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/improving-layouts/reusing-layouts.html">
-            <span class="en">Re-using Layouts with &lt;include/&gt;</span>
+          <li><a href="<?cs var:toroot ?>training/tv/optimizing-navigation-tv.html">
+            Optimizing Navigation for TV
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/improving-layouts/loading-ondemand.html">
-            <span class="en">Loading Views On Demand</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/improving-layouts/smooth-scrolling.html">
-            <span class="en">Making ListView Scrolling Smooth</span>
+          <li><a href="<?cs var:toroot ?>training/tv/unsupported-features-tv.html">
+            Handling Features Not Supported on TV
           </a>
           </li>
         </ul>
       </li>
 
-        <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/animation/index.html">
-            <span class="en">Adding Animations</span>
-          </a></div>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/search/index.html"
+             description=
+             "How to properly add a search interface to your app and create a searchable database."
+            >Adding Search Functionality</a>
+        </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/animation/crossfade.html">
-            <span class="en">Crossfading Two Views</span>
+          <li><a href="<?cs var:toroot ?>training/search/setup.html">
+            Setting up the Search Interface
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/animation/screen-slide.html">
-            <span class="en">Using ViewPager for Screen Slide</span>
+          <li><a href="<?cs var:toroot ?>training/search/search.html">
+            Storing and Searching for Data
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/animation/cardflip.html">
-            <span class="en">Displaying Card Flip Animations</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/animation/zoom.html">
-            <span class="en">Zooming a View</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/animation/layout.html">
-            <span class="en">Animating Layout Changes</span>
+          <li><a href="<?cs var:toroot ?>training/search/backward-compat.html">
+            Remaining Backward Compatible
           </a>
           </li>
         </ul>
       </li>
       
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/managing-audio/index.html">
-            <span class="en">Managing Audio Playback</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/custom-views/index.html"
+             description=
+             "How to build custom UI widgets that are interactive and smooth."
+            >Creating Custom Views</a>
+        </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/managing-audio/volume-playback.html">
-            <span class="en">Controlling Your App?s Volume and Playback</span>
+          <li><a href="<?cs var:toroot ?>training/custom-views/create-view.html">
+            Creating a Custom View Class
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-focus.html">
-            <span class="en">Managing Audio Focus</span>
+          <li><a href="<?cs var:toroot ?>training/custom-views/custom-drawing.html">
+            Implementing Custom Drawing
           </a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/managing-audio/audio-output.html">
-            <span class="en">Dealing with Audio Output Hardware</span>
+          <li><a href="<?cs var:toroot ?>training/custom-views/making-interactive.html">
+            Making the View Interactive
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/custom-views/optimizing-view.html">
+            Optimizing the View
           </a>
           </li>
         </ul>
       </li>
 
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/monitoring-device-state/index.html"
-          zh-CN-lang="优化电池使用时间"
-          ja-lang="電池消費量の最適化"
-          es-lang="Cómo optimizar la duración de la batería"
-          >Optimizing Battery Life</a>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html"
+             description=
+             "How to use UI components and other APIs from the more recent versions of Android
+             while remaining compatible with older versions of the platform."
+            >Creating Backward-Compatible UIs</a>
         </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/battery-monitoring.html"
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/abstracting.html">
+            Abstracting the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/new-implementation.html">
+            Proxying to the New APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/older-implementation.html">
+            Creating an Implementation with Older APIs
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/using-component.html">
+            Using the Version-Aware Component
+          </a>
+          </li>
+        </ul>
+      </li>
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/accessibility/index.html"
+             description=
+             "How to make your app accessible to users with vision
+             impairment or other physical disabilities."
+            >Implementing Accessibility</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/accessibility/accessible-app.html">
+            Developing Accessible Applications
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/accessibility/service.html">
+            Developing Accessibility Services
+          </a>
+          </li>
+        </ul>
+      </li>
+      
+    </ul>
+  </li>
+  <!-- End best UX and UI -->
+  
+      
+
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-performance.html">
+      <span class="small">Best Practices for</span><br/>
+              Performance
+      </a>
+    </div>
+    <ul>
+      
+      <li>
+        <a href="<?cs var:toroot ?>training/perf-tips.html"
+           description=
+           "How to optimize your app's performance in various ways to improve its
+           responsiveness and battery efficiency."
+          >Performance Tips</a>
+      </li>
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/improving-layouts/index.html"
+             description=
+             "How to identify problems in your app's layout performance and improve the UI
+             responsiveness."
+            >Improving Layout Performance</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/optimizing-layout.html">
+            Optimizing Layout Hierarchies
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/reusing-layouts.html">
+            Re-using Layouts with &lt;include/&gt;
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/loading-ondemand.html">
+            Loading Views On Demand
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/improving-layouts/smooth-scrolling.html">
+            Making ListView Scrolling Smooth
+          </a>
+          </li>
+        </ul>
+      </li>
+
+      
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="/training/monitoring-device-state/index.html"
+             zh-CN-lang="优化电池使用时间"
+             ja-lang="電池消費量の最適化"
+             es-lang="Cómo optimizar la duración de la batería"
+             description=
+             "How to minimize the amount of power your app requires by adapting to current
+             power conditions and performing power-hungry tasks at proper intervals."
+            >Optimizing Battery Life</a>
+        </div>
+        <ul>
+          <li><a href="/training/monitoring-device-state/battery-monitoring.html"
             zh-CN-lang="监控电池电量和充电状态"
             ja-lang="電池残量と充電状態の監視"
-            es-lang="Cómo controlar el nivel de batería y el estado de carga"
+            es-lang="Cómo controlar el nivel de batería y el estado de carga"               
             >Monitoring the Battery Level and Charging State</a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/docking-monitoring.html"
+          <li><a href="/training/monitoring-device-state/docking-monitoring.html"
             zh-CN-lang="确定和监控基座对接状态和类型"
             ja-lang="ホルダーの装着状態とタイプの特定と監視"
-            es-lang="Cómo determinar y controlar el tipo de conector y el estado de la conexión"
+            es-lang="Cómo determinar y controlar el tipo de conector y el estado de la conexión"               
             >Determining and Monitoring the Docking State and Type</a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/connectivity-monitoring.html"
+          <li><a href="/training/monitoring-device-state/connectivity-monitoring.html"
             zh-CN-lang="确定和监控网络连接状态"
             ja-lang="接続状態の特定と監視"
-            es-lang="Cómo determinar y controlar el estado de la conectividad"
+            es-lang="Cómo determinar y controlar el estado de la conectividad"               
             >Determining and Monitoring the Connectivity Status</a>
           </li>
-          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/manifest-receivers.html"
+          <li><a href="/training/monitoring-device-state/manifest-receivers.html"
             zh-CN-lang="根据需要操作广播接收器"
             ja-lang="オンデマンドでのブロードキャスト レシーバ操作"
-            es-lang="Cómo manipular los receptores de emisión bajo demanda"
+            es-lang="Cómo manipular los receptores de emisión bajo demanda"               
             >Manipulating Broadcast Receivers On Demand</a>
           </li>
         </ul>
       </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/custom-views/index.html">
-            <span class="en">Creating Custom Views</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/custom-views/create-view.html">
-            <span class="en">Creating a Custom View Class</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/custom-views/custom-drawing.html">
-            <span class="en">Implementing Custom Drawing</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/custom-views/making-interactive.html">
-            <span class="en">Making the View Interactive</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/custom-views/optimizing-view.html">
-            <span class="en">Optimizing the View</span>
-          </a>
-          </li>
-        </ul>
+      
+      <li>
+        <a href="<?cs var:toroot ?>training/perf-anr.html"
+           description=
+           "How to keep your app responsive to user interaction so the UI does not lock-up and
+           display an &quot;Application Not Responding&quot; dialog."
+          >Keeping Your App Responsive</a>
       </li>
+      
+      <li>
+        <a href="<?cs var:toroot ?>training/perf-jni.html"
+           description=
+           "How to efficiently use the Java Native Interface with the Android NDK."
+          >JNI Tips</a>
+      </li>
+    </ul>
+  </li> <!-- end of Performance -->
+      
+      
 
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/best-security.html">
+      <span class="small">Best Practices for</span><br/>
+              Security &amp; Privacy
+      </a>
+    </div>
+    <ul>
+
+      <li>
+        <a href="<?cs var:toroot ?>training/security-tips.html"
+           description=
+           "How to perform various tasks and keep your app's data and your user's data secure."
+          >Security Tips</a>
+      </li>
+      
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/search/index.html">
-            <span class="en">Adding Search Functionality</span>
-          </a>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/enterprise/index.html"
+             description=
+             "How to implement device management policies for enterprise-oriented apps."
+            >Developing for Enterprise</a>
         </div>
         <ul>
-          <li><a href="<?cs var:toroot ?>training/search/setup.html">
-            <span class="en">Setting up the Search Interface</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/search/search.html">
-            <span class="en">Storing and Searching for Data</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/search/backward-compat.html">
-            <span class="en">Remaining Backward Compatible</span>
+          <li><a href="<?cs var:toroot ?>training/enterprise/device-management-policy.html">
+            Enhancing Security with Device Management Policies
           </a>
           </li>
         </ul>
       </li>
+    </ul>
+  </li>
+  <!-- End security and user info -->
 
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/id-auth/index.html">
-            <span class="en">Remembering Users</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/id-auth/identify.html">
-            <span class="en">Remembering Your User</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/id-auth/authenticate.html">
-            <span class="en">Authenticating to OAuth2 Services</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/id-auth/custom_auth.html">
-            <span class="en">Creating a Custom Account Type</span>
-          </a>
-          </li>
-        </ul>
-      </li>
 
+  <li class="nav-section">
+    <div class="nav-section-header">
+      <a href="<?cs var:toroot ?>training/distribute.html">
+      <span class="small">Using Google Play to</span><br/>
+              Distribute &amp; Monetize
+      </a>
+    </div>
+    <ul>
+      
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/sharing/index.html">
-            <span class="en">Sharing Content</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/sharing/send.html">
-            <span class="en">Sending Content to Other Apps</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/sharing/receive.html">
-            <span class="en">Receiving Content from Other Apps</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/sharing/shareaction.html">
-            <span class="en">Adding an Easy Share Action</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/camera/index.html">
-            <span class="en">Capturing Photos</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/camera/photobasics.html">
-            <span class="en">Taking Photos Simply</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/camera/videobasics.html">
-            <span class="en">Recording Videos Simply</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/camera/cameradirect.html">
-            <span class="en">Controlling the Camera</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/multiple-apks/index.html">
-            <span class="en">Maintaining Multiple APKs</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/multiple-apks/index.html"
+             description=
+             "How to publish your app on Google Play with separate APKs that target
+             different devices, while using a single app listing."
+            >Maintaining Multiple APKs</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/multiple-apks/api.html">
-            <span class="en">Creating Multiple APKs for Different API Levels</span>
+            Creating Multiple APKs for Different API Levels
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/multiple-apks/screensize.html">
-            <span class="en">Creating Multiple APKs for Different Screen Sizes</span>
+            Creating Multiple APKs for Different Screen Sizes
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/multiple-apks/texture.html">
-            <span class="en">Creating Multiple APKs for Different GL Textures</span>
+            Creating Multiple APKs for Different GL Textures
           </a>
           </li>
           <li><a href="<?cs var:toroot ?>training/multiple-apks/multiple.html">
-            <span class="en">Creating Multiple APKs with 2+ Dimensions</span>
+            Creating Multiple APKs with 2+ Dimensions
           </a>
           </li>
         </ul>
       </li>
-
+      
+      
       <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/backward-compatible-ui/index.html">
-            <span class="en">Creating Backward-Compatible UIs</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/abstracting.html">
-            <span class="en">Abstracting the New APIs</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/new-implementation.html">
-            <span class="en">Proxying to the New APIs</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/older-implementation.html">
-            <span class="en">Creating an Implementation with Older APIs</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/backward-compatible-ui/using-component.html">
-            <span class="en">Using the Version-Aware Component</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/enterprise/index.html">
-            <span class="en">Developing for Enterprise</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/enterprise/device-management-policy.html">
-            <span class="en">Enhancing Security with Device Management Policies</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/monetization/index.html">
-            <span class="en">Monetizing Your App</span>
-          </a></div>
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/monetization/index.html"
+             description=
+             "How to implement monetization strategies for your app without compromising
+             the user experience."
+            >Monetizing Your App</a>
+        </div>
         <ul>
           <li><a href="<?cs var:toroot ?>training/monetization/ads-and-ux.html">
-            <span class="en">Advertising without Compromising User Experience</span>
+            Advertising without Compromising User Experience
           </a>
           </li>
         </ul>
       </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/design-navigation/index.html">
-            <span class="en">Designing Effective Navigation</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/design-navigation/screen-planning.html">
-            <span class="en">Planning Screens and Their Relationships</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/design-navigation/multiple-sizes.html">
-            <span class="en">Planning for Multiple Touchscreen Sizes</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/design-navigation/descendant-lateral.html">
-            <span class="en">Providing Descendant and Lateral Navigation</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/design-navigation/ancestral-temporal.html">
-            <span class="en">Providing Ancestral and Temporal Navigation</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/design-navigation/wireframing.html">
-            <span class="en">Putting it All Together: Wireframing the Example App</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/implementing-navigation/index.html">
-            <span class="en">Implementing Effective Navigation</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/implementing-navigation/lateral.html">
-            <span class="en">Implementing Lateral Navigation</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/implementing-navigation/ancestral.html">
-            <span class="en">Implementing Ancestral Navigation</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/implementing-navigation/temporal.html">
-            <span class="en">Implementing Temporal Navigation</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/implementing-navigation/descendant.html">
-            <span class="en">Implementing Descendant Navigation</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/tv/index.html">
-           <span class="en">Designing for TV</span>
-           </a>
-        </div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/tv/optimizing-layouts-tv.html">
-            <span class="en">Optimizing Layouts for TV</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/tv/optimizing-navigation-tv.html">
-            <span class="en">Optimizing Navigation for TV</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/tv/unsupported-features-tv.html">
-            <span class="en">Handling Features Not Supported on TV</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html">
-            <span class="en">Displaying Bitmaps Efficiently</span>
-          </a>
-        </div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/load-bitmap.html">
-            <span class="en">Loading Large Bitmaps Efficiently</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/process-bitmap.html">
-            <span class="en">Processing Bitmaps Off the UI Thread</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/cache-bitmap.html">
-            <span class="en">Caching Bitmaps</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/displaying-bitmaps/display-bitmap.html">
-            <span class="en">Displaying Bitmaps in Your UI</span>
-          </a></li>
-        </ul>
-      </li>
-
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/accessibility/index.html">
-            <span class="en">Implementing Accessibility</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/accessibility/accessible-app.html">
-            <span class="en">Developing Accessible Applications</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/accessibility/service.html">
-            <span class="en">Developing Accessibility Services</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot
-?>training/graphics/opengl/index.html">
-            <span class="en">Displaying Graphics with OpenGL ES</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/environment.html">
-            <span class="en">Building an OpenGL ES Environment</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/shapes.html">
-            <span class="en">Defining Shapes</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/draw.html">
-            <span class="en">Drawing Shapes</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/projection.html">
-            <span class="en">Applying Projection and Camera Views</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/motion.html">
-            <span class="en">Adding Motion</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/graphics/opengl/touch.html">
-            <span class="en">Responding to Touch Events</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html">
-            <span class="en">Connecting Devices Wirelessly</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd.html">
-            <span class="en">Using Network Service Discovery</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/wifi-direct.html">
-            <span class="en">Connecting with Wi-Fi Direct</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/connect-devices-wirelessly/nsd-wifi-direct.html">
-            <span class="en">Using Wi-Fi Direct for Service Discovery</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
-      <li class="nav-section">
-        <div class="nav-section-header"><a href="<?cs var:toroot ?>training/load-data-background/index.html">
-            <span class="en">Loading Data in the Background</span>
-          </a></div>
-        <ul>
-          <li><a href="<?cs var:toroot ?>training/load-data-background/setup-loader.html">
-            <span class="en">Setting Up the Loader</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/load-data-background/define-launch-query.html">
-            <span class="en">Defining and Launching the Query</span>
-          </a>
-          </li>
-          <li><a href="<?cs var:toroot ?>training/load-data-background/handle-results.html">
-            <span class="en">Handling the Results</span>
-          </a>
-          </li>
-        </ul>
-      </li>
-
     </ul>
   </li>
+  <!-- End best Publishing -->
+
 </ul><!-- nav -->
 
 <script type="text/javascript">