Merge "docs: add downloads directory with initial set of current files. This directory is not included in the final docs output, but is merely here as a "master" source for the downloadable bits that we upload and serve from elsewhere, such as from Google Cloud Storage." into jb-dev
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java
index b6001eb..81ee192 100644
--- a/core/java/android/accessibilityservice/AccessibilityService.java
+++ b/core/java/android/accessibilityservice/AccessibilityService.java
@@ -66,7 +66,7 @@
  * accessibility service. Following is an example declaration:
  * </p>
  * <pre> &lt;service android:name=".MyAccessibilityService"
- *         android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE&gt;
+ *         android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"&gt;
  *     &lt;intent-filter&gt;
  *         &lt;action android:name="android.accessibilityservice.AccessibilityService" /&gt;
  *     &lt;/intent-filter&gt;
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 079b9bd..22e454f 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -220,8 +220,6 @@
 
         sThis.set(this);
 
-        UserAccounts accounts = initUser(0);
-
         IntentFilter intentFilter = new IntentFilter();
         intentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
         intentFilter.addDataScheme("package");
@@ -242,6 +240,11 @@
         }, userFilter);
     }
 
+    public void systemReady() {
+        mAuthenticatorCache.generateServicesMap();
+        initUser(0);
+    }
+
     private UserAccounts initUser(int userId) {
         synchronized (mUsers) {
             UserAccounts accounts = mUsers.get(userId);
diff --git a/core/java/android/accounts/IAccountAuthenticatorCache.java b/core/java/android/accounts/IAccountAuthenticatorCache.java
index 618771f..20dd585 100644
--- a/core/java/android/accounts/IAccountAuthenticatorCache.java
+++ b/core/java/android/accounts/IAccountAuthenticatorCache.java
@@ -60,4 +60,9 @@
      */
     void setListener(RegisteredServicesCacheListener<AuthenticatorDescription> listener,
             Handler handler);
+
+    /**
+     * Refreshes the authenticator cache.
+     */
+    void generateServicesMap();
 }
\ No newline at end of file
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index ceb8cde..b2e69de 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1731,6 +1731,9 @@
             return this;
         }
 
+        /**
+         * Provide the bitmap to be used as the payload for the BigPicture notification.
+         */
         public BigPictureStyle bigPicture(Bitmap b) {
             mPicture = b;
             return this;
@@ -1809,6 +1812,10 @@
             return this;
         }
 
+        /**
+         * Provide the longer text to be displayed in the big form of the
+         * template in place of the content text.
+         */
         public BigTextStyle bigText(CharSequence cs) {
             mBigText = cs;
             return this;
@@ -1889,6 +1896,9 @@
             return this;
         }
 
+        /**
+         * Append a line to the digest section of the Inbox notification.
+         */
         public InboxStyle addLine(CharSequence cs) {
             mTexts.add(cs);
             return this;
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java
index f827c3d..1a07504 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -132,6 +132,9 @@
     /*package*/ ContentService(Context context, boolean factoryTest) {
         mContext = context;
         mFactoryTest = factoryTest;
+    }
+
+    public void systemReady() {
         getSyncManager();
     }
 
@@ -524,7 +527,7 @@
         }
     }
 
