Merge "Adding app quality criteria." into lmp-docs
diff --git a/Android.mk b/Android.mk
index b77c2ed..75e32c1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -732,6 +732,7 @@
                  -samplegroup Content \
                  -samplegroup Input \
                  -samplegroup Media \
+                 -samplegroup Notification \
                  -samplegroup RenderScript \
                  -samplegroup Security \
                  -samplegroup Sensors \
diff --git a/docs/html/about/versions/android-5.0.jd b/docs/html/about/versions/android-5.0.jd
index 756b75f..4caa3ad 100644
--- a/docs/html/about/versions/android-5.0.jd
+++ b/docs/html/about/versions/android-5.0.jd
@@ -141,14 +141,6 @@
 the Android SDK</a>. Then use the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>
 to download the Android 5.0 SDK Platform and System Images.</p>
 
-<p style="
-    padding: 10px;
-    background: #eee;
-    width: 445px;
-    border: 1px solid #ccc;
-    margin-top: 20px;
-">To test your apps on a real device, flash a Nexus 5 or Nexus 7 with the <br>
-<a href="/preview/index.html#Start"><b>ANDROID PREVIEW SYSTEM IMAGE</b></a>.</p>
 
 <h3 id="ApiLevel">Update your target API level</h3>
 
diff --git a/docs/html/about/versions/lollipop.jd b/docs/html/about/versions/lollipop.jd
index 3ee0a86..458de49 100644
--- a/docs/html/about/versions/lollipop.jd
+++ b/docs/html/about/versions/lollipop.jd
@@ -57,16 +57,6 @@
 
 
 
-<p style="
-    padding: 10px;
-    background: #eee;
-    width: 250px;
-    border: 1px solid #ccc;
-    margin-top: 20px;
-">To test your apps on a real device, flash a Nexus 5 or Nexus 7 with the <br>
-<a href="/preview/index.html#Start"><b>ANDROID PREVIEW SYSTEM IMAGE</b></a>.</p>
-
-
 <h2 id="Material">Material design</h2>
 
 <p>Android 5.0 brings <a href="http://www.google.com/design/spec">Material design</a> to Android and gives you an expanded UI toolkit for integrating the new design patterns easily in your apps.  </p>
diff --git a/docs/html/google/gcm/ccs.jd b/docs/html/google/gcm/ccs.jd
index 7db7a74..6332b8d 100644
--- a/docs/html/google/gcm/ccs.jd
+++ b/docs/html/google/gcm/ccs.jd
@@ -263,6 +263,21 @@
 &lt;/message&gt;
 </pre>
 
+<p>Device Message Rate Exceeded:</p>
+
+<pre>&lt;message id=&quot;...&quot;&gt;
+  &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+  {
+    &quot;message_type&quot;:&quot;nack&quot;,
+    &quot;message_id&quot;:&quot;msgId1&quot;,
+    &quot;from&quot;:&quot;REGID&quot;,
+    &quot;error&quot;:&quot;DEVICE_MESSAGE_RATE_EXCEEDED&quot;,
+    &quot;error_description&quot;:&quot;Downstream message rate exceeded for this registration id&quot;
+  }
+  &lt;/gcm&gt;
+&lt;/message&gt;
+</pre>
+
 <p>The following table lists NACK error codes. Unless otherwise
 indicated, a NACKed message should not be retried. Unexpected NACK error codes
 should be treated the same as {@code INTERNAL_SERVER_ERROR}.</p>
@@ -303,8 +318,7 @@
 <td>{@code DEVICE_MESSAGE_RATE_EXCEEDED}</td>
 <td>The rate of messages to a particular device is too high. You should reduce
 the number of messages sent to this device and should not immediately retry
-sending to this device. This error code replaces {@code QUOTA_EXCEEDED},
-which has been deprecated.</td>
+sending to this device. This error code is replacing {@code QUOTA_EXCEEDED}.</td>
 </tr>
 <tr>
   <td>{@code SERVICE_UNAVAILABLE}</td>
diff --git a/docs/html/google/gcm/client.jd b/docs/html/google/gcm/client.jd
index 70109c6..d44ee3c 100644
--- a/docs/html/google/gcm/client.jd
+++ b/docs/html/google/gcm/client.jd
@@ -452,6 +452,21 @@
     editor.commit();
 }</pre>
 
+<h4 id="reg-errors">Handle registration errors</h4>
+
+<p>As stated above, an Android app must register with GCM servers and get a registration ID
+(regID) before it can receive messages. A given regID is not guaranteed to last indefinitely,
+so the first thing your app should always do is check to make sure it has a valid regID
+(as shown in the code snippets above).</p>
+
+<p>In addition to confirming that it has a valid regID, your app should be prepared to handle
+the registration error {@code TOO_MANY_REGISTRATIONS}. This error indicates that the device
+has too many apps registered with GCM. The error only occurs in cases where there are
+extreme numbers of apps, so it should not affect the average user. The remedy is to prompt
+the user to delete some of the other GCM-enabled apps from the device to make
+room for the new one.</p>
+
+
 <h3 id="sample-send">Send a message</h3>
 <p>When the user clicks the app's <strong>Send</strong> button, the app sends an
 upstream message using the
diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index 2f8c407..3dec216 100644
--- a/docs/html/guide/components/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
@@ -139,7 +139,9 @@
 intent when starting a {@link android.app.Service} and do not
 declare intent filters for your services. Using an implicit intent to start a service is a
 security hazard because you cannot be certain what service will respond to the intent,
-and the user cannot see which service starts.</p>
+and the user cannot see which service starts. Beginning with Android 5.0 (API level 21), the system
+throws an exception if you call {@link android.content.Context#bindService bindService()}
+with an implicit intent.</p>
 
 
 
@@ -424,18 +426,18 @@
 android.app.Activity#startActivity startActivity()}. For example:</p>
 
 <pre>
-Intent intent = new Intent(Intent.ACTION_SEND);
+Intent sendIntent = new Intent(Intent.ACTION_SEND);
 ...
 
 // Always use string resources for UI text.
 // This says something like "Share this photo with"
 String title = getResources().getString(R.string.chooser_title);
-// Create intent to show chooser
-Intent chooser = Intent.createChooser(intent, title);
+// Create intent to show the chooser dialog
+Intent chooser = Intent.createChooser(sendIntent, title);
 
-// Verify the intent will resolve to at least one activity
+// Verify the original intent will resolve to at least one activity
 if (sendIntent.resolveActivity(getPackageManager()) != null) {
-    startActivity(sendIntent);
+    startActivity(chooser);
 }
 </pre>
 
diff --git a/docs/html/preview/index.html b/docs/html/preview/index.html
index ed78e4d1..4f7722c 100644
--- a/docs/html/preview/index.html
+++ b/docs/html/preview/index.html
@@ -332,47 +332,11 @@
           to <code>"21"</code>, so you can upload your updated apps today.</li>
       </ul>
 
-      <p>Although the APIs for Android 5.0 are now final, the system image for end-users
-        is not available yet. So the following preview system images are available for you to
-        test your apps on a Nexus 5 or Nexus 7. These are non-final
-        builds and their use is governed by the <a href="/preview/license.html">Android L
-        Preview License Agreement</a>.</p>
-
-          <table >
-            <tbody><tr>
-              <th scope="col">Device</th>
-              <th scope="col">Download</th>
-              <th scope="col">Checksum</th>
-            </tr>
-            <tr id="hammerhead">
-              <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
-              <td><a href="#download" onclick="onDownload(this)">hammerhead-lpx13d-preview-f7596f51.tgz</a></td>
-              <td>MD5: <code>8d92596aa038203fc6c8ff40a0e8b560</code>
-              <br>SHA-1: <code>f7596f518a8a429f03de5bf8152fa90e738228dd</code></td>
-            </tr>
-            <tr id="razor">
-              <td>Nexus 7 [2013] (Wi-Fi) <br>"razor"</td>
-              <td><a href="#download" onclick="onDownload(this)">razor-lpx13d-preview-ae4f461f.tgz</a></td>
-              <td>MD5: <code>b2c567518d203b487cb2ac28d25b0a54</code>
-              <br><nobr>SHA-1: <code>ae4f461fabae5ff92eae0c252c34bb26d877e528</code></nobr></td>
-            </tr>
-          </tbody></table>
-        </li>
-
-        <p>For details about how to flash the system image to your device, see the
-          <a href="https://developers.google.com/android/nexus/images#instructions">flashing
-            instructions</a>.</p>
-
-        <p>If you want to uninstall the preview system image and flash your device to factory
-        specifications, download the appropriate image from
+      <p>If you previously flashed your Nexus 5 or Nexus 7 with a preview system image, you should
+        now update your device to the final factory system image.
+        Download the appropriate image from
         <a href="http://developers.google.com/android/nexus/images">Factory Images for Nexus
-          Devices</a> and follow the instructions on that page.</p>
-
-        <p class="note"><strong>Note:</strong> When the final Android 5.0 system image becomes
-          available, it will be posted on the
-        <a href="http://developers.google.com/android/nexus/images">Factory Images for Nexus
-          Devices</a> page. To continue development (and receive future system updates),
-          you should update your device with that image as soon as possible.</p>
+          Devices</a> and follow the flashing instructions on that page.</p>
 
         </div> <!-- end .wrap -->
 
diff --git a/docs/html/preview/license.html b/docs/html/preview/license.html
index ffda3ab..deb16aa 100644
--- a/docs/html/preview/license.html
+++ b/docs/html/preview/license.html
@@ -87,8 +87,8 @@
 
 <div class="jd-descr" itemprop="articleBody">
     <p>
-If you are using the <a href="/preview/index.html">Android SDK
-Preview</a>, you must agree to the following terms
+If you are using the Android SDK
+Preview, you must agree to the following terms
 and conditions. As described below, please note that the preview version of the
 Android SDK is subject to change, and that you use it at your own risk.  The
 Android SDK Preview is not a stable release, and may contain errors and defects
diff --git a/docs/html/samples/new/index.jd b/docs/html/samples/new/index.jd
index 330caa3..ba75072 100644
--- a/docs/html/samples/new/index.jd
+++ b/docs/html/samples/new/index.jd
@@ -12,99 +12,229 @@
 </p>
 
 
-<h3 id="BasicManagedProfile">BasicManagedProfile</h3>
-<div class="figure" style="width:220px">
-  <img src="{@docRoot}samples/images/BasicManagedProfile.png"
-     srcset="{@docRoot}samples/images/BasicManagedProfile@2x.png 2x"
-     alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure 1.</strong> The BasicManagedProfile sample app.
-  </p>
-</div>
+<!-- NOTE TO EDITORS: add most recent samples first -->
 
-<p>This sample demonstrates how to create a managed profile. You can also:</p>
-<ul>
-  <li>Enable or disable other apps, and set restrictions on them.</li>
-  <li>Configure intents to be forwarded between the primary account and the
-   managed profile.</li>
-  <li>Wipe all the data associated with the managed profile.</li>
-</ul>
+<h3 id="MediaBrowserService">Media Browser Service</h3>
 
-<p class="note"><strong>Note:</strong> There can be only one managed profile on
-  a device at a time.</p>
+<p>
+This sample is a simple audio media app that exposes its media
+library and provides metadata and playback controls through the new
+MediaBrowserService and MediaSession APIs from API 21.
+The sample is compatible with Android Auto and also provides a basic UI
+when not connected to a car.
+</p>
 
-<p><a href="http://github.com/googlesamples/android-BasicManagedProfile">Get it on GitHub</a></p>
+<p class="note">
+  <strong>Note:</strong> This sample is compatible with <a
+  href="http://android.com/auto">Android Auto</a>.
+</p>
 
-<h3 id="Camera2Basic">Camera2Basic</h3>
+<p><a href="http://github.com/googlesamples/android-MediaBrowserService">Get it on GitHub</a></p>
+
+
+<h3 id="MessagingService">Messaging Service</h3>
+
+<p>
+This sample shows a simple service that sends notifications using
+NotificationCompat. In addition to sending a notification, it also extends
+the notification with a CarExtender to make it compatible with Android Auto.
+Each unread conversation from a user is sent as a distinct notification.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> This sample is compatible with <a
+  href="http://android.com/auto">Android Auto</a>.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-MessagingService">Get it on GitHub</a></p>
+
+
+<h3 id="SpeedTracker">Speed Tracker (Wear)</h3>
+
+<p>
+This sample uses the FusedLocation APIs of Google Play Services on Android Wear 
+devices that have a hardware GPS built in. In those cases, this sample provides
+a simple screen that shows the current speed of the wearable device. User can
+set a speed limit and if the speed approaches that limit, it changes the color
+to yellow and if it exceeds the limit, it turns red. User can also enable
+recording of coordinates and when it pairs back with the phone, this data
+is synced with the phone component of the app and user can see a track
+made of those coordinates on a map on the phone.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-SpeedTracker">Get it on GitHub</a></p>
+
+
+<h3 id="AppRestrictionSchema">AppRestrictionSchema</h3>
+
+<p>
+This sample shows how to use app restrictions. This application has one boolean
+restriction with a key "can_say_hello" that defines whether the only feature of this
+app (press the button to show "Hello" message) is enabled or disabled. Use
+AppRestrictionEnforcer sample to toggle the restriction.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-AppRestrictionSchema">Get it on GitHub</a></p>
+
+
+<h3 id="AppRestrictionEnforcer">AppRestrictionEnforcer</h3>
+
+<p>
+This sample demonstrates how to set restrictions to other apps as a profile owner.
+Use AppRestrictionSchema sample as a app with available restrictions.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-AppRestrictionEnforcer">Get it on GitHub</a></p>
+
+
+<h3 id="DocumentCentricRelinquishIdentity">DocumentCentricRelinquishIdentity</h3>
+
+<p>
+This sample shows how to relinquish identity to activities above it in the task stack.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-DocumentCentricRelinquishIdentity">Get it on GitHub</a></p>
+
+
+<h3 id="DocumentCentricApps">DocumentCentricApps</h3>
+
+<p>
+This sample shows the basic usage of the new "Document Centric Apps" API.
+It let's you create new documents in the system overview menu and persists its
+state through reboots. If "Task per document" is checked a new task will be
+created for every new document in the overview menu.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-DocumentCentricApps">Get it on GitHub</a></p>
+
+
+<h3 id="HdrViewfinder">HdrViewfinder</h3>
+
+<p>
+This demo implements a real-time high-dynamic-range camera viewfinder, by alternating
+the sensor's exposure time between two exposure values on even and odd frames, and then
+compositing together the latest two frames whenever a new frame is captured.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-HdrViewfinder">Get it on GitHub</a></p>
+
+
+<h3 id="Interpolator">Interpolator</h3>
+
+<p>
+This sample demonstrates the use of animation interpolators and path animations for
+Material Design. It shows how an ObjectAnimator is used to animate two properties of a
+view (scale X and Y) along a path.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-Interpolator">Get it on GitHub</a></p>
+
+
+<h3 id="DrawableTinting">DrawableTinting</h3>
+
+<p>Sample that shows applying tinting and color filters to Drawables both programmatically
+and as Drawable resources in XML.</p>
+<p>Tinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
+A color state list is referenced as the tint color, which defines colors for different
+states of a View (for example disabled/enabled, focused, pressed or selected).</p>
+<p>Programmatically, tinting is applied to a Drawable through its "setColorFilter" method,
+with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
+changed from the UI to see the effect of different options.</p>
+
+<p><a href="http://github.com/googlesamples/android-DrawableTinting">Get it on GitHub</a></p>
+
+
+<h3 id="LNotifications">LNotifications</h3>
+
+<p>
+This sample demonstrates how new features for notifications introduced in Android 5.0
+are used such as Heads-Up notifications, visibility, people, category and priority
+metadata. </p>
+<p><a href="http://github.com/googlesamples/android-LNotifications">Get it on GitHub</a></p>
+
+
+<h3 id="CardView">CardView</h3>
+
+<p>
+This sample demonstrates how to use the CardView UI widget introduced in Android 5.0, using the support library for backward compatibility.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-CardView">Get it on GitHub</a></p>
+
+
+<h3 id="RecyclerView">RecyclerView</h3>
+
+<p>
+Demonstration of using RecyclerView with a LayoutManager to create a vertical ListView.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-RecyclerView">Get it on GitHub</a></p>
+
+
+<h3 id="RevealEffectBasic">RevealEffectBasic</h3>
+
+<p>
+A sample demonstrating how to perform a reveal effect for UI elements within the Material Design framework.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-RevealEffectBasic">Get it on GitHub</a></p>
+
+
+<h3 id="FloatingActionButtonBasic">FloatingActionButtonBasic</h3>
+
+<p>
+This sample shows the two sizes of Floating Action Buttons and how to interact with
+them.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-FloatingActionButtonBasic">Get it on GitHub</a></p>
+
 
 <!--
+<h3 id="">SampleName</h3>
+
 <div class="figure" style="width:220px">
   <img src="" srcset="@2x.png 2x" alt="" height="375" />
   <p class="img-caption">
     <strong>Figure n.</strong> Single sentence summarizing the figure.
   </p>
 </div>
+
+<p>
+**description**
+</p>
 -->
 
-<p>This sample demonstrates the basic use of the Camera2 API. The sample code
-demonstrates how you can display camera preview and take pictures.</p>
 
-<p><a href="http://github.com/googlesamples/android-Camera2Basic">Get it on GitHub</a></p>
-
-
-<h3 id="Camera2Video">Camera2Video</h3>
+<h3 id="NavigationDrawerSample">NavigationDrawerSample</h3>
 <!--
 <div class="figure" style="width:220px">
-<img src="" srcset="@2x.png 2x" alt="" height="375" />
-    <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>This sample demonstrates how to record video using the Camera2 API.</p>
-
-<p><a href="http://github.com/googlesamples/android-Camera2Video">Get it on GitHub</a></p>
-
-<h3 id="ActivitySceneTransitionBasic">ActivitySceneTransitionBasic</h3>
-<div class="figure" style="width:220px">
-  <img src="{@docRoot}samples/images/ActivitySceneTransitionBasic.png"
-      srcset="{@docRoot}samples/images/ActivitySceneTransitionBasic@2x.png 2x"
-      alt="" height="375" />
+  <img src="" srcset="@2x.png 2x" alt="" height="375" />
   <p class="img-caption">
-    <strong>Figure 2.</strong> The ActivitySceneTransitionBasic sample app.
-  </p>
-  </div>
-
-<p> This sample demonstrates how to the use {@link android.app.Activity} scene
-transitions when transitioning from one activity to another. Uses a combination
-of <code>moveImage</code> and <code>changeBounds</code> to nicely transition
-from a grid of images to an activity with a large image and detail text. </p>
-
-<p><a href="http://github.com/googlesamples/android-ActivitySceneTransition">Get it on GitHub</a></p>
-
-<h3 id="ElevationBasic">ElevationBasic</h3>
-<!--
-<div class="figure" style="width:220px">
-<img src="" srcset="@2x.png 2x" alt="" height="375" />
-    <p class="img-caption">
     <strong>Figure n.</strong> Single sentence summarizing the figure.
   </p>
 </div>
 -->
 
 <p>
-This sample demonstrates two alternative ways to move a view in the z-axis:</p>
+This sample illustrates a common usage of the Android support library's
+{@link android.support.v4.widget.DrawerLayout} widget.
+</p>
 
-<ul>
-  <li>With a fixed elevation, using XML.</li>
-  <li>Raising the elevation when the user taps on it, using
-      <code>setTranslationZ()</code>.</li>
-</ul>
+<p><a href="http://github.com/googlesamples/android-NavigationDrawer">Get it on GitHub</a></p>
 
-<p><a href="http://github.com/googlesamples/android-ElevationBasic">Get it on GitHub</a></p>
 
-<h3 id="ElevationDrag">ElevationDrag</h3>
+<h3 id="JobSchedulerSample">JobSchedulerSample</h3>
+
+<p>
+This sample app allows the user to schedule jobs through the UI, and shows
+visual cues when the jobs are executed.
+</p>
+
+<p><a href="http://github.com/googlesamples/android-JobScheduler">Get it on GitHub</a></p>
+
+
+<h3 id="AndroidTVLeanbackSample">AndroidTVLeanbackSample</h3>
 <!--
 <div class="figure" style="width:220px">
   <img src="" srcset="@2x.png 2x" alt="" height="375" />
@@ -114,11 +244,46 @@
 </div>
 -->
 
-<p>This sample demonstrates a drag and drop action on different shapes.
-Elevation and z-translation are used to render the shadows. The views are
-clipped using different outlines.</p>
+<p>
+This sample demonstrates use of the Android TV Leanback Support Library.
+</p>
 
-<p><a href="http://github.com/googlesamples/android-ElevationDrag">Get it on GitHub</a></p>
+<p><a href="http://github.com/googlesamples/androidtv-Leanback">Get it on GitHub</a></p>
+
+
+<h3 id="Visual-Game-Controller">Visual-Game-Controller</h3>
+<!--
+<div class="figure" style="width:220px">
+  <img src="" srcset="@2x.png 2x" alt="" height="375" />
+  <p class="img-caption">
+    <strong>Figure n.</strong> Single sentence summarizing the figure.
+  </p>
+</div>
+-->
+
+<p>
+This sample displays events received from a game controller shown on the screen.
+</p>
+
+<p><a href="http://github.com/googlesamples/androidtv-VisualGameController">Get it on GitHub</a></p>
+
+
+<h3 id="GameControllerSample">GameControllerSample</h3>
+<!--
+<div class="figure" style="width:220px">
+  <img src="" srcset="@2x.png 2x" alt="" height="375" />
+  <p class="img-caption">
+    <strong>Figure n.</strong> Single sentence summarizing the figure.
+  </p>
+</div>
+-->
+
+<p>
+This sample implements a multi-player game, demonstrating game controller input
+handling.
+</p>
+
+<p><a href="http://github.com/googlesamples/androidtv-GameController">Get it on GitHub</a></p>
 
 
 <h3 id="ClippingBasic">ClippingBasic</h3>
@@ -146,7 +311,8 @@
   </p>
 </div>
 
-<h3 id="GameControllerSample">GameControllerSample</h3>
+
+<h3 id="ElevationDrag">ElevationDrag</h3>
 <!--
 <div class="figure" style="width:220px">
   <img src="" srcset="@2x.png 2x" alt="" height="375" />
@@ -156,15 +322,70 @@
 </div>
 -->
 
+<p>This sample demonstrates a drag and drop action on different shapes.
+Elevation and z-translation are used to render the shadows. The views are
+clipped using different outlines.</p>
+
+<p><a href="http://github.com/googlesamples/android-ElevationDrag">Get it on GitHub</a></p>
+
+
+<h3 id="ElevationBasic">ElevationBasic</h3>
+<!--
+<div class="figure" style="width:220px">
+<img src="" srcset="@2x.png 2x" alt="" height="375" />
+    <p class="img-caption">
+    <strong>Figure n.</strong> Single sentence summarizing the figure.
+  </p>
+</div>
+-->
+
 <p>
-This sample implements a multi-player game, demonstrating game controller input
-handling.
-</p>
+This sample demonstrates two alternative ways to move a view in the z-axis:</p>
 
-<p><a href="http://github.com/googlesamples/androidtv-GameController">Get it on GitHub</a></p>
+<ul>
+  <li>With a fixed elevation, using XML.</li>
+  <li>Raising the elevation when the user taps on it, using
+      <code>setTranslationZ()</code>.</li>
+</ul>
+
+<p><a href="http://github.com/googlesamples/android-ElevationBasic">Get it on GitHub</a></p>
 
 
-<h3 id="Visual-Game-Controller">Visual-Game-Controller</h3>
+<h3 id="ActivitySceneTransitionBasic">ActivitySceneTransitionBasic</h3>
+<div class="figure" style="width:220px">
+  <img src="{@docRoot}samples/images/ActivitySceneTransitionBasic.png"
+      srcset="{@docRoot}samples/images/ActivitySceneTransitionBasic@2x.png 2x"
+      alt="" height="375" />
+  <p class="img-caption">
+    <strong>Figure 2.</strong> The ActivitySceneTransitionBasic sample app.
+  </p>
+  </div>
+
+<p> This sample demonstrates how to the use {@link android.app.Activity} scene
+transitions when transitioning from one activity to another. Uses a combination
+of <code>moveImage</code> and <code>changeBounds</code> to nicely transition
+from a grid of images to an activity with a large image and detail text. </p>
+
+<p><a href="http://github.com/googlesamples/android-ActivitySceneTransition">Get it on GitHub</a></p>
+
+
+<h3 id="Camera2Video">Camera2Video</h3>
+<!--
+<div class="figure" style="width:220px">
+<img src="" srcset="@2x.png 2x" alt="" height="375" />
+    <p class="img-caption">
+    <strong>Figure n.</strong> Single sentence summarizing the figure.
+  </p>
+</div>
+-->
+
+<p>This sample demonstrates how to record video using the Camera2 API.</p>
+
+<p><a href="http://github.com/googlesamples/android-Camera2Video">Get it on GitHub</a></p>
+
+
+<h3 id="Camera2Basic">Camera2Basic</h3>
+
 <!--
 <div class="figure" style="width:220px">
   <img src="" srcset="@2x.png 2x" alt="" height="375" />
@@ -174,192 +395,32 @@
 </div>
 -->
 
-<p>
-This sample displays events received from a game controller shown on the screen.
-</p>
+<p>This sample demonstrates the basic use of the Camera2 API. The sample code
+demonstrates how you can display camera preview and take pictures.</p>
 
-<p><a href="http://github.com/googlesamples/androidtv-VisualGameController">Get it on GitHub</a></p>
+<p><a href="http://github.com/googlesamples/android-Camera2Basic">Get it on GitHub</a></p>
 
-<h3 id="AndroidTVLeanbackSample">AndroidTVLeanbackSample</h3>
-<!--
+
+<h3 id="BasicManagedProfile">BasicManagedProfile</h3>
 <div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
+  <img src="{@docRoot}samples/images/BasicManagedProfile.png"
+     srcset="{@docRoot}samples/images/BasicManagedProfile@2x.png 2x"
+     alt="" height="375" />
   <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample demonstrates use of the Android TV Leanback Support Library.
-</p>
-
-<p><a href="http://github.com/googlesamples/androidtv-Leanback">Get it on GitHub</a></p>
-
-<h3 id="JobSchedulerSample">JobSchedulerSample</h3>
-
-<p>
-This sample app allows the user to schedule jobs through the UI, and shows
-visual cues when the jobs are executed.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-JobScheduler">Get it on GitHub</a></p>
-
-<h3 id="NavigationDrawerSample">NavigationDrawerSample</h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample illustrates a common usage of the Android support library's
-{@link android.support.v4.widget.DrawerLayout} widget.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-NavigationDrawer">Get it on GitHub</a></p>
-<!--
-<h3 id="">SampleName</h3>
-
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
+    <strong>Figure 1.</strong> The BasicManagedProfile sample app.
   </p>
 </div>
 
-<p>
-**description**
-</p>
--->
+<p>This sample demonstrates how to create a managed profile. You can also:</p>
+<ul>
+  <li>Enable or disable other apps, and set restrictions on them.</li>
+  <li>Configure intents to be forwarded between the primary account and the
+   managed profile.</li>
+  <li>Wipe all the data associated with the managed profile.</li>
+</ul>
 
-<h3 id="FloatingActionButtonBasic">FloatingActionButtonBasic</h3>
+<p class="note"><strong>Note:</strong> There can be only one managed profile on
+  a device at a time.</p>
 
-<p>
-This sample shows the two sizes of Floating Action Buttons and how to interact with
-them.
-</p>
+<p><a href="http://github.com/googlesamples/android-BasicManagedProfile">Get it on GitHub</a></p>
 
-<p><a href="http://github.com/googlesamples/android-FloatingActionButtonBasic">Get it on GitHub</a></p>
-
-<h3 id="RevealEffectBasic">RevealEffectBasic</h3>
-
-<p>
-A sample demonstrating how to perform a reveal effect for UI elements within the Material Design framework.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-RevealEffectBasic">Get it on GitHub</a></p>
-
-<h3 id="RecyclerView">RecyclerView</h3>
-
-<p>
-Demonstration of using RecyclerView with a LayoutManager to create a vertical ListView.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-RecyclerView">Get it on GitHub</a></p>
-
-<h3 id="CardView">CardView</h3>
-
-<p>
-This sample demonstrates how to use the CardView UI widget introduced in Android 5.0, using the support library for backward compatibility.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-CardView">Get it on GitHub</a></p>
-
-<h3 id="LNotifications">LNotifications</h3>
-
-<p>
-This sample demonstrates how new features for notifications introduced in Android 5.0
-are used such as Heads-Up notifications, visibility, people, category and priority
-metadata. </p>
-<p><a href="http://github.com/googlesamples/android-LNotifications">Get it on GitHub</a></p>
-
-<h3 id="DrawableTinting">DrawableTinting</h3>
-
-<p>Sample that shows applying tinting and color filters to Drawables both programmatically
-and as Drawable resources in XML.</p>
-<p>Tinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
-A color state list is referenced as the tint color, which defines colors for different
-states of a View (for example disabled/enabled, focused, pressed or selected).</p>
-<p>Programmatically, tinting is applied to a Drawable through its "setColorFilter" method,
-with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
-changed from the UI to see the effect of different options.</p>
-
-<p><a href="http://github.com/googlesamples/android-DrawableTinting">Get it on GitHub</a></p>
-
-<h3 id="Interpolator">Interpolator</h3>
-
-<p>
-This sample demonstrates the use of animation interpolators and path animations for
-Material Design. It shows how an ObjectAnimator is used to animate two properties of a
-view (scale X and Y) along a path.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-Interpolator">Get it on GitHub</a></p>
-
-<h3 id="HdrViewfinder">HdrViewfinder</h3>
-
-<p>
-This demo implements a real-time high-dynamic-range camera viewfinder, by alternating
-the sensor's exposure time between two exposure values on even and odd frames, and then
-compositing together the latest two frames whenever a new frame is captured.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-HdrViewfinder">Get it on GitHub</a></p>
-
-<h3 id="DocumentCentricApps">DocumentCentricApps</h3>
-
-<p>
-This sample shows the basic usage of the new "Document Centric Apps" API.
-It let's you create new documents in the system overview menu and persists its
-state through reboots. If "Task per document" is checked a new task will be
-created for every new document in the overview menu.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-DocumentCentricApps">Get it on GitHub</a></p>
-
-<h3 id="DocumentCentricRelinquishIdentity">DocumentCentricRelinquishIdentity</h3>
-
-<p>
-This sample shows how to relinquish identity to activities above it in the task stack.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-DocumentCentricRelinquishIdentity">Get it on GitHub</a></p>
-
-<h3 id="AppRestrictionEnforcer">AppRestrictionEnforcer</h3>
-
-<p>
-This sample demonstrates how to set restrictions to other apps as a profile owner.
-Use AppRestrictionSchema sample as a app with available restrictions.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-AppRestrictionEnforcer">Get it on GitHub</a></p>
-
-<h3 id="AppRestrictionSchema">AppRestrictionSchema</h3>
-
-<p>
-This sample shows how to use app restrictions. This application has one boolean
-restriction with a key "can_say_hello" that defines whether the only feature of this
-app (press the button to show "Hello" message) is enabled or disabled. Use
-AppRestrictionEnforcer sample to toggle the restriction.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-AppRestrictionSchema">Get it on GitHub</a></p>
-
-<h3 id="SpeedTracker">Speed Tracker (Wear)</h3>
-
-<p>
-This sample uses the FusedLocation APIs of Google Play Services on Android Wear 
-devices that have a hardware GPS built in. In those cases, this sample provides
-a simple screen that shows the current speed of the wearable device. User can
-set a speed limit and if the speed approaches that limit, it changes the color
-to yellow and if it exceeds the limit, it turns red. User can also enable
-recording of coordinates and when it pairs back with the phone, this data
-is synced with the phone component of the app and user can see a track
-made of those coordinates on a map on the phone.
-</p>
-
-<p><a href="http://github.com/googlesamples/android-SpeedTracker">Get it on GitHub</a></p>
diff --git a/docs/html/samples/notification.jd b/docs/html/samples/notification.jd
new file mode 100644
index 0000000..bbcea93
--- /dev/null
+++ b/docs/html/samples/notification.jd
@@ -0,0 +1,11 @@
+page.title=Notification
+@jd:body
+
+
+<div id="samples" class="notification">
+</div>
+
+
+<script>
+  $(document).ready(showSamples);
+</script>
diff --git a/docs/html/sdk/installing/migrate.jd b/docs/html/sdk/installing/migrate.jd
index db1b5dd..b83f8d3 100644
--- a/docs/html/sdk/installing/migrate.jd
+++ b/docs/html/sdk/installing/migrate.jd
@@ -15,23 +15,7 @@
 </div>
 
 <p>If you've previously developed for Android using Eclipse and would like to migrate
-to Android Studio, you should export your projects from Eclipse in order to generate
-Gradle build files. You can then import your project into Android Studio.</p>
-
-
-<h2 id="Export">Export from Eclipse</h2>
-<ol>
-<li><a href="{@docRoot}tools/help/adt.html#Updating">Update your Eclipse ADT Plugin</a>
-  (you must have version 22.0 or higher).</li>
-<li>In Eclipse, select <strong>File > Export</strong>.</li>
-<li>In the window that appears, open <strong>Android</strong> and select <strong>Generate Gradle
-build files</strong>.</li>
-<li>Select the project you want to export for Android Studio and click
-<strong>Finish</strong>.</li>
-</ol>
-
-<p>Your selected project remains in the same location but now contains a {@code build.gradle}
-file and is ready for Android Studio.</p>
+to Android Studio, you can import your project into Android Studio.</p>
 
 
 <h2 id="Export">Import into Android Studio</h2>
diff --git a/docs/html/training/location/index.jd b/docs/html/training/location/index.jd
index 249c42d..f0024e2 100644
--- a/docs/html/training/location/index.jd
+++ b/docs/html/training/location/index.jd
@@ -21,7 +21,8 @@
 <h2>You should also read</h2>
 <ul>
     <li>
-        <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+        <a href="{@docRoot}google/play-services/setup.html">Set Up Google Play
+        Services SDK</a>
     </li>
 </ul>
 
@@ -29,68 +30,75 @@
 </div>
 
 <p>
-    One of the unique features of mobile applications is location awareness. Mobile users bring
-    their devices with them everywhere, and adding location awareness to your app offers users a
-    more contextual experience. The new Location Services API available in Google Play services
-    facilitates adding location awareness to your app with automated location tracking,
-    geofencing, and activity recognition. This API adds significant advantages over the plaform's
-    location API.
+  One of the unique features of mobile applications is location awareness.
+  Mobile users take their devices with them everywhere, and adding location
+  awareness to your app offers users a more contextual experience. The location
+  APIs available in Google Play services facilitate adding location awareness to
+  your app with automated location tracking, geofencing, and activity
+  recognition.
 </p>
+
+<p>The
+  <a href="{@docRoot}reference/com/google/android/gms/location/package-summary.html">Google
+  Play services location APIs</a> are preferred over the Android framework
+  location APIs
+  (<a href="{@docRoot}reference/android/location/package-summary.html">android.location</a>)
+  as a way of adding location awareness to your app. If you are currently using
+  the Android framework location APIs, you are strongly encouraged to switch to
+  the Google Play services location APIs as soon as possible.
+</p>
+
 <p>
-    This class shows you how to use Location Services in your app to get the current location,
-    get periodic location updates, look up addresses, create and monitor geofences, and
-    detect user activities. The class includes sample apps and code snippets that you can use as a
-    starting point for adding location awareness to your own app.
+  This class shows you how to use the Google Play services location APIs in your
+  app to get the current location, get periodic location updates, look up
+  addresses, create and monitor geofences, and detect user activities. The class
+  includes sample apps and code snippets that you can use as a starting point
+  for adding location awareness to your app.
 </p>
+
 <p class="note">
-    <strong>Note:</strong> Since this class is based on the Google Play services client library,
-    make sure you install the latest version before using the sample apps or code snippets. To learn
-    how to set up the client library with the latest version, see
-    <a href="{@docRoot}google/play-services/setup.html">Setup</a> in the Google Play services guide.
+  <strong>Note:</strong> Since this class is based on the Google Play services
+  client library, make sure you install the latest version before using the
+  sample apps or code snippets. To learn how to set up the client library with
+  the latest version, see
+  <a href="{@docRoot}google/play-services/setup.html">Setup</a> in the Google
+  Play services guide.
 </p>
 <h2>Lessons</h2>
 <dl>
-    <dt>
-        <b><a href="retrieve-current.html">Retrieving the Current Location</a></b>
-    </dt>
-    <dd>
-        Learn how to retrieve the user's current location.
-    </dd>
-    <dt>
-        <b><a href="receive-location-updates.html">Receiving Location Updates</a></b>
-    </dt>
-    <dd>
-        Learn how to request and receive periodic location updates.
-    </dd>
-    <dt>
-        <b><a href="display-address.html">Displaying a Location Address</a></b>
-    </dt>
-    <dd>
-        Learn how to convert a location's latitude and longitude into an address (reverse
-        geocoding).
-    </dd>
-    <dt>
-        <b>
-            <a href="geofencing.html">Creating and Monitoring Geofences</a>
-        </b>
-    </dt>
-    <dd>
-        Learn how to define one or more geographic areas as locations of interest, called geofences,
-        and detect when the user is close to or inside a geofence.
-    </dd>
-    <dt>
-        <b><a href="activity-recognition.html">Recognizing the User's Current Activity</a></b>
-    </dt>
-    <dd>
-        Learn how to recognize the user's current activity, such as walking, bicycling,
-        or driving a car, and how to use this information to modify your app's location strategy.
-    </dd>
-    <dt>
-        <b><a href="location-testing.html">Testing Using Mock Locations</a></b>
-    </dt>
-    <dd>
-        Learn how to test a location-aware app by injecting mock locations into Location
-        Services. In mock mode, Location Services sends out mock locations that you inject instead
-        of sensor-based locations.
-    </dd>
+  <dt>
+    <b><a href="retrieve-current.html">Retrieving the Current Location</a></b>
+  </dt> <dd>
+     Learn how to retrieve the user's current location.
+  </dd> <dt>
+    <b><a href="receive-location-updates.html">Receiving Location
+    Updates</a></b>
+  </dt> <dd>
+     Learn how to request and receive periodic location updates.
+  </dd> <dt>
+    <b><a href="display-address.html">Displaying a Location Address</a></b>
+  </dt> <dd>
+    Learn how to convert a location's latitude and longitude into an address
+    (reverse geocoding).
+  </dd> <dt>
+    <b>
+      <a href="geofencing.html">Creating and Monitoring Geofences</a>
+    </b>
+  </dt> <dd>
+    Learn how to define one or more geographic areas as locations of interest,
+    called geofences, and detect when the user is close to or inside a geofence.
+  </dd> <dt>
+    <b><a href="activity-recognition.html">Recognizing the User's Current
+    Activity</a></b>
+  </dt> <dd>
+    Learn how to recognize the user's current activity, such as walking,
+    bicycling, or driving a car, and how to use this information to modify your
+    app's location strategy.
+  </dd> <dt>
+    <b><a href="location-testing.html">Testing Using Mock Locations</a></b>
+  </dt> <dd>
+    Learn how to test a location-aware app by injecting mock locations into
+    Location Services. In mock mode, Location Services sends out mock locations
+    that you inject instead of sensor-based locations.
+  </dd>
 </dl>