-    public static IContentService main(Context context, boolean factoryTest) {
+    public static ContentService main(Context context, boolean factoryTest) {
         ContentService service = new ContentService(context, factoryTest);
         ServiceManager.addService(ContentResolver.CONTENT_SERVICE_NAME, service);
         return service;
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index b1fc788..d8f9204 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -251,7 +251,7 @@
         return false;
     }
 
-    void generateServicesMap() {
+    public void generateServicesMap() {
         PackageManager pm = mContext.getPackageManager();
         ArrayList<ServiceInfo<V>> serviceInfos = new ArrayList<ServiceInfo<V>>();
         List<ResolveInfo> resolveInfos = pm.queryIntentServices(new Intent(mInterfaceName),
diff --git a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
index 6efc61a..33a73b5 100644
--- a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
+++ b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
@@ -216,6 +216,10 @@
                 final RegisteredServicesCacheListener<AuthenticatorDescription> listener,
                 final Handler handler) {
         }
+
+        @Override
+        public void generateServicesMap() {
+        }
     }
 
     static public class MyMockContext extends MockContext {
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index d115beb..4a75b91 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -32,19 +32,20 @@
 </tr>
 <tr><td><a href="/about/versions/android-1.5.html">1.5</a></td><td>Cupcake</td>  <td>3</td><td>0.2%</td></tr>
 <tr><td><a href="/about/versions/android-1.6.html">1.6</a></td><td>Donut</td>    <td>4</td><td>0.5%</td></tr>
-<tr><td><a href="/about/versions/android-2.1.html">2.1</a></td><td>Eclair</td>   <td>7</td><td>4.7%</td></tr>
-<tr><td><a href="/about/versions/android-2.2.html">2.2</a></td><td>Froyo</td>    <td>8</td><td>17.3%</td></tr>
+<tr><td><a href="/about/versions/android-2.1.html">2.1</a></td><td>Eclair</td>   <td>7</td><td>4.2%</td></tr>
+<tr><td><a href="/about/versions/android-2.2.html">2.2</a></td><td>Froyo</td>    <td>8</td><td>15.5%</td></tr>
 <tr><td><a href="/about/versions/android-2.3.html">2.3 - 2.3.2</a>
-                                   </td><td rowspan="2">Gingerbread</td>    <td>9</td><td>0.4%</td></tr>
+                                   </td><td rowspan="2">Gingerbread</td>    <td>9</td><td>0.3%</td></tr>
 <tr><td><a href="/about/versions/android-2.3.3.html">2.3.3 - 2.3.7
-        </a></td><!-- Gingerbread -->                                       <td>10</td><td>63.6%</td></tr>
+        </a></td><!-- Gingerbread -->                                       <td>10</td><td>60.3%</td></tr>
 <tr><td><a href="/about/versions/android-3.1.html">3.1</a></td>
                                                    <td rowspan="2">Honeycomb</td>      <td>12</td><td>0.5%</td></tr>
-<tr><td><a href="/about/versions/android-3.2.html">3.2</a></td>      <!-- Honeycomb --><td>13</td><td>1.9%</td></tr> 
+<tr><td><a href="/about/versions/android-3.2.html">3.2</a></td>      <!-- Honeycomb --><td>13</td><td>1.8%</td></tr> 
 <tr><td><a href="/about/versions/android-4.0.html">4.0 - 4.0.2</a></td>
-                                                <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.2%</td></tr> 
+                                                <td rowspan="2">Ice Cream Sandwich</td><td>14</td><td>0.1%</td></tr> 
 <tr><td><a href="/about/versions/android-4.0.3.html">4.0.3 - 4.0.4</a></td>
-                                                                     <!-- ICS     -->  <td>15</td><td>10.7%</td></tr> 
+                                                                     <!-- ICS     -->  <td>15</td><td>15.8%</td></tr> 
+<tr><td><a href="/about/versions/android-4.1.html">4.1</a></td>   <td>Jelly Bean</td><td>16</td><td>0.8%</td></tr> 
 </table>
 
 
@@ -52,11 +53,11 @@
 
 <div class="col-7" style="margin-right:0">
 <img alt=""
-src="http://chart.apis.google.com/chart?&cht=p&chs=460x310&chd=t:0.2,0.5,4.7,17.3,0.4,63.6,0.5,1.9,0.2,10.7&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3&chco=c4df9b,6fad0c&chf=bg,s,00000000" />
+src="http://chart.apis.google.com/chart?&cht=p&chs=460x310&chd=t:0.2,0.5,4.2,15.5,0.3,60.3,0.5,1.8,0.1,15.8,0.8&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0|Android%204.0.3|Android%204.1&chco=c4df9b,6fad0c&chf=bg,s,00000000" />
 
 </div><!-- end dashboard-panel -->
 
-<p style="clear:both"><em>Data collected during a 14-day period ending on July 2, 2012</em></p>
+<p style="clear:both"><em>Data collected during a 14-day period ending on August 1, 2012</em></p>
 <!--
 <p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p>
 -->
@@ -81,9 +82,9 @@
 Google Play within a 14-day period ending on the date indicated on the x-axis.</p>
 
 <img alt="" height="250" width="660"
-src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C01/01%7C01/15%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C04/15%7C05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C1%3A%7C2012%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.3,98.2,98.6,98.4,98.4,98.6,98.5,98.6,98.8,98.7,98.9,99.1,99.1|97.2,97.2,97.6,97.5,97.6,97.8,97.8,97.9,98.1,98.1,98.3,98.5,98.6|88.7,89.2,89.9,90.3,90.8,91.4,91.8,92.1,92.5,92.7,93.1,93.5,93.9|58.2,60.1,62.0,63.7,65.2,66.8,68.6,69.9,71.5,72.6,74.0,75.2,76.5|3.5,3.6,4.0,4.1,4.3,4.6,5.5,6.5,7.6,8.2,9.4,11.0,12.8|2.0,2.2,2.6,3.0,3.2,3.5,4.5,5.5,6.6,7.4,8.7,10.4,12.3|0.3,0.4,0.7,0.8,1.1,1.3,2.3,3.3,4.4,5.3,6.7,8.4,10.4&chm=b,c3df9b,0,1,0|b,b6dc7d,1,2,0|tAndroid%202.2,5b831d,2,0,15,,t::-5|b,aadb5e,2,3,0|tAndroid%202.3.3,496c13,3,0,15,,t::-5|b,9ddb3d,3,4,0|b,91da1e,4,5,0|b,80c414,5,6,0|tAndroid%204.0.3,131d02,6,12,15,,t::-5|B,6fad0c,6,7,0&chg=7,25&chdl=Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a0d155,94d134,84c323,73ad18,62960f,507d08&chf=bg,s,00000000" />
+src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chf=bg,s,00000000&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C02/01%7C02/15%7C03/01%7C03/15%7C04/01%7C04/15%7C05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C07/15%7C08/01%7C1%3A%7C2012%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2012%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:98.6,98.4,98.4,98.6,98.5,98.6,98.8,98.7,98.9,99.1,99.1,99.2,98.6|97.6,97.5,97.6,97.8,97.8,97.9,98.1,98.1,98.3,98.5,98.6,98.7,98.1|89.9,90.3,90.8,91.4,91.8,92.1,92.5,92.7,93.1,93.5,93.9,94.2,93.9|62.0,63.7,65.2,66.8,68.6,69.9,71.5,72.6,74.0,75.2,76.5,77.8,78.4|4.0,4.1,4.3,4.6,5.5,6.5,7.6,8.2,9.4,11.0,12.8,15.6,18.1|2.6,3.0,3.2,3.5,4.5,5.5,6.6,7.4,8.7,10.4,12.3,15.1,17.6|0.7,0.8,1.1,1.3,2.3,3.3,4.4,5.3,6.7,8.4,10.4,13.2,15.8&chm=b,c3df9b,0,1,0|b,b6dc7d,1,2,0|tAndroid%202.2,5b831d,2,0,15,,t::-5|b,aadb5e,2,3,0|tAndroid%202.3.3,496c13,3,0,15,,t::-5|b,9ddb3d,3,4,0|b,91da1e,4,5,0|b,80c414,5,6,0|tAndroid%204.0.3,131d02,6,10,15,,t::-5|B,6fad0c,6,7,0&chg=7,25&chdl=Android%201.6|Android%202.1|Android%202.2|Android%202.3.3|Android%203.1|Android%203.2|Android%204.0.3&chco=add274,a0d155,94d134,84c323,73ad18,62960f,507d08" />
 
-<p><em>Last historical dataset collected during a 14-day period ending on July 2, 2012</em></p>
+<p><em>Last historical dataset collected during a 14-day period ending on August 1, 2012</em></p>
 
 
 
@@ -143,26 +144,26 @@
 <th scope="col">xhdpi</th>
 </tr>
 <tr><th scope="row">small</th> 
-<td>1.7%</td>     <!-- small/ldpi -->
+<td>1.5%</td>     <!-- small/ldpi -->
 <td></td>     <!-- small/mdpi -->
-<td>1.3%</td> <!-- small/hdpi -->
+<td>1.2%</td> <!-- small/hdpi -->
 <td></td>     <!-- small/xhdpi -->
 </tr> 
 <tr><th scope="row">normal</th> 
-<td>0.4%</td>  <!-- normal/ldpi -->
-<td>12.9%</td> <!-- normal/mdpi -->
-<td>57.5%</td> <!-- normal/hdpi -->
-<td>18.0%</td>      <!-- normal/xhdpi -->
+<td>0.5%</td>  <!-- normal/ldpi -->
+<td>12.1%</td> <!-- normal/mdpi -->
+<td>55.3%</td> <!-- normal/hdpi -->
+<td>17.4%</td>      <!-- normal/xhdpi -->
 </tr> 
 <tr><th scope="row">large</th> 
-<td>0.2%</td>     <!-- large/ldpi -->
-<td>2.9%</td> <!-- large/mdpi -->
+<td>0.1%</td>     <!-- large/ldpi -->
+<td>2.7%</td> <!-- large/mdpi -->
 <td></td>     <!-- large/hdpi -->
-<td></td>     <!-- large/xhdpi -->
+<td>4.5%</td>     <!-- large/xhdpi -->
 </tr> 
 <tr><th scope="row">xlarge</th> 
 <td></td>     <!-- xlarge/ldpi -->
-<td>5.1%</td> <!-- xlarge/mdpi -->
+<td>4.7%</td> <!-- xlarge/mdpi -->
 <td></td>     <!-- xlarge/hdpi -->
 <td></td>     <!-- xlarge/xhdpi -->
 </tr> 
@@ -173,12 +174,11 @@
 
 <div class="col-7" style="margin-right:0">
 <img alt=""
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg,s,00000000&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi%7CLarge%20/%20ldpi%7CLarge%20/%20mdpi%7CNormal%20/%20hdpi%7CNormal%20/%20ldpi%7CNormal%20/%20mdpi%7CNormal%20/%20xhdpi%7CSmall%20/%20hdpi%7CSmall%20/%20ldpi&chd=t%3A5.1,0.2,2.9,57.5,0.4,12.9,18.0,1.3,1.7" />
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg,s,00000000&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Large%20/%20xhdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Normal%20/%20xhdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A4.7,0.1,2.7,4.5,55.3,0.5,12.1,17.4,1.2,1.5" />
 
 </div>
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on July 2, 2012</em></p>
-
+<p style="clear:both"><em>Data collected during a 7-day period ending on August 1, 2012</em></p>
 
 
 
@@ -217,20 +217,20 @@
 </tr>
 <tr>
 <td>1.1 only</th>
-<td>9.7%</td>
+<td>9.3%</td>
 </tr>
 <tr>
 <td>2.0 &amp; 1.1</th>
-<td>90.3%</td>
+<td>90.7%</td>
 </tr>
 </table>
 </div>
 
 <div class="col-7" style="margin-right:0">
 <img alt=""
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL% 202.0%20%26%201.1&chd=t%3A9.7,90.3&chf=bg,s,00000000" />
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL%202.0%20%26%201.1&chd=t%3A9.3,90.7&chf=bg,s,00000000" />
 
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on July 2, 2012</em></p>
+<p style="clear:both"><em>Data collected during a 7-day period ending on August 1, 2012</em></p>
diff --git a/docs/html/about/start.jd b/docs/html/about/start.jd
index af8344d..fbe70e3 100644
--- a/docs/html/about/start.jd
+++ b/docs/html/about/start.jd
@@ -29,9 +29,9 @@
 <p>Before you write a single line of code, you need to design the user interface and make it fit
 the Android user experience. Although you may know what a user will <em>do</em> with your app, you
 should pause to focus on how a user will <em>interact</em> with it. Your design should be sleek,
-simple, powereful, and tailored to the Android experience.</p>
+simple, powerful, and tailored to the Android experience.</p>
 
-<p>So whether your a one-man shop or a large team, you should study the <a
+<p>So whether you're a one-man shop or a large team, you should study the <a
 href="{@docRoot}design/index.html">Design</a> guidelines first.</p>
 </div>
 
diff --git a/docs/html/about/versions/android-1.6-highlights.jd b/docs/html/about/versions/android-1.6-highlights.jd
index 2ee1d80..edfd7ff 100644
--- a/docs/html/about/versions/android-1.6-highlights.jd
+++ b/docs/html/about/versions/android-1.6-highlights.jd
@@ -49,17 +49,17 @@
 <!-- screenshots float right -->
 
 <div class="screenshot">
-<img src="images/search.png" class="screenshot" alt="" /><br/>
+<img src="{@docRoot}sdk/images/search.png" class="screenshot" alt="" /><br/>
 Quick Search Box
 </div>
  
 <div class="screenshot">
-<img src="images/camera.png" class="screenshot" alt="" /><br/>
+<img src="{@docRoot}sdk/images/camera.png" class="screenshot" alt="" /><br/>
 New Camera/Camcorder UI
 </div>
 
 <div class="screenshot">
-<img src="images/battery.png" class="screenshot" alt="" /><br/>
+<img src="{@docRoot}sdk/images/battery.png" class="screenshot" alt="" /><br/>
 Battery Usage Indicator
 </div>
 
@@ -121,7 +121,7 @@
 <h2 id="GooglePlayUpdates" style="clear:right">Google Play Updates</h2>
 
 <div class="screenshot" style="margin-top:-35px">
-<img src="images/market.png" class="screenshot" alt="" /><br/>
+<img src="{@docRoot}sdk/images/market.png" class="screenshot" alt="" /><br/>
 New Google Play UI
 </div>
 
diff --git a/docs/html/about/versions/android-2.0-highlights.jd b/docs/html/about/versions/android-2.0-highlights.jd
index 2ba9ac7..58b5fda 100644
--- a/docs/html/about/versions/android-2.0-highlights.jd
+++ b/docs/html/about/versions/android-2.0-highlights.jd
@@ -54,27 +54,27 @@
 <!-- screenshots float right -->
 
 <div class="screenshot">
-  <img src="images/2.0/quick-connect.png" class="screenshot" alt="" /><br/>
+  <img src="{@docRoot}sdk/images/2.0/quick-connect.png" class="screenshot" alt="" /><br/>
   Quick Contact for Android
 </div>
 
 <div class="screenshot second">
-  <img src="images/2.0/multiple-accounts.png" class="screenshot" alt="" /><br/>
+  <img src="{@docRoot}sdk/images/2.0/multiple-accounts.png" class="screenshot" alt="" /><br/>
   Multiple Accounts
 </div>
 
 <div class="screenshot">
-  <img src="images/2.0/mms-search.png" class="screenshot" alt="" /><br/>
+  <img src="{@docRoot}sdk/images/2.0/mms-search.png" class="screenshot" alt="" /><br/>
   Messaging Search
 </div>
 
 <div class="screenshot second">
-  <img src="images/2.0/email-inbox.png" class="screenshot" alt="" /><br/>
+  <img src="{@docRoot}sdk/images/2.0/email-inbox.png" class="screenshot" alt="" /><br/>
   Email Combined Inbox
 </div>
 
 <div class="screenshot">
-  <img src="images/2.0/camera-modes.png" class="screenshot" alt="" /><br/>
+  <img src="{@docRoot}sdk/images/2.0/camera-modes.png" class="screenshot" alt="" /><br/>
   Camera Modes
 </div>
 
diff --git a/docs/html/about/versions/android-2.2-highlights.jd b/docs/html/about/versions/android-2.2-highlights.jd
index 37a20d5..190e301 100644
--- a/docs/html/about/versions/android-2.2-highlights.jd
+++ b/docs/html/about/versions/android-2.2-highlights.jd
@@ -71,7 +71,7 @@
 <table class="columns" style="max-width:800px">
 <tr>
   <td>
-<img src="images/2.2/22home.png" alt="" height=230 />
+<img src="{@docRoot}sdk/images/2.2/22home.png" alt="" height=230 />
   </td>
   <td>
 <p style="margin-top:0">New Home screen <span class="green">tips widget</span> assists new users on
@@ -103,7 +103,7 @@
 application, enabling users to auto-complete recipient names from the directory.</p>
   </td>
   <td>
-<img src="images/2.2/22exchange.png" alt="" height=300 />
+<img src="{@docRoot}sdk/images/2.2/22exchange.png" alt="" height=300 />
   </td>
 </tr>
 </table>
@@ -114,7 +114,7 @@
 <table class="columns" style="max-width:800px">
 <tr>
   <td>
-<img src="images/2.2/22gallery.png" alt="" height=220 />
+<img src="{@docRoot}sdk/images/2.2/22gallery.png" alt="" height=220 />
   </td>
   <td>
 <p>Gallery allows you to <span class="green">peek into picture stacks</span> using a zoom
@@ -141,7 +141,7 @@
 two devices.</p>
   </td>
   <td>
-<img src="images/2.2/22hotspot.png" alt="" height=180 />
+<img src="{@docRoot}sdk/images/2.2/22hotspot.png" alt="" height=180 />
   </td>
 </tr>
 </table>
@@ -152,7 +152,7 @@
 <table class="columns" style="max-width:800px">
 <tr>
   <td>
-<img src="images/2.2/22keyboard.png" alt="" height=220 />
+<img src="{@docRoot}sdk/images/2.2/22keyboard.png" alt="" height=220 />
   </td>
   <td>
 <p>Multi-lingual users can add multiple languages to the keyboard and <span class="green">switch
@@ -179,7 +179,7 @@
 which results in faster app switching and smoother performance on memory-constrained devices.</p>
   </td>
   <td>
-<img src="images/2.2/jit-graph.png" alt="" height=200 />
+<img src="{@docRoot}sdk/images/2.2/jit-graph.png" alt="" height=200 />
   </td>
 </tr>
 </table>
diff --git a/docs/html/about/versions/android-2.2.jd b/docs/html/about/versions/android-2.2.jd
index 361e8b6..64ddca4 100644
--- a/docs/html/about/versions/android-2.2.jd
+++ b/docs/html/about/versions/android-2.2.jd
@@ -1,4 +1,4 @@
-page.title=Android 2.2 Platform
+page.title=Android 2.2 APIs
 sdk.platform.version=2.2
 sdk.platform.apiLevel=8
 sdk.platform.majorMinor=minor
@@ -117,7 +117,7 @@
 <p>For more information about setting a preferred install location for your
 application, including a discussion of what types of applications should and
 should not request external installation, please read the <a
-href="{@docRoot}guide/appendix/install-location.html">App Install Location</a>
+href="{@docRoot}guide/topics/data/install-location.html">App Install Location</a>
 document. </p>
 
 <h3 id="backup-manager">Data backup</h3>
diff --git a/docs/html/about/versions/android-2.3.3.jd b/docs/html/about/versions/android-2.3.3.jd
index 55ff346..7a9711d 100644
--- a/docs/html/about/versions/android-2.3.3.jd
+++ b/docs/html/about/versions/android-2.3.3.jd
@@ -1,4 +1,4 @@
-page.title=Android 2.3.3 Platform
+page.title=Android 2.3.3 APIs
 sdk.platform.version=2.3.3
 sdk.platform.apiLevel=10
 
@@ -122,8 +122,8 @@
 <code>&lt;uses-feature android:name="android.hardware.nfc"
 android:required="true"&gt;</code> to the application's manifest.</p>
 
-<p class="note">To look at sample code for NFC, see
-<a href="{@docRoot}resources/samples/NFCDemo/index.html">NFCDemo app</a>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.html">filtering by tag technology</a></li>, <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html">using foreground dispatch</a>, and <a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.html">foreground NDEF push (P2P)</a>.</p>
+<p class="note">For more information, read the 
+  <a href="{@docRoot}guide/topics/connectivity/nfc/index.html">NFC</a> developer guide.</p>
 
 <h3 id="bluetooth">Bluetooth</h3>
 
diff --git a/docs/html/about/versions/android-2.3.4.jd b/docs/html/about/versions/android-2.3.4.jd
index bb4feec..3bb0d7b 100644
--- a/docs/html/about/versions/android-2.3.4.jd
+++ b/docs/html/about/versions/android-2.3.4.jd
@@ -1,4 +1,4 @@
-page.title=Android 2.3.4 Platform
+page.title=Android 2.3.4 APIs
 sdk.platform.version=2.3.4
 sdk.platform.apiLevel=10
 
diff --git a/docs/html/about/versions/android-2.3.jd b/docs/html/about/versions/android-2.3.jd
index 2afa564..8715973 100644
--- a/docs/html/about/versions/android-2.3.jd
+++ b/docs/html/about/versions/android-2.3.jd
@@ -1,4 +1,4 @@
-page.title=Android 2.3 Platform
+page.title=Android 2.3 APIs
 sdk.platform.version=2.3
 sdk.platform.apiLevel=9
 
@@ -76,8 +76,8 @@
 android:required="true"&gt;</code> and <code>&lt;uses-feature
 android:name="android.software.sip.voip"&gt;</code> to the application manifest.</p>
 
-<p class="note">To look at a sample application that uses the SIP API, see <a
-href="{@docRoot}resources/samples/SipDemo/index.html">SIP Demo</a>.</p>
+<p class="note">For more information, read the <a
+href="{@docRoot}guide/topics/connectivity/sip.html">SIP</a> developer guide.</p>
 
 <h3 id="nfc">Near Field Communications (NFC)</h3>
 
diff --git a/docs/html/about/versions/android-3.0.jd b/docs/html/about/versions/android-3.0.jd
index 76e0795..5bfdffc 100644
--- a/docs/html/about/versions/android-3.0.jd
+++ b/docs/html/about/versions/android-3.0.jd
@@ -1,4 +1,4 @@
-page.title=Android 3.0 Platform
+page.title=Android 3.0 APIs
 sdk.platform.version=3.0
 sdk.platform.apiLevel=11
 @jd:body
diff --git a/docs/html/about/versions/android-3.1.jd b/docs/html/about/versions/android-3.1.jd
index 2a845f0..b0e2f08 100644
--- a/docs/html/about/versions/android-3.1.jd
+++ b/docs/html/about/versions/android-3.1.jd
@@ -1,4 +1,4 @@
-page.title=Android 3.1 Platform
+page.title=Android 3.1 APIs
 sdk.platform.version=3.1
 sdk.platform.apiLevel=12
 @jd:body
diff --git a/docs/html/about/versions/android-3.2.jd b/docs/html/about/versions/android-3.2.jd
index 02111a0..e0f0125 100644
--- a/docs/html/about/versions/android-3.2.jd
+++ b/docs/html/about/versions/android-3.2.jd
@@ -1,4 +1,4 @@
-page.title=Android 3.2 Platform
+page.title=Android 3.2 APIs
 sdk.platform.version=3.2
 sdk.platform.apiLevel=13
 @jd:body
diff --git a/docs/html/about/versions/android-4.0.3.jd b/docs/html/about/versions/android-4.0.3.jd
index a8c7e83..a773b6e 100644
--- a/docs/html/about/versions/android-4.0.3.jd
+++ b/docs/html/about/versions/android-4.0.3.jd
@@ -1,4 +1,4 @@
-page.title=Android 4.0.3 Platform
+page.title=Android 4.0.3 APIs
 sdk.platform.version=4.0.3
 sdk.platform.apiLevel=15
 @jd:body
diff --git a/docs/html/about/versions/android-4.0.jd b/docs/html/about/versions/android-4.0.jd
index 99ab9cb..8595eee 100644
--- a/docs/html/about/versions/android-4.0.jd
+++ b/docs/html/about/versions/android-4.0.jd
@@ -1,4 +1,4 @@
-page.title=Android 4.0 Platform
+page.title=Android 4.0 APIs
 sdk.platform.version=4.0
 sdk.platform.apiLevel=14
 @jd:body
diff --git a/docs/html/design/building-blocks/dialogs.jd b/docs/html/design/building-blocks/dialogs.jd
index 2820471..9b653ee 100644
--- a/docs/html/design/building-blocks/dialogs.jd
+++ b/docs/html/design/building-blocks/dialogs.jd
@@ -10,29 +10,28 @@
 <div class="with-callouts">
 
 <ol>
-  <li>
-  <h4>Optional title region</h4>
-  <p>The title introduces the content of your dialog. It can, for example, identify the name of a
-   setting that the user is about to change, or request a decision.</p>
-  </li>
-  <li>
-  <h4>Content area</h4>
-  <p>Dialog content varies widely. For settings dialogs, a dialog may contain UI elements such as
-   sliders, text fields, checkboxes, or radio buttons that allow the user to change app or system
-   settings. In other cases, such as alerts, the content may consist solely of text that provides
-   further context for a user decision.</p>
-  </li>
-
-  <li>
-  <h4>Action buttons</h4>
-  <p>Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely action. However, if the options consist of specific actions such as Close or Wait rather than a confirmation or cancellation of the action described in the content, then all the buttons should be active verbs. Order actions following these rules:</p>
-    <ul>
-    
-    <li>The dismissive action of a dialog is always on the left. Dismissive actions return to the user to the previous state.</li>
-    <li>The affirmative actions are on the right. Affirmative actions continue progress toward the user goal that triggered the dialog.</li>
-    </ul>
-  </li>
+<li>
+<h4>Optional title region</h4>
+<p>The title introduces the content of your dialog. It can, for example, identify the name of a
+ setting that the user is about to change, or request a decision.</p>
+</li>
+<li>
+<h4>Content area</h4>
+<p>Dialog content varies widely. For settings dialogs, a dialog may contain UI elements such as
+ sliders, text fields, checkboxes, or radio buttons that allow the user to change app or system
+ settings. In other cases, such as alerts, the content may consist solely of text that provides
+ further context for a user decision.</p>
+</li>
+<li>
+<h4>Action buttons</h4>
+<p>Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely
+ action. However, if the options consist of specific actions such as Close or Wait rather than
+ a confirmation or cancellation of the action described in the content, then all the buttons
+ should be active verbs. As a rule, the dismissive action of a dialog is always on the left
+ whereas the affirmative actions are on the right.</p>
+</li>
 </ol>
+
 </div>
 
 <img src="{@docRoot}design/media/dialogs_examples.png">
diff --git a/docs/html/design/building-blocks/index.jd b/docs/html/design/building-blocks/index.jd
index e554775..d915aae 100644
--- a/docs/html/design/building-blocks/index.jd
+++ b/docs/html/design/building-blocks/index.jd
@@ -11,7 +11,7 @@
 #text-overlay {
   position: absolute;
   left: 0;
-  top: 520px;
+  top: 472px;
   width: 450px;
 }
 </style>
diff --git a/docs/html/design/building-blocks/tabs.jd b/docs/html/design/building-blocks/tabs.jd
index 8a2eb41..19ed1c3 100644
--- a/docs/html/design/building-blocks/tabs.jd
+++ b/docs/html/design/building-blocks/tabs.jd
@@ -6,7 +6,6 @@
 <p>Tabs in the action bar make it easy to explore and switch between different views or functional
 aspects of your app, or to browse categorized data sets.</p>
 
-<p>For details on using gestures to move between tabs, see the <a href="{@docRoot}design/patterns/swipe-views.html">Swipe Views</a> pattern.</p>
 
 <h2 id="scrollable">Scrollable Tabs</h2>
 
@@ -37,7 +36,7 @@
 <h2 id="fixed">Fixed Tabs</h2>
 
 
-<p>Fixed tabs display all items concurrently. To navigate to a different view, touch the tab, or swipe left or right.</p>
+<p>Fixed tabs display all items concurrently. To navigate to a different view, touch the tab.</p>
 
 <img src="{@docRoot}design/media/tabs_standard.png">
 <div class="figure-caption">
diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs
index 17e08f2..a31fdd3 100644
--- a/docs/html/design/design_toc.cs
+++ b/docs/html/design/design_toc.cs
@@ -36,9 +36,7 @@
       <li><a href="<?cs var:toroot ?>design/patterns/selection.html">Selection</a></li>
       <li><a href="<?cs var:toroot ?>design/patterns/notifications.html">Notifications</a></li>
       <li><a href="<?cs var:toroot ?>design/patterns/settings.html">Settings</a></li>
-      <li><a href="<?cs var:toroot ?>design/patterns/help.html">Help</a></li>
       <li><a href="<?cs var:toroot ?>design/patterns/compatibility.html">Compatibility</a></li>
-      <li><a href="<?cs var:toroot ?>design/patterns/accessibility.html">Accessibility</a></li>
       <li><a href="<?cs var:toroot ?>design/patterns/pure-android.html">Pure Android</a></li>
     </ul>
   </li>
diff --git a/docs/html/design/media/accessibility_contentdesc.png b/docs/html/design/media/accessibility_contentdesc.png
deleted file mode 100644
index b4a5c2d..0000000
--- a/docs/html/design/media/accessibility_contentdesc.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/actionbar_drawer.png b/docs/html/design/media/actionbar_drawer.png
deleted file mode 100644
index 95e04f5..0000000
--- a/docs/html/design/media/actionbar_drawer.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/app_structure_book_detail_page_flip.png b/docs/html/design/media/app_structure_book_detail_page_flip.png
index 1066094..0cca587 100644
--- a/docs/html/design/media/app_structure_book_detail_page_flip.png
+++ b/docs/html/design/media/app_structure_book_detail_page_flip.png
Binary files differ
diff --git a/docs/html/design/media/app_structure_gallery_filmstrip.png b/docs/html/design/media/app_structure_gallery_filmstrip.png
index a937533..483bafa 100644
--- a/docs/html/design/media/app_structure_gallery_filmstrip.png
+++ b/docs/html/design/media/app_structure_gallery_filmstrip.png
Binary files differ
diff --git a/docs/html/design/media/building_blocks_landing.png b/docs/html/design/media/building_blocks_landing.png
index 40ab0da..2da47b7 100644
--- a/docs/html/design/media/building_blocks_landing.png
+++ b/docs/html/design/media/building_blocks_landing.png
Binary files differ
diff --git a/docs/html/design/media/color_spectrum.png b/docs/html/design/media/color_spectrum.png
index b7ab309..7d2c023 100644
--- a/docs/html/design/media/color_spectrum.png
+++ b/docs/html/design/media/color_spectrum.png
Binary files differ
diff --git a/docs/html/design/media/compatibility_physical_buttons.png b/docs/html/design/media/compatibility_physical_buttons.png
index 66a23c8..30d5ddd 100644
--- a/docs/html/design/media/compatibility_physical_buttons.png
+++ b/docs/html/design/media/compatibility_physical_buttons.png
Binary files differ
diff --git a/docs/html/design/media/compatibility_virtual_nav.png b/docs/html/design/media/compatibility_virtual_nav.png
index 27d39b2..ea595a4 100644
--- a/docs/html/design/media/compatibility_virtual_nav.png
+++ b/docs/html/design/media/compatibility_virtual_nav.png
Binary files differ
diff --git a/docs/html/design/media/dialogs_popups_example.png b/docs/html/design/media/dialogs_popups_example.png
index c7536f3..2deb00d 100644
--- a/docs/html/design/media/dialogs_popups_example.png
+++ b/docs/html/design/media/dialogs_popups_example.png
Binary files differ
diff --git a/docs/html/design/media/help_better.png b/docs/html/design/media/help_better.png
deleted file mode 100644
index fde5cb2..0000000
--- a/docs/html/design/media/help_better.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/help_cling.png b/docs/html/design/media/help_cling.png
deleted file mode 100644
index c91d189..0000000
--- a/docs/html/design/media/help_cling.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/help_dont.png b/docs/html/design/media/help_dont.png
deleted file mode 100644
index a1c9841..0000000
--- a/docs/html/design/media/help_dont.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/help_evenbetter.png b/docs/html/design/media/help_evenbetter.png
deleted file mode 100644
index beb88f8..0000000
--- a/docs/html/design/media/help_evenbetter.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/help_overflow.png b/docs/html/design/media/help_overflow.png
deleted file mode 100644
index fb2bc0a..0000000
--- a/docs/html/design/media/help_overflow.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/help_solo_overflow.png b/docs/html/design/media/help_solo_overflow.png
deleted file mode 100644
index 9423ede..0000000
--- a/docs/html/design/media/help_solo_overflow.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/index_landing_page.png b/docs/html/design/media/index_landing_page.png
index 2065344..3f319b0 100644
--- a/docs/html/design/media/index_landing_page.png
+++ b/docs/html/design/media/index_landing_page.png
Binary files differ
diff --git a/docs/html/design/media/multipane_show.png b/docs/html/design/media/multipane_show.png
index 9993c9b..b10c91c 100644
--- a/docs/html/design/media/multipane_show.png
+++ b/docs/html/design/media/multipane_show.png
Binary files differ
diff --git a/docs/html/design/media/notifications_dismiss.png b/docs/html/design/media/notifications_dismiss.png
index 696a97f..71bed4f 100644
--- a/docs/html/design/media/notifications_dismiss.png
+++ b/docs/html/design/media/notifications_dismiss.png
Binary files differ
diff --git a/docs/html/design/media/notifications_expand_contract_msg.png b/docs/html/design/media/notifications_expand_contract_msg.png
deleted file mode 100644
index f37ec2c..0000000
--- a/docs/html/design/media/notifications_expand_contract_msg.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_additional_fail.png b/docs/html/design/media/notifications_pattern_additional_fail.png
index 4f056db..707c98c 100644
--- a/docs/html/design/media/notifications_pattern_additional_fail.png
+++ b/docs/html/design/media/notifications_pattern_additional_fail.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_additional_win.png b/docs/html/design/media/notifications_pattern_additional_win.png
index 9d69dfd..eb193d8 100644
--- a/docs/html/design/media/notifications_pattern_additional_win.png
+++ b/docs/html/design/media/notifications_pattern_additional_win.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_anatomy.png b/docs/html/design/media/notifications_pattern_anatomy.png
index c9fdf85..cacc183 100644
--- a/docs/html/design/media/notifications_pattern_anatomy.png
+++ b/docs/html/design/media/notifications_pattern_anatomy.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_expand_contract.png b/docs/html/design/media/notifications_pattern_expand_contract.png
deleted file mode 100644
index e89835c..0000000
--- a/docs/html/design/media/notifications_pattern_expand_contract.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_expandable.png b/docs/html/design/media/notifications_pattern_expandable.png
deleted file mode 100644
index 30926760..0000000
--- a/docs/html/design/media/notifications_pattern_expandable.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_ongoing_music.png b/docs/html/design/media/notifications_pattern_ongoing_music.png
index 77b24ed..01039bd 100644
--- a/docs/html/design/media/notifications_pattern_ongoing_music.png
+++ b/docs/html/design/media/notifications_pattern_ongoing_music.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_personal.png b/docs/html/design/media/notifications_pattern_personal.png
deleted file mode 100644
index 08880b2..0000000
--- a/docs/html/design/media/notifications_pattern_personal.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_phone_icons.png b/docs/html/design/media/notifications_pattern_phone_icons.png
index bee66c9..09d8a83 100644
--- a/docs/html/design/media/notifications_pattern_phone_icons.png
+++ b/docs/html/design/media/notifications_pattern_phone_icons.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_priority.png b/docs/html/design/media/notifications_pattern_priority.png
deleted file mode 100644
index e89835c..0000000
--- a/docs/html/design/media/notifications_pattern_priority.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_real_time_people.png b/docs/html/design/media/notifications_pattern_real_time_people.png
index d03b6f0..2af40b8 100644
--- a/docs/html/design/media/notifications_pattern_real_time_people.png
+++ b/docs/html/design/media/notifications_pattern_real_time_people.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_social_fail.png b/docs/html/design/media/notifications_pattern_social_fail.png
index aa0e028..2c8fddc 100644
--- a/docs/html/design/media/notifications_pattern_social_fail.png
+++ b/docs/html/design/media/notifications_pattern_social_fail.png
Binary files differ
diff --git a/docs/html/design/media/notifications_pattern_two_actions.png b/docs/html/design/media/notifications_pattern_two_actions.png
deleted file mode 100644
index 7c19f2e..0000000
--- a/docs/html/design/media/notifications_pattern_two_actions.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/media/principles_decide_for_me.png b/docs/html/design/media/principles_decide_for_me.png
index 8080b4e..2d8b883 100644
--- a/docs/html/design/media/principles_decide_for_me.png
+++ b/docs/html/design/media/principles_decide_for_me.png
Binary files differ
diff --git a/docs/html/design/media/principles_error.png b/docs/html/design/media/principles_error.png
index c867fe6..93767660 100644
--- a/docs/html/design/media/principles_error.png
+++ b/docs/html/design/media/principles_error.png
Binary files differ
diff --git a/docs/html/design/media/principles_information_when_need_it.png b/docs/html/design/media/principles_information_when_need_it.png
index d78d5c5..c5ef3ca 100644
--- a/docs/html/design/media/principles_information_when_need_it.png
+++ b/docs/html/design/media/principles_information_when_need_it.png
Binary files differ
diff --git a/docs/html/design/media/principles_keep_it_brief.png b/docs/html/design/media/principles_keep_it_brief.png
index ee7dbbb..9c2813b 100644
--- a/docs/html/design/media/principles_keep_it_brief.png
+++ b/docs/html/design/media/principles_keep_it_brief.png
Binary files differ
diff --git a/docs/html/design/media/principles_never_lose_stuff.png b/docs/html/design/media/principles_never_lose_stuff.png
index 84037d9..acbefea 100644
--- a/docs/html/design/media/principles_never_lose_stuff.png
+++ b/docs/html/design/media/principles_never_lose_stuff.png
Binary files differ
diff --git a/docs/html/design/media/tabs_youtube.png b/docs/html/design/media/tabs_youtube.png
index 31c626c..69e9268 100644
--- a/docs/html/design/media/tabs_youtube.png
+++ b/docs/html/design/media/tabs_youtube.png
Binary files differ
diff --git a/docs/html/design/media/themes_holo_dark.png b/docs/html/design/media/themes_holo_dark.png
index e1f4477..0a5876a 100644
--- a/docs/html/design/media/themes_holo_dark.png
+++ b/docs/html/design/media/themes_holo_dark.png
Binary files differ
diff --git a/docs/html/design/media/themes_holo_inverse.png b/docs/html/design/media/themes_holo_inverse.png
index 528d119..50be4fb 100644
--- a/docs/html/design/media/themes_holo_inverse.png
+++ b/docs/html/design/media/themes_holo_inverse.png
Binary files differ
diff --git a/docs/html/design/media/themes_holo_light.png b/docs/html/design/media/themes_holo_light.png
index 4f34bb3..edc7f77 100644
--- a/docs/html/design/media/themes_holo_light.png
+++ b/docs/html/design/media/themes_holo_light.png
Binary files differ
diff --git a/docs/html/design/media/ui_overview_notifications.png b/docs/html/design/media/ui_overview_notifications.png
index fe4375e..bc0513f 100644
--- a/docs/html/design/media/ui_overview_notifications.png
+++ b/docs/html/design/media/ui_overview_notifications.png
Binary files differ
diff --git a/docs/html/design/patterns/accessibility.jd b/docs/html/design/patterns/accessibility.jd
deleted file mode 100644
index a41397f..0000000
--- a/docs/html/design/patterns/accessibility.jd
+++ /dev/null
@@ -1,61 +0,0 @@
-page.title=Accessibility
-@jd:body
-
-<p>One of Android's missions is to organize the world's information and make it universally accessible and useful. Accessibility is the measure of how successfully a product can be used by people with varying abilities. Our mission applies to all users-including people with disabilities such as visual impairment, color deficiency, hearing loss, and limited dexterity.</p>
-<p><a href="https://www.google.com/#hl=en&q=universal+design&fp=1">Universal design</a> is the practice of making products that are inherently accessible to all users, regardless of ability. The Android design patterns were created in accordance with universal design principles, and following them will help your app meet basic usability standards. Adhering to universal design and enabling Android's accessibility tools will make your app as accessible as possible.</p>
-<p>Robust support for accessibility will increase your app's user base. It may also be required for adoption by some organizations.</p>
-<p><a href="http://www.google.com/accessibility/">Learn more about Google and accessibility.</a></p>
-
-<h2 id="tools">Android's Accessibility Tools</h2>
-<p>Android includes several features that support access for users with visual impairments; they don't require drastic visual changes to your app.</p>
-
-<ul>
-  <li><strong><a href="https://play.google.com/store/apps/details?id=com.google.android.marvin.talkback">TalkBack</a></strong> is a pre-installed screen reader service provided by Google. It uses spoken feedback to describe the results of actions such as launching an app, and events such as notifications.</li>
-  <li><strong>Explore by Touch</strong> is a system feature that works with TalkBack, allowing you to touch your device's screen and hear what's under your finger via spoken feedback. This feature is helpful to users with low vision.</li>
-  <li><strong>Accessibility settings</strong> let you modify your device's display and sound options, such as increasing the text size, changing the speed at which text is spoken, and more.</li>
-</ul>
-
-<p>Some users use hardware or software directional controllers (such as a D-pad, trackball, keyboard) to jump from selection to selection on a screen. They interact with the structure of your app in a linear fashion, similar to 4-way remote control navigation on a television.</p>
-
-<h2 id="tools">Guidelines</h2>
-<p>The Android design principle "I should always know where I am" is key for accessibility concerns. As a user navigates through an application, they need feedback and a mental model of where they are. All users benefit from a strong sense of information hierarchy and an architecture that makes sense. Most users benefit from visual and haptic feedback during their navigation (such as labels, colors, icons, touch feedback) Low vision users benefit from explicit verbal descriptions and large visuals with high contrast.</p>
-<p>As you design your app, think about the labels and notations needed to navigate your app by sound. When using Explore by Touch, the user enables an invisible but audible layer of structure in your application. Like any other aspect of app design, this structure can be simple, elegant, and robust. The following are Android's recommended guidelines to enable effective navigation for all users.</p>
-
-<h4>Make navigation intuitive</h4>
-<p>Design well-defined, clear task flows with minimal navigation steps, especially for major user tasks. Make sure those tasks are navigable via focus controls. </p>
-
-<h4>Use recommended touch target sizes</h4>
-<p>48 dp is the recommended touch target size for on screen elements. Read about <a href="{@docRoot}design/style/metrics-grids.html">Android Metrics and Grids</a> to learn about implementation strategies to help most of your users. For certain users, it may be appropriate to use larger touch targets. An example of this is educational apps, where buttons larger than the minimum recommendations are appropriate for children with developing motor skills and people with manual dexterity challenges.</p>
-
-
-<h4>Label visual UI elements meaningfully</h4>
-<p>In your wireframes, <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">label functional UI components</a> that have no visible text. Those components might be buttons, icons, tabs with icons, and icons with state (like stars). Developers can use the <code><a href="{@docRoot}guide/topics/ui/accessibility/apps.html#label-ui">contentDescription</a></code> attribute to set the label.</p>
-
-<img src="{@docRoot}design/media/accessibility_contentdesc.png">
-
-<h4>Provide alternatives to affordances that time out</h4>
-<p>Your app may have icons or controls that disappear after a certain amount of time. For example, five seconds after starting a video, playback controls may fade from the screen.</p>
-
-<p>Due to the way that TalkBack works, those controls are not read out loud unless they are focused on. If they fade out from the screen quickly, your user may not even be aware that they are available. Therefore, make sure that you are not relying on timed out controls for high priority task flows. (This is a good universal design guideline too.) If the controls enable an important function, make sure that the user can turn on the controls again and/or their function is duplicated elsewhere. You can also change the behavior of your app when accessibility services are turned on. Your developer may be able to make sure that timed-out controls won't disappear.</p>
-
-<h4>Use standard framework controls or enable TalkBack for custom controls</h4>
-<p>Standard Android framework controls work automatically with accessibility services and have ContentDescriptions built in by default.</p>
-
-<p>An oft-overlooked system control is font size. Users can turn on a system-wide large font size in Settings; using the default system font size in your application will enable the user's preferences in your app as well. To enable system font size in your app, mark text and their associated containers to be measured in <a href="{@docRoot}guide/practices/screens_support.html#screen-independence">scale pixels</a>.</p>
-
-<p>Also, keep in mind that when users have large fonts enabled or speak a different language than you, their type might be larger than the space you've allotted for it. Read <a href="{@docRoot}design/style/devices-displays.html">Devices and Displays</a> and <a href="http://developer.android.com/guide/practices/screens_support.html">Supporting Multiple Screens</a> for design strategies.</p>
-
-<p>If you use custom controls, Android has the developer tools in place to allow adherence to the above guidelines and provide meaningful descriptions about the UI. Provide adequate notation on your wireframes and direct your developer to the <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views">Custom Views</a> documentation.</p>
-
-<h4>Try it out yourself</h4>
-<p>Turn on the TalkBack service in <strong>Settings > Accessibility</strong> and navigate your application using directional controls or eyes-free navigation.</p>
-
-<h2>Checklist</h2>
-<ul>
-  <li>Make navigation intuitive</li>
-  <li>Use recommended touch target sizes</li>
-  <li>Label visual UI elements meaningfully</li>
-  <li>Provide alternatives to affordances that time out</li>
-  <li>Use standard framework controls or enable TalkBack for custom controls</li>
-  <li>Try it out yourself</li>
-</ul>
\ No newline at end of file
diff --git a/docs/html/design/patterns/actionbar.jd b/docs/html/design/patterns/actionbar.jd
index 80aa77d..4206301 100644
--- a/docs/html/design/patterns/actionbar.jd
+++ b/docs/html/design/patterns/actionbar.jd
@@ -66,7 +66,7 @@
         <p>
 
 Show the most important actions of your app in the actions section. Actions that don't fit in the
-action bar are moved automatically to the action overflow. Long-press on an icon to view the action's name.
+action bar are moved automatically to the action overflow.
 
         </p>
       </li>
@@ -144,44 +144,28 @@
 <p>For more information, refer to the <a href="{@docRoot}design/patterns/selection.html">Selection
 pattern</a>.</p>
 
-<h2 id="elements">View Controls</h2>
-<p>If your app displays data in different views, the action bar has three different controls to allow users to switch between them: tabs, spinners, and drawers.</p>
+<h2 id="elements">Action Bar Elements</h2>
 
 <h4>Tabs</h4>
-<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Tabs may be fixed, where all tabs are simultaneously displayed, or may scroll, allowing a larger number of views to be presented.</p>
+<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Use tabs
+if you expect your users to switch views frequently.</p>
 
 <img src="{@docRoot}design/media/tabs_youtube.png">
 
-<p><strong>Use tabs if</strong>:</p>
-<ul>
-<li>You expect your app's users to switch views frequently.</li>
-<li>You want the user to be highly aware of the alternate views.</li>
-</ul>
+<p>There are two types of tabs: fixed and scrollable.</p>
 
-<h4>Fixed tabs</h4>
 <div class="layout-content-row">
   <div class="layout-content-col span-6">
-<p><em>Fixed tabs</em> are always visible on the screen, and can't be moved out of the way like scrollable
-tabs. Fixed tabs in the main action bar can move to the top bar when the screen orientation changes.</p>
-
-<p>Use fixed tabs to support quick changes between two or three app views. Fixed tabs should always allow the user to navigate between the views by swiping left or right on the content area.</p>
-
-  </div>
-  <div class="layout-content-col span-7">
-
-    <img src="{@docRoot}design/media/action_bar_pattern_default_tabs.png">
-    <div class="figure-caption">
-      Default fixed tabs shown in Holo Dark &amp; Light.
-    </div>
-
-  </div>
-</div>
 
 <h4>Scrollable tabs</h4>
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-<p><em>Scrollable tabs</em> always take up the entire width of the bar, with the currently active view item in the center, and therefore need to live in a dedicated bar. Scrollable tabs can themselves be scrolled horizontally to bring more tabs into view.</p>
-<p>Use scrollable tabs if you have a large number of views or if you're unsure how many views will be displayed because your app inserts views dynamically (for example, open chats in a messaging app that the user can navigate between). Scrollable tabs should always allow the user to navigate between the views by swiping left or right on the content area as well as swiping the tabs themselves.</p>
+<p><em>Scrollable tabs</em> always take up the entire width of the bar, with the currently active view item in
+the center, and therefore need to live in a dedicated bar. Scrollable tabs can themselves be
+scrolled horizontally to bring more tabs into view.</p>
+<p>Use scrollable tabs if you have a large number of views or if you're unsure how many views will be
+displayed because your app inserts views dynamically (for example, open chats in a messaging app
+that the user can navigate between). Scrollable tabs should always allow the user to navigate
+between the views by swiping left or right on the content area as well as swiping the tabs
+themselves.</p>
 
   </div>
   <div class="layout-content-col span-7">
@@ -202,12 +186,30 @@
 <div class="layout-content-row">
   <div class="layout-content-col span-6">
 
+<h4>Fixed tabs</h4>
+<p><em>Fixed tabs</em> are always visible on the screen, and can't be moved out of the way like scrollable
+tabs. Fixed tabs in the main action bar can move to the top bar when the screen orientation changes.</p>
+
+  </div>
+  <div class="layout-content-col span-7">
+
+    <img src="{@docRoot}design/media/action_bar_pattern_default_tabs.png">
+    <div class="figure-caption">
+      Default fixed tabs shown in Holo Dark &amp; Light.
+    </div>
+
+  </div>
+</div>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-6">
+
 <h4>Spinners</h4>
 <p>A <em>spinner</em> is a drop-down menu that allows users to switch between views of your app. </p>
-<p><strong>Use a spinner in the main action bar if</strong>:</p>
+<p><strong>Use spinners rather than tabs in the main action bar if</strong>:</p>
 <ul>
 <li>You don't want to give up the vertical screen real estate for a dedicated tab bar.</li>
-<li>The user is switching between views of the same data set (for example: calendar events viewed by day, week, or month) or data sets of the same type (such as content for two different accounts).</li>
+<li>You expect your app's users to switch views infrequently.</li>
 </ul>
 
   </div>
@@ -221,24 +223,7 @@
   </div>
 </div>
 
-<h4>Drawers</h4>
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-<p>A <em>drawer</em> is a slide-out menu that allows users to switch between views of your app. It can be opened by touching the action bar's app icon (decorated with the Up caret.) Because it relies on Up navigation, a drawer is only suitable for use at the topmost level of your app's hierarchy.</p>
-
-<p><strong>Open a drawer from the main action bar if</strong>:</p>
-<ul>
-<li>You don't want to give up the vertical screen real estate for a dedicated tab bar.</li>
-<li>You want to provide direct navigation to a number of views within your app which don't have direct relationships between each other.</li>
-</ul>
-
-  </div>
-  <div class="layout-content-col span-7">
-    <img src="{@docRoot}design/media/actionbar_drawer.png">
-  </div>
-</div>
-
-<h2>Action buttons</h2>
+<h4>Action buttons</h4>
 <p><em>Action buttons</em> on the action bar surface your app's most important activities. Think about which
 buttons will get used most often, and order them accordingly. Depending on available screen real
 estate, the system shows your most important actions as action buttons and moves the rest to the
diff --git a/docs/html/design/patterns/app-structure.jd b/docs/html/design/patterns/app-structure.jd
index a483522..e2398ed 100644
--- a/docs/html/design/patterns/app-structure.jd
+++ b/docs/html/design/patterns/app-structure.jd
@@ -185,18 +185,28 @@
 in a category view.</p>
 <h2 id="details">Details</h2>
 
-<p>The detail view allows you to view and act on your data. The layout of the detail view depends on the data type being displayed, and therefore differs widely among apps.</p>
+<p>The detail view allows you to view and act on your data. The layout of the detail view depends on
+the data type being displayed, and therefore differs widely among apps.</p>
 
 <div class="layout-content-row">
   <div class="layout-content-col span-4">
 
 <h4>Layout</h4>
-<p>Consider the activities people will perform in the detail view and arrange the layout accordingly.</p>
+<p>Consider the activities people will perform in the detail view and arrange the layout accordingly.
+For immersive content, make use of the lights-out mode to allow for distraction-free viewing of
+full-screen content.</p>
+
+    <img src="{@docRoot}design/media/app_structure_people_detail.png">
 
   </div>
   <div class="layout-content-col span-9">
 
-    <img src="{@docRoot}design/media/app_structure_people_detail.png">
+    <img src="{@docRoot}design/media/app_structure_book_detail_page_flip.png">
+    <div class="figure-caption">
+      Google Books' detail view is all about replicating the experience of reading an actual book.
+      The page-flip animation reinforces that notion. To create an immersive experience the app
+      enters lights-out mode, which hides all system UI affordances.
+    </div>
 
     <div class="figure-caption">
       The purpose of the People app's detail view is to surface communication options. The list view
@@ -207,25 +217,9 @@
   </div>
 </div>
 
-<div class="layout-content-row">
-  <div class="layout-content-col span-4">
-
-<h4>Lights-out mode</h4>
-<p>Immersive content like media and games is best experienced full screen without distractions. But that doesn't mean you can't also offer actions on the content like sharing, commenting, or searching. If the user hasn't interacted with any of the controls after a short period of time, automatically fade away the action bar and all system UI affordances so the user can lean back and enjoy the content. We call this lights-out mode. Later, if the user wants to take some action, they can touch anywhere on the screen to exit lights-out mode and bring back the controls.</p>
-
-  </div>
-  <div class="layout-content-col span-9">
-
-    <img src="{@docRoot}design/media/app_structure_book_detail_page_flip.png">
-    <div class="figure-caption">
-      Google Books' detail view replicates the immersive experience of reading an actual book through lights-out mode and a page-flip animation.
-    </div>
-  </div>
-</div>
-
 <h4>Make navigation between detail views efficient</h4>
 <p>If your users are likely to want to look at multiple items in sequence, allow them to navigate
-between items from within the detail view. Use swipe views or other techniques, such as thumbnail view controls,
+between items from within the detail view. Use swipe views or other techniques, such as filmstrips,
 to achieve this.</p>
 
 <img src="{@docRoot}design/media/app_structure_gmail_swipe.png">
@@ -235,8 +229,8 @@
 
 <img src="{@docRoot}design/media/app_structure_gallery_filmstrip.png">
 <div class="figure-caption">
-  In addition to supporting swipe gestures to move left or right through pages, Magazines provides a
-  thumbnail view control that lets people quickly jump to specific pages.
+  In addition to supporting swipe gestures to move left or right through images, Gallery provides a
+  filmstrip control that lets people quickly jump to specific images.
 </div>
 
 <h2 id="checklist">Checklist</h2>
diff --git a/docs/html/design/patterns/help.jd b/docs/html/design/patterns/help.jd
deleted file mode 100644
index 4a92c7b..0000000
--- a/docs/html/design/patterns/help.jd
+++ /dev/null
@@ -1,114 +0,0 @@
-page.title=Help
-@jd:body
-
-<p>We wish we could guarantee that if you follow every piece of advice on this website, everyone will be able to learn and use your app without a hitch. Sadly, that's not the case.</p>
-
-<p>Some of your users will run into questions or problems along the way. They'll be looking for answers <strong>within your app</strong>, and if they don't find them quickly, they may leave and never come back.</p>
-
-<p>This page covers design patterns for making help accessible in your app and tips for creating help content for users who are eager for assistance.</p>
-
-<h2 id="your-app">Designing Help into Your App</h2>
-
-<h3>Don't show unsolicited help, except in very limited cases</h3>
-<p>Naturally, you want everyone to quickly learn the ropes, discover the cool features, and get the most out of your app. So you might be tempted to present a one-time introductory slideshow, video, or splash screen to all new users when they first open the app. Or you might be drawn to the idea of displaying helpful text bubbles or dialogs when users interact with certain features for the first time.</p>
-<p>In almost all cases, we advise <strong>against</strong> approaches like these because:</p>
-<ul>
-  <li><strong>They're interruptions.</strong> People will be eager to start using your app, and anything you put in front of them will feel like an obstacle or possibly an annoyance, despite your good intentions. And because they didn't ask for it, they probably won't pay close attention to it.</li>
-  <li><strong>They're usually not necessary.</strong> If you have usability concerns about an aspect of your app, don't just throw help at the problem. Try to solve it in the UI. Apply Android design patterns, styles, and building blocks, and you'll go a long way in reducing the need to educate your users.</li>
-</ul>
-<p>The only reason for showing pure help content to new users unsolicited is:<br>
-<em>To teach high value functionality that's only available through an atypical use of a gesture.</em></p>
-
-<p>For example, we use help content to teach users how to place apps on their Home Screen. This functionality is:</p>
-<div class="layout-content-row">
-  <div class="layout-content-col span-8">
-    <ol>
-      <li><strong>High value</strong>
-      <p>Without it, users wouldn't be able to customize the most frequently-visited Android screen to meet their needs.</p></li>
-      <li><strong>Available only through a gesture</strong>
-      <p>Users can't do this through a button or a menu.</p></li>
-      <li><strong>Atypical for the gesture</strong>
-      <p>Many high value functions invoked through a gesture - like scrolling, swiping tabs, and turning pages - are common and yield expected results. Users will be able to discover them in your app, and unsolicited help is unnecessary. But here, the gesture does something unexpected: press and hold doesn't just select an app, it also immediately navigates to the Home Screen and creates a shortcut to the app that can then be dragged around.</p></li>
-    </ol>
-    <p>However, this is an exceptional case. Most functionality doesn't meet all three of these criteria.</p>
-  </div>
-  <div class="layout-content-col span-5">
-    <img src="{@docRoot}design/media/help_cling.png">
-    <div class="figure-caption">
-      The first time each user visits the All Apps screen, a semi-transparent overlay appears to teach an important gesture.
-    </div>
-  </div>
-  <p class="clearfix">Bottom line: when it comes to offering help in your app, it's much better to <strong>let users come to you</strong> when they need it.</p>
-</div>
-
-<h3 id="standard-design">Follow the standard design for navigating to help</h3>
-
-<p>On every screen in your app, offer help in the <a href="{@docRoot}design/patterns/actionbar.html">action overflow</a>. Always make it the very last item in the menu and label it "Help".</p>
-
-<div class="layout-content-row">
-  <div class="layout-content-col span-7">
-    <img src="{@docRoot}design/media/help_overflow.png">
-  </div>
-  <div class="layout-content-col span-6">
-    <img src="{@docRoot}design/media/help_solo_overflow.png">
-    <div class="figure-caption">
-      Even if your screen has no other action overflow items, "Help" should appear there and not be promoted to the action bar.
-    </div>
-  </div>
-  <p>We've established this standard design so that when users are desperate for help, they won't have to hunt to find it (see design principle: <a href="{@docRoot}design/get-started/principles.html#give-me-tricks">Give me tricks that work everywhere</a>).</p>
-</div>
-
-<h3 id="help-urgent">Assume that every call for help is urgent</h3>
-
-<p>In addition to help, you might want to expose miscellaneous other information, such as copyright info, credits, terms of service, and privacy policy.</p>
-
-<p>Let users access this information through your Help menu item, but don't give it prominence equal to the core help content. Optimize the flow for people who have urgent questions about how to do something or why something is happening in your app. The smaller subset of users who are looking for legal fine print or the names of the people who created the app won't be as burdened by taking a few extra steps.</p>
-
-<p>The same is true for any communication options you might want to provide, such as contacting customer support or submitting feedback. Offer these options in a way that doesn't add an extra step before users see help. When you put the help content forward, you increase the likelihood that users will find the answers on their own, which in turn reduces your support costs.</p>
-
-<p>When someone chooses "Help":</p>
-
-<div class="layout-content-row">
-  <div class="layout-content-col span-4">
-    <img src="{@docRoot}design/media/help_dont.png">
-  </div>
-  <div class="layout-content-col span-4">
-    <img src="{@docRoot}design/media/help_better.png">
-  </div>
-  <div class="layout-content-col span-5">
-    <img src="{@docRoot}design/media/help_evenbetter.png">
-  </div>  
-</div>
-
-<div class="layout-content-row">
-  <div class="layout-content-col span-4">
-    <h4 class="do-dont-label bad">Don't</h4>
-    <p>Present a dialog asking them to choose between help and other options.</p>
-  </div>
-  <div class="layout-content-col span-4">
-    <h4 class="do-dont-label good">Better</h4>
-    <p>Immediately launch a web browser with help content. Place other options in a footer.</p>
-  </div>
-  <div class="layout-content-col span-5">
-    <h4 class="do-dont-label good">Even Better</h4>
-    <p>Build a help screen in your app and offer other options in the action bar.</p>
-    <p>This requires more development work than launching a web browser, but it's a nicer experience for users because they don't leave your app to get the help they need and doesn't require a network connection.</p>
-  </div>
-</div>
-
-<h2>Principles for Writing On-Screen Help Content</h2>
-
-<h4>Help is part of the UI</h4>
-<p>On-screen help is an extension of your app's UI, not a description of it. All words on the screen from the core app to the help should follow our <a href="{@docRoot}design/style/writing.html">Writing Style</a> principles so that the end-to-end experience feels seamless and cohesive.</p>
-
-<h4>Make every pixel count</h4>
-<p>It's not necessary to document every single detail about your app, especially things that are extremely apparent just by looking at the UI, or behaviors that are standard for the platform. Surface just the key additional information that the on-screen text doesn't have room to describe, in a way that makes it easy to map to the screen.</p>
-
-<h4>Pictures are faster than words</h4>
-<p>In describing key UI elements and providing step-by-step instructions, consider combining text with icons, partial screenshots with callouts, and other imagery. You'll need fewer words to explain things, and users will absorb the information more quickly.</p>
-
-<h4>Help me scan, not read</h4>
-<p>People don't read help from start to finish. They scan around, looking for a piece of information containing the answer they need. Make it less burdensome with friendly formatting and layout choices like bold headings, bulleted and numbered lists, tables, and white space between paragraphs. And if you have a large amount of content, divide it into multiple screens to cut down on scrolling.</p>
-
-<h4>Take me straight to the answer</h4>
-<p>What's better than a screen that's easy to scan? A screen that requires no scanning at all because the answer's right there. Consider having each screen in your app navigate to help that's relevant just to that screen. We call this <em>contextual help</em>, and it's the holy grail of user assistance. If you take this approach, be sure to also provide a way to get to the rest of the help content.</p>
\ No newline at end of file
diff --git a/docs/html/design/patterns/multi-pane-layouts.jd b/docs/html/design/patterns/multi-pane-layouts.jd
index f752be2..0e63e32 100644
--- a/docs/html/design/patterns/multi-pane-layouts.jd
+++ b/docs/html/design/patterns/multi-pane-layouts.jd
@@ -26,8 +26,8 @@
 relationship between the panels.</p>
 <h2 id="orientation">Compound Views and Orientation Changes</h2>
 
-<p>Screens should strive to have the same functionality regardless of orientation. If you use a compound view in
-one orientation, try not to split it up when the user rotates the screen. There are several techniques
+<p>Screens should have the same functionality regardless of orientation. If you use a compound view in
+one orientation, don't split it up when the user rotates the screen. There are several techniques
 you can use to adjust the layout after orientation change while keeping functional parity intact.</p>
 
 <div class="layout-content-row">
@@ -83,7 +83,9 @@
   <div class="layout-content-col span-5">
 
 <h4>Show/hide</h4>
-<p>If your screen cannot accommodate the compound view on rotation show the right pane in full screen view on rotation to portrait. Use the Up icon in action bar to show the parent screen.</p>
+<p>After rotating the device, show the right pane in fullscreen view. Use the Up icon in the action bar
+to show the left panel and allow navigation to a different email. Hide the left panel by touching
+the content in the detail panel.</p>
 
   </div>
 </div>
@@ -102,7 +104,7 @@
 <p>Look for opportunities to consolidate your views into multi-panel compound views.</p>
 </li>
 <li>
-<p>Make sure that your screens try to provide functional parity after the screen orientation
+<p>Make sure that your screens provide functional parity after the screen orientation
   changes.</p>
 </li>
 </ul>
diff --git a/docs/html/design/patterns/notifications.jd b/docs/html/design/patterns/notifications.jd
index fbb05e3..ad88a01 100644
--- a/docs/html/design/patterns/notifications.jd
+++ b/docs/html/design/patterns/notifications.jd
@@ -1,164 +1,11 @@
 page.title=Notifications
 @jd:body
 
-<p>The notification system allows your app to keep the user informed about events, such as new chat messages or a calendar event. Think of notifications as a news channel that alerts the user to important events as they happen or a log that chronicles events while the user is not paying attention.</p>
-
-<h4>New in Jelly Bean</h4>
-<p>In Jelly Bean, notifications received their most important structural and functional update since the beginning of Android.</p>
-<ul>
-  <li>Notifications can include actions that enable the user to immediately act on a notification from the notification drawer.</li>
-  <li>Notifications are now more flexible in size and layout.</li>
-  <li>Stacked notifications can be collapsed and expanded.</li>
-  <li>A priority flag was introduced that helps to sort notifications by importance rather than time only.</li>
-</ul>
-
-<h2>Anatomy of a notification</h2>
-
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-    <h4>Base Layout</h4>
-    <p>At a minimum, all notifications consist of a base layout, including:</p>
-    <ul>
-      <li>the sending application's notification icon or the sender's photo</li>
-      <li>a notification title and message</li>
-      <li>an optional timestamp</li>
-      <li>a secondary icon to identify the sending application when the sender's image is shown for the main icon</li>
-    </ul>
-    <p>The base notification layout has not changed in Jelly Bean, so app notifications designed for versions earlier than Jelly Bean still look and work the same.</p>
-  </div>
-  <div class="layout-content-col span-6">
-    <img src="{@docRoot}design/media/notifications_pattern_anatomy.png">
-    <div class="figure-caption">
-      Base layout of a notification
-    </div>
-  </div>
-</div>
-
-<h4>Expanded layouts</h4>
-<p>With Jelly Bean you have the option to provide more event detail. You can use this to show the first few lines of a message or show a larger image preview. This provides the user with additional context, and - in some cases - may allow the user to read a message in its entirety.  The user can pinch-zoom or two-finger glide in order to toggle between base and expanded layouts. For single event notifications, Android provides two expanded layout templates (text and image) for you to re-use in your application.</p>
-
-<img src="{@docRoot}design/media/notifications_pattern_expandable.png">
-
-<h4>Actions</h4>
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-    <p>Starting with Jelly Bean, Android supports optional actions that are displayed at the bottom of the notification. With actions, users can handle the most common tasks for a particular notification from within the notification shade without having to open the originating application. This speeds up interaction and, in conjunction with "swipe-to-dismiss", helps users to streamline their notification triaging experience.</p>
-    <p>Be judicious with how many actions you include with a notification. The more actions you include, the more cognitive complexity you create. Limit yourself to the fewest number of actions possible by only including the most imminently important and meaningful ones.</p>
-    <p>Good candidates for actions on notifications are actions that are:</p>
-    <ul>
-      <li>essential, frequent and typical for the content type you're displaying</li>
-      <li>time-critical</li>
-      <li>not overlapping with neighboring actions</li>
-    </ul>
-    <p>Avoid actions that are:</p>
-    <ul>
-      <li>ambiguous</li>
-      <li>implicit to the default action of the notification (such as "Read" or "Open")</li>
-    </ul>
-  </div>
-  <div class="layout-content-col span-7">
-    <img src="{@docRoot}design/media/notifications_pattern_two_actions.png">
-    <div class="figure-caption">
-      Calendar reminder notification with two actions
-    </div>
-  </div>
-</div>
-
-<p>You can specify a maximum of three actions, each consisting of an action icon and an action name. Adding actions to a base layout will make the notification expandable, even if the notification doesn't have an expanded layout. Since actions are only shown for expanded notifications and are otherwise hidden, you must make sure that any action a user can invoke from a notification is available from within the associated application as well.</p>
-
-<h2>Design guidelines</h2>
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-    <img src="{@docRoot}design/media/notifications_pattern_personal.png">
-  </div>
-  <div class="layout-content-col span-7">
-    <h4>Make it personal</h4>
-    <p>For notifications of items sent by another user (such as a message or status update), include that person's image.</p>
-    <p>Remember to include the app icon as a secondary icon in the notification, so that the user can still identify which app posted it.</p>
-  </div>
-</div>
-
-<h4>Navigate to the right place</h4>
-<p>When the user touches a notification, open your app to the place where the user can consume and
-act upon the data referenced in the notification. In most cases this will be the detail view of a
-single data item such as a message, but it might also be a summary view if the notification is
-stacked (see <em>Stacked notifications</em> below) and references multiple items. If in any of those cases
-the user is taken to a hierarchy level below your app's top-level, insert navigation into your app's
-back stack to allow them to navigate to your app's top level using the system back key. For more
-information, see the chapter on <em>System-to-app navigation</em> in the
-<a href="{@docRoot}design/patterns/navigation.html">Navigation</a> design pattern.</p>
-<h4>Timestamps for time sensitive events</h4>
-<p>By default, standard Android notifications include a timestamp. Consider
-whether the timestamp is valuable in the context of your notification.</p>
-<p>Include a timestamp if the user likely needs to know how long ago the notification occurred. Good
-candidates for timestamps include communication notifications (email, messaging, chat, voicemail)
-where the user may need the timestamp information to understand the context of a message or to
-tailor a response.</p>
-
-<h4>Correctly set and manage notification priority</h4>
-<p>Starting with Jelly Bean, Android now supports a priority flag for notifications. It allows you to influence where your notification will appear in comparison to other notifications and help to make sure that users always see their most important notifications first. You can choose from the following priority levels when posting a notification:</p>
-
-<img src="{@docRoot}design/media/notifications_pattern_priority.png">
-
-<table>
-  <tr>
-    <th><strong>Priority</strong></th>
-    <th><strong>Use</strong></th>
-  </tr>
-  <tr>
-    <td>MAX</td>
-    <td>Use for critical and urgent notifications that alert the user to a condition that is time-critical or needs to be resolved before they can continue with a particular task.</td>
-  </tr>
-  <tr>
-    <td>HIGH</td>
-    <td>Use high priority notifications primarily for important communication, such as message or chat events with content that is particularly interesting for the user.</td>
-  </tr>
-  <tr>
-    <td>DEFAULT</td>
-    <td>The default priority. Keep all notifications that don't fall into any of the other categories at this priority level.</td>
-  </tr>
-  <tr>
-    <td>LOW</td>
-    <td>Use for notifications that you still want the user to be informed about, but that rate low in urgency.</td>
-  </tr>
-  <tr>
-    <td>MIN</td>
-    <td>Contextual/background information (e.g. weather information, contextual location information). Minimum     priority notifications will not show in the status bar. The user will only discover them when they expand the notification tray.</td>
-  </tr>
-</table>
-
-<h4>Stack your notifications</h4>
-<p>If your app creates a notification while another of the same type is still pending, avoid creating
-an altogether new notification object. Instead, stack the notification.</p>
-<p>A stacked notification builds a summary description and allows the user to understand how many
-notifications of a particular kind are pending.</p>
-<p><strong>Don't</strong>:</p>
-
-<img src="{@docRoot}design/media/notifications_pattern_additional_fail.png">
-
-<p><strong>Do</strong>:</p>
-
-<img src="{@docRoot}design/media/notifications_pattern_additional_win.png">
-
-<p>You can provide more detail about the individual notifications that make up a stack by using the expanded digest layout. This allows users to gain a better sense of which notifications are pending and if they are interesting enough to be read in detail within the associated app.</p>
-
-<img src="{@docRoot}design/media/notifications_expand_contract_msg.png">
-
-<h4>Make notifications optional</h4>
-<p>Users should always be in control of notifications. Allow the user to silence the notifications from
-your app by adding a notification settings item to your application settings.</p>
-<h4>Use distinct icons</h4>
-<p>By glancing at the notification area, the user should be able to discern what notification types are
-currently pending.</p>
-<p><strong>Do</strong>:</p>
-<p>Look at the notification icons the Android apps already provide and create notification icons for
-  your app that are sufficiently distinct in appearance.</p>
-<p><strong>Don't</strong>:</p>
-<p>Use color to distinguish your app from others. Notification icons should be <a href="{@docRoot}design/style/iconography.html#notification">white</a>.</p>
-
-<h2>Building notifications that users care about</h2>
-<p>To create an app that feels streamlined, pleasant, and respectful, it is important to design your notifications carefully. Notifications embody your app's voice, and contribute to your app's personality. Unwanted or unimportant notifications can annoy the user, so use them judiciously.</p>
-
+<p>The notification system allows your app to keep the user informed about important events, such as
+new messages in a chat app or a calendar event.</p>
+<p>To create an app that feels streamlined, pleasant, and respectful, it is important to design your
+notifications carefully. Notifications embody your app's voice, and contribute to your app's
+personality. Unwanted or unimportant notifications can annoy the user, so use them judiciously.</p>
 <h4>When to display a notification</h4>
 <p>To create an application that people love, it's important to recognize that the user's attention and
 focus is a resource that must be protected. To use an analogy that might resonate with software
@@ -219,10 +66,108 @@
 
   </div>
   <div class="layout-content-col span-6">
+
     <img src="{@docRoot}design/media/notifications_pattern_social_fail.png">
+
   </div>
 </div>
 
+<h2 id="design-guidelines">Design Guidelines</h2>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-6">
+
+    <img src="{@docRoot}design/media/notifications_pattern_anatomy.png">
+
+  </div>
+  <div class="layout-content-col span-6">
+
+<h4>Make it personal</h4>
+<p>For notifications of items sent by another user (such as a message or status update), include that
+person's image.</p>
+<p>Remember to include the app icon as a secondary icon in the notification, so that the user can
+still identify which app posted it.</p>    
+
+  </div>
+</div>
+
+<h4>Navigate to the right place</h4>
+<p>When the user touches a notification, be open your app to the place where the user can consume and
+act upon the data referenced in the notification. In most cases this will be the detail view of a
+single data item (e.g. a message), but it might also be a summary view if the notification is
+stacked (see <em>Stacked notifications</em> below) and references multiple items. If in any of those cases
+the user is taken to a hierarchy level below your app's top-level, insert navigation into your app's
+back stack to allow them to navigate to your app's top level using the system back key. For more
+information, see the chapter on <em>System-to-app navigation</em> in the
+<a href="{@docRoot}design/patterns/navigation.html">Navigation</a> design pattern.</p>
+<h4>Timestamps for time sensitive events</h4>
+<p>By default, standard Android notifications include a timestamp in the upper right corner. Consider
+whether the timestamp is valuable in the context of your notification. If the timestamp is not
+valuable, consider if the event is important enough to warrant grabbing the user's attention with a
+notification. If the notification is important enough, decide if you would like to opt out of
+displaying the timestamp.</p>
+<p>Include a timestamp if the user likely needs to know how long ago the notification occurred. Good
+candidates for timestamps include communication notifications (email, messaging, chat, voicemail)
+where the user may need the timestamp information to understand the context of a message or to
+tailor a response.</p>
+<h4>Stack your notifications</h4>
+<p>If your app creates a notification while another of the same type is still pending, avoid creating
+an altogether new notification object. Instead, stack the notification.</p>
+<p>A stacked notification builds a summary description and allows the user to understand how many
+notifications of a particular kind are pending.</p>
+<p><strong>Don't</strong>:</p>
+
+<img src="{@docRoot}design/media/notifications_pattern_additional_fail.png">
+
+<p><strong>Do</strong>:</p>
+
+<img src="{@docRoot}design/media/notifications_pattern_additional_win.png">
+
+<p>If you keep the summary and detail information on different screens, a stacked notification may need
+to open to a different place in the app than a single notification.</p>
+<p>For example, a single email notification should always open to the content of the email, whereas a
+stacked email notification opens to the Inbox view.</p>
+<h4>Clean up after yourself</h4>
+<p>Just like calendar events, some notifications alert the user to an event that happens at a
+particular point in time. After that moment has passed, the notification is likely not important to
+the user anymore, and you should consider removing it automatically.  The same is true for active
+chat conversations or voicemail messages the user has listened to, users should not have to manually
+dismiss notifications independently from taking action on them.</p>
+
+<div class="vspace size-1">&nbsp;</div>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-7">
+
+<h4>Provide a peek into your notification</h4>
+<p>You can provide a short preview of your notification's content by providing optional ticker text.
+The ticker text is shown for a short amount of time when the notification enters the system and then
+hides automatically.</p>
+
+  </div>
+  <div class="layout-content-col span-6">
+
+    <img src="{@docRoot}design/media/notifications_pattern_phone_ticker.png">
+
+  </div>
+</div>
+
+<h4>Make notifications optional</h4>
+<p>Users should always be in control of notifications. Allow the user to silence the notifications from
+your app by adding a notification settings item to your application settings.</p>
+<h4>Use distinct icons</h4>
+<p>By glancing at the notification area, the user should be able to discern what notification types are
+currently pending.</p>
+<p><strong>Do</strong>:</p>
+<ul>
+<li>Look at the notification icons the Android apps already provide and create notification icons for
+  your app that are sufficiently distinct in appearance.</li>
+</ul>
+<p><strong>Don't</strong>:</p>
+<ul>
+<li>Use color to distinguish your app from others. Notification icons should generally be monochrome.</li>
+</ul>
+
 <h2 id="interacting-with-notifications">Interacting With Notifications</h2>
 
 <div class="layout-content-row">
diff --git a/docs/html/design/patterns/swipe-views.jd b/docs/html/design/patterns/swipe-views.jd
index b98a063..95d65dd 100644
--- a/docs/html/design/patterns/swipe-views.jd
+++ b/docs/html/design/patterns/swipe-views.jd
@@ -65,9 +65,6 @@
   the swipe gesture.</p>
 </li>
 <li>
-<p>If a view contains content that exceeds the width of the screen such as a wide Email message, make sure the user's initial swipes will scroll horizontally within the view. Once the end of the content is reached, an additional swipe should navigate to the next view. In addition, support the use of edge swipes to immediately navigate between views when content scrolls horizontally.</p>
-</li>
-<li>
 <p>Consider adding contextual information in your detail view that informs the user about the
   relative list position of the currently visible item.</p>
 </li>
diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs
index bc028e5..f11e965 100644
--- a/docs/html/distribute/distribute_toc.cs
+++ b/docs/html/distribute/distribute_toc.cs
@@ -74,6 +74,8 @@
         <span class="en">Google Play Badges</a></li>
        <li><a href="<?cs var:toroot ?>distribute/googleplay/promote/brand.html">
         <span class="en">Brand Assets and Guidelines</a></li>
+       <li><a href="<?cs var:toroot ?>distribute/promote/device-art.html">
+        <span class="en">Device Art Generator</a></li>
      </ul>
    </li>
 
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
index 8d04903..76ed619 100644
--- a/docs/html/distribute/googleplay/promote/brand.jd
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -150,7 +150,7 @@
                 <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>yourCompanyName</em></span>
                 </li>
                 <li>A list of products published by you, for example,<br />
-                <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>publisherName</em>M/span>
+                <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>publisherName</em></span>
                 </li>
                 <li>A specific app product details page within Google Play, for example,<br />
                 <span style="margin-left:1em;">http://play.google.com/store/apps/details?id=<em>packageName</em></span>
@@ -171,4 +171,4 @@
 <h2>Other Brands</h2>
 
 <p>Any other brands or icons depicted on this site are <em>not</em> are the property of their
-repective owners and usage is reserved. You must seek the developer for appropriate permission to use them.</p>
+respective owners and usage is reserved. You must seek the developer for appropriate permission to use them.</p>
diff --git a/docs/html/distribute/googleplay/strategies/app-quality.jd b/docs/html/distribute/googleplay/strategies/app-quality.jd
index 26d71d7..6ea862b 100644
--- a/docs/html/distribute/googleplay/strategies/app-quality.jd
+++ b/docs/html/distribute/googleplay/strategies/app-quality.jd
@@ -67,7 +67,7 @@
 <p>
 A great way to improve UI performance is to minimize the complexity of your layouts. If you open up <a href="{@docRoot}tools/help/hierarchy-viewer.html">hierarchyviewer</a> and see that your layouts are more than 5 levels deep, it may be time to simplify your layout. Consider refactoring those deeply nested LinearLayouts into RelativeLayout. The impact of View objects is cumulative &mdash; each one costs about 1 to 2 KB of memory, so large view hierarchies can be a recipe for disaster, causing frequent VM garbage collection passes which block the main (UI) thread. You can learn more in <a href="http://www.youtube.com/watch?v=wDBM6wVEO70">World of ListView</a>, another session at Google I/O.</p>
 <p>
-Lastly, pointed out in the blog post <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">Traceview War Story</a>, tools like <a href="{@docRoot}tools/traceview.html">traceview</code> and <a href="{@docRoot}tools/ddms.html">ddms</a> can be your best friends in improving your app by profiling method calls and monitoring VM memory allocations, respectively.</p>
+Lastly, pointed out in the blog post <a href="http://android-developers.blogspot.com/2010/10/traceview-war-story.html">Traceview War Story</a>, tools like <a href="{@docRoot}tools/help/traceview.html">traceview</code> and <a href="{@docRoot}tools/help/ddms.html">ddms</a> can be your best friends in improving your app by profiling method calls and monitoring VM memory allocations, respectively.</p>
 
 
 <h2 id="usability">Improve Usability</h2>
@@ -93,7 +93,7 @@
 <p>
 There's no substitute for a real user interface designer&nbsp;&mdash;&nbsp;ideally one who's well-versed in mobile and Android, and ideally handy with both interaction and visual design. One popular venue to post openings for designers is <a href="http://jobs.smashingmagazine.com">jobs.smashingmagazine.com</a>, and leveraging social connections on Twitter and LinkedIn can surface great talent.</p>
 <p>
-If you don't have the luxury of working with a UI designer, there are some ways in which you can improve your app's appearance yourself. First, get familiar with Adobe Photoshop, Adobe Fireworks, or some other raster image editing tool. Mastering the art of the pixel in these apps takes time, but honing this skill can help build polish across your interface designs. Also, master the resources framework by studying <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res;h=a3562fe1af94134486a8a899f02a9c2f7986c8dd;hb=master">the framework UI</a> assets and layouts and reading through the new <a href="{@docRoot}guide/components/resources/available-resources.html">resources documentation</a>. Techniques such as 9-patches and resource directory qualifiers are somewhat unique to Android, and are crucial in building flexible yet aesthetic UIs.</p>
+If you don't have the luxury of working with a UI designer, there are some ways in which you can improve your app's appearance yourself. First, get familiar with Adobe Photoshop, Adobe Fireworks, or some other raster image editing tool. Mastering the art of the pixel in these apps takes time, but honing this skill can help build polish across your interface designs. Also, master the resources framework by studying <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/res/res;h=a3562fe1af94134486a8a899f02a9c2f7986c8dd;hb=master">the framework UI</a> assets and layouts and reading through the new <a href="{@docRoot}guide/topics/resources/index.html">resources documentation</a>. Techniques such as 9-patches and resource directory qualifiers are somewhat unique to Android, and are crucial in building flexible yet aesthetic UIs.</p>
 <p>
 Before you get too far in designing your app and writing the code, make sure to visit the Android Design site and learn about the vision, the building blocks, and the tools of designing beautiful and inspiring user interfaces.</p>
 
@@ -105,7 +105,7 @@
 
 <h2 id="integrate">Integrate with the System and Third-Party apps</h2>
 <p>
-A great way to deliver a delightful user experience is to integrate tightly with the operating system. Features like <a href="{@docRoot}guide/topics/appwidgets/index.html">Home screen widgets</a>, <a href={@docRoot}design/patterns/notifications.html">rich notifications</a>, <a href="{@docRoot}guide/topics/search/index.html">global search integration</a>, and {@link android.widget.QuickContactBadge Quick Contacts} are fairly low-hanging fruit in this regard. </p>
+A great way to deliver a delightful user experience is to integrate tightly with the operating system. Features like <a href="{@docRoot}guide/topics/appwidgets/index.html">Home screen widgets</a>, <a href="{@docRoot}design/patterns/notifications.html">rich notifications</a>, <a href="{@docRoot}guide/topics/search/index.html">global search integration</a>, and {@link android.widget.QuickContactBadge Quick Contacts} are fairly low-hanging fruit in this regard. </p>
 
 <p>For some app categories, basic features like home screen widgets are par for the course. Not including them is a sure-fire way to tarnish an otherwise positive user experience. Some apps can achieve even tighter OS integration with Android's contacts, accounts, and sync APIs. </p>
 <p>
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png
new file mode 100644
index 0000000..f340a62
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png
new file mode 100644
index 0000000..2a4e595
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png
new file mode 100644
index 0000000..f3a3120
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png
new file mode 100644
index 0000000..c40b37c
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png
new file mode 100644
index 0000000..aae684b
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png
new file mode 100644
index 0000000..61a0da9
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png
new file mode 100644
index 0000000..e21a421
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/galaxy_nexus/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
new file mode 100644
index 0000000..2999f35
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
new file mode 100644
index 0000000..cefdd351
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
new file mode 100644
index 0000000..8f7aec7
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
new file mode 100644
index 0000000..b2908a8
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
new file mode 100644
index 0000000..7f4b0b4
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
new file mode 100644
index 0000000..c10bd53
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
new file mode 100644
index 0000000..8b5cc5a
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png
new file mode 100644
index 0000000..f525e8e
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png
new file mode 100644
index 0000000..e26bfe1
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png
new file mode 100644
index 0000000..ea26b73
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png
new file mode 100644
index 0000000..ed4ad0c
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png
new file mode 100644
index 0000000..74bd077
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png
new file mode 100644
index 0000000..bb4bec8
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png
new file mode 100644
index 0000000..8b9a3d9
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_s/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_back.png b/docs/html/distribute/promote/device-art-resources/xoom/land_back.png
new file mode 100644
index 0000000..e1eb075
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png b/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png
new file mode 100644
index 0000000..15e5f50
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png b/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png
new file mode 100644
index 0000000..885508a
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_back.png b/docs/html/distribute/promote/device-art-resources/xoom/port_back.png
new file mode 100644
index 0000000..290ca35
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png b/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png
new file mode 100644
index 0000000..8b3dca3
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png b/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png
new file mode 100644
index 0000000..895b75e
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/xoom/thumb.png b/docs/html/distribute/promote/device-art-resources/xoom/thumb.png
new file mode 100644
index 0000000..8fd08a4
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/xoom/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art.jd b/docs/html/distribute/promote/device-art.jd
new file mode 100644
index 0000000..af36625
--- /dev/null
+++ b/docs/html/distribute/promote/device-art.jd
@@ -0,0 +1,517 @@
+page.title=Device Art Generator
+@jd:body
+
+<p>The device art generator allows you to quickly wrap your app screenshots in real device artwork.
+This provides better visual context for your app screenshots on your web site or in other
+promotional materials.</p>
+
+<p class="note"><strong>Note</strong>: Do <em>not</em> use graphics created here in your 1024x500
+feature image or screenshots for your Google Play app listing.</p>
+
+<hr>
+
+<div class="supported-browser">
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-3">
+    <h4>Step 1</h4>
+    <p>Drag a screenshot from your desktop onto a device to the right.</p>
+  </div>
+  <div class="layout-content-col span-10">
+    <ul id="device-list"></ul>
+  </div>
+</div>
+
+<hr>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-3">
+    <h4>Step 2</h4>
+    <p>Customize the generated image and drag it to your desktop to save.</p>
+    <p id="frame-customizations">
+      <input type="checkbox" id="output-shadow" checked="checked" class="form-field-checkbutton">
+      <label for="output-shadow">Shadow</label><br>
+      <input type="checkbox" id="output-glare" checked="checked" class="form-field-checkbutton">
+      <label for="output-glare">Screen Glare</label><br><br>
+      <a class="button" id="rotate-button">Rotate</a>
+    </p>
+  </div>
+  <div class="layout-content-col span-10">
+    <div id="output">No input image.</div>
+  </div>
+</div>
+
+</div>
+
+<div class="unsupported-browser" style="display: none">
+  <p class="warning"><strong>Error:</strong> This page requires 
+    <span id="unsupported-browser-reason">certain features</span>, which your web browser
+    doesn't support. To continue, navigate to this page on a supported web browser, such as
+    <strong>Google Chrome</strong>.</p>
+  <a href="https://www.google.com/chrome/" class="button">Get Google Chrome</a>
+  <br><br>
+</div>
+
+<style>
+  h4 {
+    text-transform: uppercase;
+  }
+
+  #device-list {
+    padding: 0;
+    margin: 0;
+  }
+
+  #device-list li {
+    display: inline-block;
+    vertical-align: bottom;
+    margin: 0;
+    margin-right: 20px;
+    text-align: center;
+  }
+
+  #device-list li .thumb-container {
+    display: inline-block;
+  }
+
+  #device-list li .thumb-container img {
+    margin-bottom: 8px;
+    opacity: 0.6;
+
+    -webkit-transition: -webkit-transform 0.2s, opacity 0.2s;
+       -moz-transition:    -moz-transform 0.2s, opacity 0.2s;
+            transition:         transform 0.2s, opacity 0.2s;
+  }
+
+  #device-list li.drag-hover .thumb-container img {
+    opacity: 1;
+
+    -webkit-transform: scale(1.1);
+       -moz-transform: scale(1.1);
+            transform: scale(1.1);
+  }
+
+  #device-list li .device-details {
+    font-size: 13px;
+    line-height: 16px;
+    color: #888;
+  }
+
+  #device-list li .device-url {
+    font-weight: bold;
+  }
+
+  #output {
+    color: #f44;
+    font-style: italic;
+  }
+
+  #output img {
+    max-height: 500px;
+  }
+</style>
+<script>
+  // Global variables
+  var g_currentImage;
+  var g_currentDevice;
+
+  // Global constants
+  var MSG_INVALID_INPUT_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files '
+      + 'matching the target device\'s screen resolution in either portrait or landscape.';
+  var MSG_NO_INPUT_IMAGE = 'Drag a screenshot (in PNG format) from your desktop onto a '
+      + 'target device above.'
+  var MSG_GENERATING_IMAGE = 'Generating device art&hellip;';
+
+  var MAX_DISPLAY_HEIGHT = 126; // XOOM, to fit into 200px wide
+
+  // Device manifest.
+  var DEVICES = [
+    {
+      id: 'nexus_7',
+      title: 'Nexus 7',
+      url: 'http://www.android.com/devices/detail/nexus-7',
+      physicalSize: 7,
+      physicalHeight: 7.81,
+      density: 213,
+      landRes: ['shadow', 'back', 'fore'],
+      landOffset: [363,260],
+      portRes: ['shadow', 'back', 'fore'],
+      portOffset: [265,341],
+      portSize: [800,1280],
+    },
+    {
+      id: 'xoom',
+      title: 'Motorola XOOM',
+      url: 'http://www.google.com/phone/detail/motorola-xoom',
+      physicalSize: 10,
+      physicalHeight: 6.61,
+      density: 160,
+      landRes: ['shadow', 'back', 'fore'],
+      landOffset: [218,191],
+      portRes: ['shadow', 'back', 'fore'],
+      portOffset: [199,200],
+      portSize: [800,1280],
+    },
+    {
+      id: 'galaxy_nexus',
+      title: 'Galaxy Nexus',
+      url: 'http://www.android.com/devices/detail/galaxy-nexus',
+      physicalSize: 4.65,
+      physicalHeight: 5.33,
+      density: 320,
+      landRes: ['shadow', 'back', 'fore'],
+      landOffset: [371,199],
+      portRes: ['shadow', 'back', 'fore'],
+      portOffset: [216,353],
+      portSize: [720,1280],
+    },
+    {
+      id: 'nexus_s',
+      title: 'Nexus S',
+      url: 'http://www.google.com/phone/detail/nexus-s',
+      physicalSize: 4.0,
+      physicalHeight: 4.88,
+      density: 240,
+      landRes: ['shadow', 'back', 'fore'],
+      landOffset: [247,135],
+      portRes: ['shadow', 'back', 'fore'],
+      portOffset: [134,247],
+      portSize: [480,800],
+    }
+  ];
+
+  DEVICES = DEVICES.sort(function(x, y) { return x.physicalSize - y.physicalSize; });
+
+  var MAX_HEIGHT = 0;
+  for (var i = 0; i < DEVICES.length; i++) {
+    MAX_HEIGHT = Math.max(MAX_HEIGHT, DEVICES[i].physicalHeight);
+  }
+
+  // Setup performed once the DOM is ready.
+  $(document).ready(function() {
+    if (!checkBrowser()) {
+      return;
+    }
+
+    setupUI();
+
+    // Set up Chrome drag-out
+    $.event.props.push("dataTransfer");
+    document.body.addEventListener('dragstart', function(e) {
+      var a = e.target;
+      if (a.classList.contains('dragout')) {
+        e.dataTransfer.setData('DownloadURL', a.dataset.downloadurl);
+      }
+    }, false);
+  });
+
+  /**
+   * Returns the device from DEVICES with the given id.
+   */
+  function getDeviceById(id) {
+    for (var i = 0; i < DEVICES.length; i++) {
+      if (DEVICES[i].id == id)
+        return DEVICES[i];
+    }
+    return;
+  }
+
+  /**
+   * Checks to make sure the browser supports this page. If not,
+   * updates the UI accordingly and returns false.
+   */
+  function checkBrowser() {
+    // Check for browser support
+    var browserSupportError = null;
+
+    // Must have <canvas>
+    var elem = document.createElement('canvas');
+    if (!elem.getContext || !elem.getContext('2d')) {
+      browserSupportError = 'HTML5 canvas.';
+    }
+
+    // Must have FileReader
+    if (!window.FileReader) {
+      browserSupportError = 'desktop file access';
+    }
+
+    if (browserSupportError) {
+      $('.supported-browser').hide();
+
+      $('#unsupported-browser-reason').html(browserSupportError);
+      $('.unsupported-browser').show();
+      return false;
+    }
+
+    return true;
+  }
+
+  function setupUI() {
+    $('#output').html(MSG_NO_INPUT_IMAGE);
+
+    $('#frame-customizations').hide();
+
+    $('#output-shadow, #output-glare').click(function() {
+      createFrame(g_currentDevice, g_currentImage);
+    });
+
+    // Build device list.
+    $.each(DEVICES, function() {
+      $('<li>')
+          .append($('<div>')
+              .addClass('thumb-container')
+              .append($('<img>')
+                  .attr('src', 'device-art-resources/' + this.id + '/thumb.png')
+                  .attr('height',
+                      Math.floor(MAX_DISPLAY_HEIGHT * this.physicalHeight / MAX_HEIGHT))))
+          .append($('<div>')
+              .addClass('device-details')
+              .html((this.url
+                  ? ('<a class="device-url" href="' + this.url + '">' + this.title + '</a>')
+                  : this.title) +
+                '<br>' +  this.physicalSize + '" @ ' + this.density + 'dpi' +
+                '<br>' + this.portSize[0] + 'x' + this.portSize[1]))
+          .data('deviceId', this.id)
+          .appendTo('#device-list');
+    });
+
+    // Set up drag and drop.
+    $('#device-list li')
+        .live('dragover', function(evt) {
+          $(this).addClass('drag-hover');
+          evt.dataTransfer.dropEffect = 'link';
+          evt.preventDefault();
+        })
+        .live('dragleave', function(evt) {
+          $(this).removeClass('drag-hover');
+        })
+        .live('drop', function(evt) {
+          $('#output').empty().html(MSG_GENERATING_IMAGE);
+          $(this).removeClass('drag-hover');
+          g_currentDevice = getDeviceById($(this).closest('li').data('deviceId'));
+          evt.preventDefault();
+          loadImageFromFileList(evt.dataTransfer.files, function(data) {
+            if (data == null) {
+              $('#output').html(MSG_INVALID_INPUT_IMAGE);
+              return;
+            }
+            loadImageFromUri(data.uri, function(img) {
+              g_currentFilename = data.name;
+              g_currentImage = img;
+              createFrame();
+            });
+          });
+        });
+
+    // Set up rotate button.
+    $('#rotate-button').click(function() {
+      if (!g_currentImage) {
+        return;
+      }
+
+      var w = g_currentImage.naturalHeight;
+      var h = g_currentImage.naturalWidth;
+      var canvas = $('<canvas>')
+          .attr('width', w)
+          .attr('height', h)
+          .get(0);
+
+      var ctx = canvas.getContext('2d');
+      ctx.rotate(-Math.PI / 2);
+      ctx.translate(-h, 0);
+      ctx.drawImage(g_currentImage, 0, 0);
+
+      loadImageFromUri(canvas.toDataURL(), function(img) {
+        g_currentImage = img;
+        createFrame();
+      });
+    });
+  }
+
+  /**
+   * Generates the frame from the current selections (g_currentImage and g_currentDevice).
+   */
+  function createFrame() {
+    var port;
+    if (g_currentImage.naturalWidth  == g_currentDevice.portSize[0] &&
+        g_currentImage.naturalHeight == g_currentDevice.portSize[1]) {
+      if (!g_currentDevice.portRes) {
+        alert('No portrait frame is currently available for this device.');
+        $('#output').html(MSG_NO_INPUT_IMAGE);
+        return;
+      }
+      port = true;
+    } else if (g_currentImage.naturalWidth  == g_currentDevice.portSize[1] &&
+               g_currentImage.naturalHeight == g_currentDevice.portSize[0]) {
+      if (!g_currentDevice.landRes) {
+        alert('No landscape frame is currently available for this device.');
+        $('#output').html(MSG_NO_INPUT_IMAGE);
+        return;
+      }
+      port = false;
+    } else {
+      alert('Screenshots for ' + g_currentDevice.title + ' must be ' +
+          g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] +
+          ' or ' +
+          g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + '.');
+      $('#output').html(MSG_INVALID_INPUT_IMAGE);
+      return;
+    }
+
+    // Load image resources
+    var res = port ? g_currentDevice.portRes : g_currentDevice.landRes;
+    var resList = {};
+    for (var i = 0; i < res.length; i++) {
+      resList[res[i]] = 'device-art-resources/' + g_currentDevice.id + '/' +
+          (port ? 'port_' : 'land_') + res[i] + '.png'
+    }
+
+    var resourceImages = {};
+    loadImageResources(resList, function(r) {
+      resourceImages = r;
+      continuation_();
+    });
+
+    function continuation_() {
+      var width = resourceImages['back'].naturalWidth;
+      var height = resourceImages['back'].naturalHeight;
+      var offset = port ? g_currentDevice.portOffset : g_currentDevice.landOffset;
+
+      var canvas = document.createElement('canvas');
+      canvas.width = width;
+      canvas.height = height;
+
+      var ctx = canvas.getContext('2d');
+      if (resourceImages['shadow'] && $('#output-shadow').is(':checked')) {
+        ctx.drawImage(resourceImages['shadow'], 0, 0);
+      }
+      ctx.drawImage(resourceImages['back'], 0, 0);
+      ctx.drawImage(g_currentImage, offset[0], offset[1]);
+      if (resourceImages['fore'] && $('#output-glare').is(':checked')) {
+        ctx.drawImage(resourceImages['fore'], 0, 0);
+      }
+
+      var dataUrl = canvas.toDataURL();
+      var filename = g_currentFilename
+          ? ('framed_' + g_currentFilename)
+          : 'framed_screenshot.png';
+
+      var $link = $('<a>')
+          .attr('download', filename)
+          .attr('href', dataUrl)
+          .attr('draggable', true)
+          .attr('data-downloadurl', ['image/png', filename, dataUrl].join(':'))
+          .append($('<img>').attr('src', dataUrl))
+          .appendTo($('#output').empty());
+
+      $('#frame-customizations').show();
+    }
+  }
+
+  /**
+   * Loads an image from a data URI. The callback will be called with the <img> once
+   * it loads.
+   */
+  function loadImageFromUri(uri, callback) {
+    callback = callback || function(){};
+
+    var img = document.createElement('img');
+    img.src = uri;
+    img.onload = function() {
+      callback(img);
+    };
+    img.onerror = function() {
+      callback(null);
+    }
+  }
+
+  /**
+   * Loads a set of images (organized by ID). Once all images are loaded, the callback
+   * is triggered with a dictionary of <img>'s, organized by ID.
+   */
+  function loadImageResources(images, callback) {
+    var imageResources = {};
+
+    var checkForCompletion_ = function() {
+      for (var id in images) {
+        if (!(id in imageResources))
+          return;
+      }
+      (callback || function(){})(imageResources);
+      callback = null;
+    };
+
+    for (var id in images) {
+      var img = document.createElement('img');
+      img.src = images[id];
+      (function(img, id) {
+        img.onload = function() {
+          imageResources[id] = img;
+          checkForCompletion_();
+        };
+        img.onerror = function() {
+          imageResources[id] = null;
+          checkForCompletion_();
+        }
+      })(img, id);
+    }
+  }
+
+  /**
+   * Loads the first valid image from a FileList (e.g. drag + drop source), as a data URI. This
+   * method will throw an alert() in case of errors and call back with null.
+   *
+   * @param {FileList} fileList The FileList to load.
+   * @param {Function} callback The callback to fire once image loading is done (or fails).
+   * @return Returns an object containing 'uri' representing the loaded image. There will also be
+   *      a 'name' field indicating the file name, if one is available.
+   */
+  function loadImageFromFileList(fileList, callback) {
+    fileList = fileList || [];
+
+    var file = null;
+    for (var i = 0; i < fileList.length; i++) {
+      if (fileList[i].type.toLowerCase().match(/^image\/png/)) {
+        file = fileList[i];
+        break;
+      }
+    }
+
+    if (!file) {
+      alert('Please use a valid screenshot file (PNG format).');
+      callback(null);
+      return;
+    }
+
+    var fileReader = new FileReader();
+
+    // Closure to capture the file information.
+    fileReader.onload = function(e) {
+      callback({
+        uri: e.target.result,
+        name: file.name
+      });
+    };
+    fileReader.onerror = function(e) {
+      switch(e.target.error.code) {
+        case e.target.error.NOT_FOUND_ERR:
+          alert('File not found.');
+          break;
+        case e.target.error.NOT_READABLE_ERR:
+          alert('File is not readable.');
+          break;
+        case e.target.error.ABORT_ERR:
+          break; // noop
+        default:
+          alert('An error occurred reading this file.');
+      }
+      callback(null);
+    };
+    fileReader.onabort = function(e) {
+      alert('File read cancelled.');
+      callback(null);
+    };
+
+    fileReader.readAsDataURL(file);
+  }
+</script>
diff --git a/docs/html/guide/components/fragments.jd b/docs/html/guide/components/fragments.jd
index 4f62033..7747b31 100644
--- a/docs/html/guide/components/fragments.jd
+++ b/docs/html/guide/components/fragments.jd
@@ -45,17 +45,10 @@
     <li>{@link android.app.FragmentManager}</li>
     <li>{@link android.app.FragmentTransaction}</li>
   </ol>
-
-  <h2>Related samples</h2>
-  <ol>
-    <li><a
-href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a></li>
-    <li><a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">ApiDemos</a></li>
-  </ol>
   
   <h2>See also</h2>
   <ol>
+    <li><a href="{@docRoot}training/basics/fragments/index.html">Building a Dynamic UI with Fragments</a></li>
     <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets
 and Handsets</a></li>
   </ol>
@@ -834,7 +827,7 @@
 
 
 <p>For more samples using fragments (and complete source files for this example),
-see the sample code available in <a
+see the API Demos sample app available in <a
 href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">
 ApiDemos</a> (available for download from the <a
 href="{@docRoot}resources/samples/get.html">Samples SDK component</a>).</p>
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index ba5e1f0..b89914a 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -49,13 +49,6 @@
       LocalService}</a></li>
 </ol>
 
-<h2>Articles</h2>
-<ol>
-  <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li>
-  <li><a href="{@docRoot}resources/articles/service-api-changes-starting-with.html">Service API changes starting
-      with Android 2.0</a></li>
-</ol>
-
 <h2>See also</h2>
 <ol>
 <li><a href="{@docRoot}guide/components/bound-services.html">Bound Services</a></li>
diff --git a/docs/html/guide/google/gcm/adv.jd b/docs/html/guide/google/gcm/adv.jd
index 39e946e..5cb433f 100644
--- a/docs/html/guide/google/gcm/adv.jd
+++ b/docs/html/guide/google/gcm/adv.jd
@@ -203,7 +203,7 @@
 <p>GCM allows a maximum of 4 different collapse keys to be used by the GCM server at any given time. In other words, the GCM server can simultaneously store 4 different send-to-sync messages, each with a different collapse key. If you exceed this number GCM will only keep 4 collapse keys, with no guarantees about which ones they will be.</p>
 
 <h3 id="payload">Messages with payload</h3>
-<p>Unlike a send-to-sync message, every &quot;message with payload&quot; (non-collapsible message) is delivered. The payload the message contains can be up to 4K. For example, here is a JSON-formatted message in an IM application in which spectators are discussing a sporting event:</p>
+<p>Unlike a send-to-sync message, every &quot;message with payload&quot; (non-collapsible message) is delivered. The payload the message contains can be up to 4kb. For example, here is a JSON-formatted message in an IM application in which spectators are discussing a sporting event:</p>
 
 <pre class="prettyprint pretty-json">{
   "registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...",
diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd
index 79edb9f..f471560 100644
--- a/docs/html/guide/google/gcm/gcm.jd
+++ b/docs/html/guide/google/gcm/gcm.jd
@@ -56,7 +56,7 @@
 </div>
 </div>
 
-<p>Google Cloud Messaging for Android (GCM) is a service that helps
+<p>Google Cloud Messaging for Android (GCM) is a free service that helps
 developers  send data from servers to their Android applications on  Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects  of queueing of
   messages and delivery to the target Android application running  on the target
   device.</p>
@@ -545,7 +545,8 @@
 <p>The <code>com.google.android.c2dm.intent.RECEIVE</code> intent is used by GCM to 
 deliver the messages sent by the 3rd-party server to the application running in the device.
 If the server included key-pair values in the <code>data</code> parameter, they are available as 
-extras in this intent, with the keys being the extra names.
+extras in this intent, with the keys being the extra names. GCM also includes an  extra called 
+<code>from</code> which contains the sender ID as an string.
 
 <p>Here is an example, again using the <code>MyIntentReceiver</code> class:</p>
 
@@ -651,8 +652,9 @@
   <tr>
     <td><code>data</code></td>
     <td>A JSON object whose fields represents the key-value pairs of the message's payload data. If present, the payload data it will be
-included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>
-There is no limit on the number of key/value pairs, though there is a limit on the total size of the message. Optional.</td>
+included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. 
+There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). Note that the values <em>must be enclosed by strings</em>. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Also note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). Optional.</td>
+
   </tr>
   <tr>
     <td><code>delay_while_idle</code></td>
@@ -683,7 +685,7 @@
   </tr>
   <tr>
     <td><code>data.&lt;key&gt;</code></td>
-    <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the  message. Optional.</td>
+    <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the  message. Note that the key cannot be a reserved word (<code>from</code> or any word starting with <code>google.</code>). Optional.</td>
   </tr>
   <tr>
     <td><code>delay_while_idle</code></td>
@@ -695,7 +697,7 @@
   </tr>
 </table>
 
-
+<p>If you want to test your request (either JSON or plain text) without delivering the message to the devices, you can set an optional HTTP parameter called <code>dry_run</code> with the value <code>true</code>. The result will be almost identical to running the request without this parameter, except that the message will not be delivered to the devices. Consequently, the response will contain fake IDs for the message and multicast fields (see <a href="#response">Response format</a>).</p>
 
   <h4 id="example-requests">Example requests</h4>
   <p>Here is the smallest possible request (a message without any parameters and just one recipient) using JSON:</p>
@@ -879,8 +881,22 @@
 <li>Request originated from a server not whitelisted in the Server Key IPs.</li>
 
 </ul>
-Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project.<br/>
+Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project. You can check the validity of your API key by running the following command:<br/>
 
+
+<pre># api_key=YOUR_API_KEY
+
+# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send  -d "{\"registration_ids\":[\"ABC\"]}"</pre>
+
+
+
+If you receive a 401 HTTP status code, your API key is not valid. Otherwise you should see something like this:<br/>
+
+<pre>
+{"multicast_id":6782339717028231855,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
+</pre>
+If you want to confirm the validity of a registration ID, you can do so by replacing "ABC" with the registration ID.
+<br/>
 Happens when the HTTP status code is 401.
 
   <dt id="timeout"><strong>Timeout</strong></dt>
@@ -974,7 +990,7 @@
 
 <p>To view  statistics and any error messages for your GCM applications:</p>
 <ol>
-  <li> Go to <code><a href="http://play.google.com/apps/publish">play.google.com/apps/publish</a></code>.</li>
+  <li> Go to the <code><a href="http://play.google.com/apps/publish">Android Developer Console</a></code>.</li>
   <li>Login with your developer account. 
   <p>You will see a page that has a list of all of your apps.</p></li>
   <li> Click on the &quot;statistics&quot; link next to the app for which you want to view GCM stats. 
@@ -982,6 +998,8 @@
   <li>Go to the drop-down menu and select the GCM metric you want to view. 
   </li>
 </ol>
+<p class="note"><strong>Note:</strong> Stats on the Google API Console are not enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Android Developer Console</a>.</p>
+
 <h2 id="example">Examples</h2>
 <p>See the <a href="demo.html">GCM Demo Application</a> document.</p>
 
diff --git a/docs/html/guide/google/gcm/index.jd b/docs/html/guide/google/gcm/index.jd
index 140b076..8079eba 100644
--- a/docs/html/guide/google/gcm/index.jd
+++ b/docs/html/guide/google/gcm/index.jd
@@ -5,6 +5,8 @@
 <p><img src="{@docRoot}images/gcm/gcm-logo.png" /></p>
 <p>Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p>
 
+<p>GCM is completely free no matter how big your messaging needs are, and there are no quotas.</p>
+
 <p>To learn more about GCM, you can join the <a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a> and read the following documents:</p>
 
 <dl>
diff --git a/docs/html/guide/google/play/expansion-files.jd b/docs/html/guide/google/play/expansion-files.jd
index 62ca1e2..750e958 100644
--- a/docs/html/guide/google/play/expansion-files.jd
+++ b/docs/html/guide/google/play/expansion-files.jd
@@ -262,7 +262,7 @@
 href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> service to request URLs
 for the expansion files, then download and save them.
     <p>To greatly reduce the amount of code you must write and ensure a good user experience
-during the download, we recommend you use the <a href="AboutLibraries">Downloader
+during the download, we recommend you use the <a href="#AboutLibraries">Downloader
 Library</a> to implement your download behavior.</p>
     <p>If you build your own download service instead of using the library, be aware that you
 must not change the name of the expansion files and must save them to the proper
diff --git a/docs/html/guide/practices/optimizing-for-3.0.jd b/docs/html/guide/practices/optimizing-for-3.0.jd
index 65c5674..0dd92d9 100644
--- a/docs/html/guide/practices/optimizing-for-3.0.jd
+++ b/docs/html/guide/practices/optimizing-for-3.0.jd
@@ -118,7 +118,7 @@
       <li>Samples for SDK API 11</li>
     </ul>
   </li>
-  <li><a href="{@docRoot}guide/developing/other-ide.html#AVD">Create an AVD</a> for a tablet-type
+  <li><a href="{@docRoot}tools/devices/managing-avds.html">Create an AVD</a> for a tablet-type
 device:
   <p>Set the target to "Android 3.0" and the skin to "WXGA" (the default skin).</p></li>
 </ol>
diff --git a/docs/html/guide/practices/security.jd b/docs/html/guide/practices/security.jd
index 48ccdeb..ce59a9d 100644
--- a/docs/html/guide/practices/security.jd
+++ b/docs/html/guide/practices/security.jd
@@ -134,9 +134,8 @@
 
 <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 <code><a
-href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
-protected with a user password that is not stored on the device).  While this
+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
@@ -716,8 +715,7 @@
 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
-<code><a
-href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for
+{@link java.security.KeyStore} for
 storage.</p>
 
 <a name="Crypto"></a>
@@ -751,8 +749,8 @@
 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 <code><a
-href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
+<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>
 
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
index f6c2247..4529797 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design_launcher_archive.jd
@@ -58,7 +58,7 @@
 
 <h2 id="market">Application Icons on Google Play</h2>
 
-<p>If you are <a href="{@docRoot}tools/publishing/publishing.html">publishing
+<p>If you are <a href="{@docRoot}distribute/index.html">publishing
 your application on Google Play</a>, you will also need to provide a 512x512
 pixel, high-resolution application icon in the <a
 href="http://play.google.com/apps/publish">developer console</a> at upload-time.
diff --git a/docs/html/guide/samples/index.html b/docs/html/guide/samples/index.html
index f4acdbf..959eaf5 100644
--- a/docs/html/guide/samples/index.html
+++ b/docs/html/guide/samples/index.html
@@ -1,10 +1,10 @@
 <html>
 <head>
-<meta http-equiv="refresh" content="0;url=http://developer.android.com/resources/browser.html?tag=sample">
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/tools/samples/index.html">
 <title>Redirecting...</title>
 </head>
 <body>
 <p>You should have been redirected. Please <a
-href="http://developer.android.com/resources/browser.html?tag=sample">click here</a>.</p>
+href="http://developer.android.com/tools/samples/index.html">click here</a>.</p>
 </body>
 </html>
\ No newline at end of file
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd
index 602b6e8..598b08a 100644
--- a/docs/html/guide/topics/data/backup.jd
+++ b/docs/html/guide/topics/data/backup.jd
@@ -187,10 +187,7 @@
 available only on devices running API Level 8 (Android 2.2) or greater, so you should also
 set your <a
 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
-attribute to "8". However, if you implement proper <a
-href="{@docRoot}resources/articles/backward-compatibility.html">backward compatibility</a> in
-your application, you can support this feature for devices running API Level 8 or greater, while
-remaining compatible with older devices.</p>
+attribute to "8".</p>
 
 
 
diff --git a/docs/html/guide/topics/data/install-location.jd b/docs/html/guide/topics/data/install-location.jd
index 19c4b39..5abdced 100644
--- a/docs/html/guide/topics/data/install-location.jd
+++ b/docs/html/guide/topics/data/install-location.jd
@@ -111,10 +111,7 @@
 <p class="caution"><strong>Caution:</strong> Although XML markup such as this will be ignored by
 older platforms, you must be careful not to use programming APIs introduced in API Level 8
 while your {@code minSdkVersion} is less than "8", unless you perform the work necessary to
-provide backward compatibility in your code. For information about building
-backward compatibility in your application code, see the <a
-href="{@docRoot}resources/articles/backward-compatibility.html">Backward Compatibility</a>
-article.</p>
+provide backward compatibility in your code.</p>
 
 
 
@@ -141,17 +138,13 @@
     <dd>Your alarms registered with {@link android.app.AlarmManager} will be cancelled. You must
 manually re-register any alarms when external storage is remounted.</dd>
   <dt>Input Method Engines</dt>
-    <dd>Your <a href="{@docRoot}resources/articles/on-screen-inputs.html">IME</a> will be
+    <dd>Your <a href="{@docRoot}guide/topics/text/creating-input-method.html">IME</a> will be
 replaced by the default IME. When external storage is remounted, the user can open system settings
 to enable your IME again.</dd>
   <dt>Live Wallpapers</dt>
-    <dd>Your running <a href="{@docRoot}resources/articles/live-wallpapers.html">Live Wallpaper</a>
+    <dd>Your running <a href="http://android-developers.blogspot.com/2010/02/live-wallpapers.html">Live Wallpaper</a>
 will be replaced by the default Live Wallpaper. When external storage is remounted, the user can
 select your Live Wallpaper again.</dd>
-  <dt>Live Folders</dt>
-    <dd>Your <a href="{@docRoot}resources/articles/live-folders.html">Live Folder</a> will be
-removed from the home screen. When external storage is remounted, the user can add your Live Folder
-to the home screen again.</dd>
   <dt>App Widgets</dt>
     <dd>Your <a href="{@docRoot}guide/topics/appwidgets/index.html">App Widget</a> will be removed
 from the home screen. When external storage is remounted, your App Widget will <em>not</em> be
@@ -174,7 +167,7 @@
   <dt>Copy Protection</dt>
     <dd>Your application cannot be installed to a device's SD card if it uses Google Play's 
       Copy Protection feature. However, if you use Google Play's 
-      <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, your 
+      <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, your 
       application <em>can</em> be installed to internal or external storage, including SD cards.</dd>
 </dl>
 
diff --git a/docs/html/guide/topics/graphics/opengl.jd b/docs/html/guide/topics/graphics/opengl.jd
index a9fedb7..6114a4a 100644
--- a/docs/html/guide/topics/graphics/opengl.jd
+++ b/docs/html/guide/topics/graphics/opengl.jd
@@ -84,11 +84,8 @@
     this class by creating an instance of {@link android.opengl.GLSurfaceView} and adding your
     {@link android.opengl.GLSurfaceView.Renderer Renderer} to it. However, if you want to capture
     touch screen events, you should extend the {@link android.opengl.GLSurfaceView} class to
-    implement the touch listeners, as shown in OpenGL Tutorials for
-    <a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#touch">ES 1.0</a>,
-    <a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#touch">ES 2.0</a> and the <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.html"
->TouchRotateActivity</a> sample.</dd>
+    implement the touch listeners, as shown in OpenGL training lesson,
+    <a href="{@docRoot}training/graphics/opengl/touch.html">Responding to Touch Events</a>.</dd>
 
   <dt><strong>{@link android.opengl.GLSurfaceView.Renderer}</strong></dt>
   <dd>This interface defines the methods required for drawing graphics in an OpenGL {@link
@@ -164,9 +161,8 @@
   </li>
 </ul>
 
-<p>If you'd like to start building an app with OpenGL right away, have a look at the tutorials for
-<a href="{@docRoot}resources/tutorials/opengl/opengl-es10.html">OpenGL ES 1.0</a> or
-<a href="{@docRoot}resources/tutorials/opengl/opengl-es20.html">OpenGL ES 2.0</a>!
+<p>If you'd like to start building an app with OpenGL right away, follow the
+<a href="{@docRoot}training/graphics/opengl/index.html">Displaying Graphics with OpenGL ES</a> class.
 </p>
 
 <h2 id="manifest">Declaring OpenGL Requirements</h2>
@@ -277,10 +273,6 @@
 </li>
 </ol>
 
-<p>For a complete example of how to apply projection and camera views with OpenGL ES 1.0, see the <a
-href="{@docRoot}resources/tutorials/opengl/opengl-es10.html#projection-and-views">OpenGL ES 1.0
-tutorial</a>.</p>
-
 
 <h3 id="proj-es2">Projection and camera view in OpenGL ES 2.0</h3>
 <p>In the ES 2.0 API, you apply projection and camera view by first adding a matrix member to
@@ -382,8 +374,7 @@
 </li>
 </ol>
 <p>For a complete example of how to apply projection and camera view with OpenGL ES 2.0, see the <a
-href="{@docRoot}resources/tutorials/opengl/opengl-es20.html#projection-and-views">OpenGL ES 2.0
-tutorial</a>.</p>
+href="{@docRoot}training/graphics/opengl/index.html">Displaying Graphics with OpenGL ES</a> class.</p>
 
 <h2 id="faces-winding">Shape Faces and Winding</h2>
 
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index a3d4a95..4807a5e 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -152,7 +152,7 @@
 
 <p class="caution"><strong>Caution:</strong> If your application uses Google Play's Copy 
   Protection feature, it cannot be installed to a device's SD card. However, if you use Google 
-  Play's <a href="{@docRoot}guide/google/play/licensing.html">Application Licensing</a> instead, 
+  Play's <a href="{@docRoot}guide/google/play/licensing/index.html">Application Licensing</a> instead, 
   your application <em>can</em> be installed to internal or external storage, including SD cards.</p>
 
 <p class="note"><strong>Note:</strong> By default, your application will be installed on the
@@ -175,7 +175,7 @@
 storage. However, the system will not allow the user to move the application to external storage if
 this attribute is set to {@code internalOnly}, which is the default setting.</p>
 
-<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for
+<p>Read <a href="{@docRoot}guide/topics/data/install-location.html">App Install Location</a> for
 more information about using this attribute (including how to maintain backward compatibility).</p>
 
 <p>Introduced in: API Level 8.</p>
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
index 7999033..8c47ad7 100644
--- a/docs/html/guide/topics/providers/content-provider-basics.jd
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -1030,12 +1030,12 @@
     A provider defines URI permissions for content URIs in its manifest, using the
     <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
     android:grantUriPermission</a></code>
-    attribute of the
-    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    attribute of the <a href="{@docRoot}guide/topics/manifest/provider-element.html">
+    {@code &lt;provider&gt;}</a>
     element, as well as the
-    {@code <a href="guide/topics/manifest/grant-uri-permission-element.html">
-    &lt;grant-uri-permission&gt;</a>} child element of the
-    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">{@code 
+    &lt;grant-uri-permission&gt;}</a> child element of the
+    <a href="{@docRoot}guide/topics/manifest/provider-element.html">{@code &lt;provider&gt;}</a>
     element. The URI permissions mechanism is explained in more detail in the
     <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide,
     in the section "URI Permissions".
diff --git a/docs/html/guide/topics/resources/accessing-resources.jd b/docs/html/guide/topics/resources/accessing-resources.jd
index 03bb939..0673b6f 100644
--- a/docs/html/guide/topics/resources/accessing-resources.jd
+++ b/docs/html/guide/topics/resources/accessing-resources.jd
@@ -336,6 +336,6 @@
 
 <p>In this example, {@link android.R.layout#simple_list_item_1} is a layout resource defined by the
 platform for items in a {@link android.widget.ListView}. You can use this instead of creating
-your own layout for list items. (For more about using {@link android.widget.ListView}, see the
-<a href="{@docRoot}resources/tutorials/views/hello-listview.html">List View Tutorial</a>.)</p>
+your own layout for list items. For more information, see the
+<a href="{@docRoot}guide/topics/ui/layout/listview.html">List View</a> developer guide.</p>
 
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index c653b0c..cd88ae9 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -169,8 +169,8 @@
     <p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight
 View that consumes no layout space until you explicitly inflate it, at which point, it includes a
 layout file defined by its {@code android:layout} attribute. For more information about using {@link
-android.view.ViewStub}, read <a href="{@docRoot}resources/articles/layout-tricks-stubs.html">Layout
-Tricks: ViewStubs</a>.</p>
+android.view.ViewStub}, read <a href="{@docRoot}training/improving-layouts/loading-ondemand.html">Loading
+  Views On Demand</a>.</p>
     </dd>
 
   <dt id="merge-element"><code>&lt;merge&gt;</code></dt>
@@ -181,8 +181,7 @@
 in another layout file using <a href="#include-element"><code>&lt;include&gt;</code></a> and
 this layout doesn't require a different {@link android.view.ViewGroup} container. For more
 information about merging layouts, read <a
-href="{@docRoot}resources/articles/layout-tricks-merge.html">Layout
-Tricks: Merging</a>.</dd>
+href="{@docRoot}training/improving-layouts/reusing-layouts.html">Re-using Layouts with &lt;include/></a>.</dd>
 
   </dl>
 
diff --git a/docs/html/guide/topics/resources/runtime-changes.jd b/docs/html/guide/topics/resources/runtime-changes.jd
index f5475b4..5f39aa5 100644
--- a/docs/html/guide/topics/resources/runtime-changes.jd
+++ b/docs/html/guide/topics/resources/runtime-changes.jd
@@ -16,8 +16,8 @@
   <ol>
     <li><a href="providing-resources.html">Providing Resources</a></li>
     <li><a href="accessing-resources.html">Accessing Resources</a></li>
-    <li><a href="{@docRoot}resources/articles/faster-screen-orientation-change.html">Faster Screen
-Orientation Change</a></li>
+    <li><a href="http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html">Faster
+        Screen Orientation Change</a></li>
   </ol>
 </div>
 </div>
diff --git a/docs/html/guide/topics/security/security.jd b/docs/html/guide/topics/security/security.jd
index eeaac44..9cdccae 100644
--- a/docs/html/guide/topics/security/security.jd
+++ b/docs/html/guide/topics/security/security.jd
@@ -135,8 +135,7 @@
 
 <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 <code><a
-href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> and
+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
@@ -717,8 +716,7 @@
 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
-<code><a
-href={@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> for
+{@link java.security.KeyStore} for
 storage.</p>
 
 <a name="Crypto"></a>
@@ -752,8 +750,7 @@
 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 <code><a
-href="{@docRoot}reference/java/security/KeyStore.html">KeyStore</a></code> that
+<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>
 
diff --git a/docs/html/guide/topics/sensors/index.jd b/docs/html/guide/topics/sensors/index.jd
index a045899..726476a 100644
--- a/docs/html/guide/topics/sensors/index.jd
+++ b/docs/html/guide/topics/sensors/index.jd
@@ -18,7 +18,7 @@
 issues that we’ve noticed causing problems in some apps.</p>
     </a>
     
-    <a href="android-developers.blogspot.com/2011/06/deep-dive-into-location.html">
+    <a href="http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html">
       <h4>A Deep Dive Into Location</h4>
       <p>I’ve written an open-source reference app that incorporates all of the tips, tricks, and
 cheats I know to reduce the time between opening an app and seeing an up-to-date list of nearby
diff --git a/docs/html/guide/topics/sensors/sensors_overview.jd b/docs/html/guide/topics/sensors/sensors_overview.jd
index e38a843..a162ccf 100644
--- a/docs/html/guide/topics/sensors/sensors_overview.jd
+++ b/docs/html/guide/topics/sensors/sensors_overview.jd
@@ -662,7 +662,7 @@
 <h4>Using Google Play filters to target specific sensor configurations</h4>
 
 <p>If you are publishing your application on Google Play you can use the
-  <a href="{@docRoot}guide//topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;
+  <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;
     </code></a> element in your manifest file to filter your application from devices that do not
 have the appropriate sensor configuration for your application. The
 <code>&lt;uses-feature&gt;</code> element has several hardware descriptors that let you filter
diff --git a/docs/html/guide/topics/text/creating-input-method.jd b/docs/html/guide/topics/text/creating-input-method.jd
index e49610f..7086824 100644
--- a/docs/html/guide/topics/text/creating-input-method.jd
+++ b/docs/html/guide/topics/text/creating-input-method.jd
@@ -1,6 +1,5 @@
 page.title=Creating an Input Method
 parent.title=Articles
-parent.link=../browser.html?tag=article
 @jd:body
 
 <div id="qv-wrapper">
@@ -162,8 +161,8 @@
     In this example, {@code MyKeyboardView} is an instance of a custom implementation of 
     {@link android.inputmethodservice.KeyboardView} that renders a 
     {@link android.inputmethodservice.Keyboard}. If you’re building a traditional QWERTY keyboard, 
-    see the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample 
-    app for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class.
+    see the  Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a> for an example of how to extend the {@link android.inputmethodservice.KeyboardView} class.
 </p>
 <h3 id="CandidateView">Candidates view</h3>
 <p>
@@ -175,7 +174,8 @@
     default behavior, so you don’t have to implement this if you don’t provide suggestions).</p>
 <p>
     For an example implementation that provides user suggestions, see the 
-    <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample app.
+    Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a>.
 </p>
 <h3 id="DesignConsiderations">UI design considerations</h3>
 <p>
@@ -388,8 +388,8 @@
     To intercept hardware keys, override 
     {@link android.inputmethodservice.InputMethodService#onKeyDown(int, KeyEvent) onKeyDown()}
     and {@link android.inputmethodservice.InputMethodService#onKeyUp(int, KeyEvent) onKeyUp()}. 
-    See the <a href=”{@docRoot}resources/samples/SoftKeyboard/index.html”>Soft Keyboard</a> sample 
-    app for an example.
+    See the Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample 
+    app</a> for an example.
 </p>
 <p>
     Remember to call the <code>super()</code> method for keys you don't want to handle yourself.
diff --git a/docs/html/guide/topics/text/spell-checker-framework.jd b/docs/html/guide/topics/text/spell-checker-framework.jd
index 1c2e211..7f7a0b8 100644
--- a/docs/html/guide/topics/text/spell-checker-framework.jd
+++ b/docs/html/guide/topics/text/spell-checker-framework.jd
@@ -1,6 +1,5 @@
 page.title=Spelling Checker Framework
 parent.title=Articles
-parent.link=../browser.html?tag=article
 @jd:body
 <div id="qv-wrapper">
 <div id="qv">
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index 0c1d065..7d36181 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -10,7 +10,7 @@
   <ol>
     <li><a href="#manifest">Manifest Declarations and Permissions</a>
       <ol>
-        <li><a href="service-declaration">Accessibility service declaration</a></li>
+        <li><a href="#service-declaration">Accessibility service declaration</a></li>
         <li><a href="#service-config">Accessibility service configuration</a></li>
       </ol>
     </li>
diff --git a/docs/html/guide/topics/ui/layout/relative.jd b/docs/html/guide/topics/ui/layout/relative.jd
index ee6cf02..47f9417 100644
--- a/docs/html/guide/topics/ui/layout/relative.jd
+++ b/docs/html/guide/topics/ui/layout/relative.jd
@@ -44,19 +44,19 @@
 include:</p>
 <dl>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop"
 >{@code android:layout_alignParentTop}</a></dt>
     <dd>If {@code "true"}, makes the top edge of this view match the top edge of the parent. </dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical"
 >{@code android:layout_centerVertical}</a></dt>
     <dd>If {@code "true"}, centers this child vertically within its parent.</dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below"
 >{@code android:layout_below}</a></dt>
     <dd>Positions the top edge of this view below the view specified with a resource ID.</dd>
   <dt><a
-href="{docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf"
+href="{@docRoot}reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf"
 >{@code android:layout_toRightOf}</a></dt>
     <dd>Positions the left edge of this view to the right of the view specified with a resource ID.</dd>
 </dl>
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
index 3c614d3..3206503 100644
--- a/docs/html/legal.jd
+++ b/docs/html/legal.jd
@@ -18,12 +18,11 @@
 <p>To start developing apps for Android, <a
 href="{@docRoot}sdk/index.html">download the free Android SDK</a>.</p>
 
-
-
 <h2 id="Brands">Android Brands</h2>
 
-<p>The "Android" name and <img src="images/android-logo.png" alt="Android"
-style="margin:0;padding:0 2px;vertical-align:baseline" /> logo are trademarks of Google Inc.
+<p>The "Android" name, the <img src="images/android-logo.png" alt="Android"
+style="margin:0;padding:0 2px;vertical-align:baseline" /> logo, and
+<a href="http://www.google.com/permissions/">other trademarks</a> are property of Google Inc.
 You may not use the logo or the logo's custom typeface.</p>
 
 <p>You may use the word "Android" in a product name only as a descriptor, such as "for Android"
@@ -42,7 +41,7 @@
 <p>For more information about Android brands, see the <a
 href="{@docRoot}distribute/googleplay/promote/brand.html">Android Branding Guidelines</a>.</p>
 
-
+<p>All other trademarks are the property of their respective owners.</p>
 
 <h2 id="WebSite">Web Site Content</h2>
 
@@ -126,4 +125,6 @@
 href="http://developer.android.com">developer.android.com</a> are subject to their own terms, as
 documented on their respective web sites. </p>
 
+
+
 </div>
\ No newline at end of file
diff --git a/docs/html/shareables/training/nsdchat.zip b/docs/html/shareables/training/nsdchat.zip
new file mode 100644
index 0000000..a106975
--- /dev/null
+++ b/docs/html/shareables/training/nsdchat.zip
Binary files differ
diff --git a/docs/html/tools/adk/aoa2.jd b/docs/html/tools/adk/aoa2.jd
index 2a3b2f0..bbccfc3 100644
--- a/docs/html/tools/adk/aoa2.jd
+++ b/docs/html/tools/adk/aoa2.jd
@@ -20,7 +20,7 @@
 </div>
 
 <p>This document describes the changes to the Android Open Accessory (AOA) protocol since its
-initial release, and is a supplement to the documentation of the <a href="oap.html">first
+initial release, and is a supplement to the documentation of the <a href="aoa.html">first
 release of AOA</a>.</p>
 
 <p>The Android Open Accessory Protocol 2.0 adds two new features: audio output (from the Android
diff --git a/docs/html/tools/help/gltracer.jd b/docs/html/tools/help/gltracer.jd
index 35c405e..700ee39 100644
--- a/docs/html/tools/help/gltracer.jd
+++ b/docs/html/tools/help/gltracer.jd
@@ -5,9 +5,9 @@
 <div id="qv">
   <h2>In this document</h2>
   <ol>
-    <li><a href="running">Running Tracer</a></li>
-    <li><a href="generating">Generating a Trace</a></li>
-    <li><a href="analyzing">Analyzing a Trace</a></li>
+    <li><a href="#running">Running Tracer</a></li>
+    <li><a href="#generating">Generating a Trace</a></li>
+    <li><a href="#analyzing">Analyzing a Trace</a></li>
   </ol>
   <h2>See also</h2>
   <ol>
diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd
index 6163fbc..62ec422 100644
--- a/docs/html/tools/revisions/platforms.jd
+++ b/docs/html/tools/revisions/platforms.jd
@@ -870,7 +870,7 @@
 
 <dt>Tools:</dt>
 <dd>
-<p>Adds support for building with Android library projects. See <a href="tools-notes.html">SDK
+<p>Adds support for building with Android library projects. See <a href="{@docRoot}tools/sdk/tools-notes.html">SDK
 Tools, r6</a> for information.</p>
 </dd>
 
diff --git a/docs/html/tools/samples/index.jd b/docs/html/tools/samples/index.jd
index 5c0e8db..ed416e6 100644
--- a/docs/html/tools/samples/index.jd
+++ b/docs/html/tools/samples/index.jd
@@ -3,7 +3,8 @@
 @jd:body
 
 <p>To help you understand some fundamental Android APIs and coding practices, a variety of sample
-code is available from the Android SDK Manager.</p>
+code is available from the Android SDK Manager. Each version of the Android platform available
+from the SDK Manager offers its own set of sample apps.</p>
 
 <p>To download the samples:</p>
 <ol>
@@ -18,14 +19,14 @@
   <li>Select and download <em>Samples for SDK</em>.</li>
 </ol>
 
-<p>When the download is complete, you can find the samples sources at this location:</p>
+<p>When the download is complete, you can find the source code for all samples at this location:</p>
 
 <p style="margin-left:2em">
-<code><em>&lt;sdk&gt;</em>/platforms/&lt;android-version>/samples/</code>
+<code>&lt;sdk&gt;/samples/android-&lt;version>/</code>
 </p>
 
+<p>The {@code &lt;version>} number corresponds to the platform's
+  <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level</a>.</p>
+
 <p>You can easily create new Android projects with the downloaded samples, modify them
-if you'd like, and then run them on an emulator or device. </p>
-<!--
-<p>Below are summaries for several of the available samples.</p>
--->
\ No newline at end of file
+if you'd like, and then run them on an emulator or device.</p>
\ No newline at end of file
diff --git a/docs/html/tools/sdk/installing.jd b/docs/html/tools/sdk/installing.jd
index 126d992..d7f19577 100644
--- a/docs/html/tools/sdk/installing.jd
+++ b/docs/html/tools/sdk/installing.jd
@@ -375,7 +375,7 @@
 <td colspan="3"><code>docs/</code></td>
 <td>A full set of documentation in HTML format, including the Developer's Guide,
 API Reference, and other information. To read the documentation, load the
-file <code>offline.html</code> in a web browser.</td>
+file <code>index.html</code> in a web browser.</td>
 </tr>
 <tr>
 <td colspan="3"><code>platform-tools/</code></td>
diff --git a/docs/html/training/accessibility/service.jd b/docs/html/training/accessibility/service.jd
index f62506b..80ecbc7 100644
--- a/docs/html/training/accessibility/service.jd
+++ b/docs/html/training/accessibility/service.jd
@@ -281,6 +281,6 @@
 
 <p>Now you have a complete, functioning accessibility service.  Try configuring
 how it interacts with the user, by adding Android's <a
-  href="http://developer.android.com/resources/articles/tts.html">text-to-speech
+  href="http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html">text-to-speech
   engine</a>, or using a {@link android.os.Vibrator} to provide haptic
 feedback!</p>
diff --git a/docs/html/training/basics/fragments/communicating.jd b/docs/html/training/basics/fragments/communicating.jd
index 3ac9873..eb9b368 100644
--- a/docs/html/training/basics/fragments/communicating.jd
+++ b/docs/html/training/basics/fragments/communicating.jd
@@ -108,7 +108,7 @@
         implements HeadlinesFragment.OnHeadlineSelectedListener{
     ...
     
-    public void onArticleSelected(Uri articleUri) {
+    public void onArticleSelected(int position) {
         // The user selected the headline of an article from the HeadlinesFragment
         // Do something here to display that article
     }
diff --git a/docs/html/training/basics/network-ops/connecting.jd b/docs/html/training/basics/network-ops/connecting.jd
index f70cf58..ac8d993 100644
--- a/docs/html/training/basics/network-ops/connecting.jd
+++ b/docs/html/training/basics/network-ops/connecting.jd
@@ -66,7 +66,7 @@
 Remember, the device may be out of range of a
 network, or the user may have disabled both Wi-Fi and mobile data access. 
 For more discussion of this topic, see the lesson <a
-href="{@docRoot}training/network-ops/managing.html">Managing Network
+href="{@docRoot}training/basics/network-ops/managing.html">Managing Network
 Usage</a>.</p>
 
 <pre>
diff --git a/docs/html/training/connect-devices-wirelessly/index.jd b/docs/html/training/connect-devices-wirelessly/index.jd
new file mode 100644
index 0000000..37cf633
--- /dev/null
+++ b/docs/html/training/connect-devices-wirelessly/index.jd
@@ -0,0 +1,62 @@
+page.title=Connecting Devices Wirelessly
+
+trainingnavtop=true
+startpage=true
+next.title=Using Network Service Discovery
+next.link=nsd.html
+
+@jd:body
+
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Dependencies and prerequisites</h2>
+<ul>
+  <li>Android 4.1 or higher</li>
+</ul>
+
+<h2>You should also read</h2>
+<ul>
+  <li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi Direct</a></li>
+</ul>
+
+
+</div>
+</div>
+
+
+<p>Besides enabling communication with the cloud, Android's wireless APIs also
+enable communication with other devices on the same local network, and even
+devices which are not on a network, but are physically nearby.  The addition of
+Network Service Discovery (NSD) takes this further by allowing an application to
+seek out a nearby device running services with which it can communicate.
+Integrating this functionality into your application helps you provide a wide range
+of features, such as playing games with users in the same room, pulling
+images from a networked NSD-enabled webcam, or remotely logging into
+other machines on the same network.</p>
+<p>This class describes the key APIs for finding and
+connecting to other devices from your application.  Specifically, it
+describes the NSD API for discovering available services and the Wi-Fi
+Direct&trade; API for doing peer-to-peer wireless connections.  This class also
+shows you how to use NSD and Wi-Fi Direct in
+combination to detect the services offered by a device and connect to the
+device when neither device is connected to a network.
+</p>
+<h2>Lessons</h2>
+
+<dl>
+  <dt><strong><a href="nsd.html">Using Network Service Discovery</a></strong></dt>
+  <dd>Learn how to broadcast services offered by your own application, discover
+  services offered on the local network, and use NSD to determine the connection
+  details for the service you wish to connect to.</dd>
+  <dt><strong><a href="wifi-direct.html">Connecting with Wi-Fi Direct</a></strong></dt>
+  <dd>Learn how to fetch a list of nearby peer devices, create an access point
+  for legacy devices, and connect to other devices capable of Wi-Fi Direct
+  connections.</dd>
+  <dt><strong><a href="nsd-wifi-direct.html">Using Wi-Fi Direct for Service
+      Discovery</a></strong></dt>
+  <dd>Learn how to discover services published by nearby devices without being
+  on the same network, using Wi-Fi Direct.</dd>
+</dl>
+
diff --git a/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd b/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd
new file mode 100644
index 0000000..5e276de
--- /dev/null
+++ b/docs/html/training/connect-devices-wirelessly/nsd-wifi-direct.jd
@@ -0,0 +1,252 @@
+page.title=Using Wi-Fi Direct for Service Discovery
+parent.title=Connecting Devices Wirelessly
+parent.link=index.html
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+  <div id="tb">
+    <h2>This lesson teaches you to</h2>
+    <ol>
+      <li><a href="#manifest">Set Up the Manifest</a></li>
+      <li><a href="#register">Add a Local Service</a></li>
+      <li><a href="#discover">Discover Nearby Services</a></li>
+    </ol>
+    <!--
+    <h2>You should also read</h2>
+    <ul>
+      <li><a href="#"></a></li>
+    </ul>
+    -->
+  </div>
+</div>
+
+<p>The first lesson in this class, <a href="nsd.html">Using Network Service
+  Discovery</a>, showed you
+how to discover services that are connected to a local network. However, using
+Wi-Fi Direct&trad; Service Discovery allows you to discover the services of nearby devices directly,
+without being connected to a network.  You can also advertise the services
+running on your device.  These capabilities help you communicate between apps,
+even when no local network or hotspot is available.</p>
+<p>While this set of APIs is similar in purpose to the Network Service Discovery
+APIs outlined in a previous lesson, implementing them in code is very different.
+This lesson shows you how to discover services available from other devices,
+using Wi-Fi Direct&trade;. The lesson assumes that you're already familiar with the
+<a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi Direct</a> API.</p>
+
+
+<h2 id="manifest">Set Up the Manifest</h2>
+<p>In order to use Wi-Fi Direct, add the {@link
+android.Manifest.permission#CHANGE_WIFI_STATE}, {@link
+android.Manifest.permission#ACCESS_WIFI_STATE},
+and {@link android.Manifest.permission#INTERNET}
+permissions to your manifest.  Even though Wi-Fi Direct doesn't require an
+Internet connection, it uses standard Java sockets, and using these in Android
+requires the requested permissions.</p>
+
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.nsdchat"
+    ...
+
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.CHANGE_WIFI_STATE"/&gt;
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.INTERNET"/&gt;
+    ...
+</pre>
+
+<h2 id="register">Add a Local Service</h2>
+<p>If you're providing a local service, you need to register it for
+service discovery.  Once your local service is registered, the framework
+automatically responds to service discovery requests from peers.</p>
+
+<p>To create a local service:</p>
+
+<ol>
+  <li>Create a
+{@link android.net.wifi.p2p.nsd.WifiP2pServiceInfo} object.</li>
+  <li>Populate it with information about your service.</li>
+  <li>Call {@link
+android.net.wifi.p2p.WifiP2pManager#addLocalService(WifiP2pManager.Channel,
+WifiP2pServiceInfo, WifiP2pManager.ActionListener) addLocalService()} to register the local
+service for service discovery.</li>
+</ol>
+
+<pre>
+     private void startRegistration() {
+        //  Create a string map containing information about your service.
+        Map<String,String> record = new HashMap<String,String>();
+        record.put("listenport", String.valueOf(SERVER_PORT));
+        record.put("buddyname", "John Doe" + (int) (Math.random() * 1000));
+        record.put("available", "visible");
+
+        // Service information.  Pass it an instance name, service type
+        // _protocol._transportlayer , and the map containing
+        // information other devices will want once they connect to this one.
+        WifiP2pDnsSdServiceInfo serviceInfo =
+                WifiP2pDnsSdServiceInfo.newInstance("_test", "_presence._tcp", record);
+
+        // Add the local service, sending the service info, network channel,
+        // and listener that will be used to indicate success or failure of
+        // the request.
+        mManager.addLocalService(channel, serviceInfo, new ActionListener() {
+            &#64;Override
+            public void onSuccess() {
+                // Command successful! Code isn't necessarily needed here,
+                // Unless you want to update the UI or add logging statements.
+            }
+
+            &#64;Override
+            public void onFailure(int arg0) {
+                // Command failed.  Check for P2P_UNSUPPORTED, ERROR, or BUSY
+            }
+        });
+    }
+</pre>
+
+<h2 id="discover">Discover Nearby Services</h2>
+<p>Android uses callback methods to notify your application of available services, so
+the first thing to do is set those up.  Create a {@link
+android.net.wifi.p2p.WifiP2pManager.DnsSdTxtRecordListener} to listen for
+incoming records.  This record can optionally be broadcast by other
+devices.  When one comes in, copy the device address and any other
+relevant information you want into a data structure external to the current
+method, so you can access it later.  The following example assumes that the
+record contains a "buddyname" field, populated with the user's identity.</p>
+
+<pre>
+final HashMap&lt;String, String&gt; buddies = new HashMap&lt;String, String&gt;();
+...
+private void discoverService() {
+    DnsSdTxtRecordListener txtListener = new DnsSdTxtRecordListener() {
+        &#64;Override
+        /* Callback includes:
+         * fullDomain: full domain name: e.g "printer._ipp._tcp.local."
+         * record: TXT record dta as a map of key/value pairs.
+         * device: The device running the advertised service.
+         */
+
+        public void onDnsSdTxtRecordAvailable(
+                String fullDomain, Map<String,String> record, WifiP2pDevice device) {
+                Log.d(TAG, "DnsSdTxtRecord available -" + record.toString());
+                buddies.put(device.deviceAddress, record.get("buddyname"));
+            }
+        };
+    ...
+}
+</pre>
+
+<p>To get the service information, create a {@link
+android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener}.  This
+receives the actual description and connection information.  The previous code
+snippet implemented a {@link java.util.Map} object to pair a device address with the buddy
+name.  The service response listener uses this to link the DNS record with the
+corresponding service information.  Once both
+listeners are implemented, add them to the {@link
+android.net.wifi.p2p.WifiP2pManager} using the {@link
+android.net.wifi.p2p.WifiP2pManager#setDnsSdResponseListeners(WifiP2pManager.Channel,
+WifiP2pManager.DnsSdServiceResponseListener,
+WifiP2pManager.DnsSdTxtRecordListener) setDnsSdResponseListeners()} method.</p>
+
+<pre>
+private void discoverService() {
+...
+
+    DnsSdServiceResponseListener servListener = new DnsSdServiceResponseListener() {
+        &#64;Override
+        public void onDnsSdServiceAvailable(String instanceName, String registrationType,
+                WifiP2pDevice resourceType) {
+
+                // Update the device name with the human-friendly version from
+                // the DnsTxtRecord, assuming one arrived.
+                resourceType.deviceName = buddies
+                        .containsKey(resourceType.deviceAddress) ? buddies
+                        .get(resourceType.deviceAddress) : resourceType.deviceName;
+
+                // Add to the custom adapter defined specifically for showing
+                // wifi devices.
+                WiFiDirectServicesList fragment = (WiFiDirectServicesList) getFragmentManager()
+                        .findFragmentById(R.id.frag_peerlist);
+                WiFiDevicesAdapter adapter = ((WiFiDevicesAdapter) fragment
+                        .getListAdapter());
+
+                adapter.add(resourceType);
+                adapter.notifyDataSetChanged();
+                Log.d(TAG, "onBonjourServiceAvailable " + instanceName);
+        }
+    };
+
+    mManager.setDnsSdResponseListeners(channel, servListener, txtListener);
+    ...
+}
+</pre>
+
+<p>Now create a service request and call {@link
+android.net.wifi.p2p.WifiP2pManager#addServiceRequest(WifiP2pManager.Channel,
+WifiP2pServiceRequest, WifiP2pManager.ActionListener) addServiceRequest()}.
+This method also takes a listener to report success or failure.</p>
+
+<pre>
+        serviceRequest = WifiP2pDnsSdServiceRequest.newInstance();
+        mManager.addServiceRequest(channel,
+                serviceRequest,
+                new ActionListener() {
+                    &#64;Override
+                    public void onSuccess() {
+                        // Success!
+                    }
+
+                    &#64;Override
+                    public void onFailure(int code) {
+                        // Command failed.  Check for P2P_UNSUPPORTED, ERROR, or BUSY
+                    }
+                });
+</pre>
+
+<p>Finally, make the call to {@link
+android.net.wifi.p2p.WifiP2pManager#discoverServices(WifiP2pManager.Channel,
+WifiP2pManager.ActionListener) discoverServices()}.</p>
+
+<pre>
+        mManager.discoverServices(channel, new ActionListener() {
+
+            &#64;Override
+            public void onSuccess() {
+                // Success!
+            }
+
+            &#64;Override
+            public void onFailure(int code) {
+                // Command failed.  Check for P2P_UNSUPPORTED, ERROR, or BUSY
+                if (code == WifiP2pManager.P2P_UNSUPPORTED) {
+                    Log.d(TAG, "P2P isn't supported on this device.");
+                else if(...)
+                    ...
+            }
+        });
+</pre>
+
+<p>If all goes well, hooray, you're done!  If you encounter problems, remember
+that the asynchronous calls you've made take an
+{@link android.net.wifi.p2p.WifiP2pManager.ActionListener} as an argument, and
+this provides you with callbacks indicating success or failure.  To diagnose
+problems, put debugging code in {@link
+android.net.wifi.p2p.WifiP2pManager.ActionListener#onFailure(int) onFailure()}.  The error code
+provided by the method hints at the problem.  Here are the possible error values
+and what they mean</p>
+<dl>
+  <dt> {@link android.net.wifi.p2p.WifiP2pManager#P2P_UNSUPPORTED}</dt>
+  <dd> Wi-Fi Direct isn't supported on the device running the app.</dd>
+  <dt> {@link android.net.wifi.p2p.WifiP2pManager#BUSY}</dt>
+  <dd> The system is to busy to process the request.</dd>
+  <dt> {@link android.net.wifi.p2p.WifiP2pManager#ERROR}</dt>
+  <dd> The operation failed due to an internal error.</dd>
+</dl>
diff --git a/docs/html/training/connect-devices-wirelessly/nsd.jd b/docs/html/training/connect-devices-wirelessly/nsd.jd
new file mode 100644
index 0000000..d2b01a1
--- /dev/null
+++ b/docs/html/training/connect-devices-wirelessly/nsd.jd
@@ -0,0 +1,373 @@
+page.title=Using Network Service Discovery
+parent.title=Connecting Devices Wirelessly
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Connecting with Wi-Fi Direct
+next.link=wifi-direct.html
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This lesson teaches you how to</h2>
+<ol>
+  <li><a href="#register">Register Your Service on the Network</a></li>
+  <li><a href="#discover">Discover Services on the Network</a></li>
+  <li><a href="#connect">Connect to Services on the Network</a></li>
+  <li><a href="#teardown">Unregister Your Service on Application Close</a></li>
+</ol>
+
+<!--
+<h2>You should also read</h2>
+    <ul>
+    </ul>
+-->
+<h2>Try it out</h2>
+
+<div class="download-box">
+  <a href="{@docRoot}shareables/training/nsdchat.zip" class="button">Download
+    the sample app</a>
+  <p class="filename">nsdchat.zip</p>
+</div>
+</p>
+
+</div>
+</div>
+
+<p>Adding Network Service Discovery (NSD) to your app allows your users to
+identify other devices on the local network that support the services your app
+requests. This is useful for a variety of peer-to-peer applications such as file
+sharing or multi-player gaming. Android's NSD APIs simplify the effort required
+for you to implement such features.</p>
+
+<p>This lesson shows you how to build an application that can broadcast its
+name and connection information to the local network and scan for information
+from other applications doing the same.  Finally, this lesson shows you how
+to connect to the same application running on another device.</p>
+
+<h2 id="register">Register Your Service on the Network</h2>
+
+<p class="note"><strong>Note: </strong>This step is optional.  If
+you don't care about broadcasting your app's services over the local network,
+you can skip forward to the
+next section, <a href="#discover">Discover Services on the Network</a>.</p>
+
+<p>To register your service on the local network, first create a {@link
+android.net.nsd.NsdServiceInfo} object.  This object provides the information
+that other devices on the network use when they're deciding whether to connect to your
+service. </p>
+
+<pre>
+public void registerService(int port) {
+    // Create the NsdServiceInfo object, and populate it.
+    NsdServiceInfo serviceInfo  = new NsdServiceInfo();
+
+    // The name is subject to change based on conflicts
+    // with other services advertised on the same network.
+    serviceInfo.setServiceName("NsdChat");
+    serviceInfo.setServiceType("_http._tcp.");
+    serviceInfo.setPort(port);
+    ....
+}
+</pre>
+
+<p>This code snippet sets the service name to "NsdChat".
+The name is visible to any device on the network that is using NSD to look for
+local services.  Keep in mind that the name must be unique for any service on the
+network, and Android automatically handles conflict resolution.  If
+two devices on the network both have the NsdChat application installed, one of
+them changes the service name automatically, to something like "NsdChat
+(1)".</p>
+
+<p>The second parameter sets the service type, specifies which protocol and transport
+layer the application uses.  The syntax is
+"_&lt;protocol&gt;._&lt;transportlayer&gt;".  In the
+code snippet, the service uses HTTP protocol running over TCP.  An application
+offering a printer service (for instance, a network printer) would set the
+service type to "_ipp._tcp".</p>
+
+<p class="note"><strong>Note: </strong> The International Assigned Numbers
+Authority (IANA) manages a centralized,
+authoritative list of service types used by service discovery protocols such as NSD and Bonjour.
+You can download the list from <a
+  href="http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml">the
+IANA list of service names and port numbers</a>.
+If you intend to use a new service type, you should reserve it by filling out
+the  <a
+  href="http://www.iana.org/form/ports-services">IANA Ports and Service
+  registration form</a>.</p>
+
+<p>When setting the port for your service, avoid hardcoding it as this
+conflicts with other applications.  For instance, assuming
+that your application always uses port 1337 puts it in potential conflict with
+other installed applications that use the same port.  Instead, use the device's
+next available port.  Because this information is provided to other apps by a
+service broadcast, there's no need for the port your application uses to be
+known by other applications at compile-time.  Instead, the applications can get
+this information from your service broadcast, right before connecting to your
+service.</p>
+
+<p>If you're working with sockets, here's how you can initialize a socket to any
+available port simply by setting it to 0.</p>
+
+<pre>
+public void initializeServerSocket() {
+    // Initialize a server socket on the next available port.
+    mServerSocket = new ServerSocket(0);
+
+    // Store the chosen port.
+    mLocalPort =  mServerSocket.getLocalPort();
+    ...
+}
+</pre>
+
+<p>Now that you've defined the {@link android.net.nsd.NsdServiceInfo
+NsdServiceInfo} object, you need to implement the {@link
+android.net.nsd.NsdManager.RegistrationListener RegistrationListener} interface.  This
+interface contains callbacks used by Android to alert your application of the
+success or failure of service registration and unregistration.
+</p>
+<pre>
+public void initializeRegistrationListener() {
+    mRegistrationListener = new NsdManager.RegistrationListener() {
+
+        &#64;Override
+        public void onServiceRegistered(NsdServiceInfo NsdServiceInfo) {
+            // Save the service name.  Android may have changed it in order to
+            // resolve a conflict, so update the name you initially requested
+            // with the name Android actually used.
+            mServiceName = NsdServiceInfo.getServiceName();
+        }
+
+        &#64;Override
+        public void onRegistrationFailed(NsdServiceInfo serviceInfo, int errorCode) {
+            // Registration failed!  Put debugging code here to determine why.
+        }
+
+        &#64;Override
+        public void onServiceUnregistered(NsdServiceInfo arg0) {
+            // Service has been unregistered.  This only happens when you call
+            // NsdManager.unregisterService() and pass in this listener.
+        }
+
+        &#64;Override
+        public void onUnregistrationFailed(NsdServiceInfo serviceInfo, int errorCode) {
+            // Unregistration failed.  Put debugging code here to determine why.
+        }
+    };
+}
+</pre>
+
+<p>Now you have all the pieces to register your service.  Call the method
+{@link android.net.nsd.NsdManager#registerService registerService()}.
+</p>
+
+<p>Note that this method is asynchronous, so any code that needs to run
+after the service has been registered must go in the {@link
+android.net.nsd.NsdManager.RegistrationListener#onServiceRegistered(NsdServiceInfo)
+onServiceRegistered()} method.</p>
+
+<pre>
+public void registerService(int port) {
+    NsdServiceInfo serviceInfo  = new NsdServiceInfo();
+    serviceInfo.setServiceName("NsdChat");
+    serviceInfo.setServiceType("_http._tcp.");
+    serviceInfo.setPort(port);
+
+    mNsdManager = Context.getSystemService(Context.NSD_SERVICE);
+
+    mNsdManager.registerService(
+            serviceInfo, NsdManager.PROTOCOL_DNS_SD, mRegistrationListener);
+}
+</pre>
+
+<h2 id="discover">Discover Services on the Network</h2>
+<p>The network is teeming with life, from the beastly network printers to the
+docile network webcams, to the brutal, fiery battles of nearby tic-tac-toe
+players.  The key to letting your application see this vibrant ecosystem of
+functionality is service discovery.  Your application needs to listen to service
+broadcasts on the network to see what services are available, and filter out
+anything the application can't work with.</p>
+
+<p>Service discovery, like service registration, has two steps:
+ setting up a discovery listener with the relevant callbacks, and making a single asynchronous
+API call to {@link android.net.nsd.NsdManager#discoverServices(String
+, int , NsdManager.DiscoveryListener) discoverServices()}.</p>
+
+<p>First, instantiate an anonymous class that implements {@link
+android.net.nsd.NsdManager.DiscoveryListener}.  The following snippet shows a
+simple example:</p>
+
+<pre>
+public void initializeDiscoveryListener() {
+
+    // Instantiate a new DiscoveryListener
+    mDiscoveryListener = new NsdManager.DiscoveryListener() {
+
+        //  Called as soon as service discovery begins.
+        &#64;Override
+        public void onDiscoveryStarted(String regType) {
+            Log.d(TAG, "Service discovery started");
+        }
+
+        &#64;Override
+        public void onServiceFound(NsdServiceInfo service) {
+            // A service was found!  Do something with it.
+            Log.d(TAG, "Service discovery success" + service);
+            if (!service.getServiceType().equals(SERVICE_TYPE)) {
+                // Service type is the string containing the protocol and
+                // transport layer for this service.
+                Log.d(TAG, "Unknown Service Type: " + service.getServiceType());
+            } else if (service.getServiceName().equals(mServiceName)) {
+                // The name of the service tells the user what they'd be
+                // connecting to. It could be "Bob's Chat App".
+                Log.d(TAG, "Same machine: " + mServiceName);
+            } else if (service.getServiceName().contains("NsdChat")){
+                mNsdManager.resolveService(service, mResolveListener);
+            }
+        }
+
+        &#64;Override
+        public void onServiceLost(NsdServiceInfo service) {
+            // When the network service is no longer available.
+            // Internal bookkeeping code goes here.
+            Log.e(TAG, "service lost" + service);
+        }
+
+        &#64;Override
+        public void onDiscoveryStopped(String serviceType) {
+            Log.i(TAG, "Discovery stopped: " + serviceType);
+        }
+
+        &#64;Override
+        public void onStartDiscoveryFailed(String serviceType, int errorCode) {
+            Log.e(TAG, "Discovery failed: Error code:" + errorCode);
+            mNsdManager.stopServiceDiscovery(this);
+        }
+
+        &#64;Override
+        public void onStopDiscoveryFailed(String serviceType, int errorCode) {
+            Log.e(TAG, "Discovery failed: Error code:" + errorCode);
+            mNsdManager.stopServiceDiscovery(this);
+        }
+    };
+}
+</pre>
+
+<p>The NSD API uses the methods in this interface to inform your application when discovery
+is started, when it fails, and when services are found and lost (lost means "is
+no longer available").  Notice that this snippet does several checks
+when a service is found.</p>
+<ol>
+  <li>The service name of the found service is compared to the service
+name of the local service to determine if the device just picked up its own
+broadcast (which is valid).</li>
+<li>The service type is checked, to verify it's a type of service your
+application can connect to.</li>
+<li>The service name is checked to verify connection to the correct
+application.</li>
+</ol>
+
+<p>Checking the service name isn't always necessary, and is only relevant if you
+want to connect to a specific application.  For instance, the application might
+only want to connect to instances of itself running on other devices.  However, if the
+application wants to connect to a network printer, it's enough to see that the service type
+is "_ipp._tcp".</p>
+
+<p>After setting up the listener, call {@link android.net.nsd.NsdManager#discoverServices(String, int,
+NsdManager.DiscoveryListener) discoverServices()}, passing in the service type
+your application should look for, the discovery protocol to use, and the
+listener you just created.</p>
+
+<pre>
+    mNsdManager.discoverServices(
+        SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);
+</pre>
+
+
+<h2 id="connect">Connect to Services on the Network</h2>
+<p>When your application finds a service on the network to connect to, it
+must first determine the connection information for that service, using the
+{@link android.net.nsd.NsdManager#resolveService resolveService()} method.
+Implement a {@link android.net.nsd.NsdManager.ResolveListener} to pass into this
+method, and use it to get a {@link android.net.nsd.NsdServiceInfo} containing
+the connection information.</p>
+
+<pre>
+public void initializeResolveListener() {
+    mResolveListener = new NsdManager.ResolveListener() {
+
+        &#64;Override
+        public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {
+            // Called when the resolve fails.  Use the error code to debug.
+            Log.e(TAG, "Resolve failed" + errorCode);
+        }
+
+        &#64;Override
+        public void onServiceResolved(NsdServiceInfo serviceInfo) {
+            Log.e(TAG, "Resolve Succeeded. " + serviceInfo);
+
+            if (serviceInfo.getServiceName().equals(mServiceName)) {
+                Log.d(TAG, "Same IP.");
+                return;
+            }
+            mService = serviceInfo;
+            int port = mService.getPort();
+            InetAddress host = mService.getHost();
+        }
+    };
+}
+</pre>
+
+<p>Once the service is resolved, your application receives detailed
+service information including an IP address and port number.  This is  everything
+you need to create your own network connection to the service.</p>
+
+
+<h2 id="teardown">Unregister Your Service on Application Close</h2>
+<p>It's important to enable and disable NSD
+functionality as appropriate during the application's
+lifecycle.  Unregistering your application when it closes down helps prevent
+other applications from thinking it's still active and attempting to connect to
+it.  Also, service discovery is an expensive operation, and should be stopped
+when the parent Activity is paused, and re-enabled when the Activity is
+resumed.  Override the lifecycle methods of your main Activity and insert code
+to start and stop service broadcast and discovery as appropriate.</p>
+
+<pre>
+//In your application's Activity
+
+    &#64;Override
+    protected void onPause() {
+        if (mNsdHelper != null) {
+            mNsdHelper.tearDown();
+        }
+        super.onPause();
+    }
+
+    &#64;Override
+    protected void onResume() {
+        super.onResume();
+        if (mNsdHelper != null) {
+            mNsdHelper.registerService(mConnection.getLocalPort());
+            mNsdHelper.discoverServices();
+        }
+    }
+
+    &#64;Override
+    protected void onDestroy() {
+        mNsdHelper.tearDown();
+        mConnection.tearDown();
+        super.onDestroy();
+    }
+
+    // NsdHelper's tearDown method
+        public void tearDown() {
+        mNsdManager.unregisterService(mRegistrationListener);
+        mNsdManager.stopServiceDiscovery(mDiscoveryListener);
+    }
+</pre>
+
diff --git a/docs/html/training/connect-devices-wirelessly/wifi-direct.jd b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
new file mode 100644
index 0000000..99bb243
--- /dev/null
+++ b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
@@ -0,0 +1,372 @@
+page.title=Connecting with Wi-Fi Direct
+parent.title=Connecting Devices Wirelessly
+parent.link=index.html
+
+trainingnavtop=true
+previous.title=Using Network Service Discovery
+previous.link=nsd.html
+next.title=Service Discovery with Wi-Fi Direct
+next.link=nsd-wifi-direct.html
+
+@jd:body
+
+<div id="tb-wrapper">
+  <div id="tb">
+    <h2>This lesson teaches you how to</h2>
+    <ol>
+      <li><a href="#permissions">Set Up Application Permissions</a></li>
+      <li><a href="#receiver">Set Up the Broadcast Receiver and Peer-to-Peer
+        Manager</a></li>
+      <li><a href="#discover">Initiate Peer Discovery</a></li>
+      <li><a href="#fetch">Fetch the List of Peers</a></li>
+      <li><a href="#connect">Connect to a Peer</a></li>
+    </ol>
+  </div>
+</div>
+
+<p>The Wi-Fi Direct&trade; APIs allow applications to connect to nearby devices without
+needing to connect to a network or hotspot.  This allows your application to quickly
+find and interact with nearby devices, at a range beyond the capabilities of Bluetooth.
+</p>
+<p>
+This lesson shows you how to find and connect to nearby devices using Wi-Fi Direct.
+</p>
+<h2 id="permissions">Set Up Application Permissions</h2>
+<p>In order to use Wi-Fi Direct, add the {@link
+android.Manifest.permission#CHANGE_WIFI_STATE}, {@link
+android.Manifest.permission#ACCESS_WIFI_STATE},
+and {@link android.Manifest.permission#INTERNET}
+permissions to your manifest.   Wi-Fi Direct doesn't require an internet connection,
+but it does use standard Java sockets, which require the {@link
+android.Manifest.permission#INTERNET} permission.
+So you need the following permissions to use Wi-Fi Direct.</p>
+
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.nsdchat"
+    ...
+
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.CHANGE_WIFI_STATE"/&gt;
+    &lt;uses-permission
+        android:required="true"
+        android:name="android.permission.INTERNET"/&gt;
+    ...
+</pre>
+
+<h2 id="receiver">Set Up a Broadcast Receiver and Peer-to-Peer Manager</h2>
+<p>To use Wi-Fi Direct, you need to listen for broadcast intents that tell your
+application when certain events have occurred.  In your application, instantiate
+an {@link
+android.content.IntentFilter} and set it to listen for the following:</p>
+<dl>
+  <dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_STATE_CHANGED_ACTION}</dt>
+  <dd>Indicates whether Wi-Fi Peer-To-Peer (P2P) is enabled</dd>
+  <dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_PEERS_CHANGED_ACTION}</dt>
+  <dd>Indicates that the available peer list has changed.</dd>
+  <dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION}</dt>
+  <dd>Indicates the state of Wi-Fi P2P connectivity has changed.</dd>
+  <dt>{@link android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_THIS_DEVICE_CHANGED_ACTION}</dt>
+  <dd>Indicates this device's configuration details have changed.</dd>
+<pre>
+private final IntentFilter intentFilter = new IntentFilter();
+...
+&#64;Override
+public void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    setContentView(R.layout.main);
+
+    //  Indicates a change in the Wi-Fi Peer-to-Peer status.
+    intentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION);
+
+    // Indicates a change in the list of available peers.
+    intentFilter.addAction(WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION);
+
+    // Indicates the state of Wi-Fi P2P connectivity has changed.
+    intentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
+
+    // Indicates this device's details have changed.
+    intentFilter.addAction(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION);
+
+    ...
+}
+</pre>
+
+  <p>At the end of the {@link android.app.Activity#onCreate onCreate()} method, get an instance of the {@link
+android.net.wifi.p2p.WifiP2pManager}, and call its {@link
+android.net.wifi.p2p.WifiP2pManager#initialize(Context, Looper, WifiP2pManager.ChannelListener) initialize()}
+method.  This method returns a {@link
+android.net.wifi.p2p.WifiP2pManager.Channel} object, which you'll use later to
+connect your app to the Wi-Fi Direct Framework.</p>
+
+<pre>
+&#64;Override
+
+Channel mChannel;
+
+public void onCreate(Bundle savedInstanceState) {
+    ....
+    mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
+    mChannel = mManager.initialize(this, getMainLooper(), null);
+}
+</pre>
+<p>Now create a new {@link
+android.content.BroadcastReceiver} class that you'll use to listen for changes
+to the System's Wi-Fi P2P state.  In the {@link
+android.content.BroadcastReceiver#onReceive(Context, Intent) onReceive()}
+method, add a condition to handle each P2P state change listed above.</p>
+
+<pre>
+
+    &#64;Override
+    public void onReceive(Context context, Intent intent) {
+        String action = intent.getAction();
+        if (WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION.equals(action)) {
+            // Determine if Wifi Direct mode is enabled or not, alert
+            // the Activity.
+            int state = intent.getIntExtra(WifiP2pManager.EXTRA_WIFI_STATE, -1);
+            if (state == WifiP2pManager.WIFI_P2P_STATE_ENABLED) {
+                activity.setIsWifiP2pEnabled(true);
+            } else {
+                activity.setIsWifiP2pEnabled(false);
+            }
+        } else if (WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION.equals(action)) {
+
+            // The peer list has changed!  We should probably do something about
+            // that.
+
+        } else if (WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION.equals(action)) {
+
+            // Connection state changed!  We should probably do something about
+            // that.
+
+        } else if (WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION.equals(action)) {
+            DeviceListFragment fragment = (DeviceListFragment) activity.getFragmentManager()
+                    .findFragmentById(R.id.frag_list);
+            fragment.updateThisDevice((WifiP2pDevice) intent.getParcelableExtra(
+                    WifiP2pManager.EXTRA_WIFI_P2P_DEVICE));
+
+        }
+    }
+</pre>
+
+<p>Finally, add code to register the intent filter and broadcast receiver when
+your main activity is active, and unregister them when the activity is paused.
+The best place to do this is the {@link android.app.Activity#onResume()} and
+{@link android.app.Activity#onPause()} methods.
+
+<pre>
+    /** register the BroadcastReceiver with the intent values to be matched */
+    &#64;Override
+    public void onResume() {
+        super.onResume();
+        receiver = new WiFiDirectBroadcastReceiver(mManager, mChannel, this);
+        registerReceiver(receiver, intentFilter);
+    }
+
+    &#64;Override
+    public void onPause() {
+        super.onPause();
+        unregisterReceiver(receiver);
+    }
+</pre>
+
+
+<h2 id="discover">Initiate Peer Discovery</h2>
+<p>To start searching for nearby devices with Wi-Fi Direct, call {@link
+android.net.wifi.p2p.WifiP2pManager#discoverPeers(WifiP2pManager.Channel,
+WifiP2pManager.ActionListener) discoverPeers()}.  This method takes the
+following arguments:</p>
+<ul>
+  <li>The {@link android.net.wifi.p2p.WifiP2pManager.Channel} you
+  received back when you initialized the peer-to-peer mManager</li>
+  <li>An implementation of {@link android.net.wifi.p2p.WifiP2pManager.ActionListener} with methods
+  the system invokes for successful and unsuccessful discovery.</li>
+</ul>
+
+<pre>
+mManager.discoverPeers(mChannel, new WifiP2pManager.ActionListener() {
+
+        &#64;Override
+        public void onSuccess() {
+            // Code for when the discovery initiation is successful goes here.
+            // No services have actually been discovered yet, so this method
+            // can often be left blank.  Code for peer discovery goes in the
+            // onReceive method, detailed below.
+        }
+
+        &#64;Override
+        public void onFailure(int reasonCode) {
+            // Code for when the discovery initiation fails goes here.
+            // Alert the user that something went wrong.
+        }
+});
+</pre>
+
+<p>Keep in mind that this only <em>initiates</em> peer discovery.  The
+{@link android.net.wifi.p2p.WifiP2pManager#discoverPeers(WifiP2pManager.Channel,
+WifiP2pManager.ActionListener) discoverPeers()} method starts the discovery process and then
+immediately returns.  The system notifies you if the peer discovery process is
+successfully initiated by calling methods in the provided action listener.
+Also, discovery will remain active until a connection is initiated or a P2P group is
+formed.</p>
+
+<h2 id="fetch">Fetch the List of Peers</h2>
+<p>Now write the code that fetches and processes the list of peers.  First
+implement the {@link android.net.wifi.p2p.WifiP2pManager.PeerListListener}
+interface, which provides information about the peers that Wi-Fi Direct has
+detected.  The following code snippet illustrates this.</p>
+
+<pre>
+    private List<WifiP2pDevice> peers = new ArrayList<WifiP2pDevice>();
+    ...
+
+    private PeerListListener peerListListener = new PeerListListener() {
+        &#64;Override
+        public void onPeersAvailable(WifiP2pDeviceList peerList) {
+
+            // Out with the old, in with the new.
+            peers.clear();
+            peers.addAll(peerList.getDeviceList());
+
+            // If an AdapterView is backed by this data, notify it
+            // of the change.  For instance, if you have a ListView of available
+            // peers, trigger an update.
+            ((WiFiPeerListAdapter) getListAdapter()).notifyDataSetChanged();
+            if (peers.size() == 0) {
+                Log.d(WiFiDirectActivity.TAG, "No devices found");
+                return;
+            }
+        }
+    }
+</pre>
+
+<p>Now modify your broadcast receiver's {@link
+android.content.BroadcastReceiver#onReceive(Context, Intent) onReceive()}
+method to call {@link android.net.wifi.p2p.WifiP2pManager#requestPeers
+requestPeers()} when an intent with the action {@link
+android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_PEERS_CHANGED_ACTION} is received.  You
+need to pass this listener into the receiver somehow.  One way is to send it
+as an argument to the broadcast receiver's constructor.
+</p>
+
+<pre>
+public void onReceive(Context context, Intent intent) {
+    ...
+    else if (WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION.equals(action)) {
+
+        // Request available peers from the wifi p2p manager. This is an
+        // asynchronous call and the calling activity is notified with a
+        // callback on PeerListListener.onPeersAvailable()
+        if (mManager != null) {
+            mManager.requestPeers(mChannel, peerListener);
+        }
+        Log.d(WiFiDirectActivity.TAG, "P2P peers changed");
+    }...
+}
+</pre>
+
+<p>Now, an intent with the action {@link
+android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_PEERS_CHANGED_ACTION} intent will
+trigger a request for an updated peer list. </p>
+
+<h2 id="connect">Connect to a Peer</h2>
+<p>In order to connect to a peer, create a new {@link
+android.net.wifi.p2p.WifiP2pConfig} object, and copy data into it from the
+{@link android.net.wifi.p2p.WifiP2pDevice} representing the device you want to
+connect to.  Then call the {@link
+android.net.wifi.p2p.WifiP2pManager#connect(WifiP2pManager.Channel,
+WifiP2pConfig, WifiP2pManager.ActionListener) connect()}
+method.</p>
+
+<pre>
+    &#64;Override
+    public void connect() {
+        // Picking the first device found on the network.
+        WifiP2pDevice device = peers.get(0);
+
+        WifiP2pConfig config = new WifiP2pConfig();
+        config.deviceAddress = device.deviceAddress;
+        config.wps.setup = WpsInfo.PBC;
+
+        mManager.connect(mChannel, config, new ActionListener() {
+
+            &#64;Override
+            public void onSuccess() {
+                // WiFiDirectBroadcastReceiver will notify us. Ignore for now.
+            }
+
+            &#64;Override
+            public void onFailure(int reason) {
+                Toast.makeText(WiFiDirectActivity.this, "Connect failed. Retry.",
+                        Toast.LENGTH_SHORT).show();
+            }
+        });
+    }
+</pre>
+
+<p>The {@link android.net.wifi.p2p.WifiP2pManager.ActionListener} implemented in
+this snippet only notifies you when the <em>initiation</em> succeeds or fails.
+To listen for <em>changes</em> in connection state, implement the {@link
+android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener} interface. Its {@link
+android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener#onConnectionInfoAvailable(WifiP2pInfo)
+onConnectionInfoAvailable()}
+callback will notify you when the state of the connection changes.  In cases
+where multiple devices are going to be connected to a single device (like a game with
+3 or more players, or a chat app), one device will be designated the "group
+owner".</p>
+
+<pre>
+    &#64;Override
+    public void onConnectionInfoAvailable(final WifiP2pInfo info) {
+
+        // InetAddress from WifiP2pInfo struct.
+        InetAddress groupOwnerAddress = info.groupOwnerAddress.getHostAddress());
+
+        // After the group negotiation, we can determine the group owner.
+        if (info.groupFormed && info.isGroupOwner) {
+            // Do whatever tasks are specific to the group owner.
+            // One common case is creating a server thread and accepting
+            // incoming connections.
+        } else if (info.groupFormed) {
+            // The other device acts as the client. In this case,
+            // you'll want to create a client thread that connects to the group
+            // owner.
+        }
+    }
+</pre>
+
+<p>Now go back to the {@link
+android.content.BroadcastReceiver#onReceive(Context, Intent) onReceive()} method of the broadcast receiver, and modify the section
+that listens for a {@link
+android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION} intent.
+When this intent is received, call {@link
+android.net.wifi.p2p.WifiP2pManager#requestConnectionInfo(WifiP2pManager.Channel,
+WifiP2pManager.ConnectionInfoListener) requestConnectionInfo()}.  This is an
+asynchronous call, so results will be received by the connection info listener
+you provide as a parameter.
+
+<pre>
+        ...
+        } else if (WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION.equals(action)) {
+
+            if (mManager == null) {
+                return;
+            }
+
+            NetworkInfo networkInfo = (NetworkInfo) intent
+                    .getParcelableExtra(WifiP2pManager.EXTRA_NETWORK_INFO);
+
+            if (networkInfo.isConnected()) {
+
+                // We are connected with the other device, request connection
+                // info to find group owner IP
+
+                mManager.requestConnectionInfo(mChannel, connectionListener);
+            }
+            ...
+</pre>
diff --git a/docs/html/training/custom-views/create-view.jd b/docs/html/training/custom-views/create-view.jd
index b0bc8b4..674bcc9 100644
--- a/docs/html/training/custom-views/create-view.jd
+++ b/docs/html/training/custom-views/create-view.jd
@@ -61,7 +61,7 @@
     existing view
     subclasses, such as {@link android.widget.Button}.</p>
 
-<p>To allow the <a href=”{@docRoot}guide/developing/tools/adt.html”>Android Developer Tools
+<p>To allow the <a href="{@docRoot}guide/developing/tools/adt.html">Android Developer Tools
 </a> to interact with your view, at a minimum you must provide a constructor that takes a
 {@link android.content.Context} and an {@link android.util.AttributeSet} object as parameters.
 This constructor allows the layout editor to create and edit an instance of your view.</p>
@@ -105,7 +105,7 @@
 
 <pre>
 &lt;resources>;
-   &ltdeclare-styleable name="PieChart">
+   &lt;declare-styleable name="PieChart">
        &lt;attr name="showText" format="boolean" />
        &lt;attr name="labelPosition" format="enum">
            &lt;enum name="left" value="0"/>
@@ -276,6 +276,6 @@
             </ul>
 
             <p>For more information on creating accessible views, see
-                <a href=”{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views”>
+                <a href="{@docRoot}guide/topics/ui/accessibility/apps.html#custom-views">
               Making Applications Accessible</a> in the Android Developers Guide.
         </p>
diff --git a/docs/html/training/custom-views/optimizing-view.jd b/docs/html/training/custom-views/optimizing-view.jd
index 1f489dd..7f2e762 100644
--- a/docs/html/training/custom-views/optimizing-view.jd
+++ b/docs/html/training/custom-views/optimizing-view.jd
@@ -19,7 +19,7 @@
 
         <h2>You should also read</h2>
         <ul>
-            <li><a href=”{@docRoot}guide/topics/graphics/hardware-accel.html”>
+            <li><a href="{@docRoot}guide/topics/graphics/hardware-accel.html">
                 Hardware Acceleration
             </a>
         </li>
diff --git a/docs/html/training/efficient-downloads/regular_updates.jd b/docs/html/training/efficient-downloads/regular_updates.jd
index feb7a8e..262d676 100644
--- a/docs/html/training/efficient-downloads/regular_updates.jd
+++ b/docs/html/training/efficient-downloads/regular_updates.jd
@@ -15,14 +15,14 @@
 
 <h2>This lesson teaches you to</h2>
 <ol>
-  <li><a href="#C2DM">Use Cloud to Device Messaging as an alternative to polling</a></li>
+  <li><a href="#GCM">Use Google Cloud Messaging as an alternative to polling</a></li>
   <li><a href="#OptimizedPolling">Optimize polling with inexact repeating alarms and exponential back-offs</a></li>
 </ol>
 
 <h2>You should also read</h2>
 <ul>
   <li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
-  <li><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging</a></li>
+  <li><a href="{@docRoot}guide/google/gcm/index.html">Google Cloud Messaging for Android</a></li>
 </ul>
 
 </div>
@@ -34,17 +34,17 @@
 
 <p>This lesson will examine how your refresh frequency can be varied to best mitigate the effect of background updates on the underlying wireless radio state machine.</p>
  
-<h2 id="C2DM">Use Cloud to Device Messaging as an Alternative to Polling</h2> 
+<h2 id="GCM">Use Google Cloud Messaging as an Alternative to Polling</h2> 
  
 <p>Every time your app polls your server to check if an update is required, you activate the wireless radio, drawing power unnecessarily, for up to 20 seconds on a typical 3G connection.</p>
 
-<p><a href="http://code.google.com/android/c2dm/">Android Cloud to Device Messaging (C2DM)</a> is a lightweight mechanism used to transmit data from a server to a particular app instance. Using C2DM, your server can notify your app running on a particular device that there is new data available for it.</p>
+<p><a href="{@docRoot}guide/google/gcm/index.html">Google Cloud Messaging for Android (GCM)</a> is a lightweight mechanism used to transmit data from a server to a particular app instance. Using GCM, your server can notify your app running on a particular device that there is new data available for it.</p>
 
 <p>Compared to polling, where your app must regularly ping the server to query for new data, this event-driven model allows your app to create a new connection only when it knows there is data to download.</p>
 
 <p>The result is a reduction in unnecessary connections, and a reduced latency for updated data within your application.</p>
 
-<p>C2DM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use C2DM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.</p>
+<p>GCM is implemented using a persistent TCP/IP connection. While it's possible to implement your own push service, it's best practice to use GCM. This minimizes the number of persistent connections and allows the platform to optimize bandwidth and minimize the associated impact on battery life.</p>
 
 <h2 id="OptimizedPolling">Optimize Polling with Inexact Repeating Alarms and Exponential Backoffs</h2> 
 
@@ -99,4 +99,4 @@
   }
 }</pre>
 
-<p>Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.</p>
\ No newline at end of file
+<p>Alternatively, for transfers that are failure tolerant (such as regular updates), you can simply ignore failed connection and transfer attempts.</p>
diff --git a/docs/html/training/implementing-navigation/lateral.jd b/docs/html/training/implementing-navigation/lateral.jd
index 76acf03..b59bab2 100644
--- a/docs/html/training/implementing-navigation/lateral.jd
+++ b/docs/html/training/implementing-navigation/lateral.jd
@@ -119,7 +119,7 @@
 
 <h2 id="horizontal-paging">Implement Horizontal Paging (Swipe Views)</h2>
 
-<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p>
+<p>Horizontal paging, or swipe views, allow users to <a href="{@docRoot}design/patterns/swipe-views.html">swipe</a> horizontally on the current screen to navigate to adjacent screens. This pattern can be implemented using the {@link android.support.v4.view.ViewPager} widget, currently available as part of the <a href="{@docRoot}tools/extras/support-library.html">Android Support Package</a>. For navigating between sibling screens representing a fixed number of sections, it's best to provide the {@link android.support.v4.view.ViewPager} with a {@link android.support.v4.app.FragmentPagerAdapter}. For horizontal paging across collections of objects, it's best to use a {@link android.support.v4.app.FragmentStatePagerAdapter}, which destroys fragments as the user navigates to other pages, minimizing memory usage.</p>
 
 <p>Below is an example of using a {@link android.support.v4.view.ViewPager} to swipe across a collection of objects.</p>
 
diff --git a/docs/html/training/improving-layouts/reusing-layouts.jd b/docs/html/training/improving-layouts/reusing-layouts.jd
index 095b0dd..fdd3333 100644
--- a/docs/html/training/improving-layouts/reusing-layouts.jd
+++ b/docs/html/training/improving-layouts/reusing-layouts.jd
@@ -25,12 +25,9 @@
 <!-- other docs (NOT javadocs) -->
 <h2>You should also read</h2>
 <ul>
-  <li><a href="{@docRoot}resources/articles/layout-tricks-reuse.html">Creating Reusable UI
-Components</a></li>
-  <li><a href="{@docRoot}resources/articles/layout-tricks-merge.html">Merging Layouts</a></li>
   <li><a
 href="{@docRoot}guide/topics/resources/layout-resource.html#include-element">Layout
-Resource</a></li>
+Resources</a></li>
 </ul>
 
 </div>
diff --git a/docs/html/training/improving-layouts/smooth-scrolling.jd b/docs/html/training/improving-layouts/smooth-scrolling.jd
index 0afa929..2a1ffba 100644
--- a/docs/html/training/improving-layouts/smooth-scrolling.jd
+++ b/docs/html/training/improving-layouts/smooth-scrolling.jd
@@ -22,8 +22,8 @@
 <!-- other docs (NOT javadocs) -->
 <h2>You should also read</h2>
 <ul>
-  <li><a href="{@docRoot}resources/articles/listview-backgrounds.html">ListView
-Backgrounds: An Optimization</a></li>
+  <li><a href="http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html">Why
+      is my list black? An Android optimization</a></li>
 </ul>
 
 </div>
diff --git a/docs/html/training/notepad/index.jd b/docs/html/training/notepad/index.jd
index 87a57d1..64ba144 100644
--- a/docs/html/training/notepad/index.jd
+++ b/docs/html/training/notepad/index.jd
@@ -1,6 +1,5 @@
 page.title=Notepad Tutorial
 parent.title=Tutorials
-parent.link=../../browser.html?tag=tutorial
 @jd:body
 
 
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 37b69d4..b70ba3f 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -673,6 +673,27 @@
       </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>
+
+
     </ul>
   </li>
 </ul><!-- nav -->
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index a32e469..f49c429 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -22,8 +22,9 @@
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
+import java.io.UTFDataFormatException;
 import java.nio.charset.Charsets;
+import java.nio.charset.ModifiedUtf8;
 import java.util.ArrayList;
 
 /**
@@ -75,7 +76,7 @@
     }
 
     public byte[] get(String key) {
-        return get(getBytes(key));
+        return get(getKeyBytes(key));
     }
 
     private boolean put(byte[] key, byte[] value) {
@@ -84,7 +85,7 @@
     }
 
     public boolean put(String key, byte[] value) {
-        return put(getBytes(key), value);
+        return put(getKeyBytes(key), value);
     }
 
     private boolean delete(byte[] key) {
@@ -93,7 +94,7 @@
     }
 
     public boolean delete(String key) {
-        return delete(getBytes(key));
+        return delete(getKeyBytes(key));
     }
 
     private boolean contains(byte[] key) {
@@ -102,7 +103,7 @@
     }
 
     public boolean contains(String key) {
-        return contains(getBytes(key));
+        return contains(getKeyBytes(key));
     }
 
     public byte[][] saw(byte[] prefix) {
@@ -111,13 +112,13 @@
     }
 
     public String[] saw(String prefix) {
-        byte[][] values = saw(getBytes(prefix));
+        byte[][] values = saw(getKeyBytes(prefix));
         if (values == null) {
             return null;
         }
         String[] strings = new String[values.length];
         for (int i = 0; i < values.length; ++i) {
-            strings[i] = toString(values[i]);
+            strings[i] = toKeyString(values[i]);
         }
         return strings;
     }
@@ -133,7 +134,7 @@
     }
 
     public boolean password(String password) {
-        return password(getBytes(password));
+        return password(getPasswordBytes(password));
     }
 
     public boolean lock() {
@@ -147,7 +148,7 @@
     }
 
     public boolean unlock(String password) {
-        return unlock(getBytes(password));
+        return unlock(getPasswordBytes(password));
     }
 
     public boolean isEmpty() {
@@ -161,7 +162,7 @@
     }
 
     public boolean generate(String key) {
-        return generate(getBytes(key));
+        return generate(getKeyBytes(key));
     }
 
     private boolean importKey(byte[] keyName, byte[] key) {
@@ -170,7 +171,7 @@
     }
 
     public boolean importKey(String keyName, byte[] key) {
-        return importKey(getBytes(keyName), key);
+        return importKey(getKeyBytes(keyName), key);
     }
 
     private byte[] getPubkey(byte[] key) {
@@ -179,7 +180,7 @@
     }
 
     public byte[] getPubkey(String key) {
-        return getPubkey(getBytes(key));
+        return getPubkey(getKeyBytes(key));
     }
 
     private boolean delKey(byte[] key) {
@@ -188,7 +189,7 @@
     }
 
     public boolean delKey(String key) {
-        return delKey(getBytes(key));
+        return delKey(getKeyBytes(key));
     }
 
     private byte[] sign(byte[] keyName, byte[] data) {
@@ -197,7 +198,7 @@
     }
 
     public byte[] sign(String key, byte[] data) {
-        return sign(getBytes(key), data);
+        return sign(getKeyBytes(key), data);
     }
 
     private boolean verify(byte[] keyName, byte[] data, byte[] signature) {
@@ -206,7 +207,7 @@
     }
 
     public boolean verify(String key, byte[] data, byte[] signature) {
-        return verify(getBytes(key), data, signature);
+        return verify(getKeyBytes(key), data, signature);
     }
 
     private boolean grant(byte[] key, byte[] uid) {
@@ -215,7 +216,7 @@
     }
 
     public boolean grant(String key, int uid) {
-        return grant(getBytes(key), Integer.toString(uid).getBytes());
+         return grant(getKeyBytes(key), getUidBytes(uid));
     }
 
     private boolean ungrant(byte[] key, byte[] uid) {
@@ -224,7 +225,7 @@
     }
 
     public boolean ungrant(String key, int uid) {
-        return ungrant(getBytes(key), Integer.toString(uid).getBytes());
+        return ungrant(getKeyBytes(key), getUidBytes(uid));
     }
 
     public int getLastError() {
@@ -291,11 +292,34 @@
         return null;
     }
 
-    private static byte[] getBytes(String string) {
-        return string.getBytes(Charsets.UTF_8);
+    /**
+     * ModifiedUtf8 is used for key encoding to match the
+     * implementation of NativeCrypto.ENGINE_load_private_key.
+     */
+    private static byte[] getKeyBytes(String string) {
+        try {
+            int utfCount = (int) ModifiedUtf8.countBytes(string, false);
+            byte[] result = new byte[utfCount];
+            ModifiedUtf8.encode(result, 0, string);
+            return result;
+        } catch (UTFDataFormatException e) {
+            throw new RuntimeException(e);
+        }
     }
 
-    private static String toString(byte[] bytes) {
-        return new String(bytes, Charsets.UTF_8);
+    private static String toKeyString(byte[] bytes) {
+        try {
+            return ModifiedUtf8.decode(bytes, new char[bytes.length], 0, bytes.length);
+        } catch (UTFDataFormatException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static byte[] getPasswordBytes(String password) {
+        return password.getBytes(Charsets.UTF_8);
+    }
+
+    private static byte[] getUidBytes(int uid) {
+        return Integer.toString(uid).getBytes(Charsets.UTF_8);
     }
 }
diff --git a/keystore/tests/src/android/security/KeyStoreTest.java b/keystore/tests/src/android/security/KeyStoreTest.java
index 91c56d6..32cd6e2 100755
--- a/keystore/tests/src/android/security/KeyStoreTest.java
+++ b/keystore/tests/src/android/security/KeyStoreTest.java
@@ -37,7 +37,7 @@
     private static final String TEST_PASSWD2 = "87654321";
     private static final String TEST_KEYNAME = "test-key";
     private static final String TEST_KEYNAME1 = "test-key.1";
-    private static final String TEST_KEYNAME2 = "test-key.2";
+    private static final String TEST_KEYNAME2 = "test-key\02";
     private static final byte[] TEST_KEYVALUE = "test value".getBytes(Charsets.UTF_8);
 
     // "Hello, World" in Chinese
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index fdbfb65..c1ea50d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -25,6 +25,7 @@
 import android.util.AttributeSet;
 import android.util.Slog;
 import android.view.Gravity;
+import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -34,7 +35,6 @@
 import android.view.animation.DecelerateInterpolator;
 import android.view.animation.Interpolator;
 import android.widget.RelativeLayout;
-import android.widget.ScrollView;
 
 import com.android.systemui.ExpandHelper;
 import com.android.systemui.R;
@@ -197,6 +197,27 @@
         return true;
     }
 
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+    final int keyCode = event.getKeyCode();
+        switch (keyCode) {
+            // We exclusively handle the back key by hiding this panel.
+            case KeyEvent.KEYCODE_BACK: {
+                if (event.getAction() == KeyEvent.ACTION_UP) {
+                    mBar.animateCollapse();
+                }
+                return true;
+            }
+            // We react to the home key but let the system handle it.
+            case KeyEvent.KEYCODE_HOME: {
+                if (event.getAction() == KeyEvent.ACTION_UP) {
+                    mBar.animateCollapse();
+                }
+            } break;
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
     /*
     @Override
     protected void onLayout(boolean changed, int l, int t, int r, int b) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 9dd4a91..6d0b26f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -114,6 +114,8 @@
                 : Integer.parseInt(factoryTestStr);
         final boolean headless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
 
+        AccountManagerService accountManager = null;
+        ContentService contentService = null;
         LightsService lights = null;
         PowerManagerService power = null;
         BatteryService battery = null;
@@ -190,14 +192,14 @@
             // The AccountManager must come before the ContentService
             try {
                 Slog.i(TAG, "Account Manager");
-                ServiceManager.addService(Context.ACCOUNT_SERVICE,
-                        new AccountManagerService(context));
+                accountManager = new AccountManagerService(context);
+                ServiceManager.addService(Context.ACCOUNT_SERVICE, accountManager);
             } catch (Throwable e) {
                 Slog.e(TAG, "Failure starting Account Manager", e);
             }
 
             Slog.i(TAG, "Content Manager");
-            ContentService.main(context,
+            contentService = ContentService.main(context,
                     factoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL);
 
             Slog.i(TAG, "System Content Providers");
@@ -466,6 +468,20 @@
             }
 
             try {
+                if (accountManager != null)
+                    accountManager.systemReady();
+            } catch (Throwable e) {
+                reportWtf("making Account Manager Service ready", e);
+            }
+
+            try {
+                if (contentService != null)
+                    contentService.systemReady();
+            } catch (Throwable e) {
+                reportWtf("making Content Service ready", e);
+            }
+
+            try {
                 Slog.i(TAG, "Notification Manager");
                 notification = new NotificationManagerService(context, statusBar, lights);
                 ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification);
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 25cd112..564ce3b 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -1378,7 +1378,8 @@
                 mZoneTime    = c.getTimeInMillis();
             }
             if (DBG) {
-                log("NITZ: tzOffset=" + tzOffset + " dst=" + dst + " zone=" + zone.getID() +
+                log("NITZ: tzOffset=" + tzOffset + " dst=" + dst + " zone=" +
+                        (zone!=null ? zone.getID() : "NULL") +
                         " iso=" + iso + " mGotCountryCode=" + mGotCountryCode +
                         " mNeedFixZone=" + mNeedFixZone);
             }