Merge "Minor resource notation/compatibility fixes" into lmp-mr1-dev
diff --git a/api/current.txt b/api/current.txt
index caf28cb..44a93d2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -21399,8 +21399,8 @@
     field public static final int JELLY_BEAN_MR2 = 18; // 0x12
     field public static final int KITKAT = 19; // 0x13
     field public static final int KITKAT_WATCH = 20; // 0x14
-    field public static final int L = 21; // 0x15
     field public static final int LOLLIPOP = 21; // 0x15
+    field public static final int LOLLIPOP_MR1 = 22; // 0x16
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index ee36012..f361695b 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -554,6 +554,7 @@
 
         /**
          * Temporary until we completely switch to {@link #LOLLIPOP}.
+         * @hide
          */
         public static final int L = 21;
 
@@ -566,9 +567,32 @@
          * <li> {@link android.content.Context#bindService Context.bindService} now
          * requires an explicit Intent, and will throw an exception if given an implicit
          * Intent.</li>
+         * <li> {@link android.app.Notification.Builder Notification.Builder} will
+         * not have the colors of their various notification elements adjusted to better
+         * match the new material design look.</li>
+         * <li> {@link android.os.Message} will validate that a message is not currently
+         * in use when it is recycled.</li>
+         * <li> Hardware accelerated drawing in windows will be enabled automatically
+         * in most places.</li>
+         * <li> {@link android.widget.Spinner} throws an exception if attaching an
+         * adapter with more than one item type.</li>
+         * <li> If the app is a launcher, the launcher will be available to the user
+         * even when they are using corporate profiles (which requires that the app
+         * use {@link android.content.pm.LauncherApps} to correctly populate its
+         * apps UI).</li>
+         * <li> Calling {@link android.app.Service#stopForeground Service.stopForeground}
+         * with removeNotification false will modify the still posted notification so that
+         * it is no longer forced to be ongoing.</li>
+         * <li> A {@link android.service.dreams.DreamService} must require the
+         * {@link android.Manifest.permission#BIND_DREAM_SERVICE} permission to be usable.</li>
          * </ul>
          */
         public static final int LOLLIPOP = 21;
+
+        /**
+         * Lollipop with an extra sugar coating on the outside!
+         */
+        public static final int LOLLIPOP_MR1 = 22;
     }
     
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 12a49d5..50e64c6 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -1005,12 +1005,21 @@
             return fields;
         }
 
-        final ArrayList<Field> foundFields = new ArrayList<Field>();
-        fields = klass.getDeclaredFields();
+        final ArrayList<Field> declaredFields = new ArrayList();
+        klass.getDeclaredFieldsUnchecked(false, declaredFields);
 
-        int count = fields.length;
+        final ArrayList<Field> foundFields = new ArrayList<Field>();
+        final int count = declaredFields.size();
         for (int i = 0; i < count; i++) {
-            final Field field = fields[i];
+            final Field field = declaredFields.get(i);
+
+            // Ensure the field type can be resolved.
+            try {
+                field.getType();
+            } catch (NoClassDefFoundError e) {
+                continue;
+            }
+
             if (field.isAnnotationPresent(ExportedProperty.class)) {
                 field.setAccessible(true);
                 foundFields.add(field);
@@ -1039,12 +1048,22 @@
             return methods;
         }
 
-        final ArrayList<Method> foundMethods = new ArrayList<Method>();
-        methods = klass.getDeclaredMethods();
+        final ArrayList<Method> declaredMethods = new ArrayList();
+        klass.getDeclaredMethodsUnchecked(false, declaredMethods);
 
-        int count = methods.length;
+        final ArrayList<Method> foundMethods = new ArrayList<Method>();
+        final int count = declaredMethods.size();
         for (int i = 0; i < count; i++) {
-            final Method method = methods[i];
+            final Method method = declaredMethods.get(i);
+
+            // Ensure the method return and parameter types can be resolved.
+            try {
+                method.getReturnType();
+                method.getParameterTypes();
+            } catch (NoClassDefFoundError e) {
+                continue;
+            }
+
             if (method.getParameterTypes().length == 0 &&
                     method.isAnnotationPresent(ExportedProperty.class) &&
                     method.getReturnType() != Void.class) {
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 9a1c9fc..412b4d2 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -728,12 +728,9 @@
 
     /** Update the encryption password if it is enabled **/
     private void updateEncryptionPassword(final int type, final String password) {
-        DevicePolicyManager dpm = getDevicePolicyManager();
-        if (dpm.getStorageEncryptionStatus(getCurrentOrCallingUserId())
-                != DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE) {
+        if (!isDeviceEncryptionEnabled()) {
             return;
         }
-
         final IBinder service = ServiceManager.getService("mount");
         if (service == null) {
             Log.e(TAG, "Could not find the mount service to update the encryption password");
diff --git a/docs/html/about/about_toc.cs b/docs/html/about/about_toc.cs
index 95688a9..c025b61 100644
--- a/docs/html/about/about_toc.cs
+++ b/docs/html/about/about_toc.cs
@@ -7,7 +7,7 @@
     </ul>
   </li>
   <li class="nav-section">
-    <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-5.0.html">
+    <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/lollipop.html">
       <span class="en">Lollipop</span></a></div>
       <ul>
         <li><a href="<?cs var:toroot ?>about/versions/android-5.0.html">Android 5.0 APIs</a></li>
@@ -39,23 +39,6 @@
       </ul>
   </li>
   <li class="nav-section">
-    <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-3.0-highlights.html">
-      <span class="en">Honeycomb</span></a></div>
-      <ul>
-        <li><a href="<?cs var:toroot ?>about/versions/android-3.2.html">Android 3.2 APIs</a></li>
-        <li><a href="<?cs var:toroot ?>about/versions/android-3.1.html">Android 3.1 APIs</a></li>
-        <li><a href="<?cs var:toroot ?>about/versions/android-3.0.html">Android 3.0 APIs</a> </li>
-      </ul>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/android-2.3-highlights.html">
-      <span class="en">Gingerbread</span></a></div>
-      <ul>
-        <li><a href="<?cs var:toroot ?>about/versions/android-2.3.4.html">Android 2.3.4 APIs</a></li>
-        <li><a href="<?cs var:toroot ?>about/versions/android-2.3.3.html">Android 2.3.3 APIs</a></li>
-      </ul>
-  </li>
-  <li class="nav-section">
     <div class="nav-section-header empty"><a href="<?cs
 var:toroot?>about/dashboards/index.html">Dashboards</a></div>
   </li>
diff --git a/docs/html/about/versions/android-5.0.jd b/docs/html/about/versions/android-5.0.jd
index d9084b6..4f9066c 100644
--- a/docs/html/about/versions/android-5.0.jd
+++ b/docs/html/about/versions/android-5.0.jd
@@ -106,10 +106,10 @@
   </li>
 </ol>
 
-<h2>See also</h2>
+<h2>API Differences</h2>
 <ol>
-<li><a href="{@docRoot}sdk/api_diff/21/changes.html">API
-Differences Report &raquo;</a> </li>
+<li><a href="{@docRoot}sdk/api_diff/21/changes.html">API level 20 to 21 &raquo;</a> </li>
+<li><a href="{@docRoot}sdk/api_diff/preview-21/changes.html">L Developer Preview to 21 &raquo;</a> </li>
 </ol>
 
 </div>
@@ -117,16 +117,27 @@
 
 <p>API Level: {@sdkPlatformApiLevel}</p>
 
-<p>Android 5.0 (<a href="{@docRoot}reference/android/os/Build.VERSION_CODES.html#L">Lollipop</a>)
+<p>Android 5.0 (<a href="{@docRoot}reference/android/os/Build.VERSION_CODES.html#LOLLIPOP">LOLLIPOP</a>)
   offers new features for users and app developers. This document provides an
   introduction to the most notable new APIs.</p>
 
-<p>As an app developer, you should download the Android 5.0 system image and
-SDK platform from the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>
-as soon as possible. If you don’t have a device running Android 5.0 on which to
-test your app, use the Android 5.0 system image to test your app on the
-<a href="{@docRoot}tools/devices/emulator.html">Android emulator</a>. Then
-build your apps against the Android 5.0 platform to begin using the latest APIs.</p>
+
+<h3 id="Start">Start developing</h3>
+
+<p>To start building apps for Android 5.0, you must first <a href="{@docRoot}sdk/index.html">get
+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>
 
@@ -219,8 +230,10 @@
 
 <p>Setting the device to
 {@link android.media.AudioManager#RINGER_MODE_SILENT RINGER_MODE_SILENT} now
-causes the device to enter the new priority mode. The device stays in priority
-mode when you leave silent mode.</p>
+causes the device to enter the new priority mode. The device leaves priority
+mode if you set it to
+{@link android.media.AudioManager#RINGER_MODE_NORMAL RINGER_MODE_NORMAL} or
+{@link android.media.AudioManager#RINGER_MODE_NORMAL RINGER_MODE_VIBRATE}.</p>
 
 <p>Previously, Android used {@link android.media.AudioManager#STREAM_MUSIC STREAM_MUSIC}
 as the master stream to control volume on tablet devices. In Android 5.0, the
@@ -1168,7 +1181,7 @@
 
 <h3 id="Permissions">User permissions</h3>
 
-<p>The following permissions are now supported in the
+<p>The following permission is now supported in the
 <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code &lt;uses-permission&gt;}</a>
 element to declare the permissions your app requires to access certain APIs.</p>
 
@@ -1177,13 +1190,4 @@
   level 21 and higher, this permission is required by a
   <a href="{@docRoot}about/versions/android-4.2.html#Daydream">Daydream</a> service,
   to ensure that only the system can bind to it.</li>
-
-<li>{@link android.Manifest.permission#READ_VOICEMAIL}: Required to allow your
-  app to read voicemails in the system.</li>
-
-<li>{@link android.Manifest.permission#WRITE_VOICEMAIL}: Required to allow your
-  app to modify and remove existing voicemails in the system.</li>
-</ul>
-
-<p class="note">For a detailed view of all API changes in Android 5.0, see the
-<a href="{@docRoot}sdk/api_diff/21/changes.html">API Differences Report</a>.</p>
+</ul>
\ No newline at end of file
diff --git a/docs/html/about/versions/lollipop.jd b/docs/html/about/versions/lollipop.jd
new file mode 100644
index 0000000..757f148
--- /dev/null
+++ b/docs/html/about/versions/lollipop.jd
@@ -0,0 +1,252 @@
+page.title=Android Lollipop
+
+@jd:body
+
+
+
+
+
+
+
+
+
+
+  <div style="padding:0px 0px 0px 20px;float:right;margin:0 -10px 0 0">
+    <img src="{@docRoot}images/home/l-hero_2x.png" srcset="{@docRoot}images/home/l-hero.png 1x, {@docRoot}images/home/l-hero_2x.png 2x" width="460" height="300" >
+  </div>
+
+  <div class="landing-docs" style="float:right;clear:both;margin:68px 0 2em 3em;">
+  <div class="col-4 normal-links highlights" style="font-size:12px;">
+    <h3 id="thisd" >Key Developer Features</h3>
+    <ul style="list-style-type:none;">
+  <li><a href="#Material">Material design</a></li>
+  <li><a href="#Perf">Performance focus</a></li>
+  <li><a href="#Notifications">Notifications</a></li>
+  <li><a href="#TV">Your apps on the big screen</a></li>
+  <li><a href="#Documents">Document-centric apps</a></li>
+  <li><a href="#Connectivity">Advanced connectivity</a></li>
+  <li><a href="#Graphics">High-performance graphics</a></li>
+  <li><a href="#Audio">More Powerful Audio</a></li>
+  <li><a href="#Camera">Enhanced Camera & Video</a></li>
+  <li><a href="#ScreenCapture">Screen capturing and sharing</a></li>
+  <li><a href="#Sensors">New types of sensors</a></li>
+  <li><a href="#WebView">Chromium WebView</a></li>
+  <li><a href="#Accessibility">Accessibility & Input</a></li>
+  <li><a href="#Battery">Tools for building battery-efficient apps</a></li>
+    </ul>
+  </div>
+</div>
+
+
+
+
+
+
+
+<p>Welcome to Android 5.0 Lollipop&mdash;the largest and most ambitious release for Android yet!</p>
+
+<p>This release is packed with new features for users and thousands of new APIs for developers. It extends Android even further, from phones, tablets, and wearables, to TVs and cars.</p>
+
+<p>For a closer look at the new developer APIs, see the
+<a href="{@docRoot}about/versions/android-5.0.html">Android
+5.0 API Overview</a>. Or, read more
+about Android 5.0 for consumers at
+<a href="http://www.android.com/versions/lollipop-5-0/"
+>www.android.com</a>.</p>
+
+
+
+<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>
+
+
+
+<p>New <strong>3D views</strong> let you set a z-level to raise elements off of the view hierarchy and cast <strong>realtime shadows</strong>, even as they move.</p>
+
+
+<p>Built-in <strong>activity transitions</strong> take the user seamlessly from one state to another with beautiful, animated motion. The material theme adds transitions for your activities, including the ability to use <strong>shared visual elements</strong> across activities.</p>
+
+
+
+<div style="width:290px;margin-right:35px;float:left">
+  <div class="framed-nexus5-port-span-5">
+  <video class="play-on-hover" autoplay="">
+    <source src="/design/material/videos/ContactsAnim.mp4">
+    <source src="/design/videos/ContactsAnim.webm">
+    <source src="/design/videos/ContactsAnim.ogv">
+  </video>
+  </div>
+  <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
+    <em>To replay the movie, click on the device screen</em>
+  </div>
+</div>
+
+
+<p>Ripple animations are available for buttons, checkboxes, and other touch controls in your app.</p>
+
+<p>A new system-managed processing thread called <strong>RenderThread</strong> keeps animations smooth even when there are delays in the main UI thread. </p>
+
+
+
+<h2 id="Perf">Performance focus</h2>
+
+<p>Android 5.0 provides a faster, smoother and more powerful computing experience.</p>
+
+<p>Android now runs exclusively on the new <strong>ART runtime</strong>, built from the ground up to support a mix of ahead-of-time (AOT), just-in-time (JIT), and interpreted code. It’s supported on ARM, x86, and MIPS architectures and is fully 64-bit compatible.</p>
+
+<p>ART improves app performance and responsiveness. Efficient garbage collection reduces the number and duration of pauses for GC events, which fit comfortably within the v-sync window so your app doesn’t skip frames. ART also dynamically moves memory to optimize performance for foreground uses. </p>
+
+<p>Android 5.0 introduces platform support for <strong>64-bit architectures</strong>&mdash;used by the Nexus 9's NVIDIA Tegra K1. Optimizations provide larger address space and improved performance for certain compute workloads. Apps written in the Java language run as 64-bit apps automatically&mdash;no modifications are needed. If your app uses native code, we’ve extended the NDK to support new ABIs for ARM v8, and x86-64, and MIPS-64.</p>
+
+<p>Continuing the focus on smoother performance, Android 5.0 offers improved A/V sync. The audio and graphics pipelines have been instrumented for more accurate timestamps, enabling
+video apps and games to display smooth synchronized content.</p>
+
+
+<h2 id="Notifications">Notifications</h2>
+
+<p>Notifications in Android 5.0 are more visible, accessible, and configurable. </p>
+
+<img src="{@docRoot}images/versions/notification-headsup.png" style="float:right; margin:0 0 40px 60px" width="300" height="224" />
+
+<p>Varying notification details may appear <strong>on the lock screen</strong> if desired by the user. Users may elect to allow none, some, or all notification content to be shown on a secure lock screen. </p>
+
+<p>Key notification alerts such as incoming calls appear in a <strong>heads-up notification</strong>&mdash;a small floating window that allows the user to respond or dismiss without leaving the current app.</p>
+
+<p>You can now add <strong>new metadata</strong> to notifications to collect associated contacts (for ranking), category, and priority.</p>
+
+<p>A new media notification template provides consistent media controls for notifications with up to 6 action buttons, including custom controls such as "thumbs up"&mdash;no more need for RemoteViews!</p>
+
+
+
+<h2 id="TV">Your apps on the big screen</h2>
+
+<p><a href="http://developer.android.com/tv/index.html">Android TV</a> provides a complete TV platform for your app's big screen experience. Android TV is centered around a simplified home screen experience that allows users to discover content easily, with personalized recommendations and voice search.</p>
+
+<p>With Android TV you can now <strong>create big, bold experiences</strong> for your app or game content and support interactions with game controllers and other input devices. To help you build cinematic, 10-foot UIs for television, Android provides a <strong>leanback UI framework</strong> in the <a href="{@docRoot}tools/support-library/features.html#v17-leanback">v17 support library</a>.</p>
+
+<p>The <strong>Android TV Input Framework</strong> (TIF) allows TV apps to handle video streams from sources such as HDMI inputs, TV tuners, and IPTV receivers. It also enables live TV search and recommendations via metadata published by the TV Input and includes an HDMI-CEC Control Service to handle multiple devices with a single remote. </p>
+
+<p>The TV Input Framework provides access to a wide variety of live TV input sources and brings them together in a single user interface for users to browse, view, and enjoy content. Building a TV input service for your content can help make your content more accessible on TV devices.</p>
+
+
+
+<img src="{@docRoot}images/versions/recents_screen.png" style="float:right; margin:0 0 40px 60px" width="300" height="521" />
+
+<h2 id="Documents">Document-centric apps</h2>
+
+<p>Android 5.0 introduces a redesigned Overview space (formerly called Recents) that’s more versatile and useful for multitasking.</p>
+
+<p>New APIs allow you to show separate activities in your app as individual documents alongside other recent screens.</p>
+
+<p>You can take advantage of concurrent documents to provide users instant access to more of your content or services. For example, you might use concurrent documents to represent files in a productivity app, player matches in a game, or chats in a messaging app. </p>
+
+
+
+<h2 id="Connectivity">Advanced connectivity</h2>
+
+<p>Android 5.0 adds new APIs that allow apps to perform concurrent operations with <strong>Bluetooth Low Energy</strong> (BLE), allowing both scanning (central mode) and advertising (peripheral mode).</p>
+
+<p>New <strong>multi-networking</strong> features allow apps to query available networks for available features such as whether they are Wi-Fi, cellular, metered, or provide certain network features. Then the app can request a connection and respond to connectivity loss or other network changes.</p>
+
+<p><strong>NFC</strong> APIs now allow apps to register an NFC application ID (AID) dynamically. They can also set the preferred card emulation service per active service and create an NDEF record containing UTF-8 text data.</p>
+
+
+
+<h2 id="Graphics">High-performance graphics</h2>
+
+<p>Support for <strong><a href="http://www.khronos.org/opengles/3_X/">Khronos OpenGL ES 3.1</a></strong> now provides games and other apps the highest-performance 2D and 3D graphics capabilities on supported devices. </p>
+
+<p>OpenGL ES 3.1 adds compute shaders, stencil textures, accelerated visual effects, high quality ETC2/EAC texture compression, advanced texture rendering, standardized texture size and render-buffer formats, and more.</p>
+
+
+<div class="figure" style="width:350px; margin:0 0 0 60px">
+<img src="{@docRoot}images/versions/rivalknights.png" style="float:right;" width="350" height="525" />
+<p class="img-caption">Gameloft's Rival Knights uses ASTC from AEP and Compute Shaders from ES 3.1 to deliver HDR Bloom effects and provide more graphical detail.</p>
+</div>
+
+<p>Android 5.0 also introduces the <strong>Android Extension Pack</strong> (AEP), a set of OpenGL ES extensions that give you access to features like tessellation shaders, geometry shaders, ASTC texture compression, per-sample interpolation and shading, and other advanced rendering capabilities. With AEP you can deliver high-performance graphics across a range of GPUs.</p>
+
+
+<h2 id="Audio">More Powerful Audio</h2>
+
+<p>A new audio-capture design offers <strong>low-latency audio input</strong>. The new design includes: a fast capture thread that never blocks except during a read; fast track capture clients at native sample rate, channel count, and bit depth; and normal capture clients offer resampling, up/down channel mix, and up/down bit depth.</p>
+
+<p>Multi-channel <strong>audio stream mixing</strong> allows professional audio apps to mix up to eight channels including 5.1 and 7.1 channels.</p>
+
+<p>Apps can expose their media content and <strong>browse media</strong> from other apps, then request playback. Content is exposed through a queryable interface and does not need to reside on the device.</p>
+
+<p>Apps have finer-grain control over <strong>text-to-speech synthesis</strong> through voice profiles that are associated with specific locales, quality and latency rating. New APIs also improve support for synthesis error checking, network synthesis, language discovery, and network fallback.</p>
+
+<p>Android now includes support for standard <strong>USB audio</strong> peripherals, allowing users to connect USB headsets, speakers, microphones, or other high performance digital peripherals. Android 5.0 also adds support for <strong>Opus</strong> audio codecs.</p>
+
+<p>New <strong>{@link android.media.session.MediaSession}</strong> APIs for controlling media playback now make it easier to provide consistent media controls across screens and other controllers.</p>
+
+
+<h2 id="Camera">Enhanced Camera &amp; Video</h2>
+
+<p>Android 5.0 introduces <strong>all new camera APIs</strong> that let you capture raw formats such as YUV and Bayer RAW, and control parameters such as exposure time, ISO sensitivity, and frame duration on a per-frame basis. The new fully-synchronized camera pipeline allows you to capture uncompressed full-resolution YUV images at 30 FPS on supported devices.</p>
+
+<p>Along with images, you can also capture metadata like noise models and optical information from the camera.</p>
+
+<p>Apps sending video streams over the network can now take advantage of H.265 <strong>High Efficiency Video Coding (HEVC)</strong> for optimized encoding and decoding of video data. </p>
+
+<p>Android 5.0 also adds support for <strong>multimedia tunneling</strong> to provide the best experience for ultra-high definition (4K) content and the ability to play compressed audio and video data together. </p>
+
+
+<h2 id="ScreenCapture">Screen capturing and sharing</h2>
+
+<p>Android 5.0 lets you add screen capturing and screen sharing capabilities to your app. </p>
+
+<p>With user permission, you can capture non-secure video from the display and deliver it over the network if you choose.</p>
+
+
+<h2 id="Sensors">New types of sensors</h2>
+
+<p>In Android 5.0, a new <strong>tilt detector</strong> sensor helps improve activity recognition on supported devices, and a <strong>heart rate sensor</strong> reports the heart rate of the person touching the device. </p>
+
+<p>New <strong>interaction composite sensors</strong> are now available to detect special interactions such as a <em>wake up</em> gesture, a <em>pick up</em> gesture, and a <em>glance</em> gesture.</p>
+
+
+
+<h2 id="WebView">Chromium WebView</h2>
+
+<div style="float:right;margin:1em 2em 1em 2em;">
+  <img src="/images/kk-chromium-icon.png" alt="" height="160" style="margin-bottom:0em;">
+</div>
+
+<p>The initial release for Android 5.0 includes a version of Chromium for {@link android.webkit.WebView} based on the Chromium M37 release, adding support for <strong>WebRTC</strong>, <strong>WebAudio</strong>, and <strong>WebGL</strong>. </p>
+
+<p>Although WebView has been based on Chromium since Android 4.4, the Chromium layer is now updatable from Google Play.</p>
+
+<p>As new versions of Chromium become available, users can update from Google Play to ensure they get the latest enhancements and bug fixes for WebView, providing the latest web APIs and bug fixes for apps using WebView on Android 5.0 and higher.</p>
+
+
+
+<h2 id="Accessibility">Accessibility &amp; Input</h2>
+
+<p>New accessibility APIs can retrieve detailed information about the properties of windows on the screen that sighted users can interact with and define standard or customized input actions for UI elements.</p>
+
+<p>New Input method editor (IME) APIs enable faster switching to other IMEs directly from the input method.</p>
+
+
+
+<h2 id="Battery">Tools for building battery-efficient apps</h2>
+
+<p>New <strong>job scheduling</strong> APIs allow you optimize battery life by deferring jobs for the system to run at a later time or under specified conditions, such as when the device is charging or connected to Wi-Fi.</p>
+
+<p>A new <code>dumpsys batterystats</code> command generates <strong>battery usage statistics</strong> that you can use to understand system-wide power use and understand the impact of your app on the device battery. You can look at a history of power events, approximate power use per UID and system component, and more.</p>
+
+<img src="{@docRoot}images/versions/battery_historian.png" srcset="{@docRoot}images/versions/battery_historian@2x.png 2x" alt="" width="760" height="462" />
+<p class="img-caption">Battery Historian is a new tool to convert the statistics from <code>dumpsys batterystats</code> into a visualization for battery-related debugging. You can find it at <a href="https://github.com/google/battery-historian"
+>https://github.com/google/battery-historian</a>.</p>
\ No newline at end of file
diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs
index 1a6ee7a..52c7c52 100644
--- a/docs/html/design/design_toc.cs
+++ b/docs/html/design/design_toc.cs
@@ -9,6 +9,10 @@
   </li>
 
   <li class="nav-section">
+    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>design/material/index.html">Material Design</a></div>
+  </li>
+
+  <li class="nav-section">
     <div class="nav-section-header"><a href="<?cs var:toroot ?>design/devices.html">Devices</a></div>
     <ul>
       <li><a href="<?cs var:toroot ?>design/handhelds/index.html">Phones &amp; Tablets</a></li>
diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd
index 27e3169..47e8d26 100644
--- a/docs/html/design/index.jd
+++ b/docs/html/design/index.jd
@@ -28,20 +28,20 @@
     <span itemprop="description">Welcome to <strong>Android Design</strong>, your place for
     learning how to design exceptional Android apps.</span>
     <br><br>
-    Want to know what <strong>Android 4.4 KitKat</strong> has for designers? See <a href="{@docRoot}design/patterns/new.html">New in Android</a>.<br><br>
+    Want to know what <strong>Android 5.0</strong> has for designers? See <a href="{@docRoot}design/patterns/new.html">New in Android</a>.<br><br>
     <a href="/design/get-started/creative-vision.html" class="landing-page-link">Creative Vision</a>
   </div>
   <a id="hero-image" href="/design/get-started/creative-vision.html">
-    <img src="/design/media/index_landing_page.png">
+    <img src="{@docRoot}design/media/index_landing_page.png" width="760" height="600" alt=""
+         srcset="{@docRoot}design/media/index_landing_page_2x.png 2x"/>
   </a>
 
 <div style="background: hsl(8, 70%, 54%); margin: 0; padding: 20px 20px 10px 20px;color: #fff; position: absolute;top: 255px;width: 179px;">
-<h2 style="color: #fff;margin:0 0 10px; font-size:18px" class="norule">L Developer Preview</h2>
-<p> The next version of Android uses a design
-metaphor inspired by paper and ink that provides a reassuring sense of tactility. Before it arrives for users, you can get an early
-look at the new Material design.
+<h2 style="color: #fff;margin:0 0 10px; font-size:18px" class="norule">Material Design</h2>
+<p>Android 5.0 introduces a design
+metaphor inspired by paper and ink that provides a reassuring sense of tactility.
 </p>
-<p><a class="white" href="{@docRoot}preview/material/index.html">Learn more about Material</a></p>
+<p><a class="white" href="{@docRoot}design/material/index.html">Learn more</a></p>
 </div>
 
 </div>
diff --git a/docs/html/preview/material/images/MaterialDark.png b/docs/html/design/material/images/MaterialDark.png
similarity index 100%
rename from docs/html/preview/material/images/MaterialDark.png
rename to docs/html/design/material/images/MaterialDark.png
Binary files differ
diff --git a/docs/html/preview/material/images/MaterialLight.png b/docs/html/design/material/images/MaterialLight.png
similarity index 100%
rename from docs/html/preview/material/images/MaterialLight.png
rename to docs/html/design/material/images/MaterialLight.png
Binary files differ
diff --git a/docs/html/preview/material/images/card_travel.png b/docs/html/design/material/images/card_travel.png
similarity index 100%
rename from docs/html/preview/material/images/card_travel.png
rename to docs/html/design/material/images/card_travel.png
Binary files differ
diff --git a/docs/html/preview/material/images/list_mail.png b/docs/html/design/material/images/list_mail.png
similarity index 100%
rename from docs/html/preview/material/images/list_mail.png
rename to docs/html/design/material/images/list_mail.png
Binary files differ
diff --git a/docs/html/design/material/index.jd b/docs/html/design/material/index.jd
new file mode 100644
index 0000000..db18a83
--- /dev/null
+++ b/docs/html/design/material/index.jd
@@ -0,0 +1,152 @@
+page.title=Material Design
+page.tags=Material,design
+page.type=design
+page.image=design/material/images/MaterialLight.png
+
+@jd:body
+
+<p itemprop="description">Material design is a comprehensive guide for visual, motion, and
+interaction design across platforms and devices. Android now includes support for
+material design apps. To use material design in your Android apps, follow the guidelines defined
+in the <a href="http://www.google.com/design/spec">material design specification</a> and use the
+new components and functionality available in Android 5.0 (API level 21) and above.</p>
+
+<p>Android provides the following elements for you to build material design apps:</p>
+
+<ul>
+  <li>A new theme</li>
+  <li>New widgets for complex views</li>
+  <li>New APIs for custom shadows and animations</li>
+</ul>
+
+<p>For more information about implementing material design on Android, see
+<a href="{@docRoot}training/material/index.html">Creating Apps with Material Design</a>.</p>
+
+
+<h3>Material Theme</h3>
+
+<p>The material theme provides a new style for your app, system widgets that let you set
+their color palette, and default animations for touch feedback and activity transitions.</p>
+
+<!-- two columns -->
+<div style="width:700px;margin-top:25px;margin-bottom:20px">
+<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
+  <img src="{@docRoot}design/material/images/MaterialDark.png" width="500" height="238"/>
+  <div style="width:140px;margin:0 auto">
+  <p style="margin-top:8px">Dark material theme</p>
+  </div>
+</div>
+<div style="float:left;width:250px;margin-right:0px;">
+  <img src="{@docRoot}design/material/images/MaterialLight.png" width="500" height="238"/>
+  <div style="width:140px;margin:0 auto">
+  <p style="margin-top:8px">Light material theme</p>
+  </div>
+</div>
+<br style="clear:left"/>
+</div>
+
+<p>For more information, see <a href="{@docRoot}training/material/theme.html">Using the Material
+Theme</a>.</p>
+
+
+<h3>Lists and Cards</h3>
+
+<p>Android provides two new widgets for displaying cards and lists with material design styles
+and animations:</p>
+
+<!-- two columns -->
+<div style="width:700px;margin-top:25px;margin-bottom:20px">
+<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
+  <img src="{@docRoot}design/material/images/list_mail.png" width="500" height="426"/>
+  <p>The new <code>RecyclerView</code> widget is a more pluggable version of <code>ListView</code>
+  that supports different layout types and provides performance improvements.</p>
+</div>
+<div style="float:left;width:250px;margin-right:0px;">
+  <img src="{@docRoot}design/material/images/card_travel.png" width="500" height="426"/>
+  <p>The new <code>CardView</code> widget lets you display important pieces of information inside
+  cards that have a consistent look and feel.</p>
+</div>
+<br style="clear:left"/>
+</div>
+
+<p>For more information, see <a href="{@docRoot}training/material/lists-cards.html">Creating Lists
+and Cards</a>.</p>
+
+
+<h3>View Shadows</h3>
+
+<p>In addition to the X and Y properties, views in Android now have a Z
+property. This new property represents the elevation of a view, which determines:</p>
+
+<ul>
+<li>The size of the shadow: views with higher Z values cast bigger shadows.</li>
+<li>The drawing order: views with higher Z values appear on top of other views.</li>
+</ul>
+
+<div style="width:290px;margin-left:35px;float:right">
+  <div class="framed-nexus5-port-span-5">
+  <video class="play-on-hover" autoplay>
+    <source src="{@docRoot}design/material/videos/ContactsAnim.mp4"/>
+    <source src="{@docRoot}design/videos/ContactsAnim.webm"/>
+    <source src="{@docRoot}design/videos/ContactsAnim.ogv"/>
+  </video>
+  </div>
+  <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
+    <em>To replay the movie, click on the device screen</em>
+  </div>
+</div>
+
+<p>For more information, see <a href="{@docRoot}training/material/shadows-clipping.html">Defining
+Shadows and Clipping Views</a>.</p>
+
+
+<h3>Animations</h3>
+
+<p>The new animation APIs let you create custom animations for touch feedback in UI controls,
+changes in view state, and activity transitions.</p>
+
+<p>These APIs let you:</p>
+
+<ul>
+<li style="margin-bottom:15px">
+Respond to touch events in your views with <strong>touch feedback</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Hide and show views with <strong>circular reveal</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Switch between activities with custom <strong>activity transition</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Create more natural animations with <strong>curved motion</strong>.
+</li>
+<li style="margin-bottom:15px">
+Animate changes in one or more view properties with <strong>view state change</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Show animations in <strong>state list drawables</strong> between view state changes.
+</li>
+</ul>
+
+<p>Touch feedback animations are built into several standard views, such as buttons. The new APIs
+let you customize these animations and add them to your custom views.</p>
+
+<p>For more information, see <a href="{@docRoot}training/material/animations.html">Defining Custom
+Animations</a>.</p>
+
+
+<h3>Drawables</h3>
+
+<p>These new capabilities for drawables help you implement material design apps:</p>
+
+<ul>
+<li><strong>Vector drawables</strong> are scalable without losing definition and are perfect
+for single-color in-app icons.</li>
+<li><strong>Drawable tinting</strong> lets you define bitmaps as an alpha mask and tint them with
+a color at runtime.</li>
+<li><strong>Color extraction</strong> lets you automatically extract prominent colors from a
+bitmap image.</li>
+</ul>
+
+<p>For more information, see <a href="{@docRoot}training/material/drawables.html">Working with
+Drawables</a>.</p>
diff --git a/docs/html/preview/material/videos/ContactsAnim.mp4 b/docs/html/design/material/videos/ContactsAnim.mp4
similarity index 100%
rename from docs/html/preview/material/videos/ContactsAnim.mp4
rename to docs/html/design/material/videos/ContactsAnim.mp4
Binary files differ
diff --git a/docs/html/preview/material/videos/ContactsAnim.ogv b/docs/html/design/material/videos/ContactsAnim.ogv
similarity index 100%
rename from docs/html/preview/material/videos/ContactsAnim.ogv
rename to docs/html/design/material/videos/ContactsAnim.ogv
Binary files differ
diff --git a/docs/html/preview/material/videos/ContactsAnim.webm b/docs/html/design/material/videos/ContactsAnim.webm
similarity index 100%
rename from docs/html/preview/material/videos/ContactsAnim.webm
rename to docs/html/design/material/videos/ContactsAnim.webm
Binary files differ
diff --git a/docs/html/design/media/index_landing_page.png b/docs/html/design/media/index_landing_page.png
index 078eb4d..36d3828f 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/index_landing_page_2x.png b/docs/html/design/media/index_landing_page_2x.png
new file mode 100644
index 0000000..1cd97ab
--- /dev/null
+++ b/docs/html/design/media/index_landing_page_2x.png
Binary files differ
diff --git a/docs/html/design/patterns/new.jd b/docs/html/design/patterns/new.jd
index d672e46..1523cea 100644
--- a/docs/html/design/patterns/new.jd
+++ b/docs/html/design/patterns/new.jd
@@ -3,7 +3,24 @@
 @jd:body
 
 
-<p>A quick look at the new patterns and styles you can use to build beautiful Android apps&hellip; 
+<p>A quick look at the new patterns and styles you can use to build beautiful Android apps&hellip;
+
+
+<h2 id="Android5">Android 5.0 Lollipop</h2>
+
+<h3>Material design</h3>
+
+<p><a href="{@docRoot}design/material/index.html">Material design</a> is a comprehensive guide for
+visual, motion, and interaction design across platforms and devices. Android 5.0 provides a new
+theme, new widgets for complex views, and new APIs for shadows and animations that help you
+implement material design patterns in your apps.</p>
+
+<h3>Notifications</h3>
+
+<p><a href="{@docRoot}design/patterns/notifications.html">Notifications</a> receive important
+updates in Android 5.0, with material design visual changes, notification availability in the
+lockscreen, priority notifications, and cloud-synced notifications.</p>
+
 
 <h2 id="kitkat">Android 4.4 KitKat</h2>
 
@@ -30,7 +47,7 @@
   see it in every screen of your app.
 </p>
 <p>
-  <a href="{@docRoot}design/style/branding.html">Your Branding</a> highlights 
+  <a href="{@docRoot}design/style/branding.html">Your Branding</a> highlights
   these and other pointers on how to incorporate elements of your brand into your
   app's visual language &mdash; highly encouraged!
 </p>
@@ -60,7 +77,7 @@
 <img src="{@docRoot}design/media/touch_feedback_reaction_response.png" style="padding-top:1em;">
 
 <h3>
-  Full screen 
+  Full screen
 </h3>
 
 <p>
@@ -73,7 +90,7 @@
 <img src="{@docRoot}design/media/fullscreen_landing.png" style="margin:1em auto 2em auto;">
 
 <h3>
-  Gestures 
+  Gestures
 </h3>
 <div class="layout-content-row">
   <div class="layout-content-col span-6">
diff --git a/docs/html/design/patterns/notifications.jd b/docs/html/design/patterns/notifications.jd
index 41f9190..467dbb2 100644
--- a/docs/html/design/patterns/notifications.jd
+++ b/docs/html/design/patterns/notifications.jd
@@ -1,253 +1,887 @@
 page.title=Notifications
+page.tags="notifications","design","L"
 @jd:body
 
-<a class="notice-developers" href="{@docRoot}training/notify-user/index.html">
+  <a class="notice-developers" href="{@docRoot}training/notify-user/index.html">
   <div>
     <h3>Developer Docs</h3>
     <p>Notifying the User</p>
   </div>
 </a>
 
-<p itemprop="description">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>
+<a class="notice-designers" href="notifications_k.html">
+  <div>
+    <h3>Notifications in Android 4.4 and Lower</h3>
+  </div>
+</a>
 
-<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>
+<style>
+  .col-5, .col-6, .col-7 {
+    margin-left:0px;
+  }
+</style>
+
+<p>The notification system allows users to keep informed about relevant and
+timely
+events in your app, such as new chat messages from a friend 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&mdash;and one that is synced as appropriate across all their Android devices.</p>
+
+<h4 id="New"><strong>New in Android 5.0</strong></h4>
+
+<p>In Android 5.0, notifications receive important updates: structurally,
+visually, and functionally:</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. They can be expanded to show additional information details.</li>
-  <li>A priority flag was introduced that helps to sort notifications by importance rather than time only.</li>
+  <li>Notifications have undergone visual changes consistent with the new
+material design theme.</li>
+  <li> Notifications are now available on the device lock screen, while
+sensitive content can still
+  be hidden behind it.</li>
+  <li>High-priority notifications received while the device is in use now use a new format called
+  heads-up notifications.</li>
+  <li>Cloud-synced notifications: Dismissing a notification on one of your
+Android devices dismisses it
+  on the others, as well.</li>
 </ul>
 
-<h2>Anatomy of a notification</h2>
+<p class="note"><strong>Note:</strong> Notification design in this version of
+Android is a significant
+departure from that of previous versions. For information about notification design in previous
+versions, see <a href="./notifications_k.html">Notifications in Android 4.4 and lower</a>.</p>
 
-<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>a timestamp</li>
-      <li>a secondary icon to identify the sending application when the senders image is shown for the main icon</li>
-    </ul>
-    <p>The information arrangement of the base layout has not changed in Jelly Bean, so app notifications designed for versions earlier than Jelly Bean still look and work the same.</p>
+<h2 id="Anatomy">Anatomy of a Notification</h2>
+
+<p>This section goes over basic parts of a notification and how they can
+appear on different types of devices.</p>
+
+<h3 id="BaseLayout">Base layout</h3>
+
+<p>At a minimum, all notifications consist of a base layout, including:</p>
+
+<ul>
+  <li> The notification's <strong>icon</strong>. The icon symbolizes the
+originating app. It may also
+  potentially indicate notification type if the app generates more than one
+type.</li>
+  <li> A notification <strong>title</strong> and additional
+<strong>text</strong>.</li>
+  <li> A <strong>timestamp</strong>.</li>
+</ul>
+
+<p>Notifications created with {@link android.app.Notification.Builder Notification.Builder}
+for previous platform versions look and work the same in Android
+5.0, with only minor stylistic changes that the system handles
+for you. For more information about notifications on previous versions of
+Android, see
+<a href="./notifications_k.html">Notifications in Android 4.4 and lower</a>.</p></p>
+
+
+    <img style="margin:20px 0 0 0"
+src="{@docRoot}images/android-5.0/notifications/basic_combo.png"
+      alt="" width="700px" />
+
+
+<div style="clear:both;margin-top:20px">
+      <p class="img-caption">
+      Base layout of a handheld notification (left) and the same notification on Wear (right),
+      with a user photo and a notification icon
+    </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>
+
+<h3 id="ExpandedLayouts">Expanded layouts</h3>
+
+
+<p>You can choose how much detail your app's notifications should
+provide. They can show the first
+few lines of a message or show a larger image preview. The additional
+information provides the user with more
+context, and&mdash;in some cases&mdash;may allow the user to read a message in its
+entirety. The user can
+pinch-zoom or perform a single-finger glide to toggle between compact
+and expanded layouts.
+ For single-event notifications, Android provides three expanded layout
+templates (text, inbox, and
+ image) for you to use in your application. The following images show you how
+single-event notifications look on
+ handhelds (left) and wearables (right).</p>
+
+<img style="margin-top:30px"
+src="{@docRoot}images/android-5.0/notifications/expandedtext_combo.png"
+  alt="" width="700px" height;="284px" />
+<img style="margin-top:30px"
+src="{@docRoot}images/android-5.0/notifications/stack_combo.png"
+  alt="" width="700px" height;="284px" />
+<img style="margin-top:30px"
+src="{@docRoot}images/android-5.0/notifications/ExpandedImage.png"
+    alt="" width="311px" height;="450px" />
+
+<h3 id="actions" style="clear:both; margin-top:40px">Actions</h3>
+
+<p>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 focus on
+notifications that matter to them.</p>
+
+
+  <img src="{@docRoot}images/android-5.0/notifications/action_combo.png"
+    alt="" width="700px" />
+
+
+
+<p style="clear:both">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 smallest number
+of actions possible by only including the most imminently important and
+meaningful actions.</p>
+
+<p>Good candidates for actions on notifications are actions that:</p>
+
+<ul>
+  <li> Are essential, frequent, and typical for the content type you're
+displaying
+  <li> Allow the user to accomplish tasks quickly
+</ul>
+
+<p>Avoid actions that are:</p>
+
+<ul>
+  <li> Ambiguous
+  <li> The same as the default action of the notification (such as "Read" or
+"Open")
+</ul>
+
+
+
+<p>You can specify a maximum of three actions, each consisting of an action
+icon and name.
+ Adding actions to a simple base layout makes 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,  make sure that any action a
+user can invoke from
+ a notification is available from within the associated application, as
+well.</p>
+
+<h2 style="clear:left">Heads-up Notification</h2>
+<div class="figure" style="width:311px">
+  <img src="{@docRoot}images/android-5.0/notifications/hun-example.png"
+    alt="" width="311px" />
+  <p class="img-caption">
+    Example of a heads-up notification (incoming phone call, high priority)
+appearing on top of an
+    immersive app
+  </p>
 </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>
+<p>When a high-priority notification arrives (see right), it is presented
+to users for a
+short period of time with an expanded layout exposing possible actions.</p>
+<p> After this period of time, the notification retreats to the notification
+shade. If a notification's <a href="#correctly_set_and_manage_notification_priority">priority</a> is
+flagged as High, Max, or full-screen, it gets a heads-up notification.</p>
 
-<img src="{@docRoot}design/media/notifications_pattern_expandable.png">
+<p><b>Good examples of heads-up notifications</b></p>
 
-<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>duplicative of 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>
+<ul>
+  <li> Incoming phone call when using a device</li>
+  <li> Alarm when using a device</li>
+  <li> New SMS message</li>
+  <li> Low battery</li>
+</ul>
 
-<p>You can specify a maximum of three actions, each consisting of an action icon and an action name. Adding actions to a simple 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 style="clear:both" id="guidelines">Guidelines</h2>
 
-<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 the body of a notification (outside of the action buttons), 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>
+<h3 id="MakeItPersonal">Make it personal</h3>
 
-<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>
+<p>For notifications of items sent by another person (such as a message or
+status update), include that person's image using
+{@link android.app.Notification.Builder#setLargeIcon setLargeIcon()}. Also attach information about
+the person to the notification's metadata (see {@link android.app.Notification#EXTRA_PEOPLE}).</p>
 
+<p>Your notification's main icon is still shown, so the user can associate
+it with the icon
+visible in the status bar.</p>
+
+
+<img src="{@docRoot}images/android-5.0/notifications/Triggered.png"
+  alt="" width="311px"/>
+<p style="margin-top:10px" class="img-caption">
+  Notification that shows the person who triggered it and the content they sent.
+</p>
+
+
+<h3 id="navigate_to_the_right_place">Navigate to the right place</h3>
+
+<p>When the user touches the body of a notification (outside of the action
+buttons), open your app
+to the place where the user can view and act upon the data referenced in the
+notification. In most cases, this will be the detailed view of a single data item such as a message,
+but it might also be a
+summary view if the notification is stacked. If your app takes the
+user anywhere below your app's top level, insert navigation into your app's back stack so that the
+user can press the system back button to return to the top level. For more information, see
+<em>Navigation into Your App via Home Screen Widgets and Notifications</em> in the <a
+href="{@docRoot}design/patterns/navigation.html#into-your-app">Navigation</a>
+design pattern.</p>
+
+<h3 id="correctly_set_and_manage_notification_priority">Correctly set and
+manage notification
+priority</h3>
+
+<p>Android supports a priority flag for notifications. This flag allows you to
+influence where your notification appears, relative to other notifications, and
+helps ensure
+that users always see their most important notifications first. You can choose
+from the
+following priority levels when posting a notification:</p>
 <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>
+ <tr>
+    <td class="tab0">
+<p><strong>Priority</strong></p>
+</td>
+    <td class="tab0">
+<p><strong>Use</strong></p>
+</td>
+ </tr>
+ <tr>
+    <td class="tab1">
+<p><code>MAX</code></p>
+</td>
+    <td class="tab1">
+<p>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.</p>
+</td>
+ </tr>
+ <tr>
+    <td class="tab1">
+<p><code>HIGH</code></p>
+</td>
+    <td class="tab1">
+<p>Use primarily for important communication, such as message or chat
+events with content that is particularly interesting for the user.
+High-priority notifications trigger the heads-up notification display.</p>
+</td>
+ </tr>
+ <tr>
+    <td class="tab1">
+<p><code>DEFAULT</code></p>
+</td>
+    <td class="tab1">
+<p>Use for all notifications that don't fall into any of the other priorities described here.</p>
+</td>
+ </tr>
+ <tr>
+    <td class="tab1">
+<p><code>LOW</code></p>
+</td>
+    <td class="tab1">
+<p>Use for notifications that you want the user to be informed about, but
+that are less urgent. Low-priority notifications tend to show up at the bottom of the list,
+which makes them a good
+choice for things like public or undirected social updates: The user has asked to
+be notified about
+them, but these notifications should never take precedence over urgent or direct
+communication.</p>
+</td>
+ </tr>
+ <tr>
+    <td class="tab1">
+<p><code>MIN</code></p>
+</td>
+    <td class="tab1">
+<p>Use for contextual or background information such as weather information or contextual
+location information.
+Minimum-priority notifications do not appear in the status bar. The user
+discovers them on expanding the notification shade.</p>
+</td>
+ </tr>
 </table>
-<img src="{@docRoot}design/media/notifications_pattern_priority.png">
 
-<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">
+<h4 id="how_to_choose_an_appropriate_priority"><strong>How to choose an
+appropriate
+priority</strong></h4>
 
-<p><strong>Do</strong>:</p>
+<p><code>DEFAULT</code>, <code>HIGH</code>, and <code>MAX</code> are interruptive priority levels, and risk
+interrupting the user
+in mid-activity. To avoid annoying your app's users, reserve interruptive priority levels for
+notifications that:</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 disable your apps notifications or change their alert properties, such as alert sound and whether to use vibration, 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 kinds of notifications are currently pending.</p>
-
-<div class="do-dont-label good"><strong>Do</strong></div>
-<p style="margin-top:0;">Look at the notification icons the Android apps already provide and create notification icons for your app that are sufficiently distinct in appearance.</p>
-<div class="do-dont-label good"><strong>Do</strong></div>
-<p style="margin-top:0;">Use the proper <a href="{@docRoot}design/style/iconography.html#notification">notification icon style</a> for small icons, and the Holo Dark <a href="{@docRoot}design/style/iconography.html#action-bar">action bar icon style</a> for your action icons.</p>
-<div class="do-dont-label good"><strong>Do</strong></div>
-<p style="margin-top:0;">Keep your icons visually simple and avoid excessive detail that is hard to discern.</p>
-<div class="do-dont-label bad"><strong>Don't</strong></div>
-<p style="margin-top:0;">Use color to distinguish your app from others.</p>
-
-<h4>Pulse the notification LED appropriately</h4>
-<p>Many Android devices contain a tiny lamp, called the notification <acronym title="Light-Emitting Diode">LED</acronym>, which is used to keep the user informed about events while the screen is off. Notifications with a priority level of MAX, HIGH, or DEFAULT should cause the LED to glow, while those with lower priority (LOW and MIN) should not.</p>
-
-<p>The user's control over notifications should extend to the LED. By default, the LED will glow with a white color. Your notifications shouldn't use a different color unless the user has explicitly customized it.</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>
-
-<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. While Android's notification system has been designed
-to minimize the impact of notifications on the users attention, it is nonetheless still important
-to be aware of the fact that notifications are potentially interrupting the users task flow. As you
-plan your notifications, ask yourself if they are important enough to warrant an interruption. If
-you are unsure, allow the user to opt into a notification using your apps notification settings or
-adjust the notifications priority flag.</p>
-<p>While well behaved apps generally only speak when spoken to, there are some limited cases where an
-app actually should interrupt the user with an unprompted notification.</p>
-<p>Notifications should be used primarily for <strong>time sensitive events</strong>, and especially if these
-synchronous events <strong>involve other people</strong>. For instance, an incoming chat is a real time and
-synchronous form of communication: there is another user actively waiting on you to respond.
-Calendar events are another good example of when to use a notification and grab the user's
-attention, because the event is imminent, and calendar events often involve other people.</p>
-
-<img src="{@docRoot}design/media/notifications_pattern_real_time_people.png">
-
-<div class="vspace size-2">&nbsp;</div>
-
-<div class="layout-content-row">
-  <div class="layout-content-col span-7">
-
-<h4>When not to display a notification</h4>
-<p>There are however many other cases where notifications should not be used:</p>
 <ul>
-<li>
-<p>Avoid notifying the user of information that is not directed specifically at them, or information that is not truly time sensitive. For instance the asynchronous and undirected updates flowing through a social network generally do not warrant a real time interruption. For the users that do care about them, allow them to opt-in.</p>
-</li>
-<li>
-<p>Don't create a notification if the relevant new information is currently on screen. Instead, use the UI of the application itself to notify the user of new information directly in context. For instance, a chat application should not create system notifications while the user is actively chatting with another user.</p>
-</li>
-<li>
-<p>Don't interrupt the user for low level technical operations, like saving or syncing information, or updating an application, if it is possible for the system to simply take care of itself without involving the user.</p>
-</li>
-<li>
-<p>Don't interrupt the user to inform them of an error if it is possible for the application to quickly recover from the error on its own without the user taking any action.</p>
-</li>
-<li>
-<p>Don't create notifications that have no true notification content and merely advertise your app. A notification should inform the user about a state and should not be used to merely launch an app.</p>
-</li>
-<li>
-<p>Don't create superfluous notifications just to get your brand in front of users. Such
-notifications will only frustrate and likely alienate your audience. The best way to provide the
-user with a small amount of updated information and to keep them engaged with your application is to
-develop a widget that they can choose to place on their home screen.</p>
-</li>
+  <li> Involve another person</li>
+  <li> Are time-sensitive</li>
+  <li> Might immediately change the user's behavior in the real world</li>
 </ul>
 
-  </div>
-  <div class="layout-content-col span-6">
-    <img src="{@docRoot}design/media/notifications_pattern_social_fail.png">
-  </div>
+<p>Notifications set to <code>LOW</code> and <code>MIN</code> can still be
+valuable for the user: Many, if not most, notifications just don't need to command the user's
+immediate attention, or vibrate the user's wrist, yet contain information that the user will find
+valuable when they choose to
+look for notifications. Criteria for <code>LOW</code> and <code>MIN</code>
+priority notifications include:</p>
+
+<ul>
+  <li> Don't involve other people</li>
+  <li> Aren't time sensitive</li>
+  <li> Contain content the user might be interested in but could choose to
+browse at their leisure</li>
+</ul>
+
+
+  <img
+src="{@docRoot}images/android-5.0/notifications/notifications_pattern_priority.png"
+    alt="" width="700"/>
+
+
+<h3 style="clear:both" id="set_a_notification_category">Set a notification
+category</h3>
+
+<p>If your notification falls into one of the predefined categories (see
+below), assign it
+accordingly.  Aspects of the system UI such as the notification shade (or any
+other notification
+listener) may use this information to make ranking and filtering decisions.</p>
+<table>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_CALL">CATEGORY_CALL</a></code></p>
+</td>
+    <td>
+<p>Incoming call (voice or video) or similar synchronous communication
+request</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_MESSAGE">CATEGORY_MESSAGE</a></code></p>
+</td>
+    <td>
+<p>Incoming direct message (SMS, instant message, etc.)</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_EMAIL">CATEGORY_EMAIL</a></code></p>
+</td>
+    <td>
+<p>Asynchronous bulk message (email)</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_EVENT">CATEGORY_EVENT</a></code></p>
+</td>
+    <td>
+<p>Calendar event</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_PROMO">CATEGORY_PROMO</a></code></p>
+</td>
+    <td>
+<p>Promotion or advertisement</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_ALARM">CATEGORY_ALARM</a></code></p>
+</td>
+    <td>
+<p>Alarm or timer</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_PROGRESS">CATEGORY_PROGRESS</a></code></p>
+</td>
+    <td>
+<p>Progress of a long-running background operation</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_SOCIAL">CATEGORY_SOCIAL</a></code></p>
+</td>
+    <td>
+<p>Social network or sharing update</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_ERROR">CATEGORY_ERROR</a></code></p>
+</td>
+    <td>
+<p>Error in background operation or authentication status</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_TRANSPORT">CATEGORY_TRANSPORT</a></code></p>
+</td>
+    <td>
+<p>Media transport control for playback</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_SYSTEM">CATEGORY_SYSTEM</a></code></p>
+</td>
+    <td>
+<p>System or device status update.  Reserved for system use.</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_SERVICE">CATEGORY_SERVICE</a></code></p>
+</td>
+    <td>
+<p>Indication of running background service</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_RECOMMENDATION">CATEGORY_RECOMMENDATION</a></code></p>
+</td>
+    <td>
+<p>A specific, timely recommendation for a single thing.  For example, a news
+app might want to
+recommend a news story it believes the user will want to read next.</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><code><a
+href="/reference/android/app/Notification.html#CATEGORY_STATUS">CATEGORY_STATUS</a></code></p>
+</td>
+    <td>
+<p>Ongoing information about device or contextual status</p>
+</td>
+ </tr>
+</table>
+
+<h3 id="summarize_your_notifications">Summarize your notifications</h3>
+
+<p>If a notification of a certain type is already pending when your app tries to send a new
+notification of the same type, combine them into a single summary notification for the app. Do not
+create a new object.</p>
+
+<p>A summary notification builds a summary description and allows the user to
+understand how many
+notifications of a particular kind are pending.</p>
+
+<div class="col-6">
+
+<p><strong>Don't</strong></p>
+  <img src="{@docRoot}images/android-5.0/notifications/Summarise_Dont.png"
+    alt="" width="311px" />
 </div>
 
-<h2 id="interacting-with-notifications">Interacting With Notifications</h2>
+<div>
+<p><strong>Do</strong></p>
 
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-
-    <img src="{@docRoot}design/media/notifications_pattern_phone_icons.png">
-
-  </div>
-  <div class="layout-content-col span-6">
-
-  <p>Notifications are indicated by icons in the notification area and can be accessed by opening the notification drawer.</p>
-  <p>Inside the drawer, notifications are chronologically sorted with the latest one on top. Touching a notification opens the associated app to detailed content matching the notification. Swiping left or right on a notification removes it from the drawer.</p>
-
-  </div>
+  <img src="{@docRoot}images/android-5.0/notifications/Summarise_Do.png"
+    alt="" width="311px"/>
 </div>
 
-<div class="layout-content-row">
-  <div class="layout-content-col span-6">
-
-<p><h4>Ongoing notifications</h4>
-<p>Ongoing notifications keep users informed about an ongoing process in the background. For example, music players announce the currently playing track in the notification system and continue to do so until the user stops the playback. They can also be used to show the user feedback for longer tasks like downloading a file, or encoding a video. Ongoing notifications cannot be manually removed from the notification drawer.</p></p>
-
-  </div>
-  <div class="layout-content-col span-6">
-
-    <img src="{@docRoot}design/media/notifications_pattern_ongoing_music.png">
-
-  </div>
+<p style="clear:left; padding-top:30px; padding-bottom:20px">You can provide
+more detail about the individual notifications that make up a
+ summary by using the expanded digest layout. This approach allows users to gain a
+better sense of which
+ notifications are pending and if they are interesting enough to read in
+detail within the
+ associated app.</p>
+<div class="col-6">
+  <img src="{@docRoot}images/android-5.0/notifications/Stack.png"
+style="margin-bottom:20px"
+    alt="" width="311px" />
+  <p class="img-caption">
+  Expanded and contracted notification that is a summary (using <code>InboxStyle</code>)
+  </p>
 </div>
 
-<div class="layout-content-row">
-  <div class="layout-content-col span-12">
-    <h4>Dialogs and toasts are for feedback not notification</h4>
-    <p>Your app should not create a dialog or toast if it is not currently on screen. Dialogs and Toasts should only be displayed as the immediate response to the user taking an action inside of your app. For further guidance on the use of dialogs and toasts, refer to <a href="{@docRoot}design/patterns/confirming-acknowledging.html">Confirming &amp; Acknowledging</a>.</p>
-  </div>
+<h3 style="clear:both" id="make_notifications_optional">Make notifications
+optional</h3>
+
+<p>Users should always be in control of notifications. Allow the user to
+disable your app's
+notifications or change their alert properties, such as alert sound and whether
+to use vibration,
+by adding a notification settings item to your application settings.</p>
+
+<h3 id="use_distinct_icons">Use distinct icons</h3>
+<p>By glancing at the notification area, the user should be able to discern
+what kinds of
+notifications are currently pending.</p>
+
+<div class="figure">
+  <img src="{@docRoot}images/android-5.0/notifications/ProductIcons.png"
+    alt="" width="420" />
 </div>
 
+  <div><p><strong>Do</strong></p>
+    <p>Look at the notification icons Android apps already provide and create
+notification icons for
+    your app that are sufficiently distinct in appearance.</p>
+
+    <p><strong>Do</strong></p>
+    <p>Use the proper <a
+href="/design/style/iconography.html#notification">notification icon style</a>
+ for small icons, and the Material Light
+    <a href="/design/style/iconography.html#action-bar">action bar icon
+style</a> for your action
+    icons.</p>
+<p ><strong>Do</strong></p>
+<p >Keep your icons visually simple, avoiding excessive detail that is hard to
+discern.</p>
+
+  <div><p><strong>Don't</strong></p>
+    <p>Place any additional alpha (dimming or fading) into your
+small icons and action
+    icons; they can have anti-aliased edges, but because Android uses these
+icons as masks (that is, only
+    the alpha channel is used), the image should generally be drawn at full
+opacity.</p>
+
+</div>
+<p style="clear:both"><strong>Don't</strong></p>
+
+<p>Use color to distinguish your app from others. Notification icons should
+only be a white-on-transparent background image.</p>
+
+
+<h3 id="pulse_the_notification_led_appropriately">Pulse the notification LED
+appropriately</h3>
+
+<p>Many Android devices contain a notification LED, which is used to keep the
+user informed about
+events while the screen is off. Notifications with a priority level of <code>MAX</code>,
+<code>HIGH</code>, or <code>DEFAULT</code> should
+cause the LED to glow, while those with lower priority (<code>LOW</code> and
+<code>MIN</code>) should not.</p>
+
+<p>The user's control over notifications should extend to the LED. When you use
+DEFAULT_LIGHTS, the
+LED will glow white. Your notifications shouldn't use a different
+color unless the
+user has explicitly customized it.</p>
+
+<h2 id="building_notifications_that_users_care_about">Building Notifications
+That Users Care About</h2>
+
+<p>To create an app that users love, 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 or make them resent how much
+attention the app wants
+from them, so use notifications judiciously.</p>
+
+<h3 id="when_to_display_a_notification">When to display a notification</h3>
+
+<p>To create an application that people enjoy using, it's important to
+recognize that the user's
+attention and focus is a resource that must be protected. While Android's
+notification system has
+been designed to minimize the impact of notifications on the user's attention,
+it is
+still important to be aware of the fact that notifications are interrupting the
+user's task flow.
+As you plan your notifications, ask yourself if they are important enough to
+warrant an interruption. If you are unsure, allow the user to opt into a
+notification using your apps notification settings, or adjust
+the notifications priority flag to <code>LOW</code> or <code>MIN</code> to
+avoid distracting the user while they are doing
+something else.</p>
+
+  <img src="{@docRoot}images/android-5.0/notifications/TimeSensitive.png"
+    alt="" width="311px" />
+  <p style="margin-top:10px" class="img-caption">
+   Examples of time-sensitive notification
+  </p>
+
+<p>While well-behaved apps generally only speak when spoken to, a few cases
+do merit an app's interrupting the user with an unprompted notification.</p>
+
+<p>Use notifications primarily for <strong>time-sensitive events</strong>, especially
+ if these synchronous events <strong>involve other people</strong>. For
+instance, an incoming chat
+ is a real-time and synchronous form of communication: Another user
+actively waiting on your response. Calendar events are another good example of when to use a
+notification and grab the
+  user's attention, because the event is imminent, and calendar events often
+involve other people.</p>
+
+<h3 style="clear:both" id="when_not_to_display_a_notification">When not to
+display a notification</h3>
+
+<div class="figure" style="margin-top:60px">
+  <img src="{@docRoot}images/android-5.0/notifications/AntiSample1.png"
+    alt="" width="311px" />
+</div>
+
+<p>In many other cases, notifications aren't appropriate:</p>
+
+<ul>
+  <li> Avoid notifying the user of information that is not directed
+specifically at them, or
+  information that is not truly time-sensitive. For instance, the asynchronous
+and undirected updates
+  flowing through a social network generally do not warrant a real-time
+interruption. For the users
+  who do care about them, allow them to opt-in.</li>
+  <li> Don't create a notification if the relevant new information is currently
+on screen. Instead,
+  use the UI of the application itself to notify the user of new information
+directly in context.
+  For instance, a chat application should not create system notifications while
+the user is actively chatting with another user.</li>
+  <li> Don't interrupt the user for low-level technical operations, like saving
+or syncing information, or updating an application if the app or system can resolve the issue
+without involving the user.</li>
+  <li> Don't interrupt the user to inform them of an error if it is possible
+for the application to recover from the error on its own without the user
+taking any action.</li>
+  <li> Don't create notifications that have no true notification content and
+merely advertise your
+  app. A notification should provide useful, timely, new information and should
+not be used
+  merely to launch an app.</li>
+  <li> Don't create superfluous notifications just to get your brand in front
+of users.
+  Such notifications frustrate and likely alienate your audience. The
+best way to provide
+  small amounts of updated information and keep them engaged
+with your
+  app is to develop a widget that they can choose to place on their
+home screen.</li>
+</ul>
+
+<h2 style="clear:left" id="interacting_with_notifications">Interacting with
+Notifications</h2>
+
+<p>Notifications are indicated by icons in the status bar, and can be accessed
+by opening the
+notification drawer.</p>
+
+<p>Touching a notification opens the associated app to detailed content
+that matches the notification.
+Swiping left or right on a notification removes it from the drawer.</p>
+
+<h3 id="ongoing_notifications">Ongoing notifications</h3>
+<div class="figure" style="width:311px">
+  <img src="{@docRoot}images/android-5.0/notifications/MusicPlayback.png"
+    alt="" width="311px"  />
+      <p class="img-caption">
+    Ongoing notification due to music playback
+  </p>
+</div>
+<p>Ongoing notifications keep users informed about an ongoing process in the
+background.
+For example, music players announce the currently playing track in the
+notification system and
+continue to do so until the user stops the playback. Ongoing notifications can also
+show the user
+feedback for longer tasks like downloading a file, or encoding a video. A user cannot manually
+remove an ongoing notification from the notification drawer.</p>
+
+<h3 id="ongoing_notifications">Media playback</h3>
+<p>In Android 5.0, the lock screen doesn't show transport controls for the deprecated
+{@link android.media.RemoteControlClient} class. But it <em>does</em> show notifications, so each
+app's playback notification is now the primary
+way for users to control playback from a locked state. This behavior gives apps more
+control over which
+buttons to show, and in what way, while providing a consistent experience for
+the user whether or not the screen is locked.</p>
+
+<h3 style="clear:both"
+id="dialogs_and_toasts_are_for_feedback_not_notification">Dialogs
+and toasts</h3>
+
+<p>Your app should not create a dialog or toast if it is not currently on
+screen. A dialog or toast
+ should only be displayed as an immediate response to the user taking an action
+inside of your app.
+For further guidance on the use of dialogs and toasts, refer to
+<a href="/design/patterns/confirming-acknowledging.html">Confirming & Acknowledging</a>.</p>
+
+<h3>Ranking and ordering</h3>
+
+<p>Notifications are news, and so are essentially shown in
+reverse-chronological order, with
+special consideration given to the app's stated notification
+<a href="#correctly_set_and_manage_notification_priority">priority</a>.</p>
+
+<p>Notifications are a key part of the lock screen, and are featured prominently
+every
+time the device display comes on. Space on the lock screen is tight, so it
+is more important
+than ever to identify the most urgent or relevant notifications. For this
+reason, Android has a
+more sophisticated sorting algorithm for notifications, taking into account:</p>
+
+<ul>
+  <li> The timestamp and application's stated priority.</li>
+  <li> Whether the notification has recently disturbed the user with sound or
+vibration. (That is,
+  if the phone just made a noise, and the user wants to know "What just
+happened?", the lock screen
+  should answer that at a glance.)</li>
+  <li> Any people attached to the notification using {@link android.app.Notification#EXTRA_PEOPLE},
+  and, in particular, whether they are starred contacts.</li>
+</ul>
+
+<p>To best take advantage of this sorting, focus on the user
+experience you want
+to create, rather than aiming for any particular spot on the list.</p>
+
+  <img src="{@docRoot}images/android-5.0/notifications/AntiSample3.png"
+    alt="" width="700px" />
+
+  <p class="img-caption" style="margin-top:10px">Gmail notifications are
+default priority, so they
+  normally sort below messages from an instant messaging app like Hangouts, but
+get a
+  temporary bump when new messages come in.
+  </p>
+
+
+<h3>On the lock screen</h3>
+
+<p>Because notifications are visible on the lock screen, user privacy is an
+especially
+important consideration. Notifications often contain sensitive information, and
+should not necessarily be visible
+to anyone who picks up the device and turns on the display.</p>
+
+<ul>
+  <li> For devices that have a secure lock screen (PIN, pattern, or password), the interface has
+  public and private parts. The public interface can be displayed on a secure lock screen and
+  therefore seen by anyone. The private interface is the world behind that lock screen, and
+  is only revealed once the user has signed into the device.</li>
+</ul>
+
+<h3>User control over information displayed on the secure lock screen</h3>
+<div class="figure" style="width:311px">
+  <img src="{@docRoot}images/android-5.0/notifications/LockScreen.png"
+    alt="" width="311px" />
+      <p class="img-caption">
+    Notifications on the lock screen, with contents revealed after the user unlocks the device.
+  </p>
+</div>
+
+<p>When setting up a secure lock screen, the user can choose to conceal
+sensitive details from the secure lock screen. In this case the System UI
+considers the notification's <em>visibility level</em> to figure out what can
+safely be shown.</p>
+<p> To control the visibility level, call
+<code><a
+href="/reference/android/app/Notification.Builder.html#setVisibility(int)">Notification.Builder.setVisibility()</a></code>,
+and specify one of these values:</p>
+
+<ul>
+  <li><code><a
+href="/reference/android/app/Notification.html#VISIBILITY_PUBLIC">VISIBILITY_PUBLIC</a></code>.
+Shows the notification's full content.
+  This is the system default if visibility is left unspecified.</li>
+  <li><code><a
+href="/reference/android/app/Notification.html#VISIBILITY_PRIVATE">VISIBILITY_PRIVATE</a></code>.
+On the lock screen, shows basic information about the existence of this notification, including its
+icon and the name of the app that posted it. The rest of the notification's details are not displayed.
+A couple of good points to keep in mind are as follows:
+  <ul>
+    <li> If you want to provide a different public version of your notification
+for the system to display on a secure lock screen, supply a replacement
+Notification object in the <code><a
+href="/reference/android/app/Notification.html#publicVersion">Notification.publicVersion</a></code>
+field.
+    <li> This setting gives your app an opportunity to create a redacted version of the
+content that is still useful but does not reveal personal information. Consider the example of an
+SMS app whose notifications include the text of the SMS and the sender's name and contact icon.
+This notification should be <code>VISIBILITY_PRIVATE</code>, but <code>publicVersion</code> could still
+contain useful information like "3 new messages" without any other identifying
+details.
+  </ul>
+  </li>
+  <li><code><a
+href="/reference/android/app/Notification.html#VISIBILITY_SECRET">Notification.VISIBILITY_SECRET</A></code>. Shows only the most minimal information, excluding
+even the notification's icon.</li>
+</ul>
+<h2 style="clear:both" id="notifications_on_android_wear">Notifications on
+Android Wear</h2>
+
+<p>Notifications and their <em>actions</em> are bridged over to Wear devices by default.
+Developers can control which notifications bridge from the
+phone to the watch,
+and vice-versa. Developers can also control which actions bridge, as well. If
+your app includes
+actions that can't be accomplished with a single tap, either hide these actions
+on your Wear
+notification or consider hooking them up to a Wear app, thus allowing the user to
+finish the action on
+their watch.</p>
+
+<h4>Bridging notifications and actions</h4>
+
+<p>A connected device, such as a phone, can bridge notifications to a Wear device, so that the
+notifications are displayed there. Similarly, it can bridge actions, so that the user can act
+on the notifications right from the Wear device.</p>
+
+<p><strong>Bridge</strong></p>
+
+<ul>
+  <li> New instant messages</li>
+  <li> Single-tap actions such as +1, Like, Heart</li>
+</ul>
+
+<img src="{@docRoot}images/android-5.0/notifications/WearBasic.png" width="156px"
+height="156px"
+  alt="" />
+
+<p><strong>Don't bridge</strong></p>
+
+<ul>
+  <li> Notifications of newly arrived podcasts</li>
+  <li> Actions that map to features that aren't possible on the watch</li>
+</ul>
+
+
+
+<p><h4>Unique actions to define for Wear</h4></p>
+
+<p>There are some actions that you can perform only on Wear. These include the following:</p>
+
+<ul>
+  <li> Quick lists of canned responses such as "Be right back"</li>
+  <li> Open on the phone</li>
+  <li> A "Comment" or "Reply" action that brings up the speech input screen</li>
+  <li> Actions that launch Wear-specific apps</li>
+</ul>
+
+<img src="{@docRoot}images/android-5.0/notifications/ReplyAction.png" width="156px"
+height="156px"
+  alt="" />
diff --git a/docs/html/design/patterns/notifications_k.jd b/docs/html/design/patterns/notifications_k.jd
new file mode 100644
index 0000000..c8ef50b
--- /dev/null
+++ b/docs/html/design/patterns/notifications_k.jd
@@ -0,0 +1,369 @@
+page.title=Notifications in Android 4.4 and Lower
+@jd:body
+
+<a class="notice-developers" href="{@docRoot}training/notify-user/index.html">
+  <div>
+    <h3>Developer Docs</h3>
+    <p>Notifying the User</p>
+  </div>
+</a>
+
+<a class="notice-designers" href="notifications.html">
+  <div>
+    <h3>Notifications in Android 5.0</h3>
+  </div>
+</a>
+
+<p itemprop="description">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>
+
+<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>a timestamp</li>
+      <li>a secondary icon to identify the sending application when the sender's
+image is shown for the main icon</li>
+    </ul>
+  </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>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>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>duplicative of 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 simple 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 the body of a notification (outside of the action
+buttons), 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>Correctly set and manage notification priority</h4>
+<p>Starting with Jelly Bean, Android supports a priority flag for
+notifications. This flag 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>
+
+<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>
+<img src="{@docRoot}design/media/notifications_pattern_priority.png">
+
+<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
+disable your apps notifications or change their alert properties, such as alert
+sound and whether to use vibration, 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 kinds of notifications are currently pending.</p>
+
+<div class="do-dont-label good"><strong>Do</strong></div>
+<p style="margin-top:0;">Look at the notification icons the Android apps
+already provide and create notification icons for your app that are
+sufficiently distinct in appearance.</p>
+<div class="do-dont-label good"><strong>Do</strong></div>
+<p style="margin-top:0;">Use the proper <a
+href="{@docRoot}design/style/iconography.html#notification">notification icon
+style</a> for small icons, and the Holo Dark <a
+href="{@docRoot}design/style/iconography.html#action-bar">action bar icon
+style</a> for your action icons.</p>
+<div class="do-dont-label good"><strong>Do</strong></div>
+<p style="margin-top:0;">Keep your icons visually simple and avoid excessive
+detail that is hard to discern.</p>
+<div class="do-dont-label bad"><strong>Don't</strong></div>
+<p style="margin-top:0;">Use color to distinguish your app from others.</p>
+
+<h4>Pulse the notification LED appropriately</h4>
+<p>Many Android devices contain a tiny lamp, called the notification <acronym
+title="Light-Emitting Diode">LED</acronym>, which is used to keep the user
+informed about events while the screen is off. Notifications with a priority
+level of MAX, HIGH, or DEFAULT should cause the LED to glow, while those with
+lower priority (LOW and MIN) should not.</p>
+
+<p>The user's control over notifications should extend to the LED. By default,
+the LED will glow with a white color. Your notifications shouldn't use a
+different color unless the user has explicitly customized it.</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>
+
+<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. While Android's notification system
+has been designed
+to minimize the impact of notifications on the users attention, it is
+nonetheless still important
+to be aware of the fact that notifications are potentially interrupting the
+users task flow. As you
+plan your notifications, ask yourself if they are important enough to warrant
+an interruption. If
+you are unsure, allow the user to opt into a notification using your apps
+notification settings or
+adjust the notifications priority flag.</p>
+<p>While well behaved apps generally only speak when spoken to, there are some
+limited cases where an
+app actually should interrupt the user with an unprompted notification.</p>
+<p>Notifications should be used primarily for <strong>time sensitive
+events</strong>, and especially if these
+synchronous events <strong>involve other people</strong>. For instance, an
+incoming chat is a real time and
+synchronous form of communication: there is another user actively waiting on
+you to respond.
+Calendar events are another good example of when to use a notification and grab
+the user's
+attention, because the event is imminent, and calendar events often involve
+other people.</p>
+
+<img src="{@docRoot}design/media/notifications_pattern_real_time_people.png">
+
+<div class="vspace size-2">&nbsp;</div>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-7">
+
+<h4>When not to display a notification</h4>
+<p>There are however many other cases where notifications should not be
+used:</p>
+<ul>
+<li>
+<p>Avoid notifying the user of information that is not directed specifically at
+them, or information that is not truly time sensitive. For instance the
+asynchronous and undirected updates flowing through a social network generally
+do not warrant a real time interruption. For the users that do care about them,
+allow them to opt-in.</p>
+</li>
+<li>
+<p>Don't create a notification if the relevant new information is currently on
+screen. Instead, use the UI of the application itself to notify the user of new
+information directly in context. For instance, a chat application should not
+create system notifications while the user is actively chatting with another
+user.</p>
+</li>
+<li>
+<p>Don't interrupt the user for low level technical operations, like saving or
+syncing information, or updating an application, if it is possible for the
+system to simply take care of itself without involving the user.</p>
+</li>
+<li>
+<p>Don't interrupt the user to inform them of an error if it is possible for
+the application to quickly recover from the error on its own without the user
+taking any action.</p>
+</li>
+<li>
+<p>Don't create notifications that have no true notification content and merely
+advertise your app. A notification should inform the user about a state and
+should not be used to merely launch an app.</p>
+</li>
+<li>
+<p>Don't create superfluous notifications just to get your brand in front of
+users. Such
+notifications will only frustrate and likely alienate your audience. The best
+way to provide the
+user with a small amount of updated information and to keep them engaged with
+your application is to
+develop a widget that they can choose to place on their home screen.</p>
+</li>
+</ul>
+
+  </div>
+  <div class="layout-content-col span-6">
+    <img src="{@docRoot}design/media/notifications_pattern_social_fail.png">
+  </div>
+</div>
+
+<h2 id="interacting-with-notifications">Interacting With Notifications</h2>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-6">
+
+    <img src="{@docRoot}design/media/notifications_pattern_phone_icons.png">
+
+  </div>
+  <div class="layout-content-col span-6">
+
+  <p>Notifications are indicated by icons in the notification area and can be
+accessed by opening the notification drawer.</p>
+  <p>Inside the drawer, notifications are chronologically sorted with the
+latest one on top. Touching a notification opens the associated app to detailed
+content matching the notification. Swiping left or right on a notification
+removes it from the drawer.</p>
+
+  </div>
+</div>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-6">
+
+<p><h4>Ongoing notifications</h4>
+<p>Ongoing notifications keep users informed about an ongoing process in the
+background. For example, music players announce the currently playing track in
+the notification system and continue to do so until the user stops the
+playback. They can also be used to show the user feedback for longer tasks like
+downloading a file, or encoding a video. Ongoing notifications cannot be
+manually removed from the notification drawer.</p></p>
+
+  </div>
+  <div class="layout-content-col span-6">
+
+    <img src="{@docRoot}design/media/notifications_pattern_ongoing_music.png">
+
+  </div>
+</div>
+
+<div class="layout-content-row">
+  <div class="layout-content-col span-12">
+    <h4>Dialogs and toasts are for feedback not notification</h4>
+    <p>Your app should not create a dialog or toast if it is not currently on
+screen. Dialogs and Toasts should only be displayed as the immediate response
+to the user taking an action inside of your app. For further guidance on the
+use of dialogs and toasts, refer to <a
+href="{@docRoot}design/patterns/confirming-acknowledging.html">Confirming &amp;
+Acknowledging</a>.</p>
+  </div>
+</div>
diff --git a/docs/html/design/tv/images/apps-games-rows.jpg b/docs/html/design/tv/images/apps-games-rows.jpg
index 5023655..d18ac6a 100644
--- a/docs/html/design/tv/images/apps-games-rows.jpg
+++ b/docs/html/design/tv/images/apps-games-rows.jpg
Binary files differ
diff --git a/docs/html/design/tv/images/atv-home.jpg b/docs/html/design/tv/images/atv-home.jpg
index 4b25bab..6040a49 100644
--- a/docs/html/design/tv/images/atv-home.jpg
+++ b/docs/html/design/tv/images/atv-home.jpg
Binary files differ
diff --git a/docs/html/design/tv/images/recommendations.png b/docs/html/design/tv/images/recommendations.png
index 942cd10..fb6562f 100644
--- a/docs/html/design/tv/images/recommendations.png
+++ b/docs/html/design/tv/images/recommendations.png
Binary files differ
diff --git a/docs/html/design/tv/images/settings.jpg b/docs/html/design/tv/images/settings.jpg
index 1c5bf31..d96fed4 100644
--- a/docs/html/design/tv/images/settings.jpg
+++ b/docs/html/design/tv/images/settings.jpg
Binary files differ
diff --git a/docs/html/design/tv/patterns.jd b/docs/html/design/tv/patterns.jd
index 51bb699..768dcfc 100644
--- a/docs/html/design/tv/patterns.jd
+++ b/docs/html/design/tv/patterns.jd
@@ -29,7 +29,7 @@
   The visual specifications for these icons are shown below.</p>
 
 
-<h3>Banners</h3>
+<h3 id="banner">Banners</h3>
 
 <p>App Banners represent your app on the home screen of TV devices and serve and as a way for
   users to launch your app. Here are specific requirements for a banner image:
diff --git a/docs/html/design/tv/style.jd b/docs/html/design/tv/style.jd
index 6e2704b..dd10a8a 100644
--- a/docs/html/design/tv/style.jd
+++ b/docs/html/design/tv/style.jd
@@ -70,7 +70,7 @@
   exaggerated contrast, causing them to be indistinguishable.</p>
 
 
-<h2>Typography</h2>
+<h2 id="typography">Typography</h2>
 
 <p>The text and controls in a TV application's UI should be easily visible and navigable from a
   distance. The minimum recommended font size for TV is 12sp. The default text size setting should
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index bb90cca..e89e228 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -37,6 +37,28 @@
 
               <li class="item carousel-home">
                  <div class="col-8">
+                   <img 
+                   style="max-height: 250px; margin-top:5px;
+                   margin-left: 30px; max-width: 451px;"
+src="{@docRoot}design/tv/images/focus.png"
+class="play no-shadow no-transform" />
+                 </div>
+                <div class="content-right col-6">
+                  <h2>Create Quality Apps for TV</h2>
+                  <p>Now that the Android platform has
+                  extended to TVs, your apps on Google Play have
+                  a new opportunity for engagement in the
+                  living room. To provide the best
+                  "leanback" experience on the couch, follow
+                  this quality checklist.</p>
+                  <p><a
+href="{@docRoot}distribute/essentials/quality/tv.html" class="button">Read
+more</a></p>
+                </div>            
+              </li>
+
+              <li class="item carousel-home">
+                 <div class="col-8">
                    <img
 src="//lh4.ggpht.com/-lfjzgG5Dqrk/UHMThRtpRwI/AAAAAAAABpk/h4d3nsmkgPM/s400/mint.png"
 class="play no-shadow no-transform" />
diff --git a/docs/html/distribute/essentials/essentials_toc.cs b/docs/html/distribute/essentials/essentials_toc.cs
index d0a1114..4e53468 100644
--- a/docs/html/distribute/essentials/essentials_toc.cs
+++ b/docs/html/distribute/essentials/essentials_toc.cs
@@ -11,6 +11,12 @@
     </div>
   </li>
   <li class="nav-section">
+    <div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/essentials/quality/tv.html">
+            <span class="en">TV App Quality</span>
+          </a>
+    </div>
+  </li>
+  <li class="nav-section">
     <div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/essentials/optimizing-your-app.html">
           <span class="en">Optimize Your App</span>
         </a>
diff --git a/docs/html/distribute/essentials/quality/tv.jd b/docs/html/distribute/essentials/quality/tv.jd
new file mode 100644
index 0000000..8e17157
--- /dev/null
+++ b/docs/html/distribute/essentials/quality/tv.jd
@@ -0,0 +1,513 @@
+page.title=TV App Quality
+page.metaDescription=TV is a growing segment of Android devices that requires specific attention to app design and functionality in order to create a great experience.
+page.image=/distribute/images/gp-tv-quality.png
+@jd:body
+
+<div id="qv-wrapper"><div id="qv">
+<h2>Quality Criteria</h2>
+  <ol>
+    <li><a href="#ux">Design and Interaction</a></li>
+    <li><a href="#fn">Functionality</a></li>
+    <li><a href="#faq">Frequently Asked Questions</a></li>
+  </ol>
+
+  <h2>You Should Also Read</h2>
+  <ol>
+    <li><a href="{@docRoot}distribute/essentials/quality/core.html">
+      Core App Quality</a></li>
+    <li><a href="{@docRoot}distribute/essentials/optimizing-your-app.html">
+      Optimize Your App</a></li>
+  </ol>
+</div>
+</div>
+
+<div class="top-right-float" style="padding-right:0;margin-bottom:1em;">
+  <img src="{@docRoot}distribute/images/gp-tv-quality.png" style="width:480px;">
+</div>
+
+<p>
+  Users have a different set of expectations when watching TV, compared to using a phone or tablet.
+  A typical TV user sits about 10 feet away from the screen, so small details are less noticeable
+  and small text is hard to read. Since users sit away from a TV, they must use a remote
+  control device to navigate and make selections rather than touching elements on screen. These
+  differences significantly change the requirements for what makes a good TV user experience.
+</p>
+
+<p>
+  The first step toward creating a great experience for TV users is to review and follow the
+  <a href="{@docRoot}design/tv/index.html">Android TV design guidelines</a>, which provides
+  instructions on how to build the best user experience for TV apps. You should also review the
+  <a href="{@docRoot}training/tv/start/index.html">Building TV Apps</a> training, to understand the
+  basic implementation requirements for a TV app.
+</p>
+
+<p class="caution">
+  <strong>Important:</strong> To ensure a great user experience, apps for TV devices must meet some
+  specific requirements for usability. Only apps that meet the following quality criteria will
+  qualify as an Android TV app on Google Play.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> You will be able to submit TV apps to Google Play with the public release
+  of Android 5.0 on November 3. Stay tuned for more information about how to submit your TV apps
+  through the Google Play Developer Console.
+</p>
+
+
+<div class="headerLine">
+  <h2 id="ux">
+  Visual Design and User Interaction
+  </h2>
+
+
+</div>
+
+<p>
+  These criteria ensure that your app follows critical design and interaction patterns
+  to ensure a consistent, intuitive, and enjoyable user experience on TV devices.
+</p>
+
+<table>
+
+<tr>
+  <th style="width:2px;">
+    Type
+  </th>
+  <th style="width:54px;">
+    Test
+  </th>
+  <th>
+    Description
+  </th>
+</tr>
+
+<tr>
+  <td rowspan="4" id="launcher">
+    Launcher
+  </td>
+
+  <td id="TV-LM">
+    TV-LM
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App displays a launcher icon in the Android TV Launcher after installation.
+      (<a href="{@docRoot}training/tv/start/start.html#tv-activity">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-LB">
+    TV-LB
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App displays a 320px x 180px full-size banner as its launcher icon in the Android TV Launcher.
+      (<a href="{@docRoot}design/tv/patterns.html#banner">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-BN">
+    TV-BN
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App launch banner contains the name of the app.
+      (<a href="{@docRoot}design/tv/patterns.html#banner">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-LG">
+    TV-LG
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app is a game, it appears in the Games row in the Android TV Launcher.<br>
+      (<a href="{@docRoot}training/tv/games/index.html#manifest">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="5" id="layout">
+    Layout
+  </td>
+
+  <td id="TV-LO">
+    TV-LO
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      All app interfaces are presented in landscape orientation.
+      (<a href="{@docRoot}training/tv/start/layouts.html#structure">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-TC">
+    TV-TC
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App displays core text at 16sp or higher in size.
+      (<a href="{@docRoot}design/tv/style.html#typography">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-TA">
+    TV-TA
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App displays all text at 12sp or higher in size.
+      (<a href="{@docRoot}design/tv/style.html#typography">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-OV">
+    TV-OV
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App does not display any text or functionality that is partially cut off by the
+      edges of the screen.
+      (<a href="{@docRoot}training/tv/start/layouts.html#overscan">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-TR">
+    TV-TR
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App does not partially obscure other apps. App fills the entire screen and has a
+      non-transparent background.
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="3" id="navigation">
+    Navigation
+  </td>
+
+  <td id="TV-DP">
+    TV-DP
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App functionality is navigable using 5-way D-pad controls, unless the app
+      requires a gamepad controller as specified in <a href="#TV-GP">TV-GP</a>.
+      (<a href="{@docRoot}training/tv/start/navigation.html#d-pad-navigation">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-DK">
+    TV-DK
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app requires a game controller, as specified in <a href="#TV-GP">TV-GP</a>, all
+      functionality is navigable using standard Android game controller keys.
+      (<a href="{@docRoot}training/game-controllers/controller-input.html#button">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-DM">
+    TV-DM
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App does not depend on a remote controller having a menu button to access user interface
+      controls.
+      (<a href="{@docRoot}training/tv/start/navigation.html#d-pad-navigation">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+
+</table>
+
+
+<h3 class="rel-resources clearfloat">Related resources</h3>
+
+<div class="resource-widget resource-flow-layout col-13" data-query=
+"collection:distribute/essentials/tvqualityguidelines/visualdesign"
+data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
+</div>
+
+
+
+<div class="headerLine">
+  <h2 id="fn">
+  Functionality
+  </h2>
+
+
+</div>
+
+<p>
+  These criteria ensure that your app is configured correctly and provides expected
+  functional behavior.
+</p>
+
+
+<table>
+<tr>
+  <th style="width:2px;">
+    Type
+  </th>
+  <th style="width:54px;">
+    Test
+  </th>
+  <th>
+    Description
+  </th>
+</tr>
+
+<tr>
+  <td rowspan="2" id="manifest">
+   Manifest
+  </td>
+
+  <td id="TV-ML">
+    TV-ML
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App manifest sets an intent type of {@code ACTION_MAIN} with category
+      {@code CATEGORY_LEANBACK_LAUNCHER}.
+      (<a href="{@docRoot}training/tv/start/start.html#tv-activity">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+</tr>
+  <td id="TV-MT">
+    TV-MT
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App manifest sets the hardware feature {@code android.hardware.touchscreen} to not required.
+      (<a href="{@docRoot}training/tv/start/hardware.html#declare-hardware-requirements">Learn
+      how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="2" id="game-controllers">
+    Game Controllers
+  </td>
+
+  <td id="TV-GP">
+    TV-GP
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app requires a game controller, the app manifest sets the {@code uses-feature} setting
+      {@code android.hardware.gamepad} to {@code required="true"}.
+      (<a href="{@docRoot}training/tv/games/index.html#gamepad">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-GC">
+    TV-GC
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app provides user instructions for use of game controllers, the instructions
+      do not include a controller with any branding.
+      (<a href="{@docRoot}training/tv/games/index.html#generic-controllers">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="4" id="advertising">
+    Advertising
+  </td>
+
+  <td id="TV-AP">
+    TV-AP
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      App enables interaction with any advertising using D-pad controls.
+      (<a href="{@docRoot}training/tv/start/navigation.html#d-pad-navigation">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-AD">
+    TV-AD
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      For advertising that uses full-screen, non-video ads, the app allows the user to
+      immediately dismiss the ad with D-pad controls.
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-AU">
+    TV-AU
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      For advertising that uses clickable, non-full screen, non-video ads, the app does not allow
+      ads to link to a web URL.
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-AA">
+    TV-AA
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      For advertising that uses clickable, non-full screen, non-video ads, the app does not allow
+      ads to link to another app that is not available on TV devices.
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="1" id="web">
+    Web Content
+  </td>
+
+  <td id="TV-WB">
+    TV-WB
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      For web content, the app uses {@link android.webkit.WebView} components and does not attempt
+      to launch a web browser app.
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td rowspan="3" id="media-playback">
+    Media Playback
+  </td>
+
+  <td id="TV-NP">
+    TV-NP
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app continues to play sound after the user has left, the app provides a <em>Now
+      Playing</em> card on the home screen recommendation row so users can return to the app to
+      control playback.
+      (<a href="{@docRoot}training/tv/playback/now-playing.html">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-PA">
+    TV-PA
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app provides a <em>Now Playing</em> card, selecting this card takes the user to
+      a screen that allows playback to be paused.
+      (<a href="{@docRoot}training/tv/playback/now-playing.html">Learn how</a>)
+    </p>
+  </td>
+</tr>
+
+<tr>
+  <td id="TV-PP">
+    TV-PP
+  </td>
+  <td>
+    <p style="margin-bottom:.5em;">
+      If the app plays video or music content, the app toggles between play and pause of media
+      playback when a play or pause key event is sent during playback.<br>
+      (<a href="{@docRoot}reference/android/view/KeyEvent.html#KEYCODE_MEDIA_PLAY_PAUSE">Learn
+      how</a>)
+    </p>
+  </td>
+</tr>
+
+
+</table>
+
+
+<h3 class="rel-resources clearfloat">Related resources</h3>
+
+<div class="resource-widget resource-flow-layout col-13" data-query=
+"collection:distribute/essentials/tvqualityguidelines/functionality"
+data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">
+</div>
+
+
+<div class="headerLine">
+  <h2 id="faq">
+  Frequently Asked Questions
+  </h2>
+</div>
+
+<p style="margin-top:30px;">
+  <strong>After I submit my app, how will find out if my app does not meet all the requirements for
+  TV devices?</strong>
+</p>
+<p>
+  If your app does not meet the usability requirements described on this page, the Play Store team
+  will contact you through the email address specified in main <a href=
+  "https://play.google.com/apps/publish/">Google Play Developer Console</a> account associated with
+  the app.
+</p>
+<p class="caution">
+  <strong>Caution:</strong> Make sure your app includes the <a href=
+  "{@docRoot}preview/tv/start/index.html#tv-activity">required manifest entries</a> for TV devices,
+  otherwise your app will not be considered a TV app and will not be reviewed for TV usability
+  requirements.
+</p>
+
+
+<p style="margin-top:30px;">
+  <strong>My app targets more than just TV devices. If my app does not meet the TV device
+  requirements, will my new or updated app still appear on Google Play for phones and
+  tablets?</strong>
+</p>
+<p>
+  Yes. The requirements described above only restrict distribution to the Google Play Store on TV
+  devices. Distribution to other device types, such as phones, tablets and other devices, is not
+  affected.
+</p>
+
+
+<p style="margin-top:30px;">
+  <strong>If my app meets the publishing requirements, when will it be available in the Google
+    Play Store on TV devices?</strong>
+</p>
+
+<p>
+  Apps that meet the requirements for TV will appear in the Google Play Store on TV devices
+  <em>after</em> the official release of Android 5.0.
+</p>
\ No newline at end of file
diff --git a/docs/html/distribute/images/gp-tv-quality.png b/docs/html/distribute/images/gp-tv-quality.png
new file mode 100644
index 0000000..44da11b
--- /dev/null
+++ b/docs/html/distribute/images/gp-tv-quality.png
Binary files differ
diff --git a/docs/html/guide/components/recents.jd b/docs/html/guide/components/recents.jd
new file mode 100644
index 0000000..b44c682
--- /dev/null
+++ b/docs/html/guide/components/recents.jd
@@ -0,0 +1,256 @@
+page.title=Overview Screen
+page.tags="recents","overview"
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+  <h2>In this document</h2>
+  <ol>
+    <li><a href="#adding">Adding Tasks to the Overview Screen</a>
+      <ol>
+        <li><a href="#flag-new-doc">Using the Intent flag to add a task</a></li>
+        <li><a href="#attr-doclaunch">Using the Activity attribute to add a task</a></li>
+      </ol>
+    </li>
+    <li><a href="#removing">Removing Tasks</a>
+      <ol>
+        <li><a href="#apptask-remove">Using the AppTask class to remove tasks</a></li>
+        <li><a href="#retain-finished">Retaining finished tasks</a></li>
+      </ol>
+    </li>
+  </ol>
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.app.ActivityManager.AppTask}</li>
+    <li>{@link android.content.Intent}</li>
+  </ol>
+
+  <h2>Sample code</h2>
+  <ol>
+    <li><a href="{@docRoot}samples/activitytasks/index.html">Document-centric Apps</a></li>
+  </ol>
+
+</div>
+</div>
+
+<p>The overview screen (also referred to as the recents screen, recent task list, or recent apps)
+is a system-level UI that lists recently accessed <a href="{@docRoot}guide/components/activities.html">
+activities</a> and <a href="{@docRoot}guide/components/tasks-and-back-stack.html">tasks</a>. The
+user can navigate through the list and select a task to resume, or the user can remove a task from
+the list by swiping it away. With the Android 5.0 release (API level 21), multiple instances of the
+same activity containing different documents may appear as tasks in the overview screen. For example,
+Google Drive may have a task for each of several Google documents. Each document appears as a
+task in the overview screen.</p>
+
+<img src="{@docRoot}images/components/recents.png" alt="" width="284" />
+<p class="img-caption"><strong>Figure 1.</strong> The overview screen showing three Google Drive
+documents, each represented as a separate task.</p>
+
+<p>Normally you should allow the system to define how your tasks and
+activities are represented in the overview screen, and you don't need to modify this behavior.
+However, your app can determine how and and when activities appear in the overview screen. The
+{@link android.app.ActivityManager.AppTask} class lets you manage tasks, and the activity flags of
+the {@link android.content.Intent} class let you specify when an activity is added or removed from
+the overview screen. Also, the <code><a href="{@docRoot}guide/topics/manifest/activity-element.html">
+&lt;activity&gt;</a></code> attributes let you set the behavior in the manifest.</p>
+
+<h2 id="adding">Adding Tasks to the Overview Screen</h2>
+
+<p>Using the flags of the {@link android.content.Intent} class to add a task affords greater control
+over when and how a document gets opened or reopened in the overview screen. When you use the
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+attributes you can choose between always opening the document in a new task or reusing an
+existing task for the document.</p>
+
+<h3 id="flag-new-doc">Using the Intent flag to add a task</h3>
+
+<p>When you create a new document for your activity, you call the
+{@link android.app.ActivityManager.AppTask#startActivity(android.content.Context, android.content.Intent, android.os.Bundle) startActivity()}
+method of the {@link android.app.ActivityManager.AppTask} class, passing to it the intent that
+launches the activity. To insert a logical break so that the system treats your activity as a new
+task in the overview screen, pass the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT} flag
+in the {@link android.content.Intent#addFlags(int) addFlags()} method of the {@link android.content.Intent}
+that launches the activity.</p>
+
+<p class="note"><strong>Note:</strong> The {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT}
+flag replaces the {@link android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET} flag,
+which is deprecated as of Android 5.0 (API level 21).</p>
+
+<p>If you set the {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flag when you create
+the new document, the system always creates a new task with the target activity as the root.
+This setting allows the same document to be opened in more than one task. The following code demonstrates
+how the main activity does this:</p>
+
+<p class="code-caption"><a href="{@docRoot}samples/activitytasks/src/com/example/android/documentcentricrecents/DocumentCentricActivity.html">
+DocumentCentricActivity.java</a></p>
+<pre>
+public void createNewDocument(View view) {
+      final Intent newDocumentIntent = newDocumentIntent();
+      if (useMultipleTasks) {
+          newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
+      }
+      startActivity(newDocumentIntent);
+  }
+
+  private Intent newDocumentIntent() {
+      boolean useMultipleTasks = mCheckbox.isChecked();
+      final Intent newDocumentIntent = new Intent(this, NewDocumentActivity.class);
+      newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
+      newDocumentIntent.putExtra(KEY_EXTRA_NEW_DOCUMENT_COUNTER, incrementAndGet());
+      return newDocumentIntent;
+  }
+
+  private static int incrementAndGet() {
+      Log.d(TAG, "incrementAndGet(): " + mDocumentCounter);
+      return mDocumentCounter++;
+  }
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> Activities launched with the {@code FLAG_ACTIVITY_NEW_DOCUMENT}
+flag must have the {@code android:launchMode="standard"} attribute value (the default) set in the
+manifest.</p>
+
+<p>When the main activity launches a new activity, the system searches through existing tasks for
+one whose intent matches the intent component name and the Intent data for the activity. If the task
+is not found, or the intent contained the {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK}
+flag, a new task will be created with the activity as its root. If it finds one, it brings that task
+to the front and passes the new intent to {@link android.app.Activity#onNewIntent onNewIntent()}.
+The new activity gets the intent and creates a new document in the overview screen, as in the
+following example:</p>
+
+<p class="code-caption"><a href="{@docRoot}samples/activitytasks/src/com/example/android/documentcentricrecents/NewDocumentActivity.html">
+NewDocumentActivity.java</a></p>
+<pre>
+&#64;Override
+protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    setContentView(R.layout.activity_new_document);
+    mDocumentCount = getIntent()
+            .getIntExtra(DocumentCentricActivity.KEY_EXTRA_NEW_DOCUMENT_COUNTER, 0);
+    mDocumentCounterTextView = (TextView) findViewById(
+            R.id.hello_new_document_text_view);
+    setDocumentCounterText(R.string.hello_new_document_counter);
+}
+
+&#64;Override
+protected void onNewIntent(Intent intent) {
+    super.onNewIntent(intent);
+    /* If FLAG_ACTIVITY_MULTIPLE_TASK has not been used, this activity
+    is reused to create a new document.
+     */
+    setDocumentCounterText(R.string.reusing_document_counter);
+}
+</pre>
+
+
+<h3 id="#attr-doclaunch">Using the activity attribute to add a task</h3>
+
+<p>An activity can also specify in its manifest that it always launches into a new task by using
+the <code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+attribute, <a href="{@docRoot}guide/topics/manifest/activity-element.html#dlmode">
+{@code android:documentLaunchMode}</a>. This attribute has four values which produce the following
+effects when the user opens a document with the application:</p>
+
+<dl>
+  <dt>"{@code intoExisting}"</dt>
+  <dd>The activity reuses an existing task for the document. This is the same as setting the
+  {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT} flag <em>without</em> setting the
+  {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flag, as described in
+  <a href="#flag-new-doc">Using the Intent flag to add a task</a>, above.</dd>
+
+  <dt>"{@code always}"</dt>
+  <dd>The activity creates a new task for the document, even if the document is already opened. Using
+  this value is the same as setting both the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT}
+  and {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flags.</dd>
+
+  <dt>"{@code none”}"</dt>
+  <dd>The activity does not create a new task for the document. The overview screen treats the
+  activity as it would by default: it displays a single task for the app, which
+  resumes from whatever activity the user last invoked.</dd>
+
+  <dt>"{@code never}"</dt>
+  <dd>The activity does not create a new task for the document. Setting this value overrides the
+  behavior of the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT}
+  and {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flags, if either of these are set
+  in the intent, and the overview screen displays a single task for the app, which resumes from
+  whatever activity the user last invoked.</dd>
+</dl>
+
+<p class="note"><strong>Note:</strong> For values other than {@code none} and {@code never} the
+activity must be defined with {@code launchMode="standard"}. If this attribute is not specified,
+{@code documentLaunchMode="none"} is used.</p>
+
+<h2 id="removing">Removing Tasks</h2>
+
+<p>By default a document task is automatically removed from the overview screen when its activity
+finishes. You can override this behavior with the {@link android.app.ActivityManager.AppTask} class,
+with an {@link android.content.Intent} flag, or with an<code><a href="{@docRoot}guide/topics/manifest/activity-element.html">
+&lt;activity&gt;</a></code> attribute.</p>
+
+<p>You can always exclude a task from the overview screen entirely by setting the
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+attribute, <a href="{@docRoot}guide/topics/manifest/activity-element.html#exclude">
+{@code android:excludeFromRecents}</a> to {@code true}.</p>
+
+<p>You can set the maximum number of tasks that your app can include in the overview screen by setting
+the <code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+attribute <a href="{@docRoot}guide/topics/manifest/activity-element.html#maxrecents">{@code android:maxRecents}
+</a> to an integer value. The default is 16. When the maximum number of tasks is reached, the least
+recently used task is removed from the overview screen. The {@code android:maxRecents} maximum value
+is 50 (25 on low memory devices); values less than 1 are not valid.</p>
+
+<h3 id="#apptask-remove">Using the AppTask class to remove tasks</h3>
+
+<p>In the activity that creates a new task in the overview screen, you can
+specify when to remove the task and finish all activities associated with it by calling
+the {@link android.app.ActivityManager.AppTask#finishAndRemoveTask() finishAndRemoveTask()} method.</p>
+
+<p class="code-caption"><a href="{@docRoot}samples/activitytasks/index.html">
+NewDocumentActivity.java</a></p>
+<pre>
+public void onRemoveFromRecents(View view) {
+    // The document is no longer needed; remove its task.
+    finishAndRemoveTask();
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> Using the
+{@link android.app.ActivityManager.AppTask#finishAndRemoveTask() finishAndRemoveTask()} method
+overrides the use of the {@link android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS} tag,
+discussed below.</p>
+
+<h3 id="#retain-finished">Retaining finished tasks</h3>
+
+<p>If you want to retain a task in the overview screen, even if its activity has finished, pass
+the {@link android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS} flag in the
+{@link android.content.Intent#addFlags(int) addFlags()} method of the Intent that launches the activity.</p>
+
+<p class="code-caption"><a href="{@docRoot}samples/activitytasks/src/com/example/android/documentcentricrecents/DocumentCentricActivity.html">
+DocumentCentricActivity.java</a></p>
+<pre>
+private Intent newDocumentIntent() {
+    final Intent newDocumentIntent = new Intent(this, NewDocumentActivity.class);
+    newDocumentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT |
+      android.content.Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
+    newDocumentIntent.putExtra(KEY_EXTRA_NEW_DOCUMENT_COUNTER, incrementAndGet());
+    return newDocumentIntent;
+}
+</pre>
+
+<p>To achieve the same effect, set the
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+attribute <a href="{@docRoot}guide/topics/manifest/activity-element.html#autoremrecents">
+{@code android:autoRemoveFromRecents}</a> to {@code false}. The default value is {@code true}
+for document activities, and {@code false} for regular activities. Using this attribute overrides
+the {@link android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS} flag, discussed previously.</p>
+
+
+
+
+
+
+
diff --git a/docs/html/guide/components/tasks-and-back-stack.jd b/docs/html/guide/components/tasks-and-back-stack.jd
index e054313..aaef10e 100644
--- a/docs/html/guide/components/tasks-and-back-stack.jd
+++ b/docs/html/guide/components/tasks-and-back-stack.jd
@@ -21,7 +21,8 @@
 
 <h2>Articles</h2>
 <ol>
-  <li><a href="http://android-developers.blogspot.com/2010/04/multitasking-android-way.html">Multitasking the Android Way</a></li>
+  <li><a href="http://android-developers.blogspot.com/2010/04/multitasking-android-way.html">
+  Multitasking the Android Way</a></li>
 </ol>
 
 <h2>See also</h2>
@@ -31,6 +32,7 @@
   <li><a
 href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;} manifest
 element</a></li>
+  <li><a href="{@docRoot}guide/components/recents.html">Overview Screen</a></li>
 </ol>
 </div>
 </div>
@@ -39,12 +41,12 @@
 <p>An application usually contains multiple <a
 href="{@docRoot}guide/components/activities.html">activities</a>. Each activity
 should be designed around a specific kind of action the user can perform and can start other
-activities. For example, an email application might have one activity to show a list of new email.
-When the user selects an email, a new activity opens to view that email.</p>
+activities. For example, an email application might have one activity to show a list of new messages.
+When the user selects a message, a new activity opens to view that message.</p>
 
 <p>An activity can even start activities that exist in other applications on the device. For
-example, if your application wants to send an email, you can define an intent to perform a "send"
-action and include some data, such as an email address and a message. An activity from another
+example, if your application wants to send an email message, you can define an intent to perform a
+"send" action and include some data, such as an email address and a message. An activity from another
 application that declares itself to handle this kind of intent then opens. In this case, the intent
 is to send an email, so an email application's "compose" activity starts (if multiple activities
 support the same intent, then the system lets the user select which one to use). When the email is
@@ -53,8 +55,8 @@
 experience by keeping both activities in the same <em>task</em>.</p>
 
 <p>A task is a collection of activities that users interact with
-when performing a certain job. The activities are arranged in a stack (the "back stack"), in the
-order in which each activity is opened.</p>
+when performing a certain job. The activities are arranged in a stack (the <em>back stack</em>), in
+the order in which each activity is opened.</p>
 
 <!-- SAVE FOR WHEN THE FRAGMENT DOC IS ADDED
 <div class="sidebox-wrapper">
@@ -134,7 +136,8 @@
 foreground&mdash;all three activities in its stack are intact and the activity at the top of the
 stack resumes. At
 this point, the user can also switch back to Task B by going Home and selecting the application icon
-that started that task (or by selecting the app's task from the <em>recent apps</em> screen).
+that started that task (or by selecting the app's task from the
+<a href="{@docRoot}guide/components/recents.html">overview screen</a>).
 This is an example of multitasking on Android.</p>
 
 <p class="note"><strong>Note:</strong> Multiple tasks can be held in the background at once.
@@ -195,8 +198,8 @@
 system still
 knows that the activity has a place in the back stack, but when the activity is brought to the
 top of the stack the system must recreate it (rather than resume it). In order to
-avoid losing the user's work, you should proactively retain it by implementing the {@link
-android.app.Activity#onSaveInstanceState onSaveInstanceState()} callback
+avoid losing the user's work, you should proactively retain it by implementing the
+{@link android.app.Activity#onSaveInstanceState onSaveInstanceState()} callback
 methods in your activity.</p>
 
 <p>For more information about how to save your activity state, see the <a
@@ -218,27 +221,26 @@
 activities except for the root activity when the user leaves the task.</p>
 
 <p>You can do these things and more, with attributes in the
-<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-&lt;activity&gt;}</a> manifest element and with flags in the intent that you pass to {@link
-android.app.Activity#startActivity startActivity()}.</p>
+<a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a>
+manifest element and with flags in the intent that you pass to
+{@link android.app.Activity#startActivity startActivity()}.</p>
 
-<p>In this regard, the principal <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a>
-attributes you can use are:</p>
+<p>In this regard, the principal <a href="{@docRoot}guide/topics/manifest/activity-element.html">
+{@code &lt;activity&gt;}</a> attributes you can use are:</p>
 
 <ul class="nolist">
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code
-taskAffinity}</a></li>
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code
-launchMode}</a></li>
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">{@code
-allowTaskReparenting}</a></li>
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#clear">{@code
-clearTaskOnLaunch}</a></li>
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#always">{@code
-alwaysRetainTaskState}</a></li>
-  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#finish">{@code
-finishOnTaskLaunch}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#aff">
+  {@code taskAffinity}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">
+  {@code launchMode}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">
+  {@code allowTaskReparenting}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#clear">
+  {@code clearTaskOnLaunch}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#always">
+  {@code alwaysRetainTaskState}</a></li>
+  <li><a href="{@docRoot}guide/topics/manifest/activity-element.html#finish">
+  {@code finishOnTaskLaunch}</a></li>
 </ul>
 
 <p>And the principal intent flags you can use are:</p>
@@ -250,15 +252,18 @@
 </ul>
 
 <p>In the following sections, you'll see how you can use these manifest attributes and intent
-flags to define how activities are associated with tasks and how the behave in the back stack.</p>
+flags to define how activities are associated with tasks and how they behave in the back stack.</p>
 
+<p>Also, discussed separately are the considerations for how tasks and activites may be represented
+and managed in the overview screen. See <a href="{@docRoot}guide/components/recents.html">Overview Screen</a>
+for more information. Normally you should allow the system to define how your task and
+activities are represented in the overview screen, and you don't need to modify this behavior.</p>
 
 <p class="caution"><strong>Caution:</strong> Most applications should not interrupt the default
 behavior for activities and tasks. If you determine that it's necessary for your activity to modify
 the default behaviors, use caution and be sure to test the usability of the activity during
 launch and when navigating back to it from other activities and tasks with the <em>Back</em> button.
-Be sure 
-to test for navigation behaviors that might conflict with the user's expected behavior.</p>
+Be sure to test for navigation behaviors that might conflict with the user's expected behavior.</p>
 
 
 <h3 id="TaskLaunchModes">Defining launch modes</h3>
@@ -389,7 +394,7 @@
   <dt>{@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}</dt>
     <dd>Start the activity in a new task. If a task is already running for the activity you are now
 starting, that task is brought to the foreground with its last state restored and the activity
-receives the new intent in {@link android.app.Activity#onNewIntent onNewIntent()}. 
+receives the new intent in {@link android.app.Activity#onNewIntent onNewIntent()}.
     <p>This produces the same behavior as the {@code "singleTask"} <a
 href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code launchMode}</a> value,
 discussed in the previous section.</p></dd>
@@ -408,11 +413,13 @@
     <p>There is no value for the <a
 href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code launchMode}</a>
 attribute that produces this behavior.</p>
-    <p>{@code FLAG_ACTIVITY_CLEAR_TOP} is most often used in conjunction with {@code
-FLAG_ACTIVITY_NEW_TASK}.  When used together, these flags are a way of locating an existing activity
+    <p>{@code FLAG_ACTIVITY_CLEAR_TOP} is most often used in conjunction with
+    {@code FLAG_ACTIVITY_NEW_TASK}.
+When used together, these flags are a way of locating an existing activity
 in another task and putting it in a position where it can respond to the intent. </p>
-    <p class="note"><strong>Note:</strong> If the launch mode of the designated activity is {@code
-"standard"}, it too is removed from the stack and a new instance is launched in its place to handle
+    <p class="note"><strong>Note:</strong> If the launch mode of the designated activity is
+    {@code "standard"},
+it too is removed from the stack and a new instance is launched in its place to handle
 the incoming intent.  That's because a new instance is always created for a new intent when the
 launch mode is {@code "standard"}. </p>
 </dd>
@@ -439,21 +446,23 @@
 <p>The <a
 href="{@docRoot}guide/topics/manifest/activity-element.html#aff">{@code taskAffinity}</a>
 attribute takes a string value, which must be unique from the default package name
-declared in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">{@code
-&lt;manifest&gt;}</a> element, because the system uses that name to identify the default task
+declared in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">
+{@code &lt;manifest&gt;}
+</a> element, because the system uses that name to identify the default task
 affinity for the application.</p>
 
 <p>The affinity comes into play in two circumstances:</p>
 <ul>
-  <li>When the intent that launches an activity contains the {@link
-android.content.Intent#FLAG_ACTIVITY_NEW_TASK} flag.
+  <li>When the intent that launches an activity contains the
+  {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}
+  flag.
 
 <p>A new activity is, by default, launched into the task of the activity
 that called {@link android.app.Activity#startActivity startActivity()}. It's pushed onto the same
-back stack as the caller.  However, if the intent passed to {@link
-android.app.Activity#startActivity startActivity()} contains the {@link
-android.content.Intent#FLAG_ACTIVITY_NEW_TASK}
-flag, the system looks for a different task to house the new activity. Often, it's a new task. 
+back stack as the caller.  However, if the intent passed to
+{@link android.app.Activity#startActivity startActivity()}
+contains the {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}
+flag, the system looks for a different task to house the new activity. Often, it's a new task.
 However, it doesn't have to be.  If there's already an existing task with the same affinity as the
 new activity, the activity is launched into that task.  If not, it begins a new task.</p>
 
@@ -461,17 +470,17 @@
 to leave
 it, there must be some way for the user to navigate back to the task. Some entities (such as the
 notification manager) always start activities in an external task, never as part of their own, so
-they always put {@code FLAG_ACTIVITY_NEW_TASK} in the intents they pass to {@link
-android.app.Activity#startActivity startActivity()}.  If you have an activity that can be invoked by
+they always put {@code FLAG_ACTIVITY_NEW_TASK} in the intents they pass to
+{@link android.app.Activity#startActivity startActivity()}.
+If you have an activity that can be invoked by
 an external entity that might use this flag, take care that the user has a independent way to get
 back to the task that's started, such as with a launcher icon (the root activity of the task
 has a {@link android.content.Intent#CATEGORY_LAUNCHER} intent filter; see the <a
 href="#Starting">Starting a task</a> section below).</p>
 </li>
 
-  <li>When an activity has its <a
-href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">{@code
-allowTaskReparenting}</a> attribute set to {@code "true"}.
+  <li>When an activity has its <a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">
+{@code allowTaskReparenting}</a> attribute set to {@code "true"}.
   <p>In this case, the activity can move from the task it starts to the task it has an affinity
 for, when that task comes to the foreground.</p>
   <p>For example, suppose that an activity that reports weather conditions in selected cities is
@@ -511,9 +520,9 @@
 href="{@docRoot}guide/topics/manifest/activity-element.html#clear">clearTaskOnLaunch</a></code></dt>
 <dd>If this attribute is set to {@code "true"} in the root activity of a task,
 the stack is cleared down to the root activity whenever the user leaves the task
-and returns to it.  In other words, it's the opposite of <a
-href="{@docRoot}guide/topics/manifest/activity-element.html#always">{@code
-alwaysRetainTaskState}</a>.  The user always returns to the task in its
+and returns to it.  In other words, it's the opposite of
+<a href="{@docRoot}guide/topics/manifest/activity-element.html#always">
+{@code alwaysRetainTaskState}</a>. The user always returns to the task in its
 initial state, even after a leaving the task for only a moment.</dd>
 
 <dt><code><a
@@ -534,8 +543,9 @@
 <h3 id="Starting">Starting a task</h3>
 
 <p>You can set up an activity as the entry point for a task by giving it an intent filter with
-{@code "android.intent.action.MAIN"} as the specified action and {@code
-"android.intent.category.LAUNCHER"} as the specified category. For example:</p>
+{@code "android.intent.action.MAIN"} as the specified action and
+{@code "android.intent.category.LAUNCHER"}
+as the specified category. For example:</p>
 
 <pre>
 &lt;activity ... &gt;
@@ -553,27 +563,25 @@
 </p>
 
 <p>This second ability is important: Users must be able to leave a task and then come back to it
-later using this activity launcher.  For this reason, the two <a href="#LaunchModes">launch
-modes</a> that mark activities as always initiating a task, {@code "singleTask"} and "{@code
-"singleInstance"}, should be used only when the activity has an {@link
-android.content.Intent#ACTION_MAIN}
-and a {@link android.content.Intent#CATEGORY_LAUNCHER}
-filter. Imagine, for example, what could happen if the filter is missing: An intent launches a
-{@code "singleTask"} activity, initiating a new task, and the user spends some time working in
-that task.  The user then presses the <em>Home</em> button. The task is now sent to the background
-and is
-not visible. Now the user has no way to return to the task, because it is not represented in the
-application launcher.
-</p>
+later using this activity launcher. For this reason, the two <a href="#LaunchModes">launch
+modes</a> that mark activities as always initiating a task, {@code "singleTask"} and
+{@code "singleInstance"}, should be used only when the activity has an
+{@link android.content.Intent#ACTION_MAIN}
+and a {@link android.content.Intent#CATEGORY_LAUNCHER} filter. Imagine, for example, what could
+happen if the filter is missing: An intent launches a {@code "singleTask"} activity, initiating a
+new task, and the user spends some time working in that task. The user then presses the <em>Home</em>
+button. The task is now sent to the background and is not visible. Now the user has no way to return
+to the task, because it is not represented in the application launcher.</p>
 
 <p>For those cases where you don't want the user to be able to return to an activity, set the
-  <code><a
-href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code> element's
-<a href="{@docRoot}guide/topics/manifest/activity-element.html#finish">{@code
-finishOnTaskLaunch}</a> to {@code "true"} (see <a
-href="#Clearing">Clearing the stack</a>).</p>
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
+element's
+<a href="{@docRoot}guide/topics/manifest/activity-element.html#finish">{@code finishOnTaskLaunch}</a>
+to {@code "true"} (see <a href="#Clearing">Clearing the stack</a>).</p>
 
-
+<p>Further information about how tasks and activites are represented and managed in
+the overview screen is available in <a href="{@docRoot}guide/components/recents.html">
+Overview Screen</a>.</p>
 
 <!--
 <h2>Beginner's Path</h2>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index ea36405..8d010a1 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -55,6 +55,9 @@
           <li><a href="<?cs var:toroot ?>guide/components/tasks-and-back-stack.html">
               <span class="en">Tasks and Back Stack</span>
             </a></li>
+          <li><a href="<?cs var:toroot ?>guide/components/recents.html">
+              <span class="en">Overview Screen</span>
+            </a></li>
         </ul>
       </li>
       <li class="nav-section">
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd
index f0e93b9..ade05c9 100644
--- a/docs/html/guide/topics/manifest/activity-element.jd
+++ b/docs/html/guide/topics/manifest/activity-element.jd
@@ -8,11 +8,14 @@
 <dd><pre class="stx">&lt;activity android:<a href="#embedded">allowEmbedded</a>=["true" | "false"]
           android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
           android:<a href="#always">alwaysRetainTaskState</a>=["true" | "false"]
+          android:<a href="#autoremrecents">autoRemoveFromRecents</a>=["true" | "false"]
           android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
           android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
                                  "touchscreen", "keyboard", "keyboardHidden",
                                  "navigation", "screenLayout", "fontScale", "uiMode",
                                  "orientation", "screenSize", "smallestScreenSize"]
+          android:<a href="#dlmode">documentLaunchMode</a>=["intoExisting", "always",
+                                  "none", "never"]
           android:<a href="#enabled">enabled</a>=["true" | "false"]
           android:<a href="#exclude">excludeFromRecents</a>=["true" | "false"]
           android:<a href="#exported">exported</a>=["true" | "false"]
@@ -22,12 +25,14 @@
           android:<a href="#label">label</a>="<i>string resource</i>"
           android:<a href="#lmode">launchMode</a>=["multiple" | "singleTop" |
                               "singleTask" | "singleInstance"]
+          android:<a href="#maxRecents">maxRecents</a>="<i>integer</i>"
           android:<a href="#multi">multiprocess</a>=["true" | "false"]
           android:<a href="#nm">name</a>="<i>string</i>"
           android:<a href="#nohist">noHistory</a>=["true" | "false"]  <!-- ##api level 3## -->
           android:<a href="#parent">parentActivityName</a>="<i>string</i>" <!-- api level 16 -->
           android:<a href="#prmsn">permission</a>="<i>string</i>"
           android:<a href="#proc">process</a>="<i>string</i>"
+          android:<a href="#relinquish">relinquishTaskIdentity</a>=["true" | "false"]
           android:<a href="#screen">screenOrientation</a>=["unspecified" | "behind" |
                                      "landscape" | "portrait" |
                                      "reverseLandscape" | "reversePortrait" |
@@ -139,6 +144,15 @@
 a lot of state (such as multiple open tabs) that users would not like to lose.
 </p></dd>
 
+<dt><a name="autoremrecents"></a>{@code android:autoRemoveFromRecents}</dt>
+<dd>Whether or not tasks launched by activities with this attribute remains in the
+<a href="{@docRoot}guide/components/recents.html">overview screen</a> until the last activity in the
+task is completed. If {@code true}, the task is
+automatically removed from the overview screen. This overrides the caller's use of
+{@link android.content.Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS}. It must be a boolean value, either
+"{@code true}" or "{@code false}".</dd>
+
+
 <dt><a name="clear"></a>{@code android:clearTaskOnLaunch}</dt>
 <dd>Whether or not all activities will be removed from the task, except for
 the root activity, whenever it is re-launched from the home screen &mdash;
@@ -177,7 +191,7 @@
 <dd>Lists configuration changes that the activity will handle itself.  When a configuration
 change occurs at runtime, the activity is shut down and restarted by default, but declaring a
 configuration with this attribute will prevent the activity from being restarted. Instead, the
-activity remains running and its <code>{@link android.app.Activity#onConfigurationChanged
+activity remains running and its <code>{@link android.app.Activity#onConfigurationChanged(android.content.res.Configuration)
 onConfigurationChanged()}</code> method is called.
 
 <p class="note"><strong>Note:</strong> Using this attribute should be
@@ -271,20 +285,67 @@
 
 <p>
 All of these configuration changes can impact the resource values seen by the
-application.  Therefore, when <code>{@link android.app.Activity#onConfigurationChanged
+application.  Therefore, when <code>{@link android.app.Activity#onConfigurationChanged(android.content.res.Configuration)
 onConfigurationChanged()}</code> is called, it will generally be necessary to again
 retrieve all resources (including view layouts, drawables, and so on) to correctly
 handle the change.
 </p></dd>
 
+<dt><a name="dlmode"></a>{@code android:documentLaunchMode}</dt>
+<dd>Specifies how a new instance of an activity should be added to a task each time it is
+launched. This attribute permits the user to have multiple documents from the same application
+appear in the <a href="{@docRoot}guide/components/recents.html">overview screen</a>.
+
+<p>This attribute has four values which produce the following effects when the user opens a document
+with the application:</p>
+
+<table>
+<tr>
+  <th>Value</th>
+  <th>Description</th>
+</tr><tr>
+  <td>"{@code intoExisting}"</td>
+  <td>The activity reuses the existing task for the document. Using this value is the same as setting
+  the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT} flag, <em>without</em> setting the
+  {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flag, as described in
+  <a href="{@docRoot}guide/components/recents.html#flag-new-doc">Using the Intent flag to add a task
+  </a>.</td>
+</tr><tr>
+    <td>"{@code always}"</td>
+    <td>The activity creates a new task for the document, even if the document is already opened.
+    This is the same as setting both the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT}
+    and {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flags.</td>
+</tr><tr>
+    <td>"{@code none}"</td>
+    <td>The activity does not create a new task for the activity. This is the default value, which
+    creates a new task only when {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK} is set.
+    The overview screen treats the activity as it would by default: it displays a single task for
+    the app, which resumes from whatever activity the user last invoked.</td>
+</tr><tr>
+    <td>"{@code never}"</td>
+    <td>This activity is not launched into a new document even if the Intent contains
+    {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT}. Setting this overrides the behavior
+    of the {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT} and
+    {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK} flags, if either of these are set in
+    the activity, and the overview screen displays a single task for the app, which resumes from
+    whatever activity the user last invoked.</td>
+</tr>
+</table>
+
+<p class="note"><strong>Note:</strong> For values other than "{@code none}" and "{@code never}" the
+activity must be defined with {@code launchMode="standard"}. If this attribute is not specified,
+{@code documentLaunchMode="none"} is used.</p>
+</dd>
+
 <dt><a name="enabled"></a>{@code android:enabled}</dt>
 <dd>Whether or not the activity can be instantiated by the system &mdash;
-"{@code true}" if it can be, and "{@code false}" if not.  The default value
+{@code "true"} if it can be, and "{@code false}" if not.  The default value
 is "{@code true}".
 
 <p>
-The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element has its own
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code>
+The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a>
+</code> element has its own<code>
+<a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code>
 attribute that applies to all application components, including activities.  The
 <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
 and {@code &lt;activity&gt;} attributes must both be "{@code true}" (as they both
@@ -294,10 +355,11 @@
 
 <dt><a name="exclude"></a>{@code android:excludeFromRecents}</dt>
 <dd>Whether or not the task initiated by this activity should be excluded from the list of recently
-used applications ("recent apps"). That is, when this activity is the root activity of a new task,
-this attribute determines whether the task should not appear in the list of recent apps. Set "{@code
-true}" if the task should be <em>excluded</em> from the list; set "{@code false}" if it should be
-<em>included</em>. The default value is "{@code false}".
+used applications, the <a href="{@docRoot}guide/components/recents.html">
+overview screen</a>. That is, when this activity is the root activity of a new
+task, this attribute determines whether the task should not appear in the list of recent apps. Set
+"{@code true}" if the task should be <em>excluded</em> from the list; set "{@code false}" if it
+should be <em>included</em>. The default value is "{@code false}".
 </p></dd>
 
 <dt><a name="exported"></a>{@code android:exported}</dt>
@@ -550,6 +612,13 @@
 </p>
 </dd>
 
+<dt><a name="maxrecents"></a>{@code android:maxRecents}</dt>
+<dd>The maximum number of tasks rooted at this activity in the <a href="{@docRoot}guide/components/recents.html">
+overview screen</a>. When this number of entries is reached, the system removes the least-recently
+used instance from the overview screen. Valid values are 1 through 50 (25 on low memory devices);
+zero is invalid. This must be an integer value, such as 50. The default value is 16.
+</dd>
+
 <dt><a name="multi"></a>{@code android:multiprocess}</dt>
 <dd>Whether an instance of the activity can be launched into the process of the component
 that started it &mdash; "{@code true}" if it can be, and "{@code false}" if not.
@@ -685,6 +754,20 @@
 attribute can set a different default process name for all components.
 </dd>
 
+<dt><a name="relinquish"></a>{@code android:relinquishTaskIdentity}</dt>
+<dd>Whether or not the activity relinquishes its task identifiers to an activity above it in the
+task stack. A task whose root activity has this attribute set to "{@code true}" replaces the base
+Intent with that of the next activity in the task. If the next activity also has this attribute set
+to "{@code true}" then it will yield the base Intent to any activity that it launches in the same
+task. This continues for each activity until an activity is encountered which has this attribute set
+to "{@code false}". The default value is "{@code false}".
+
+<p>This attribute set to "{@code true}" also permits the activity's use of the
+{@link android.app.ActivityManager.TaskDescription} to change labels, colors
+and icons in the <a href="{@docRoot}guide/components/recents.html">overview screen</a>.</p>
+</dd>
+
+
 <dt><a name="screen"></a>{@code android:screenOrientation}</dt>
 <dd>The orientation of the activity's display on the device.
 
diff --git a/docs/html/guide/topics/manifest/uses-sdk-element.jd b/docs/html/guide/topics/manifest/uses-sdk-element.jd
index 79a37f0..e5e64e5 100644
--- a/docs/html/guide/topics/manifest/uses-sdk-element.jd
+++ b/docs/html/guide/topics/manifest/uses-sdk-element.jd
@@ -227,6 +227,17 @@
 <table>
   <tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
 
+    <tr><td><a href="{@docRoot}about/versions/android-5.0.html">Android 5.0</a></td>
+    <td><a href="{@docRoot}sdk/api_diff/21/changes.html" title="Diff Report">21</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#LOLLIPOP}</td>
+    <td><a href="{@docRoot}about/versions/lollipop.html">Platform
+Highlights</a></td></tr>
+
+    <tr><td style="color:#bbb">Android 4.4W</td>
+    <td><a href="{@docRoot}sdk/api_diff/20/changes.html" title="Diff Report">20</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#KITKAT_WATCH}</td>
+    <td style="color:#bbb">KitKat for Wearables Only</td></tr>
+
     <tr><td><a href="{@docRoot}about/versions/android-4.4.html">Android 4.4</a></td>
     <td><a href="{@docRoot}sdk/api_diff/19/changes.html" title="Diff Report">19</a></td>
     <td>{@link android.os.Build.VERSION_CODES#KITKAT}</td>
diff --git a/docs/html/guide/topics/text/creating-input-method.jd b/docs/html/guide/topics/text/creating-input-method.jd
index 4b6b7b7..802b58a 100644
--- a/docs/html/guide/topics/text/creating-input-method.jd
+++ b/docs/html/guide/topics/text/creating-input-method.jd
@@ -6,45 +6,37 @@
 <div id="qv">
 <h2>In This Document</h2>
 <ol>
-    <li>
-        <a href="#InputMethodLifecycle">The IME Lifecycle</a>
-    </li>
-    <li>
-        <a href="#DefiningIME">Declaring IME Components in the Manifest</a>
-    </li>
-    <li>
-        <a href="#IMEAPI">The Input Method API</a>
-    </li>
-    <li>
-        <a href="#IMEUI">Designing the Input Method UI</a>
-    </li>
-    <li>
-        <a href="#SendText">Sending Text to the Application</a>
-    </li>
-    <li>
-        <a href="#IMESubTypes">Creating an IME Subtype</a>
-    </li>
-    <li>
-        <a href="#GeneralDesign">General IME Considerations</a>
-    </li>
+    <li><a href="#InputMethodLifecycle">The IME Lifecycle</a></li>
+    <li><a href="#DefiningIME">Declaring IME Components in the Manifest</a></li>
+    <li><a href="#IMEAPI">The Input Method API</a></li>
+    <li><a href="#IMEUI">Designing the Input Method UI</a></li>
+    <li><a href="#SendText">Sending Text to the Application</a></li>
+    <li><a href="#IMESubTypes">Creating an IME Subtype</a></li>
+    <li><a href="#Switching">Switching among IME Subtypes</a></li>
+    <li><a href="#GeneralDesign">General IME Considerations</a></li>
 </ol>
 <h2>See also</h2>
 <ol>
     <li>
         <a href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">Onscreen Input Methods</a>
     </li>
-    <li>
-        <a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard sample</a>
+</ol>
+
+<h2>Sample</h2>
+<ol>
+    <li><a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a>
     </li>
 </ol>
+
 </div>
 </div>
 <p>
     An input method editor (IME) is a user control that enables users to enter text. Android
-    provides an extensible input method framework that allows applications to provide users
-    alternative input methods, such as on-screen keyboards or even speech input. Once installed,
-    users can select which IME they want to use from the system settings and use it across the
-    entire system; only one IME may be enabled at a time.
+    provides an extensible input-method framework that allows applications to provide users
+    alternative input methods, such as on-screen keyboards or even speech input. After installing
+    the desired IMEs, a user can select which one to use from the system settings, and use it
+    across the entire system; only one IME may be enabled at a time.
 </p>
 <p>
     To add an IME to the Android system, you create an Android application
@@ -52,37 +44,54 @@
     addition, you usually create a "settings" activity that passes options to the IME
     service. You can also define a settings UI that's displayed as part of the system settings.
 </p>
+<p>This guide covers the following:</p>
+<ul>
+    <li>The IME lifecycle</li>
+    <li>Declaring IME components in the application manifest</li>
+    <li>The IME API</li>
+    <li>Designing an IME UI</li>
+    <li>Sending text from an IME to an application</li>
+    <li>Working with IME subtypes</li>
+</ul>
 <p>
     If you haven't worked with IMEs before, you should read the introductory article
-    <a href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">Onscreen Input Methods</a> first.
-    Also, the Soft Keyboard sample app included in the SDK contains sample code that you can modify
-    to start building your own IME.
+    <a href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">Onscreen Input Methods</a>
+    first.
+    Also, the <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a> sample app included in the SDK contains sample code that you can modify to
+    start building your own IME.
 </p>
 <h2 id="InputMethodLifecycle">The IME Lifecycle</h2>
 <p>
     The following diagram describes the life cycle of an IME:
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_lifecycle_image.png" alt="" height="845"
-    id="figure1" />
+<img src="{@docRoot}resources/articles/images/inputmethod_lifecycle_image.png" alt="" height="845" id="figure1" />
 <p class="img-caption">
     <strong>Figure 1.</strong> The life cycle of an IME.
 </p>
 <p>
-    The following sections describe how to implement the UI and code associated with an IME that
+    The following sections describe how to implement the UI and code associated
+with an IME that
     follows this lifecycle.
 </p>
 <h2 id="DefiningIME">Declaring IME Components in the Manifest</h2>
 <p>
-    In the Android system, an IME is an Android application that contains a special IME service.
-    The application's manifest file must declare the service, request the necessary permissions,
-    provide an intent filter that matches the action <code>action.view.InputMethod</code>, and
-    provide metadata that defines characteristics of the IME. In addition, to provide a settings
-    interface that allows the user to modify the behavior of the IME, you can define a "settings"
+    In the Android system, an IME is an Android application that contains a
+special IME service.
+    The application's manifest file must declare the service, request the
+necessary permissions,
+    provide an intent filter that matches the action
+<code>action.view.InputMethod</code>, and
+    provide metadata that defines characteristics of the IME. In addition, to
+provide a settings
+    interface that allows the user to modify the behavior of the IME, you can
+define a "settings"
     activity that can be launched from System Settings.
 </p>
 <p>
-    The following snippet declares IME service. It requests the permission {@link
-    android.Manifest.permission#BIND_INPUT_METHOD} to allow the service to connect the IME to
+    The following snippet declares an IME service. It requests the permission
+{@link android.Manifest.permission#BIND_INPUT_METHOD} to allow the service to
+connect the IME to
     the system, sets up an intent filter that matches the action
     <code>android.view.InputMethod</code>, and defines metadata for the IME:
 </p>
@@ -94,12 +103,15 @@
         &lt;intent-filter&gt;
             &lt;action android:name="android.view.InputMethod" /&gt;
         &lt;/intent-filter&gt;
-        &lt;meta-data android:name="android.view.im" android:resource="&#64;xml/method" /&gt;
+        &lt;meta-data android:name="android.view.im"
+android:resource="&#64;xml/method" /&gt;
     &lt;/service&gt;
 </pre>
 <p>
-    This next snippet declares the settings activity for the IME. It has an intent filter for
-    {@link android.content.Intent#ACTION_MAIN} that indicates this activity is the main entry point
+    This next snippet declares the settings activity for the IME. It has an
+intent filter for
+    {@link android.content.Intent#ACTION_MAIN} that indicates this activity is
+the main entry point
     for the IME application:</p>
 <pre>
     &lt;!-- Optional: an activity for controlling the IME settings --&gt;
@@ -115,17 +127,22 @@
 </p>
 <h2 id="IMEAPI">The Input Method API</h2>
 <p>
-    Classes specific to IMEs are found in the {@link android.inputmethodservice} and {@link
-    android.view.inputmethod} packages. The {@link android.view.KeyEvent} class is important for
-    handling keyboard characters.
+    Classes specific to IMEs are found in the {@link android.inputmethodservice} and {@link android.view.inputmethod}
+    packages. The {@link android.view.KeyEvent} class is important for handling keyboard
+    characters.
 </p>
 <p>
     The central part of an IME is a service component, a class that extends
-    {@link android.inputmethodservice.InputMethodService}. In addition to implementing the
-    normal service lifecycle, this class has callbacks for providing your IME's UI, handling user
-    input, and delivering text to the field that currently has focus. By default, the
-    {@link android.inputmethodservice.InputMethodService} class provides most of the implementation
-    for managing the state and visibility of the IME and communicating with the current
+    {@link android.inputmethodservice.InputMethodService}. In addition to
+implementing the
+    normal service lifecycle, this class has callbacks for providing your IME's
+UI, handling user
+    input, and delivering text to the field that currently has focus. By
+default, the
+    {@link android.inputmethodservice.InputMethodService} class provides most
+of the implementation
+    for managing the state and visibility of the IME and communicating with the
+current
     input field.
 </p>
 <p>
@@ -135,62 +152,84 @@
     <dt>{@link android.view.inputmethod.BaseInputConnection}</dt>
     <dd>
         Defines the communication channel from an {@link android.view.inputmethod.InputMethod}
-        back to the application that is receiving its input. You use it to read text around the
-        cursor, commit text to the text box, and send raw key events to the application.
-        Applications should extend this class rather than implementing the base interface
+        back to the application that is receiving its input. You use it to read
+text around the
+        cursor, commit text to the text box, and send raw key events to the
+application.
+        Applications should extend this class rather than implementing the base
+interface
         {@link android.view.inputmethod.InputConnection}.
     </dd>
     <dt>{@link android.inputmethodservice.KeyboardView}</dt>
     <dd>
-        An extension of {@link android.view.View} that renders a keyboard and responds to user
+        An extension of {@link android.view.View} that renders a keyboard and
+responds to user
         input events. The keyboard layout is specified by an instance of
-        {@link android.inputmethodservice.Keyboard}, which you can define in an XML file.
+        {@link android.inputmethodservice.Keyboard}, which you can define in an
+XML file.
     </dd>
 </dl>
 <h2 id="IMEUI">Designing the Input Method UI</h2>
 <p>
-    There are two main visual elements for an IME: the <strong>input</strong> view and the
-    <strong>candidates</strong> view. You only have to implement the elements that are relevant to
+    There are two main visual elements for an IME: the <strong>input</strong>
+view and the
+    <strong>candidates</strong> view. You only have to implement the elements
+that are relevant to
     the input method you're designing.
 </p>
 <h3 id="InputView">Input view</h3>
 <p>
-    The input view is the UI where the user inputs text, in the form of keyclicks, handwriting or
-    gestures. When the iIME is displayed for the first time, the system calls the
-    {@link android.inputmethodservice.InputMethodService#onCreateInputView()} callback. In your
-    implementation of this method, you create the layout you want to display in the IME
-    window and return the layout to the system. This snippet is an example of implementing the
-    {@link android.inputmethodservice.InputMethodService#onCreateInputView()} method:
+    The input view is the UI where the user inputs text in the form of
+keyclicks, handwriting or
+    gestures. When the IME is displayed for the first time, the system calls
+the
+    {@link android.inputmethodservice.InputMethodService#onCreateInputView()}
+callback. In your
+    implementation of this method, you create the layout you want to display in
+the IME
+    window and return the layout to the system. This snippet is an example of
+implementing the
+    {@link android.inputmethodservice.InputMethodService#onCreateInputView()}
+method:
 <pre>
     &#64;Override
     public View onCreateInputView() {
         MyKeyboardView inputView =
             (MyKeyboardView) getLayoutInflater().inflate( R.layout.input, null);
 
-        inputView.setOnKeyboardActionListener(this); inputView.setKeyboard(mLatinKeyboard);
+        inputView.setOnKeyboardActionListener(this);
+inputView.setKeyboard(mLatinKeyboard);
 
         return mInputView;
     }
 </pre>
 <p>
-    In this example, {@code MyKeyboardView} is an instance of a custom implementation of
+    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  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.
+    {@link android.inputmethodservice.Keyboard}. If you’re building a
+traditional QWERTY keyboard,
+    see the <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/>
+    SoftKeyboard</a> sample app for an example of how to extend the {@link android.inputmethodservice.KeyboardView}
+    class.
 </p>
 <h3 id="CandidateView">Candidates view</h3>
 <p>
-    The candidates view is the UI where the IME displays potential word corrections or
+    The candidates view is the UI where the IME displays potential word
+corrections or
     suggestions for the user to select. In the IME lifecycle, the system calls
-    {@link android.inputmethodservice.InputMethodService#onCreateCandidatesView()} when it's ready
-    to display the candidate view. In your implementation of this method, return a layout that shows
-    word suggestions, or return null if you don’t want to show anything (a null response is the
-    default behavior, so you don’t have to implement this if you don’t provide suggestions).</p>
+    {@link android.inputmethodservice.InputMethodService#onCreateCandidatesView()} when
+it's ready
+    to display the candidates view. In your implementation of this method,
+return a layout that shows
+    word suggestions, or return null if you don’t want to show anything. A
+null response is the
+    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
-    Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample
-    app</a>.
+    <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a> sample app.
 </p>
 <h3 id="DesignConsiderations">UI design considerations</h3>
 <p>
@@ -198,42 +237,54 @@
 </p>
 <h4>Handling multiple screen sizes</h4>
 <p>
-    The UI for your IME must be able to scale for different screen sizes, and it also
-    must handle both landscape and portrait orientations. In non-fullscreen IME mode, leave
-    sufficient space for the application to show the text field and any associated context, so that
-    no more than half the screen is occupied by the IME. In fullscreen IME mode this is not an
+    The UI for your IME must be able to scale for different screen sizes, and
+it also
+    must handle both landscape and portrait orientations. In non-fullscreen IME
+mode, leave
+    sufficient space for the application to show the text field and any
+associated context, so that
+    no more than half the screen is occupied by the IME. In fullscreen IME mode
+this is not an
     issue.
 </p>
 <h4>Handling different input types</h4>
 <p>
-    Android text fields allow you to set a specific input type, such as free form text, numbers,
-    URLs, email addresses, and search strings. When you implement a new IME, you need to
-    detect the input type of each field and provide the appropriate interface for it. However, you
-    don't have to set up your IME to check that the user entered text that's valid for the
-    input type; that's the responsibility of the application that owns the text field.
+    Android text fields allow you to set a specific input type, such as free
+form text, numbers,
+    URLs, email addresses, and search strings. When you implement a new IME,
+you need to
+    detect the input type of each field and provide the appropriate interface
+for it. However, you
+    don't have to set up your IME to check that the user entered text
+valid for the
+    input type; that's the responsibility of the application that owns the text
+field.
 </p>
 <p>
-    For example, here are screenshots of the interfaces that the Latin IME provided with the
+    For example, here are screenshots of the interfaces that the Latin IME
+provided with the
     Android platform provides for text and phone number inputs:
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_text_type_screenshot.png" alt=""
-    height="142" id="figure2" />
-<img src="{@docRoot}resources/articles/images/inputmethod_numeric_type_screenshot.png" alt=""
-    height="120" id="figure2a" />
+<img src="{@docRoot}resources/articles/images/inputmethod_text_type_screenshot.png" alt="" height="142" id="figure2" />
+<img src="{@docRoot}resources/articles/images/inputmethod_numeric_type_screenshot.png" alt="" height="120" id="figure2a" />
 <p class="img-caption">
     <strong>Figure 2.</strong> Latin IME input types.
 </p>
 <p>
     When an input field receives focus and your IME starts, the system calls
-    {@link android.inputmethodservice.InputMethodService#onStartInputView(EditorInfo, boolean)
-    onStartInputView()}, passing in an {@link android.view.inputmethod.EditorInfo} object that
-    contains details about the input type and other attributes of the text field. In this object,
-    the {@link android.view.inputmethod.EditorInfo#inputType} field contains the text field's input
+    {@link android.inputmethodservice.InputMethodService#onStartInputView(EditorInfo, boolean) onStartInputView()},
+    passing in an {@link android.view.inputmethod.EditorInfo} object that
+    contains details about the input type and other attributes of the text
+field. In this object,
+    the {@link android.view.inputmethod.EditorInfo#inputType} field contains
+the text field's input
     type.
 </p>
 <p>
-    The {@link android.view.inputmethod.EditorInfo#inputType} field is an <code>int</code>
-    that contains bit patterns for various input type settings. To test it for the text field's
+    The {@link android.view.inputmethod.EditorInfo#inputType} field is an
+<code>int</code>
+    that contains bit patterns for various input type settings. To test it for
+the text field's
     input type, mask it with the constant {@link android.text.InputType#TYPE_MASK_CLASS}, like
     this:
 </p>
@@ -246,7 +297,8 @@
 <dl>
     <dt>{@link android.text.InputType#TYPE_CLASS_NUMBER}</dt>
     <dd>
-        A text field for entering numbers. As illustrated in the previous screen shot, the
+        A text field for entering numbers. As illustrated in the previous
+screen shot, the
         Latin IME displays a number pad for fields of this type.
     </dd>
     <dt>{@link android.text.InputType#TYPE_CLASS_DATETIME}</dt>
@@ -263,91 +315,103 @@
     </dd>
 </dl>
 <p>
-    These constants are described in more detail in the reference documentation for
+    These constants are described in more detail in the reference documentation
+for
     {@link android.text.InputType}.
 </p>
 <p>
-    The {@link android.view.inputmethod.EditorInfo#inputType} field can contain other bits that
+    The {@link android.view.inputmethod.EditorInfo#inputType} field can contain
+other bits that
     indicate a variant of the text field type, such as:
 </p>
 <dl>
     <dt>{@link android.text.InputType#TYPE_TEXT_VARIATION_PASSWORD}</dt>
     <dd>
-        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering passwords. The
+        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for
+entering passwords. The
         input method will display dingbats instead of the actual text.
     </dd>
     <dt>{@link android.text.InputType#TYPE_TEXT_VARIATION_URI}</dt>
     <dd>
-        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering web URLs and
+        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for
+entering web URLs and
         other Uniform Resource Identifiers (URIs).
     </dd>
     <dt>{@link android.text.InputType#TYPE_TEXT_FLAG_AUTO_COMPLETE}</dt>
     <dd>
-        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for entering text that the
-        application "auto-completes" from a dictionary, search, or other facility.
+        A variant of {@link android.text.InputType#TYPE_CLASS_TEXT} for
+entering text that the
+        application "auto-completes" from a dictionary, search, or other
+facility.
     </dd>
 </dl>
 <p>
-    Remember to mask {@link android.view.inputmethod.EditorInfo#inputType} with the appropriate
-    constant when you test for these variants. The available mask constants are listed in the
+    Remember to mask {@link android.view.inputmethod.EditorInfo#inputType} with
+the appropriate
+    constant when you test for these variants. The available mask constants are
+listed in the
     reference documentation for {@link android.text.InputType}.
 </p>
 <p class="caution">
-    <strong>Caution:</strong> In your own IME, make sure you handle text correctly when you send it
-    to a password field. Hide the password in your UI both in the input view and in the candidates
-    view. Also remember that you shouldn't store passwords on a device. To learn more, see the <a
-        href="{@docRoot}guide/practices/security.html">Designing for Security</a> guide.
+    <strong>Caution:</strong> In your own IME, make sure you handle text
+correctly when you send it
+    to a password field. Hide the password in your UI both in the input view
+and in the candidates
+    view. Also remember that you shouldn't store passwords on a device. To
+learn more, see the <a href="{@docRoot}guide/practices/security.html">Designing for Security</a>
+ guide.
 </p>
 <h2 id="SendText">Sending Text to the Application</h2>
 <p>
-    As the user inputs text with your IME, you can send text to the application by
-    sending individual key events or by editing the text around the cursor in the application's text
+    As the user inputs text with your IME, you can send text to the application
+by
+    sending individual key events or by editing the text around the cursor in
+the application's text
     field. In either case, you use an instance of {@link android.view.inputmethod.InputConnection}
     to deliver the text. To get this instance, call
-    {@link android.inputmethodservice.InputMethodService#getCurrentInputConnection
-    InputMethodService.getCurrentInputConnection()}.
+    {@link android.inputmethodservice.InputMethodService#getCurrentInputConnection InputMethodService.getCurrentInputConnection()}.
 </p>
 <h3 id="EditingCursor">Editing the text around the cursor</h3>
 <p>
-    When you're handling the editing of existing text in a text field, some of the more useful
+    When you're handling the editing of existing text in a text field, some of
+the more useful
     methods in {@link android.view.inputmethod.BaseInputConnection} are:
 </p>
 <dl>
     <dt>
-        {@link android.view.inputmethod.BaseInputConnection#getTextBeforeCursor(int, int)
-        getTextBeforeCursor()}</dt>
+        {@link android.view.inputmethod.BaseInputConnection#getTextBeforeCursor(int, int) getTextBeforeCursor()}</dt>
     <dd>
-        Returns a {@link java.lang.CharSequence} containing the number of requested characters
+        Returns a {@link java.lang.CharSequence} containing the number of
+requested characters
         before the current cursor position.
     </dd>
     <dt>
-        {@link android.view.inputmethod.BaseInputConnection#getTextAfterCursor(int, int)
-        getTextAfterCursor()}
+        {@link android.view.inputmethod.BaseInputConnection#getTextAfterCursor(int, int) getTextAfterCursor()}
     </dt>
     <dd>
-        Returns a {@link java.lang.CharSequence} containing the number of requested characters
-        following the current cursor position.
+        Returns a {@link java.lang.CharSequence} containing the number of
+requested characters following the current cursor position.
     </dd>
     <dt>
-        {@link android.view.inputmethod.BaseInputConnection#deleteSurroundingText(int, int)
-        deleteSurroundingText()}
+        {@link android.view.inputmethod.BaseInputConnection#deleteSurroundingText(int, int) deleteSurroundingText()}
     </dt>
     <dd>
-        Deletes the specified number of characters before and following the current cursor
+        Deletes the specified number of characters before and following the
+current cursor
         position.
     </dd>
     <dt>
-        {@link android.view.inputmethod.BaseInputConnection#commitText(CharSequence, int)
-        commitText()}
+        {@link android.view.inputmethod.BaseInputConnection#commitText(CharSequence, int) commitText()}
     </dt>
     <dd>
-        Commit a {@link java.lang.CharSequence} to the text field and set a new cursor
+        Commit a {@link java.lang.CharSequence} to the text field and set a new
+cursor
         position.
     </dd>
 </dl>
 <p>
-    For example, the following snippet shows how to replace the text "Fell" to the left of the
-    with the text "Hello!":
+    For example, the following snippet shows how to replace the four characters to
+the left of the cursor with the text "Hello!":
 </p>
 <pre>
     InputConnection ic = getCurrentInputConnection();
@@ -360,10 +424,14 @@
 </pre>
 <h3 id="ComposeThenCommit">Composing text before committing</h3>
 <p>
-    If your IME does text prediction or requires multiple steps to compose a glyph or
-    word, you can show the progress in the text field until the user commits the word, and then you
-    can replace the partial composition with the completed text. You may give special treatment to
-    the text by adding a "span" to it when you pass it to InputConnection#setComposingText().
+    If your IME does text prediction or requires multiple steps to compose a
+glyph or
+    word, you can show the progress in the text field until the user commits
+the word, and then you
+    can replace the partial composition with the completed text. You may give
+special treatment to
+    the text by adding a "span" to it when you pass it to
+{@link android.view.inputmethod.InputConnection#setComposingText setComposingText()}.
 </p>
 <p>
     The following snippet shows how to show progress in a text field:
@@ -383,59 +451,77 @@
 <p>
     The following screenshots show how this appears to the user:
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_1.png" alt="" height="54"
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_1.png"
+alt="" height="54"
     id="figure3a" />
-<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_2.png" alt="" height="53"
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_2.png"
+alt="" height="53"
     id="figure3b" />
-<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_3.png" alt="" height="31"
+<img src="{@docRoot}resources/articles/images/inputmethod_composing_text_3.png"
+alt="" height="31"
     id="figure3c" />
 <p class="img-caption">
     <strong>Figure 3.</strong> Composing text before committing.
 </p>
 <h3 id="HardwareKeyEvents">Intercepting hardware key events</h3>
 <p>
-    Even though the input method window doesn't have explicit focus, it receives hardware key
-    events first and can choose to consume them or forward them along to the application. For
-    example, you may want to consume the directional keys to navigate within your UI for candidate
-    selection during composition. You may also want to trap the back key to dismiss any popups
+    Even though the input method window doesn't have explicit focus, it
+receives hardware key
+    events first and can choose to consume them or forward them along to the
+application. For
+    example, you may want to consume the directional keys to navigate within
+your UI for candidate
+    selection during composition. You may also want to trap the back key to
+dismiss any popups
     originating from the input method window.</p>
 <p>
     To intercept hardware keys, override
     {@link android.inputmethodservice.InputMethodService#onKeyDown(int, KeyEvent) onKeyDown()}
     and {@link android.inputmethodservice.InputMethodService#onKeyUp(int, KeyEvent) onKeyUp()}.
-    See the Soft Keyboard <a href="{@docRoot}tools/samples/index.html">sample
-    app</a> for an example.
+    See the
+    <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a> sample app for an example.
 </p>
 <p>
-    Remember to call the <code>super()</code> method for keys you don't want to handle yourself.
+    Remember to call the <code>super()</code> method for keys you don't want to
+handle yourself.
 </p>
 <h2 id="IMESubTypes">Creating an IME Subtype</h2>
 <p>
-    Subtypes allow the IME to expose multiple input modes and languages supported by an IME. A
-    subtype can represent:
+    Subtypes allow the IME to expose multiple input modes and languages
+supported by an IME. A subtype can represent:
 </p>
 <ul>
     <li>A locale such as en_US or fr_FR</li>
     <li>An input mode such as voice, keyboard, or handwriting</li>
     <li>
-        Other input styles, forms, or properties specific to the IME, such as 10-key or qwerty
+        Other input styles, forms, or properties specific to the IME, such as
+10-key or qwerty
         keyboard layouts.
     </li>
 </ul>
 <p>
-    Basically, the mode can be any text such as "keyboard", "voice", and so forth.
+    Basically, the mode can be any text such as "keyboard", "voice", and so
+forth. A subtype can also expose a combination of these.
 </p>
-<p>A subtype can also expose a combination of these.</p>
+
 <p>
-    Subtype information is used for an IME switcher dialog that's available from the notification
-    bar and also for IME settings. The information also allows the framework to bring up a
-    specific subtype of an IME directly. When you build an IME, use the subtype facility, because
-    it helps the user identify and switch between different IME languages and modes.
+    Subtype information is used for an IME switcher dialog that's available
+from the notification
+    bar and also for IME settings. The information also allows the framework to
+bring up a
+    specific subtype of an IME directly. When you build an IME, use the subtype
+facility, because
+    it helps the user identify and switch between different IME languages and
+modes.
 </p>
 <p>
-    You define subtypes in one of the input method's XML resource files, using the
-    <code>&lt;subtype&gt;</code> element. The following snippet defines an IME with two
-    subtypes: a keyboard subtype for the US English locale, and another keyboard subtype for the
+    You define subtypes in one of the input method's XML resource files, using
+the
+    <code>&lt;subtype&gt;</code> element. The following snippet defines an IME
+with two
+    subtypes: a keyboard subtype for the US English locale, and another
+keyboard subtype for the
     French language locale for France:
 </p>
 <pre>
@@ -460,8 +546,10 @@
 /&gt;
 </pre>
 <p>
-    To ensure that your subtypes are labeled correctly in the UI, use %s to get a subtype label
-    that is the same as the subtype’s locale label. This is demonstrated in the next two snippets.
+    To ensure that your subtypes are labeled correctly in the UI, use %s to get
+a subtype label
+    that is the same as the subtype’s locale label. This is demonstrated in
+the next two snippets.
     The first snippet shows part of the input method's XML file:
 </p>
 <pre>
@@ -472,47 +560,99 @@
         android:imeSubtypeMode="keyboard" /&gt;
 </pre>
 <p>
-    The next snippet is part of the IME's <code>strings.xml</code> file. The string
-    resource <code>label_subtype_generic</code>, which is used by the input method UI definition to
+    The next snippet is part of the IME's <code>strings.xml</code> file. The
+string
+    resource <code>label_subtype_generic</code>, which is used by the input
+method UI definition to
     set the subtype's label, is defined as:
 </p>
 <pre>
 &lt;string name="label_subtype_generic"&gt;%s&lt;/string&gt;
 </pre>
 <p>
-    This sets the subtype’s display name to “English (United States)” in any English language
-    locale, or to the appropriate localization in other locales.
+    This setting causes the subtype’s display name to match the locale setting.
+    For example, in any English locale, the display name is “English (United States)”.
 </p>
 <h3 id="SubtypeProcessing">Choosing IME subtypes from the notification bar</h3>
 <p>
-    The Android system manages all subtypes exposed by all IMEs. IME subtypes are
-    treated as modes of the IME they belong to. In the notification bar, a user can select an
-    available subtype for the currently-set IME, as shown in the following screenshot:
+    The Android system manages all subtypes exposed by all IMEs. IME subtypes
+are
+    treated as modes of the IME they belong to. In the notification bar, a user
+can select an
+    available subtype for the currently-set IME, as shown in the following
+screenshot:
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_subtype_notification.png" alt=""
+<img
+src="{@docRoot}resources/articles/images/inputmethod_subtype_notification.png"
+alt=""
     height="85" id="figure4" />
 <p class="img-caption">
-    <strong>Figure 4.</strong> Choosing an IME subtype from the notification bar.
+    <strong>Figure 4.</strong> Choosing an IME subtype from the notification
+bar.
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_subtype_preferences.png" alt=""
+<img
+src="{@docRoot}resources/articles/images/inputmethod_subtype_preferences.png"
+alt=""
     height="165" id="figure5" />
 <p class="img-caption">
     <strong>Figure 5.</strong> Setting subtype preferences in System Settings.
 </p>
 <h3 id="SubtypeSettings">Choosing IME subtypes from System Settings</h3>
 <p>
-    A user can control how subtypes are used in the “Language &amp; input” settings panel in the
-    System Settings area. In the Soft Keyboard sample, the file
-    <code>InputMethodSettingsFragment.java</code> contains an implementation that
-    facilitates a subtype enabler in the IME settings. Please refer to the SoftKeyboard sample in
-    the Android SDK for more information about how to support Input Method Subtypes in your IME.
+    A user can control how subtypes are used in the “Language &amp; input”
+settings panel in the
+    System Settings area. In the <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a> sample app, the file <code>InputMethodSettingsFragment.java</code> contains an
+    implementation that facilitates a subtype enabler in the IME settings. Refer to the
+    <a href="https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/">
+    SoftKeyboard</a> sample app in the Android SDK for more information about how to support
+    Input Method Subtypes in your IME.
 </p>
-<img src="{@docRoot}resources/articles/images/inputmethod_subtype_settings.png" alt=""
+<img src="{@docRoot}resources/articles/images/inputmethod_subtype_settings.png"
+alt=""
     height="210" id="figure6" />
 <p class="img-caption">
     <strong>Figure 6.</strong> Choosing a language for the IME.
 </p>
 
+<h2 id="Switching">Switching among IME Subtypes</h2>
+
+<p>You can allow users to switch easily among multiple IME subtypes by providing
+a switching key, such as the globe-shaped language icon, as part of the keyboard. Doing so greatly
+improves the keyboard's usability, and can help avoid user frustration.
+To enable such switching, perform the following steps:</p>
+<p>
+<ol>
+    <li>Declare <code>supportsSwitchingToNextInputMethod = "true"</code> in the
+input method's XML resource files. Your declaration
+    should look similar to the following snippet:
+    <pre>
+&lt;input-method xmlns:android="http://schemas.android.com/apk/res/android"
+        android:settingsActivity="com.example.softkeyboard.Settings"
+        android:icon="&#64;drawable/ime_icon"
+        android:supportsSwitchingToNextInputMethod="true"&gt;
+</pre></li>
+    <li>Call the {@link android.view.inputmethod.InputMethodManager#shouldOfferSwitchingToNextInputMethod shouldOfferSwitchingToNextInputMethod()} method.</li>
+    <li>If the method returns true, display a switching key.</li>
+    <li>When the user taps the switching key, call
+    {@link android.view.inputmethod.InputMethodManager#switchToNextInputMethod switchToNextInputMethod()},
+    passing false to the second parameter. A value of false tells the system to treat all subtypes
+    equally, regardless of what IME they belong to. Specifying true requires the system to cycle
+    through subtypes in the current IME.</li>
+</ol>
+</p>
+
+<p class="caution">
+    <strong>Caution:</strong> Prior to Android 5.0 (API level 21),
+{@link android.view.inputmethod.InputMethodManager#switchToNextInputMethod switchToNextInputMethod()}
+is not aware of the <code>supportsSwitchingToNextInputMethod</code> attribute. If the user switches
+into an IME without a switching key, he or she may get stuck in that IME, unable to switch out of it
+easily.</p>
+
+<p>
+
+</p>
+
 <h2 id="GeneralDesign">General IME Considerations</h2>
 <p>
     Here are some other things to consider as you're implementing your IME:
@@ -522,23 +662,31 @@
     Provide a way for users to set options directly from the IME's UI.
 </li>
 <li>
-    Because multiple IMEs may be installed on the device, provide a way for the user to switch to a
+    Because multiple IMEs may be installed on the device, provide a way for the
+user to switch to a
     different IME directly from the input method UI.
 </li>
 <li>
-    Bring up the IME's UI quickly. Preload or load on demand any large resources so that users
-    see the IME as soon as they tap on a text field. Cache resources and views for subsequent
+    Bring up the IME's UI quickly. Preload or load on demand any large
+resources so that users
+    see the IME as soon as they tap on a text field. Cache resources and views
+for subsequent
     invocations of the input method.
 </li>
 <li>
-    Conversely, you should release large memory allocations soon after the input method window is
-    hidden, so that applications can have sufficient memory to run. Consider using a delayed message
+    Conversely, you should release large memory allocations soon after the
+input method window is
+    hidden, so that applications can have sufficient memory to run. Consider
+using a delayed message
     to release resources if the IME is in a hidden state for a few seconds.
 </li>
 <li>
-    Make sure that users can enter as many characters as possible for the language or locale
-    associated with the IME. Remember that users may use punctuation in passwords or user
-    names, so your IME has to provide many different characters to allow users to enter a
+    Make sure that users can enter as many characters as possible for the
+language or locale
+    associated with the IME. Remember that users may use punctuation in
+passwords or user
+    names, so your IME has to provide many different characters to allow users
+to enter a
     password and get access to the device.
 </li>
-</ul>
+</ul>
\ No newline at end of file
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index 59c2269..e47c77e 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -5,12 +5,7 @@
 <div id="qv">
 <h2>In this document</h2>
 <ol>
-  <li><a href="#NotificationUI">Notification Display Elements</a>
-    <ol>
-      <li><a href="#NormalNotify">Normal view</a></li>
-      <li><a href="#BigNotify">Big view</a></li>
-    </ol>
-  </li>
+  <li><a href="#Design">Design Considerations</a></li>
   <li><a href="#CreateNotification">Creating a Notification</a>
     <ol>
       <li><a href="#Required">Required notification contents</a></li>
@@ -18,7 +13,7 @@
       <li><a href="#Actions">Notification actions</a></li>
       <li><a href="#Priority">Notification priority</a></li>
       <li><a href="#SimpleNotification">Creating a simple notification</a></li>
-      <li><a href="#ApplyStyle">Applying a big view style to a notification</a></li>
+      <li><a href="#ApplyStyle">Applying an expanded layout to a notification</a></li>
       <li><a href="#Compatibility">Handling compatibility</a></li>
     </ol>
   </li>
@@ -40,6 +35,13 @@
       <li><a href="#ActivityIndicator">Displaying a continuing activity indicator</a></li>
     </ol>
   </li>
+  <li><a href="#metadata">Notification Metadata</a></li>
+  <li><a href="#Heads-up">Heads-up Notifications</a></li>
+  <li><a href="#lockscreenNotification">Lock Screen Notifications</a></li>
+    <ol>
+      <li><a href="#visibility">Setting Visibility</a></li>
+      <li><a href="#controllingMedia">Controlling Media Playback on the Lock Screen</a></li>
+    </ol>
   <li><a href="#CustomNotification">Custom Notification Layouts</a></li>
 </ol>
 
@@ -72,167 +74,41 @@
 </p>
 <img
     id="figure1"
-    src="{@docRoot}images/ui/notifications/iconic_notification.png"
-    height="120" alt="" />
+    src="{@docRoot}images/ui/notifications/notification_area.png"
+    height="" alt="" />
 <p class="img-caption">
     <strong>Figure 1.</strong> Notifications in the notification area.
 </p>
-<img id="figure2" src="{@docRoot}images/ui/notifications/normal_notification.png"
-     height="293" alt="" />
+<img id="figure2" src="{@docRoot}images/ui/notifications/notification_drawer.png"
+     width="280px" alt="" />
 <p class="img-caption">
     <strong>Figure 2.</strong> Notifications in the notification drawer.
 </p>
-<div class="note design">
-    <p>
-        <strong>Notification Design</strong>
-    </p>
-    <p>
-        Notifications, as an important part of the Android UI, have their own design guidelines. To
-        learn how to design notifications and their interactions, read the Android Design Guide
-        <a href="{@docRoot}design/patterns/notifications.html">Notifications</a> topic.
-    </p>
-</div>
-<p class="note">
-    <strong>Note:</strong> Except where noted, this guide refers to the
-    {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder} class
-    in the version 4 <a href="{@docRoot}tools/support-library/index.html">Support Library</a>.
-    The class {@link android.app.Notification.Builder Notification.Builder} was added in Android
-    3.0.
-</p>
-<!-- ------------------------------------------------------------------------------------------ -->
-<!-- ------------------------------------------------------------------------------------------ -->
-<h2 id="NotificationUI">Notification Display Elements</h2>
-<p>
-    Notifications in the notification drawer can appear in one of two visual styles, depending on
-    the version and the state of the drawer:
-</p>
-<dl>
-    <dt>
-        Normal view
-    </dt>
-    <dd>
-        The standard view of the notifications in the notification drawer.
-    </dd>
-    <dt>
-        Big view
-    </dt>
-    <dd>
-        A large view that's visible when the notification is expanded. Big view is part of the
-        expanded notification feature available as of Android 4.1.
-    </dd>
-</dl>
-<p>
-    These styles are described in the following sections.
-</p>
-<!-- ------------------------------------------------------------------------------------------ -->
-<h3 id="NormalNotify">Normal view</h3>
-<p>
-    A notification in normal view appears in an area that's up to 64 dp tall. Even if you create a
-    notification with a big view style, it will appear in normal view until it's expanded. This
-    is an example of a normal view:
-</p>
-<img
-    src="{@docRoot}images/ui/notifications/normal_notification_callouts.png"
-    alt=""
-    height="153"
-    id="figure3" />
-<p class="img-caption">
-  <strong>Figure 3.</strong> Notification in normal view.
-</p>
-<p>
-    The callouts in the illustration refer to the following:
-</p>
-<ol>
-    <li>Content title</li>
-    <li>Large icon</li>
-    <li>Content text</li>
-    <li>Content info</li>
-    <li>Small icon</li>
-    <li>
-        Time that the notification was issued. You can set an explicit value with
-        {@link android.support.v4.app.NotificationCompat.Builder#setWhen setWhen()}; if you don't
-        it defaults to the time that the system received the notification.
-    </li>
-</ol>
-<!-- ------------------------------------------------------------------------------------------ -->
-<h3 id="BigNotify">Big view</h3>
-<p>
-    A notification's big view appears only when the notification is expanded, which happens when the
-    notification is at the top of the notification drawer, or when the user expands the
-    notification with a gesture. Expanded notifications are available starting with Android 4.1.
-</p>
-<p>
-    The following screenshot shows an inbox-style notification:
-</p>
-<img src="{@docRoot}images/ui/notifications/bigpicture_notification_callouts.png"
-    alt=""
-    height="240"
-    id="figure4" />
-<p class="img-caption">
-  <strong>Figure 4.</strong> Big view notification.
-</p>
-<p>
-    Notice that the big view shares most of its visual elements with the normal view. The
-    only difference is callout number 7, the details area. Each big view style sets this area in
-    a different way. The available styles are:
-</p>
-<dl>
-    <dt>
-        Big picture style
-    </dt>
-    <dd>
-        The details area contains a bitmap up to 256 dp tall in its detail section.
-    </dd>
-    <dt>
-        Big text style
-    </dt>
-    <dd>
-        Displays a large text block in the details section.
-    </dd>
-    <dt>
-        Inbox style
-    </dt>
-    <dd>
-        Displays lines of text in the details section.
-    </dd>
-</dl>
-<p>
-    All of the big view styles also have the following content options that aren't
-    available in normal view:
-</p>
-<dl>
-    <dt>
-        Big content title
-    </dt>
-    <dd>
-        Allows you to override the normal view's content title with a title that appears only in
-        the expanded view.
-    </dd>
-    <dt>
-        Summary text
-    </dt>
-    <dd>
-        Allows you to add a line of text below the details area.
-    </dd>
-</dl>
-<p>
-    Applying a big view style to a notification is described in the section
-    <a href="#ApplyStyle">Applying a big view style to a notification</a>.
-</p>
-<!-- ------------------------------------------------------------------------------------------ -->
-<!-- ------------------------------------------------------------------------------------------ -->
+
+<p class="note"><strong>Note:</strong> Except where noted, this guide refers to the
+{@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder} class
+in the version 4 <a href="{@docRoot}tools/support-library/index.html">Support Library</a>.
+The class {@link android.app.Notification.Builder Notification.Builder} was added in Android
+3.0 (API level 11).</p>
+
+<h2 id="Design">Design Considerations</h2>
+
+<p>Notifications, as an important part of the Android user interface, have their own design guidelines.
+The material design changes introduced in Android 5.0 (API level 21) are of particular
+importance, and you should review the <a href="{@docRoot}training/material/index.html">Material Design</a>
+training for more information. To learn how to design notifications and their interactions, read the
+<a href="{@docRoot}design/patterns/notifications.html">Notifications</a> design guide.</p>
+
 <h2 id="CreateNotification">Creating a Notification</h2>
-<p>
-    You specify the UI information and actions for a notification in a
-    {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder} object.
-    To create the notification itself, you call
-    {@link android.support.v4.app.NotificationCompat.Builder#build
-    NotificationCompat.Builder.build()}, which returns a {@link android.app.Notification} object
-    containing your specifications.
-    To issue the notification, you pass the {@link android.app.Notification} object to the system
-    by calling {@link android.app.NotificationManager#notify NotificationManager.notify()}.
-</p>
-<!-- ------------------------------------------------------------------------------------------ -->
+
+<p>You specify the UI information and actions for a notification in a
+{@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder} object.
+To create the notification itself, you call
+{@link android.support.v4.app.NotificationCompat.Builder#build NotificationCompat.Builder.build()},
+which returns a {@link android.app.Notification} object containing your specifications. To issue the
+notification, you pass the {@link android.app.Notification} object to the system by calling
+{@link android.app.NotificationManager#notify NotificationManager.notify()}.</p>
+
 <h3 id="Required">Required notification contents</h3>
 <p>
     A {@link android.app.Notification} object <em>must</em> contain the following:
@@ -275,7 +151,8 @@
 </p>
 <p>
     Inside a {@link android.app.Notification}, the action itself is defined by a
-    {@link android.app.PendingIntent} containing an {@link android.content.Intent} that starts
+    {@link android.app.PendingIntent} containing an
+    {@link android.content.Intent} that starts
     an {@link android.app.Activity} in your application. To associate the
     {@link android.app.PendingIntent} with a gesture, call the appropriate method of
     {@link android.support.v4.app.NotificationCompat.Builder}. For example, if you want to start
@@ -351,12 +228,12 @@
 </pre>
 <p>That's it. Your user has now been notified.</p>
 <!-- ------------------------------------------------------------------------------------------ -->
-<h3 id="ApplyStyle">Applying a big view style to a notification</h3>
+<h3 id="ApplyStyle">Applying an expanded layout to a notification</h3>
 <p>
-    To have a notification appear in a big view when it's expanded, first create a
+    To have a notification appear in an expanded view, first create a
     {@link android.support.v4.app.NotificationCompat.Builder} object with the normal view options
     you want. Next, call {@link android.support.v4.app.NotificationCompat.Builder#setStyle
-    Builder.setStyle()} with a big view style object as its argument.
+    Builder.setStyle()} with an expanded layout object as its argument.
 </p>
 <p>
     Remember that expanded notifications are not available on platforms prior to Android 4.1. To
@@ -365,7 +242,7 @@
 </p>
 <p>
     For example, the following code snippet demonstrates how to alter the notification created
-    in the previous snippet to use the Inbox big view style:
+    in the previous snippet to use the expanded layout:
 </p>
 <pre>
 NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
@@ -375,20 +252,22 @@
 NotificationCompat.InboxStyle inboxStyle =
         new NotificationCompat.InboxStyle();
 String[] events = new String[6];
-// Sets a title for the Inbox style big view
+// Sets a title for the Inbox in expanded layout
 inboxStyle.setBigContentTitle("Event tracker details:");
 ...
-// Moves events into the big view
+// Moves events into the expanded layout
 for (int i=0; i &lt; events.length; i++) {
 
     inboxStyle.addLine(events[i]);
 }
-// Moves the big view style object into the notification object.
+// Moves the expanded layout object into the notification object.
 mBuilder.setStyle(inBoxStyle);
 ...
 // Issue the notification here.
 </pre>
+
 <h3 id="Compatibility">Handling compatibility</h3>
+
 <p>
     Not all notification features are available for a particular version, even though
     the methods to set them are in the support library class
@@ -419,7 +298,8 @@
     <li>
         Ensure that all users can get to the functionality in the {@link android.app.Activity},
         by having it start when users click the notification. To do this,
-        create a {@link android.app.PendingIntent} for the {@link android.app.Activity}. Call
+        create a {@link android.app.PendingIntent}
+        for the {@link android.app.Activity}. Call
         {@link android.support.v4.app.NotificationCompat.Builder#setContentIntent
         setContentIntent()} to add the {@link android.app.PendingIntent} to the notification.
     </li>
@@ -429,6 +309,8 @@
         that starts when users click the notification.
     </li>
 </ol>
+
+
 <!-- ------------------------------------------------------------------------------------------ -->
 <!-- ------------------------------------------------------------------------------------------ -->
 <h2 id="Managing">Managing Notifications</h2>
@@ -444,7 +326,7 @@
     <a href="{@docRoot}design/patterns/notifications.html">Notifications</a> Design guide.
 </p>
 <p class="note">
-    <strong>Note:</strong> This Gmail feature requires the "inbox" big view style, which is
+    <strong>Note:</strong> This Gmail feature requires the "inbox" expanded layout, which is
     part of the expanded notification feature available starting in Android 4.1.
 </p>
 <p>
@@ -453,8 +335,8 @@
 <h3 id="Updating">Updating notifications</h3>
 <p>
     To set up a notification so it can be updated, issue it with a notification ID by
-    calling {@link android.app.NotificationManager#notify(int, Notification)
-    NotificationManager.notify(ID, notification)}. To update this notification once you've issued
+    calling {@link android.app.NotificationManager#notify(int, android.app.Notification) NotificationManager.notify()}.
+    To update this notification once you've issued
     it, update or create a {@link android.support.v4.app.NotificationCompat.Builder} object,
     build a {@link android.app.Notification} object from it, and issue the
     {@link android.app.Notification} with the same ID you used previously. If
@@ -487,17 +369,7 @@
             mNotifyBuilder.build());
 ...
 </pre>
-<p>
-    This produces a notification that looks like this:
-</p>
-<img
-    id="figure5"
-    src="{@docRoot}images/ui/notifications/updated_notification.png"
-    alt=""
-    height="118"/>
-<p class="img-caption">
-  <strong>Figure 5.</strong> Updated notification displayed in the notification drawer.
-</p>
+
 <!-- ------------------------------------------------------------------------------------------ -->
 <h3 id="Removing">Removing notifications</h3>
 <p>
@@ -899,18 +771,7 @@
 // Starts the thread by calling the run() method in its Runnable
 ).start();
 </pre>
-<p>
-    The resulting notifications are shown in figure 6. On the left side is a snapshot of the
-    notification during the operation; on the right side is a snapshot of it after the operation
-    has finished.
-</p>
-<img
-    id="figure6"
-    src="{@docRoot}images/ui/notifications/progress_bar_summary.png"
-    height="84"
-    alt="" />
-<p class="img-caption">
-<strong>Figure 6.</strong> The progress bar during and after the operation.</p>
+
 <!-- ------------------------------------------------------------------------------------------ -->
 <h3 id="ActivityIndicator">Displaying a continuing activity indicator</h3>
 <p>
@@ -946,19 +807,123 @@
 // Issues the notification
 mNotifyManager.notify(0, mBuilder.build());
 </pre>
-<p>
-    The resulting indicator is shown in figure 7:
-</p>
-<img
-    id="figure7"
-    src="{@docRoot}images/ui/notifications/activity_indicator.png"
-    height="99"
-    alt="" />
-<p class="img-caption"><strong>Figure 7.</strong> An ongoing activity indicator.</p>
 
-<!-- ------------------------------------------------------------------------------------------ -->
-<!-- ------------------------------------------------------------------------------------------ -->
-<!-- ------------------------------------------------------------------------------------------ -->
+<h2 id="metadata">Notification Metadata</h2>
+
+<p>Notifications may be sorted according to metadata that you assign with the
+following {@link android.support.v4.app.NotificationCompat.Builder} methods:</p>
+
+<ul>
+    <li>{@link android.support.v4.app.NotificationCompat.Builder#setCategory(java.lang.String) setCategory()}
+    tells the system how to handle your app notifications when the device is in Priority mode
+    (for example, if your notification represents an incoming call, instant message, or alarm).</li>
+    <li>{@link android.support.v4.app.NotificationCompat.Builder#setPriority(int) setPriority()} causes
+    notifications with the priority field set to {@code PRIORITY_MAX} or {@code PRIORITY_HIGH} to
+    appear in a small floating window if the notification also has sound or vibration.</li>
+    <li>{@link android.support.v4.app.NotificationCompat.Builder#addPerson(java.lang.String) addPerson()}
+    allows you to add a list of people to a notification. Your app can use this to signal to the
+    system that it should group together notifications from the specified people, or rank notifications
+    from these people as being more important.</li>
+</ul>
+
+<div class="figure" style="width:230px">
+  <img src="{@docRoot}images/ui/notifications/heads-up.png"
+    alt="" width="" height="" id="figure3" />
+  <p class="img-caption">
+    <strong>Figure 3.</strong> Fullscreen activity showing a heads-up notification
+  </p>
+</div>
+
+<h2 id="Heads-up">Heads-up Notifications</h2>
+
+<p>With Android 5.0 (API level 21), notifications can appear in a small floating window
+(also called a <em>heads-up notification</em>) when the device is active
+(that is, the device is unlocked and its screen is on). These notifications
+appear similar to the compact form of your notification, except that the
+heads-up notification also shows action buttons. Users can act on, or dismiss,
+a heads-up notification without leaving the current app.</p>
+
+<p>Examples of conditions that may trigger heads-up notifications include:</p>
+
+<ul>
+  <li>The user's activity is in fullscreen mode (the app uses
+{@link android.app.Notification#fullScreenIntent}), or</li>
+  <li>The notification has high priority and uses ringtones or
+    vibrations</li>
+</ul>
+
+<h2 id="lockscreenNotification">Lock Screen Notifications</h2>
+
+<p>With the release of Android 5.0 (API level 21), notifications may now appear on the lock
+screen. Your app can use this functionality to provide media playback controls and other common
+actions. Users can choose via Settings whether to display notifications on the lock screen, and
+you can designate whether a notification from your app is visible on the lock screen.</p>
+
+<h3 id="visibility">Setting Visibility</h3>
+
+<p>Your app can control the level of detail visible in notifications displayed on a secure
+lock screen. You call {@link android.support.v4.app.NotificationCompat.Builder#setVisibility(int) setVisibility()}
+and specify one of the following values:</p>
+
+<ul>
+    <li>{@link android.support.v4.app.NotificationCompat#VISIBILITY_PUBLIC} shows the notification's
+    full content.</li>
+    <li>{@link android.support.v4.app.NotificationCompat#VISIBILITY_SECRET} doesn't show any part of
+    this notification on the lock screen.</li>
+    <li>{@link android.support.v4.app.NotificationCompat#VISIBILITY_PRIVATE} shows basic information,
+    such as the notification's icon and the content title, but hides the notification's full content.</li>
+</ul>
+
+<p>When {@link android.support.v4.app.NotificationCompat#VISIBILITY_PRIVATE} is set, you can also
+provide an alternate version of the notification content which hides certain details. For example,
+an SMS app might display a notification that shows <em>You have 3 new text messages</em>, but hides the
+message contents and senders. To provide this alternative notification, first create the replacement
+notification using {@link android.support.v4.app.NotificationCompat.Builder}. When you create the
+private notification object, attach the replacement notification to it through the
+{@link android.support.v4.app.NotificationCompat.Builder#setPublicVersion(android.app.Notification) setPublicVersion()}
+method.</p>
+
+<h3 id="controllingMedia">Controlling Media Playback on the Lock Screen</h3>
+
+<p>In Android 5.0 (API level 21) the lock screen no longer displays media controls
+based on the {@link android.media.RemoteControlClient}, which is now deprecated. Instead, use the
+{@link android.app.Notification.MediaStyle} template with the
+{@link android.app.Notification.Builder#addAction(android.app.Notification.Action) addAction()}
+method, which converts actions into clickable icons.</p>
+
+<p class="note"><strong>Note:</strong> The template and the {@link android.app.Notification.Builder#addAction(android.app.Notification.Action) addAction()}
+method are not included in the support library, so these features run in Android 5.0 and higher
+only.</p>
+
+<p>To display media playback controls on the lock screen in Android 5.0, set the visibility
+to {@link android.support.v4.app.NotificationCompat#VISIBILITY_PUBLIC}, as described above. Then add
+the actions and set the {@link android.app.Notification.MediaStyle} template, as described in the
+following sample code:</p>
+
+<pre>
+Notification notification = new Notification.Builder(context)
+    // Show controls on lock screen even when user hides sensitive content.
+    .setVisibility(Notification.VISIBILITY_PUBLIC)
+    .setSmallIcon(R.drawable.ic_stat_player)
+    // Add media control buttons that invoke intents in your media service
+    .addAction(R.drawable.ic_prev, "Previous", prevPendingIntent) // #0
+    .addAction(R.drawable.ic_pause, "Pause", pausePendingIntent)  // #1
+    .addAction(R.drawable.ic_next, "Next", nextPendingIntent)     // #2
+    // Apply the media style template
+    .setStyle(new Notification.MediaStyle()
+    .setShowActionsInCompactView(1 /* #1: pause button */)
+    .setMediaSession(mMediaSession.getSessionToken())
+    .setContentTitle("Wonderful music")
+    .setContentText("My Awesome Band")
+    .setLargeIcon(albumArtBitmap)
+    .build();
+</pre>
+
+<p class="note"><strong>Note:</strong> The deprecation of {@link android.media.RemoteControlClient}
+has further implications for controlling media. See
+<a href="{@docRoot}about/versions/android-5.0.html#MediaPlaybackControl">Media Playback Control</a>
+for more information about the new APIs for managing the media session and controlling playback.</p>
+
 
 <!-- ------------------------------------------------------------------------------------------ -->
 <h2 id="CustomNotification">Custom Notification Layouts</h2>
diff --git a/docs/html/images/android-5.0/notifications/hun-example.png b/docs/html/images/android-5.0/notifications/hun-example.png
new file mode 100644
index 0000000..f07004b
--- /dev/null
+++ b/docs/html/images/android-5.0/notifications/hun-example.png
Binary files differ
diff --git a/docs/html/images/android-5.0/notifications/hun-example@2x.png b/docs/html/images/android-5.0/notifications/hun-example@2x.png
new file mode 100644
index 0000000..cc6b840
--- /dev/null
+++ b/docs/html/images/android-5.0/notifications/hun-example@2x.png
Binary files differ
diff --git a/docs/html/images/components/recents.png b/docs/html/images/components/recents.png
new file mode 100644
index 0000000..9809f04
--- /dev/null
+++ b/docs/html/images/components/recents.png
Binary files differ
diff --git a/docs/html/images/home/l-hero.png b/docs/html/images/home/l-hero.png
new file mode 100644
index 0000000..5104bca
--- /dev/null
+++ b/docs/html/images/home/l-hero.png
Binary files differ
diff --git a/docs/html/images/home/l-hero_2x.png b/docs/html/images/home/l-hero_2x.png
new file mode 100644
index 0000000..19ae6b3
--- /dev/null
+++ b/docs/html/images/home/l-hero_2x.png
Binary files differ
diff --git a/docs/html/preview/tv/images/home-recommendations.png b/docs/html/images/tv/home-recommendations.png
similarity index 100%
rename from docs/html/preview/tv/images/home-recommendations.png
rename to docs/html/images/tv/home-recommendations.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/heads-up.png b/docs/html/images/ui/notifications/heads-up.png
new file mode 100644
index 0000000..42fbbcd
--- /dev/null
+++ b/docs/html/images/ui/notifications/heads-up.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/notification_area.png b/docs/html/images/ui/notifications/notification_area.png
new file mode 100644
index 0000000..5836300
--- /dev/null
+++ b/docs/html/images/ui/notifications/notification_area.png
Binary files differ
diff --git a/docs/html/images/ui/notifications/notification_drawer.png b/docs/html/images/ui/notifications/notification_drawer.png
new file mode 100755
index 0000000..30da8fb
--- /dev/null
+++ b/docs/html/images/ui/notifications/notification_drawer.png
Binary files differ
diff --git a/docs/html/images/versions/battery_historian.png b/docs/html/images/versions/battery_historian.png
new file mode 100644
index 0000000..f1d4e40
--- /dev/null
+++ b/docs/html/images/versions/battery_historian.png
Binary files differ
diff --git a/docs/html/images/versions/battery_historian@2x.png b/docs/html/images/versions/battery_historian@2x.png
new file mode 100644
index 0000000..8c8a87f
--- /dev/null
+++ b/docs/html/images/versions/battery_historian@2x.png
Binary files differ
diff --git a/docs/html/images/versions/notification-headsup.png b/docs/html/images/versions/notification-headsup.png
new file mode 100644
index 0000000..7c374c8
--- /dev/null
+++ b/docs/html/images/versions/notification-headsup.png
Binary files differ
diff --git a/docs/html/images/versions/recents_screen.png b/docs/html/images/versions/recents_screen.png
new file mode 100644
index 0000000..a6619c5
--- /dev/null
+++ b/docs/html/images/versions/recents_screen.png
Binary files differ
diff --git a/docs/html/images/versions/rivalknights.png b/docs/html/images/versions/rivalknights.png
new file mode 100644
index 0000000..6b467ef
--- /dev/null
+++ b/docs/html/images/versions/rivalknights.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 253a7a5..2838959 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -15,20 +15,21 @@
           <div class="resource resource-card resource-card-18x6">
 
       <div class="landing-section-header">
-            <div class="col-10"><img src="{@docRoot}preview/images/l-dev-prev.png"
-            style="margin:40px 60px 0 20px"></div>
+            <div class="col-10"><img src="{@docRoot}images/home/l-hero_2x.png"
+                 srcset="{@docRoot}images/home/l-hero.png 1x, {@docRoot}images/home/l-hero_2x.png 2x"
+                 width="510" style="margin:20px 30px 0 30px"></div>
             <div class="col-5" style=" margin-top:70px ">
-            <h3 stye="font-weight:300;">L Developer Preview</h3>
-            <p>The L Developer Preview lets you design and develop against the next major
-            release of Android. Take the time to test and build your app before the platform
-            officially launches. </p>
-            <a href="{@docRoot}preview/index.html" class="landing-button landing-primary">Learn More</a>
+            <h3 stye="font-weight:300;">Android 5.0 Lollipop</h3>
+            <p>The Android 5.0 update adds a variety of new
+            features for your apps, such as notifications on the lock screen, an all-new camera API,
+            OpenGL ES 3.1, the new Material design interface, and much more.</p>
+            <a href="{@docRoot}about/versions/lollipop.html" class="landing-button landing-primary">Learn More</a>
             </div>
           </div>
           </div>
         </div>
        <h2>&nbsp;</h2>
-        <div style="margin-top:20px" class="resource-widget resource-flow-layout wrap col-16
+        <div style="margin-top:20px;height:115px" class="resource-widget resource-flow-layout wrap col-16
         no-section" data-query="collection:index/primary" data-resourcestyle="card"
         data-sortorder="-timestamp" data-maxresults="3" data-cardsizes="6x2,6x2,6x2"></div> <!-- end .resource-widget -->
       </div> <!-- end .wrap -->
@@ -53,7 +54,7 @@
   <div class="landing-section">
     <div class="wrap">
       <div class="landing-section-header">
-        
+
             <div class="landing-h1" style="margin-top:0px">Build for a Multi-Screen World</div>
         <div class="landing-subhead" style="margin-top: 20px;">
           Android runs on hundreds of millions of handheld devices around the world, <br>
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 15564e0..c49f8cc 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -3,8 +3,8 @@
     "title": "",
     "resources": [
       "training/building-wearables.html",
-      "preview/material/index.html",
-      "sdk/installing/studio.html" 
+      "training/material/index.html",
+      "sdk/installing/studio.html"
     ]
   },
   "distribute/edu/videos/stories": {
@@ -66,9 +66,9 @@
     "resources": [
       "distribute/essentials/quality/core.html",
       "distribute/essentials/quality/tablets.html",
+      "distribute/essentials/quality/tv.html",
       "https://developers.google.com/edu/guidelines",
       "distribute/essentials/optimizing-your-app.html",
-      "distribute/essentials/best-practices/apps.html",
       "distribute/essentials/best-practices/games.html"
     ]
   },
@@ -318,6 +318,20 @@
       "training/basics/activity-lifecycle/recreating.html"
     ]
   },
+  "distribute/essentials/tvqualityguidelines/visualdesign": {
+    "title": "",
+    "resources": [
+      "design/tv/index.html",
+      "training/tv/start/index.html"
+    ]
+  },
+  "distribute/essentials/tvqualityguidelines/functionality": {
+    "title": "",
+    "resources": [
+      "training/tv/start/hardware.html",
+      "training/tv/games/index.html"
+    ]
+  },
   "distribute/essentials/core/performance": {
     "title": "",
     "resources": [
@@ -705,7 +719,7 @@
       "google/play/billing/index.html",
       "https://support.google.com/googleplay/android-developer/answer/4407611"
     ]
-  },  
+  },
   "distribute/monetize/freemium": {
     "title": "",
     "resources": [
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
index c6143da..5ee6b5c 100644
--- a/docs/html/legal.jd
+++ b/docs/html/legal.jd
@@ -4,9 +4,9 @@
 @jd:body
 
 <div class="wrap" style="width:940px;">
-  
+
 <h1>Legal Notice</h1>
-  
+
 <p>Android is an open platform that's freely available to you as an app developer. You can
 immediately download the Android SDK, develop apps, and distribute them to the world without any
 registration or fees.</p>
@@ -107,7 +107,7 @@
     <p><a href="https://developers.google.com/android/c2dm/terms">Android Cloud to Device
 Messaging Terms of Service</a></p>
     </dd>
-    
+
   <dt>Android Backup Service</dt>
     <dd>Android Backup Service is integrated with Android's data backup framework to perform data
 backup and restore for most devices running Android 2.2 or greater, using Google servers and a
@@ -124,4 +124,8 @@
 
 
 
-</div>
\ No newline at end of file
+</div> <!-- end.class.wrap -->
+
+<div class="layout-content-col col-16" style="padding-top:1px">
+  <!-- layout div, so auto-gen footer sits correctly; do not remove -->
+</div>
diff --git a/docs/html/preview/images/material-layers.png b/docs/html/preview/images/material-layers.png
new file mode 100644
index 0000000..9b01ede
--- /dev/null
+++ b/docs/html/preview/images/material-layers.png
Binary files differ
diff --git a/docs/html/preview/index.html b/docs/html/preview/index.html
index ab959c7..ed78e4d1 100644
--- a/docs/html/preview/index.html
+++ b/docs/html/preview/index.html
@@ -1,88 +1,5 @@
 <!DOCTYPE html>
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 <html>
 <head>
 
@@ -127,211 +44,555 @@
 
 </head>
 
-<body class="gc-documentation
 
-" itemscope itemtype="http://schema.org/Article">
+<body class="gc-documentation" itemscope="" itemtype="http://schema.org/Article">
 
 
 <a name="top"></a>
+<a name="download"></a>
 <div id="body-content">
-<div class="fullpage" >
+<div class="fullpage">
 <div id="jd-content">
   <div class="jd-descr" itemprop="articleBody">
-    <style>
+<style>
+body,html, #qv {background-color:#e9e9e9}
+
+#qv * { font-weight:bold;}
+
 .fullpage>#footer,
 #jd-content>.content-footer.wrap {
   display:none;
 }
-</style>
 
-<style>
-#footer {
-    display: none;
-}
 .content-footer {
   display: none;
 }
 </style>
 
-
-    <div style="height:20px"><!-- spacer to bump header down --></div>
-    <div id="butterbar-wrapper">
-      <div id="butterbar">
-        <a href="http://googleblog.blogspot.com/" id="butterbar-message">
-          The Android 5.0 SDK will be available on October 17th!
+    <div style="border-bottom: 1px solid #a5c43a; position: absolute; left: 0; right: 0; top: 0; z-index:99">
+      <div class="wrap" style="position: relative; height: 45px; padding: 0 20px;">
+        <a href="/index.html" style="position:absolute;top:8px">
+          <img src="/assets/images/dac_logo.png" srcset="/assets/images/dac_logo@2x.png 2x" width="123" height="25" alt="Android Developers home page">
         </a>
       </div>
     </div>
 
 
-    <div class="landing-rest-of-page">
-      <div class="landing-section" style="padding-top:30px">
-        <div class="wrap">
-          <div class="landing-section-header">
+
+
+
+
+
+
+
+
+
+
+
+    <div class="landing-rest-of-page" style="position:relative;">
+
+
+
+
+
+
+
+
+  <div class="wrap" id="tos" style="display:none;padding-top:90px">
+
+    <p class="sdk-terms-intro">Before downloading the Android Preview system image,
+      you must agree to the following terms and conditions.</p>
+
+      <h2 class="norule">Terms and Conditions</h2>
+    <div class="sdk-terms" onfocus="this.blur()" style="width:100%">
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+
+1. Introduction
+
+1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
+
+1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting the License Agreement
+
+2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
+
+2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
+
+2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
+
+2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
+
+3. Preview License from Google
+
+3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
+
+3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
+
+3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
+
+4. Use of the Preview by You
+
+4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
+
+5. Your Developer Credentials
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+6. Privacy and Information
+
+6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
+
+7. Third Party Applications
+
+7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
+
+8. Using Google APIs
+
+8.1 Google APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+9. Terminating the License Agreement
+
+9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
+
+9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
+
+9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
+(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
+(B) Google issues a final release version of the Android SDK.
+
+9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
+
+10. DISCLAIMERS
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+11. LIMITATION OF LIABILITY
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+12. Indemnification
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
+
+13. Changes to the License Agreement
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
+
+14. General Legal Terms
+
+14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
+
+14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+    </div><!-- sdk terms -->
+
+
+
+    <div id="sdk-terms-form">
+      <p>
+        <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
+        <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
+      </p>
+      <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
+    </div>
+
+
+  </div><!-- end TOS -->
+
+
+
+
+
+
+
+      <div class="landing-section" id="landing-wrapper" style="padding:55px 10px 0">
+          <div class="landing-section-header" style="margin:0">
             <div class="landing-h1">Android L Developer Preview</div>
-            <div class="landing-subhead">
-              Get an early look at the next release and  get your apps ready when the
-              platform officially launches.
-            </div>
-
-            <img src="/preview/images/l-dev-prev.png" style=" margin:0px 0 0 40px" width="860px"/>
-            <div class="col-6" style="margin-left:660px; margin-top:-105px">
-   <a href="/preview/setup-sdk.html" class="landing-button landing-primary" style="position:absolute;z-index:100;float:right;margin-top: 0px;">Get Started</a><!--
-            <p>Set up your environment and check out all the docs to get up and running.</p>-->
-
-
+            <div class="landing-subhead" style="padding-bottom:40px">
+              Final APIs now available!
             </div>
           </div>
+        <div class="wrap" style="padding:20px; position:relative">
+
+    <img src="/images/home/l-hero_2x.png"
+          srcset="/images/home/l-hero.png 1x, /images/home/l-hero_2x.png 2x"
+          style=" margin:-5px -30px 0 0;float:right" alt="" width="510">
+
+  <a href="/about/versions/android-5.0.html" class="landing-button landing-primary"
+  style="position:absolute;z-index:100;right:215px;top:375px">Android 5.0 API Overview</a>
+
+      <div style="width:440px">
+<p>Android 5.0 (Lollipop) is almost here and users will begin receiving
+device updates in November. To help you prepare, the Android 5.0 SDK is now available
+with final APIs.</p>
+
+<p>Since the L Developer Preview began, various APIs and behaviors have changed,
+so if you've been using the Preview SDK
+you should update now to test your apps and take advantage of new features.</p>
+
+
+        <p>To get the latest Android 5.0 SDK:</p>
+        <ol>
+          <li>Start the <a href="/tools/help/sdk-manager.html">Android SDK Manager</a>.</li>
+          <li>In the <b>Tools</b> section, select the latest <b>SDK Tools</b>,
+            <b>SDK Platform-tools</b>, and <b>SDK Build-tools</b>.</li>
+            <!-- Android L not yet showing up in Android SDK Manager...  -->
+          <li>Select everything under the <b>Android 5.0</b> section, then
+            click <b>Install packages...</b></li>
+          <li>Accept the licensing agreement for the packages, then click
+            <b>Install</b>.</li>
+        <li>If you previously installed the Android L Preview SDK, select all those
+          packages in the SDK Manager and click <strong>Delete packages</strong>.
+        </ol>
+        <p>Now you're ready to develop and test on Android 5.0 with your normal workflow
+          and begin publishing app updates to Google Play.
+      </div>
+
+    <h2 id="Start" class="norule" style="margin:60px 0 0 0">Get Started on Android 5.0</h2>
         </div> <!-- end .wrap -->
+
+
+
+    <div class="wrap" style="background-color:#fff;padding:20px;position:relative">
+
+      <div id="qv-wrapper">
+      <div id="qv">
+      <h2>More about Android 5.0</h2>
+        <ul>
+          <li><a href="http://android-developers.blogspot.com/">Android 5.0 announcement</a></li>
+          <li><a href="/about/versions/android-5.0.html">Android 5.0 API Overview</a></li>
+          <li><a href="/sdk/api_diff/21/changes.html">Android 5.0 API Diff Report</a></li>
+          <li><a href="/samples/new/index.html">Android 5.0 API Samples</a></li>
+        </ul>
+      </div>
+      </div>
+
+      <p>Now that Android 5.0 APIs are final:</p>
+      <ul>
+        <li>The API level for Android 5.0 is 21, so be sure to update your
+        app's manifest file to set <a href="/guide/topics/manifest/uses-sdk-element.html#target"
+        ><code>targetSdkVersion</code></a> to
+        <code>"21"</code> when you begin testing:
+        <pre>&lt;uses-sdk android:targetSdkVersion="21" ... /></pre>
+        </li>
+        <li>Google Play now accepts APKs with <a
+          href="/guide/topics/manifest/uses-sdk-element.html#min"><code>minSdkVersion</code></a> or
+          <a href="/guide/topics/manifest/uses-sdk-element.html#target"
+                  ><code>targetSdkVersion</code></a> set
+          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
+        <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>
+
+        </div> <!-- end .wrap -->
+
+
+
+
+
+
+
+
+        <div class="wrap" style="padding:20px; position:relative">
+    <h2 id="Material" class="norule" style="margin:40px 0 0 0">Design with Material</h2>
+    </div>
+
+        <div class="wrap" style="background-color:#fff;padding:20px;position:relative">
+      <img src="images/material-layers.png" width="240"
+          style="position:absolute;right:20px;top:-50px">
+
+      <div id="qv-wrapper" style="margin-top:120px">
+      <div id="qv">
+
+      <h2>More about Material Design</h2>
+        <ul>
+          <li><a href="http://www.google.com/design/spec/material-design/introduction.html">Material
+            Design Spec</a></li>
+          <li><a href="/design/material/index.html">Android Material Design</a></li>
+          <li><a href="/training/material/index.html">Creating Apps with Material Design</a>
+        </ul>
+      </div>
+      </div>
+
+
+<p>Material design is a complete design philosophy for visual, motion, and interaction design
+across platforms and devices. The <a href=
+"http://www.google.com/design/spec/material-design/introduction.html">material design specification
+(preview)</a> provides all the details for designers.</p>
+
+
+      <p>To get started with Material design in your Android app, update
+        your <a href="/guide/topics/manifest/uses-sdk-element.html#target"
+        ><code>targetSdkVersion</code></a> to <code>"21"</code> and apply the new
+        <a href="/reference/android/R.style.html#Theme_Material"
+        ><code>Material</code></a> theme. For example, when creating
+        a <a href="/guide/topics/ui/themes.html">custom theme</a>
+        for your app, open your project's <code>res/values/styles.xml</code> file
+        and extend the <a href="/reference/android/R.style.html#Theme_Material"
+        ><code>Material</code></a> theme:</p>
+<pre>
+&lt;resources>
+    &lt;style name="AppTheme" parent="android:Theme.Material">
+        &lt;!-- Customize the Material elements here -->
+    &lt;/style>
+&lt;/resources>
+</pre>
+<p>Then apply your custom theme to your application in the manifest file:</p>
+<pre>
+&lt;application android:theme="&#64;style/AppTheme">
+</pre>
+<p>Material design is more than just the UI theme, though. It's also about the way the app
+  behaves&mdash;how elements move and transform when the user interacts with them. So Android 5.0
+  and the <a href="/tools/support-library/features.html#v7">v7 support library</a> provide new
+  widgets and animation APIs that allow you to
+  build interaction patterns described in the
+  <a href="http://www.google.com/design/spec/material-design/introduction.html">Material design
+    specification</a>.</p>
+
+<p>All the Material design elements and interaction patterns provided by the UI styles and widgets
+are flexible, so you can adopt only what's appropriate for your app and retain a unique identity
+and experience for your product.</p>
+
+<p>And Material design on Android isn't just for Android 5.0. The
+  <a href="/tools/support-library/features.html#v7">v7 support library</a> has been significantly
+  updated in revision 21 to make many of the Material design elements available when
+  running on older versions of the platform.</p>
+
+<p>For many more details about how to implement the Material look and feel,
+    see <a href="/training/material/index.html">Creating Apps with Material
+    Design</a>.</p>
+
+
+    </div>
+
+
+
+
+
+
+
+
+
+
+
+    <div class="wrap" style="padding:20px; position:relative">
+    <h2 id="TV" class="norule" style="margin:40px 0 0 0">Build for Android TV</h2>
+    </div>
+
+        <div class="wrap" style="background-color:#fff;padding:20px;position:relative">
+      <img src="/tv/images/components.png" width="240"
+          style="position:absolute;right:20px;top:-50px">
+
+    <div id="qv-wrapper" style="margin-top:120px">
+    <div id="qv">
+
+    <h2>More about Android TV</h2>
+      <ul>
+        <li><a href="/design/tv/index.html">Android TV Design</a></li>
+        <li><a href="/training/tv/start/index.html">Building Apps for Android TV</a></li>
+        <li><a href="/training/tv/games/index.html">Building TV Games</a></li>
+        <li><a href="/training/tv/playback/index.html">Building TV Playback Apps</a></li>
+        <li><a href="/distribute/essentials/quality/tv.html">TV App Quality</a></li>
+      </ul>
+    </div>
+    </div>
+
+<p>Android 5.0 provides a new platform for users to experience your app on a big screen. The
+Android TV experience is centered around a simplified home screen that allows users to discover
+your app's content with personalized recommendations and voice search, or select your app to launch
+into your fullscreen experience.</p>
+
+
+<p>Making your app available on Android TV does not require that you build an entirely new app.
+Android TV is simply another form factor for the Android platform, so you can deliver the same APK
+that you provide for phones and tablets to TVs through Google Play. However, to make your app
+available on Android TV, you'll need to make some optimizations such as adding layouts
+for the big screen and adding support for remote control input. For more information about design
+guidelines, see <a href="/distribute/essentials/quality/tv.html">TV App Quality</a>.</p>
+
+<p class="note"><strong>Note:</strong> Google Play for Android TV will officially
+open for apps on November 3.</p>
+
+<p>Android TV is also great new opportunity for Android games. If you'd like to make your games
+available on Android TV, be sure to optimize the user experience for the big screen by following
+the recommendations in <a href="/training/tv/games/index.html">Building TV Games</a>.</p>
+
+
+      <p>To get started on Android TV, you need:</p>
+      <ul>
+        <li>The Android 5.0 SDK packages from the
+          <a href="/tools/help/sdk-manager.html">Android SDK Manager</a>,
+          including the <strong>Android TV System Image</strong> so you can create an
+          Android TV emulator.</li>
+        <li>An activity that's launchable from the Android TV home screen. This requires that you
+        add the <a href="/reference/android/content/Intent.html#CATEGORY_LEANBACK_LAUNCHER"
+        ><code>LEANBACK_LAUNCHER</code></a> category to one of your activities. For example:
+<pre>
+&lt;activity ... >
+    &lt;intent-filter>
+        &lt;action android:name="android.intent.action.MAIN" />
+        &lt;category android:name="android.intent.category.LEANBACK_LAUNCHER" />
+    &lt;/intent-filter>
+&lt;/activity>
+</pre>
+        </li>
+
+        <li>For a set of default styles that optimize your UI for the TV's
+          <em>leanback user experience</em>,
+          you should also apply the <a
+          href="/reference/android/support/v17/leanback/R.style.html#Theme_Leanback"
+        ><code>Leanback</code></a> theme to your activity:
+<pre>
+&lt;activity android:theme="@style/Theme.Leanback" ... >
+</pre>
+      </li>
+
+      </ul>
+      <p>You should also take advantage of the <a
+        href="/tools/support-library/features.html#v17-leanback">v17 leanback library</a>, which
+        provides the <a href="/reference/android/support/v17/leanback/R.style.html#Theme_Leanback"
+        ><code>Leanback</code></a> theme shown above, plus several widgets designed to
+        make your UI beautiful and easy to navigate on the big screen, such as a widget that creates
+        a set of large horizontal card views.</p>
+
+      <p>For more information about setting up a project for your TV app, building
+        TV layouts, and handling controller input,
+        see <a href="/training/tv/start/index.html">Building
+        TV Apps</a>.</p>
+    </div>
+
+
+
+
+
+
+
+
       </div> <!-- end .landing-section -->
 
 
 
-<div class="landing-section landing-gray-background" style="margin-top:-135px; padding-bottom:20px">
-        <div class="wrap">
-          <div class="cols">
-<div class="landing-body" style="margin-top:-80px" >
 
-            <div class="landing-breakout cols">
-              <div class="col-4">
-                <p>A New UI Design</p>
-                <p class="landing-small">
-                  Create a consistent experience across mobile and the web with
-                   <b>material design</b>, the new Google-wide standard.
-                </p>
-                <p class="landing-small">
-                  <a href="/preview/material/index.html">Learn about material</a>
-                </p>
-              </div>
-              <div class="col-4">
-                <p>A New Runtime</p>
-                <p class="landing-small">
-                  Test your apps and get them ready for <b>ART</b> (<b>A</b>ndroid <b>R</b>un<b>t</b>ime),
-                  the default runtime in the next release.
-                </p>
-                <p class="landing-small">
-                  <a href="/preview/api-overview.html#ART">Learn about ART</a>
-                </p>
-              </div>
-              <div class="col-4">
-                <p style="width:230px">Enhanced Notifications</p>
-                <p class="landing-small">
-                   Get control over where notifications appear,
-                   how they look, and how they sync to non-handheld devices.
-                </p>
-                <p class="landing-small">
-                  <a href="/preview/api-overview.html#UI">Learn about notifications</a>
-                </p>
-              </div>
-              <div class="col-4">
-                <p>Increased Efficiency</p>
-                <p class="landing-small">
-                  <b>Project Volta</b> is our effort to make the platform energy efficient and
-                  to give you more control over resource usage.
-                </p>
-                <p class="landing-small">
-                  <a href="/preview/api-overview.html#Power">Learn about Project Volta</a>
-                </p>
-              </div>
-            </div>
-               <p style="margin-left:20px">See the <a href="/preview/api-overview.html">API overview</a> for more information
-              on the rest of the new and updated features.</p>
-          </div>
-          </div></div></div>
-    <div class="landing-section">
-        <div class="wrap">
-          <div class="cols">
-            <div class="landing-body">
-              <div class="col-3-wide">
-                  <a target="_blank" href="https://code.google.com/p/android-developer-preview/">
-                    <img class="landing-social-image" src="/preview/images/bugs.png" alt="">
-                  </a>
-                <div class="landing-social-copy">
-                  <p>Issue Tracker</p>
-                  <p class="landing-small">
-                  Let us know when you encounter problems, so we can fix them and make
-                  the platform better for you and your users.
-                    </p><p class="landing-small">
-                      <a href="https://code.google.com/p/android-developer-preview/">
-                      Report Issues</a>
-                    </p>
-                  <p></p>
-                </div>
-              </div>
-              <div class="col-3-wide">
-                <a target="_blank" href="http://g.co/androidldevpreview">
-                  <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="">
-                </a>
-                <div class="landing-social-copy">
-                  <p>Google+ </p>
-                  <p class="landing-small">
-                    Join the community of Android developers testing out the L Developer Preview and
-                    share your thoughts and experiences.
-                  </p><p class="landing-small">
-                    <a href="http://g.co/androidldevpreview">
-                    Discuss on Google+</a>
-                    </p>
-                </div>
-              </div>
-              <div class="col-3-wide">
-                <a target="_blank" href="/preview/support.html">
-                  <img class="landing-social-image" src="/preview/images/updates.png" alt="">
-                </a>
-                <div class="landing-social-copy">
-                  <p>Support and Updates</p>
-                  <p class="landing-small">
-                  Updates to the L Developer Preview are delivered
-                  in the Android SDK Manager. Check back periodically
-                  for news about the changes.
-                  </p>
-                  <p class="landing-small">
-                    <a href="/preview/support.html">Get Support</a>
-                  </p>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
 
-    <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
-      <div class="layout-content-col col-16" style="padding-top:4px">
-        <style>#___plusone_0 {float:right !important;}</style>
-        <div class="g-plusone" data-size="medium"></div>
-      </div>
+
+
+
+    <!-- spacer -->
+    <div class="wrap" style="padding:20px; position:relative">
+      <p>&nbsp;</p>
     </div>
-    <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
+
+
+
+    <div id="footer" class="wrap" style="width:940px;position:relative;">
       <div id="copyright">
         Except as noted, this content is
         licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
         Creative Commons Attribution 2.5</a>. For details and
-        restrictions, see the <a href="/license.html">Content
+        restrictions, see the <a href="https://developer.android.com/license.html">Content
         License</a>.
       </div>
     </div>
   </div> <!-- end landing-body-content -->
 
-  <script>
-  $("a.landing-down-arrow").on("click", function(e) {
-    $("body").animate({
-      scrollTop: $(".preview-hero").height() + 76
-    }, 1000, "easeOutQuint");
-    e.preventDefault();
-  });
-  </script>
     </div>
 
-      <div class="content-footer wrap"
-                    itemscope itemtype="http://schema.org/SiteNavigationElement">
+      <div class="content-footer wrap" itemscope=""
+        itemtype="http://schema.org/SiteNavigationElement">
 
         <div class="paging-links layout-content-col col-10">
 
         </div>
-        <div class="layout-content-col plus-container col-2" >
-          <style>#___plusone_0 {float:right !important;}</style>
-            <div class="g-plusone" data-size="medium"></div>
-
-        </div>
 
       </div>
 
@@ -348,7 +609,7 @@
   Except as noted, this content is
   licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
   Creative Commons Attribution 2.5</a>. For details and
-  restrictions, see the <a href="/license.html">Content
+  restrictions, see the <a href="https://developer.android.com/license.html">Content
   License</a>.
   </div>
 
@@ -359,14 +620,50 @@
 </div> <!-- end body-content -->
 
 
+<script>
+  var urlRoot = "http://storage.googleapis.com/androiddevelopers/finalpreview/";
+  function onDownload(link) {
+
+    $("#downloadForRealz").html("Download " + $(link).text());
+    $("#downloadForRealz").attr('href', urlRoot + $(link).text());
+
+    $("#tos").show();
+    $("#landing-wrapper").hide();
+
+    return true;
+  }
 
 
+  function onAgreeChecked() {
+    /* verify that the TOS is agreed */
+    if ($("input#agree").is(":checked")) {
+      /* reveal the download button */
+      $("a#downloadForRealz").removeClass('disabled');
+    } else {
+      $("a#downloadForRealz").addClass('disabled');
+    }
+  }
 
-  <script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script>
-  <script src="/jd_lists_unified.js" type="text/javascript"></script>
-  <script src="/jd_extras.js" type="text/javascript"></script>
-  <script src="/jd_collections.js" type="text/javascript"></script>
-  <script src="/jd_tag_helpers.js" type="text/javascript"></script>
+  function onDownloadForRealz(link) {
+    if ($("input#agree").is(':checked')) {
+      $("#tos").fadeOut('fast');
+      $("#landing-wrapper").fadeIn('fast');
+      ga('send', 'event', 'L Preview', 'System Image', $("#downloadForRealz").html());
+      location.hash = "";
+      // reset the checkbox for future downloads
+      $("#agree").trigger('click');
+      $("a#downloadForRealz").addClass('disabled');
+      return true;
+    } else {
+      $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
+        function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
+      );
+      return false;
+    }
+  }
+
+</script>
+
 
 </body>
-</html>
+</html>
\ No newline at end of file
diff --git a/docs/html/preview/material/animations.jd b/docs/html/preview/material/animations.jd
deleted file mode 100644
index 353f0f2..0000000
--- a/docs/html/preview/material/animations.jd
+++ /dev/null
@@ -1,441 +0,0 @@
-page.title=Animations
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#touch">Touch Feedback</a></li>
-  <li><a href="#reveal">Reveal Effect</a></li>
-  <li><a href="#transitions">Activity Transitions</a></li>
-  <li><a href="#curvedmotion">Curved Motion</a></li>
-  <li><a href="#viewstate">Animating View State Changes</a></li>
-  <li><a href="#drawabletint">Drawable Tinting</a></li>
-  <li><a href="#colorextract">Extracting Colors from an Image</a></li>
-</ol>
-</div>
-</div>
-
-<p>Animations in material design give users feedback on their actions and provide visual
-continuity as users interact with your app. The material theme provides some default animations
-for buttons and activity transitions, and the Android L Developer Preview provides additional
-APIs that let you customize these animations and create new ones:</p>
-
-<ul>
-<li>Touch feedback</li>
-<li>Reveal effect</li>
-<li>Activity transitions</li>
-<li>Curved motion</li>
-<li>View state changes</li>
-</ul>
-
-
-<h2 id="touch">Touch Feedback</h2>
-
-<p>The default touch feedback animations for buttons use the new
-<code>RippleDrawable</code> class, which transitions between different states with a ripple
-effect.</p>
-
-<p>In most cases, this functionality should be applied in your view XML by specifying the
-background as <code>?android:attr/selectableItemBackground</code> for a bounded ripple or
-<code>?android:attr/selectableItemBackgroundBorderless</code> for a ripple that extends beyond
-the view bounds. You can also create a <code>RippleDrawable</code> and set
-it as the background of your view. Alternatively, you can define a <code>RippleDrawable</code>
-as an XML resource using the <code>ripple</code> element. The
-Android L Developer Preview animates the selection color with a ripple effect.</p>
-
-<p>You can assign a color to <code>RippleDrawable</code> objects. To change the default touch
-feedback color, use the theme's <code>android:colorControlHighlight</code> attribute.</p>
-
-
-<h2 id="reveal">Reveal Effect</h2>
-
-<p>The <code>ViewAnimationUtils.createCircularReveal</code> method enables you to animate a
-clipping circle to reveal or hide a view.</p>
-
-<p>To reveal a previously invisible view using this effect:</p>
-
-<pre>
-// previously invisible view
-View myView = findViewById(R.id.my_view);
-
-// get the center for the clipping circle
-int cx = (myView.getLeft() + myView.getRight()) / 2;
-int cy = (myView.getTop() + myView.getBottom()) / 2;
-
-// get the final radius for the clipping circle
-int finalRadius = myView.getWidth();
-
-// create and start the animator for this view
-// (the start radius is zero)
-ValueAnimator anim =
-    ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
-anim.start();
-</pre>
-
-<p>To hide a previously visible view using this effect:</p>
-
-<pre>
-// previously visible view
-final View myView = findViewById(R.id.my_view);
-
-// get the center for the clipping circle
-int cx = (myView.getLeft() + myView.getRight()) / 2;
-int cy = (myView.getTop() + myView.getBottom()) / 2;
-
-// get the initial radius for the clipping circle
-int initialRadius = myView.getWidth();
-
-// create the animation (the final radius is zero)
-ValueAnimator anim =
-    ViewAnimationUtils.createCircularReveal(myView, cx, cy, initialRadius, 0);
-
-// make the view invisible when the animation is done
-anim.addListener(new AnimatorListenerAdapter() {
-    &#64;Override
-    public void onAnimationEnd(Animator animation) {
-        super.onAnimationEnd(animation);
-        myView.setVisibility(View.INVISIBLE);
-    }
-});
-
-// start the animation
-anim.start();
-</pre>
-
-
-<h2 id="transitions">Activity Transitions</h2>
-
-<p>You can specify custom animations for enter and exit transitions and for
-transitions of shared elements between activities.</p>
-
-<ul>
-<li>An <strong>enter</strong> transition determines how views in an activity enter the scene.
-For example, in the <em>explode</em> enter transition, the views enter the scene from the outside
-and fly in towards the center of the screen.</li>
-
-<li>An <strong>exit</strong> transition determines how views in an activity exit the scene. For
-  example, in the <em>explode</em> exit transition, the views exit the scene away from the
-center.</li>
-
-<li>A <strong>shared elements</strong> transition determines how views that are shared between
-two activities transition between these activities. For example, if two activities have the same
-image in different positions and sizes, the <em>moveImage</em> shared element transition
-translates and scales the image smoothly between these activities.</li>
-</ul>
-
-<p>The Android L Developer Preview supports these enter and exit transitions:</p>
-
-<ul>
-<li><em>explode</em> - Moves views in or out from the center of the scene.</li>
-<li><em>slide</em> - Moves views in or out from one of the edges of the scene.</li>
-<li><em>fade</em> - Moves views in or out of the scene.</li>
-</ul>
-
-<p>Any transition that extends the <code>android.transition.Visibility</code> class is supported
-as an enter or exit transition. For more information, see the API reference for the
-<code>android.transition.Transition</code> class.</p>
-
-<p>The Android L Developer Preview also supports these shared elements transitions:</p>
-
-<ul>
-<li><em>changeBounds</em> - Animates the changes in layout bounds of target views.</li>
-<li><em>changeClipBounds</em> - Animates the changes in clip bounds of target views.</li>
-<li><em>changeTransform</em> - Animates the changes in scale and rotation of target views.</li>
-<li><em>moveImage</em> - Animates changes in size and scale type for an image view.</li>
-</ul>
-
-<p>When you enable activity transitions in your app, the default cross-fading transition is
-activated between the entering and exiting activities.</p>
-
-<img src="/preview/material/images/SceneTransition.png" alt=""
-     id="figure1" style="width:600px;margin-top:20px"/>
-<p class="img-caption">
-  <strong>Figure 1</strong> - A scene transition with one shared element.
-</p>
-
-<h3>Specify custom transitions</h3>
-
-<p>First, enable window content transitions with the <code>android:windowContentTransitions</code>
-attribute when you define a style that inherits from the material theme. You can also specify
-enter, exit, and shared element transitions in your style definition:</p>
-
-<pre>
-&lt;style name="BaseAppTheme" parent="android:Theme.Material">
-  &lt;!-- enable window content transitions -->
-  &lt;item name="android:windowContentTransitions">true&lt;/item>
-
-  &lt;!-- specify enter and exit transitions -->
-  &lt;item name="android:windowEnterTransition">@transition/explode&lt;/item>
-  &lt;item name="android:windowExitTransition">@transition/explode&lt;/item>
-
-  &lt;!-- specify shared element transitions -->
-  &lt;item name="android:windowSharedElementEnterTransition">
-    &#64;transition/move_image&lt;/item>
-  &lt;item name="android:windowSharedElementExitTransition">
-    &#64;transition/move_image&lt;/item>
-&lt;/style>
-</pre>
-
-<p>The <code>move_image</code> transition in this example is defined as follows:</p>
-
-<pre>
-&lt;!-- res/transition/move_image.xml -->
-&lt;!-- (see also Shared Transitions below) -->
-&lt;transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
-  &lt;moveImage/>
-&lt;/transitionSet>
-</pre>
-
-<p>The <code>moveImage</code> element corresponds to the <code>android.transition.MoveImage</code>
-class. For more information, see the API reference for <code>android.transition.Transition</code>.
-</p>
-
-<p>To enable window content transitions in your code instead, call the
-<code>Window.requestFeature</code> method:</p>
-
-<pre>
-// inside your activity (if you did not enable transitions in your theme)
-getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
-
-// set an exit transition
-getWindow().setExitTransition(new Explode());
-</pre>
-
-<p>To specify transitions in your code, call these methods with a <code>Transition</code>
-object:</p>
-
-<ul>
-  <li><code>Window.setEnterTransition</code></li>
-  <li><code>Window.setExitTransition</code></li>
-  <li><code>Window.setSharedElementEnterTransition</code></li>
-  <li><code>Window.setSharedElementExitTransition</code></li>
-</ul>
-
-<p>The <code>setExitTransition</code> and <code>setSharedElementExitTransition</code> methods
-define the exit transition for the calling activity. The <code>setEnterTransition</code> and
-<code>setSharedElementEnterTransition</code> methods define the enter transition for the called
-activity.</p>
-
-<p>To get the full effect of a transition, you must enable window content transitions on both the
-calling and called activities. Otherwise, the calling activity will start the exit transition,
-but then you'll see a window transition (like scale or fade).</p>
-
-<p>To start an enter transition as soon as possible, use the
-<code>Window.setAllowEnterTransitionOverlap</code> method on the called activity. This lets you
-have more dramatic enter transitions. The same applies for the calling activity and exit
-transitions with the <code>Window.setAllowExitTransitionOverlap</code> method.</p>
-
-<h3>Start an activity using transitions</h3>
-
-<p>If you enable transitions and set an exit transition for an activity, the transition is activated
-when you launch another activity with the <code>startActivity</code> method. If you have set an
-enter transition for the second activity, the transition is also activated when the activity
-starts.</p>
-
-<h3>Shared elements transitions</h3>
-
-<p>To make a screen transition animation between two activities that have a shared element:</p>
-
-<ol>
-<li>Enable window content transitions in your style.</li>
-<li>Specify a shared elements transition in your style.</li>
-<li>Define your transition as an XML resource.</li>
-<li>Assign a common name to the shared elements in both layouts with the
-    <code>android:viewName</code> attribute.</li>
-<li>Use the <code>ActivityOptions.makeSceneTransitionAnimation</code> method.</li>
-</ol>
-
-<pre>
-// get the element that receives the click event
-final View imgContainerView = findViewById(R.id.img_container);
-
-// get the common element for the transition in this activity
-final View androidRobotView = findViewById(R.id.image_small);
-
-// define a click listener
-imgContainerView.setOnClickListener(new View.OnClickListener() {
-    &#64;Override
-    public void onClick(View view) {
-        Intent intent = new Intent(this, Activity2.class);
-        // create the transition animation - the images in the layouts
-        // of both activities are defined with android:viewName="robot"
-        ActivityOptions options = ActivityOptions
-            .makeSceneTransitionAnimation(this, androidRobotView, "robot");
-        // start the new activity
-        startActivity(intent, options.toBundle());
-    }
-});
-</pre>
-
-<p>For shared dynamic views that you generate in your code, use the <code>View.setViewName</code>
-method to specify a common element name in both activities.</p>
-
-<p>To reverse the scene transition animation when you finish the second activity, call the
-<code>Activity.finishAfterTransition</code> method instead of <code>Activity.finish</code>.</p>
-
-<h3>Multiple shared elements</h3>
-
-<p>To make a scene transition animation between two activities that have more than one shared
-element, define the shared elements in both layouts with the <code>android:viewName</code>
-attribute (or use the <code>View.setViewName</code> in both activities), and create an
-<code>ActivityOptions</code> object as follows:</p>
-
-<pre>
-ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this,
-        Pair.create(view1, "agreedName1"),
-        Pair.create(view2, "agreedName2"));
-</pre>
-
-
-<h2 id="curvedmotion">Curved Motion</h2>
-
-<p>Animations in material design rely on curves for time interpolation and spatial movement
-patterns. The Android L Developer Preview provides new APIs that enable you to define custom
-timing curves and curved motion patterns for animations.</p>
-
-<p>The <code>PathInterpolator</code> class is a new interpolator based on a Bézier curve or a
-<code>Path</code> object. This interpolator specifies a motion curve in a 1x1 square, with anchor
-points at (0,0) and (1,1) and control points as specified using the constructor arguments. You can
-also define a <code>PathInterpolator</code> as an XML resource:</p>
-
-<pre>
-&lt;pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
-    android:controlX1="0.4"
-    android:controlY1="0"
-    android:controlX2="1"
-    android:controlY2="1"/>
-</pre>
-
-<p>The Android L Developer Preview provides XML resources for the three basic curves in the
-material design specification:</p>
-
-<ul>
-  <li><code>&#64;interpolator/fast_out_linear_in.xml</code></li>
-  <li><code>&#64;interpolator/fast_out_slow_in.xml</code></li>
-  <li><code>&#64;interpolator/linear_out_slow_in.xml</code></li>
-</ul>
-
-<p>You can pass a <code>PathInterpolator</code> object to the
-<code>Animator.setInterpolation</code> method.</p>
-
-<p>The <code>ObjectAnimator</code> class has new constructors that enable you to animate
-coordinates along a path using two or more properties at once. For example, the following animator
-uses a <code>Path</code> object to animate the X and Y properties of a view:</p>
-
-<pre>
-ObjectAnimator mAnimator;
-mAnimator = ObjectAnimator.ofFloat(view, View.X, View.Y, path);
-...
-mAnimator.start();
-</pre>
-
-
-<h2 id="viewstate">Animating View State Changes</h2>
-
-<p>The new <code>StateListAnimator</code> class lets you define animators that run when the state
-of a view changes. The following example shows how to define an <code>StateListAnimator</code> as
-an XML resource:</p>
-
-<pre>
-&lt;!-- animate the translationZ property of a view when pressed -->
-&lt;selector xmlns:android="http://schemas.android.com/apk/res/android">
-  &lt;item android:state_pressed="true">
-    &lt;set>
-      &lt;objectAnimator android:propertyName="translationZ"
-        android:duration="100"
-        android:valueTo="2"
-        android:valueType="floatType"/>
-        &lt;!-- you could have other objectAnimator elements
-             here for "x" and "y", or other properties -->
-    &lt;/set>
-  &lt;/item>
-  &lt;item android:state_enabled="true"
-    android:state_pressed="false"
-    android:state_focused="true">
-    &lt;set>
-      &lt;objectAnimator android:propertyName="translationZ"
-        android:duration="100"
-        android:valueTo="2"
-        android:valueType="floatType"/>
-    &lt;/set>
-  &lt;/item>
-&lt;/selector>
-</pre>
-
-<p class="note"><strong>Note:</strong> There is a known issue in the L Developer Preview release
-that requires valueFrom values to be provided in StateListAnimator animations to get the correct
-behavior.</p>
-
-<p>The new <code>AnimatedStateListDrawable</code> class lets you create drawables that show
-animations between state changes of the associated view. Some of the system widgets in the
-Android L Developer Preview use these animations by default. The following example shows how
-to define an <code>AnimatedStateListDrawable</code> as an XML resource:</p>
-
-<pre>
-&lt;!-- res/drawable/myanimstatedrawable.xml -->
-&lt;animated-selector
-    xmlns:android="http://schemas.android.com/apk/res/android">
-
-    &lt;!-- provide a different drawable for each state-->
-    &lt;item android:id="@+id/pressed" android:drawable="@drawable/drawableP"
-        android:state_pressed="true"/>
-    &lt;item android:id="@+id/focused" android:drawable="@drawable/drawableF"
-        android:state_focused="true"/>
-    &lt;item android:id="@id/default"
-        android:drawable="@drawable/drawableD"/>
-
-    &lt;!-- specify a transition -->
-    &lt;transition android:fromId="@+id/default" android:toId="@+id/pressed">
-        &lt;animation-list>
-            &lt;item android:duration="15" android:drawable="@drawable/dt1"/>
-            &lt;item android:duration="15" android:drawable="@drawable/dt2"/>
-            ...
-        &lt;/animation-list>
-    &lt;/transition>
-    ...
-&lt;/animated-selector>
-</pre>
-
-
-<h2 id="drawabletint">Drawable Tinting</h2>
-
-<p>The Android L Developer Preview enables you to define bitmaps or nine-patches as alpha masks and
-to tint them using a color resource or a theme attribute that resolves to a color resource (for
-example, <code>?android:attr/colorPrimary</code>). You can create these assets only once and color them
-automatically to match your theme.</p>
-
-<p>To apply a tint to a bitmap, use the <code>setTint</code> method or the <code>android:tint</code>
-attribute for <code>BitmapDrawable</code> and <code>NinePatchDrawable</code>.</p>
-
-<p>The <code>setTint</code> method also lets you set the Porter-Duff mode used to blend the
-tint color for <code>NinePatchDrawable</code> and <code>BitmapDrawable</code> objects in your code.
-To set the tint mode in your layouts, use the <code>android:tintMode</code> attribute.</p>
-
-
-<h2 id="colorextract">Extracting Prominent Colors from an Image</h2>
-
-<p>The Android L Developer Preview Support Library includes the <code>Palette</code> class,
-which lets you extract prominent colors from an image. This class extracts the following
-prominent colors:</p>
-
-<ul>
-<li>Vibrant</li>
-<li>Vibrant dark</li>
-<li>Vibrant light</li>
-<li>Muted</li>
-<li>Muted dark</li>
-<li>Muted light</li>
-</ul>
-
-<p>To extract these colors, pass a <code>Bitmap</code> object to the
-<code>Palette.generate</code> static method in the background thread where you load your images.
-If you can't use that thread, call the <code>Palette.generateAsync</code> method instead and
-provide a listener.</p>
-
-<p>To retrieve the prominent colors from the image, use the getter methods in the
-<code>Palette</code> class, such as <code>Palette.getVibrantColor</code>.</p>
-
-<p>For more information, see the API reference for the
-<code>android.support.v7.graphics.Palette</code> class.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/compatibility.jd b/docs/html/preview/material/compatibility.jd
deleted file mode 100644
index b4d26a7..0000000
--- a/docs/html/preview/material/compatibility.jd
+++ /dev/null
@@ -1,82 +0,0 @@
-page.title=Compatibility
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#materialtheme">Material Theme</a></li>
-  <li><a href="#layouts">Layouts</a></li>
-  <li><a href="#widgets">UI Widgets</a></li>
-  <li><a href="#animation">Animation APIs</a></li>
-</ol>
-</div>
-</div>
-
-<p>The new material design features (like the material theme and activity transitions) are only
-available in the Android L Developer Preview. However, you can design your apps to make use of
-these features when running on devices with the Android L Developer Preview and still be
-compatible with previous releases of Android.</p>
-
-
-<h2 id="materialtheme">Material Theme</h2>
-
-<p>The material theme is only available in the Android L Developer Preview. To configure your
-app to use the material theme on devices running the Android L Developer Preview and an older
-theme on devices running earlier versions of Android:</p>
-
-<ol>
-<li>Define a theme that inherits from an older theme (like Holo) in
-<code>res/values/styles.xml</code>.</li>
-<li>Define a theme with the same name that inherits from the material theme in
-<code>res/values-v21/styles.xml</code>.</li>
-<li>Set this theme as your app's theme in the manifest file.</li>
-</ol>
-
-<p class="note"><strong>Note:</strong> If you do not provide an alternative theme in this manner,
-your app will not run on earlier versions of Android.</p>
-
-
-<h2 id="layouts">Layouts</h2>
-
-<p>If the layouts that you design according to the material design guidelines do not use any
-of the new XML attributes from the Android L Developer Preview, they will work on previous
-versions of Android. Otherwise, you can provide alternative layouts. You can also provide
-alternative layouts to customize how your app looks on earlier versions of Android.</p>
-
-<p>Create your layout files for the Android L Developer Preview inside <code>res/layout-v21/</code>
-and your alternative layout files for earlier versions of Android inside <code>res/layout/</code>.
-Alternative layouts have the same file name.</p>
-
-<p>To avoid duplication of code, define your styles inside <code>res/values/</code> and modify the
-styles in <code>res/values-v21/</code> for the new APIs.</p>
-
-
-<h2 id="widgets">UI Widgets</h2>
-
-<p>The <code>RecyclerView</code> and <code>CardView</code> widgets are included in the Android L
-Developer Preview Support Library, so they are available in earlier versions of Android with
-these limitations:</p>
-
-<ul>
-<li><code>CardView</code> falls back to a programmatic shadow implementation using additional padding.</li>
-<li><code>CardView</code> does not clip its children views that intersect with rounded corners.</li>
-</ul>
-
-<p>These limitations do not apply to the Android L Developer Preview.</p>
-
-
-<h2 id="animation">Animation APIs</h2>
-
-<p>The following new APIs are only available in the Android L Developer Preview:</p>
-
-<ul>
-<li>Activity transitions</li>
-<li>Touch feedback</li>
-<li>Reveal animations</li>
-<li>Path-based animations</li>
-</ul>
-
-<p>To preserve compatibility with earlier versions of Android, check the system version at
-runtime before you invoke these APIs.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/get-started.jd b/docs/html/preview/material/get-started.jd
deleted file mode 100644
index 7d0625e..0000000
--- a/docs/html/preview/material/get-started.jd
+++ /dev/null
@@ -1,147 +0,0 @@
-page.title=Get Started
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#applytheme">Apply the Material Theme</a></li>
-  <li><a href="#layouts">Design Your Layouts</a></li>
-  <li><a href="#depth">Specify Elevation in Your Views</a></li>
-  <li><a href="#widgets">Use the New UI Widgets</a></li>
-  <li><a href="#animations">Customize Your Animations</a></li>
-</ol>
-</div>
-</div>
-
-<p>To create apps with material design:</p>
-
-<ol>
-  <li style="margin-bottom:10px">
-    Take a look at the <a href="http://www.google.com/design/spec">material design
-    specification</a>.</li>
-  <li style="margin-bottom:10px">
-    Apply the material <strong>theme</strong> to your app.</li>
-  <li style="margin-bottom:10px">
-    Define additional <strong>styles</strong> to customize the material theme.</li>
-  <li style="margin-bottom:10px">
-    Create your <strong>layouts</strong> following material design guidelines.</li>
-  <li style="margin-bottom:10px">
-    Specify the <strong>elevation</strong> of your views to cast appropriate shadows.</li>
-  <li style="margin-bottom:10px">
-    Use the new <strong>widgets</strong> for complex views, such as lists and cards.</li>
-  <li style="margin-bottom:10px">
-    Use the new APIs to customize the <strong>animations</strong> in your app.</li>
-</ol>
-
-<h3>Update Your App for the Android L Developer Preview</h3>
-
-<p>To update an existing app for the Android L Developer Preview, design new layouts following
-material design guidelines and consider how you can improve the user experience for your app by
-incorporating depth, touch feedback and animations in your UI.</p>
-
-<h3>Create New Apps for the Android L Developer Preview</h3>
-
-<p>If you are creating a new app for the Android L Developer Preview, the <a
-href="http://www.google.com/design/spec">material design guidelines</a> provide you with a
-cohesive design framework for your app. Follow these guidelines and
-use the new functionality in the Android framework to design and develop your app.</p>
-
-
-<h2 id="applytheme">Apply the Material Theme</h2>
-
-<p>To apply the material theme in your app, specify a style that inherits from
-<code>android:Theme.Material</code>:</p>
-
-<pre>
-&lt;!-- res/values/styles.xml -->
-&lt;resources>
-  &lt!-- your app's theme inherits from the Material theme -->
-  &lt;style name="AppTheme" parent="android:Theme.Material">
-    &lt!-- theme customizations -->
-  &lt;/style>
-&lt;/resources>
-</pre>
-
-<p>The material theme provides new system widgets that let you set their color palette and default
-animations for touch feedback and activity transitions. For more details, see
-<a href="{@docRoot}preview/material/theme.html">Material Theme</a>.</p>
-
-
-<h2 id="layouts">Design Your Layouts</h2>
-
-<p>In addition to applying and customizing the material theme, your layouts should conform to
-the <a href="http://www.google.com/design/spec">material design guidelines</a>. When you design
-your layouts, pay special attention to the following:</p>
-
-<ul>
-<li>Baseline grids</li>
-<li>Keylines</li>
-<li>Spacing</li>
-<li>Touch target size</li>
-<li>Layout structure</li>
-</ul>
-
-
-<h2 id="depth">Specify Elevation in Your Views</h2>
-
-<p>Views can cast shadows, and the elevation value of a view
-determines the size of its shadow and its drawing order. To set the elevation of a view, use the
-<code>android:elevation</code> attribute in your layouts:</p>
-
-<pre>
-&lt;TextView
-    android:id="@+id/my_textview"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:text="@string/next"
-    android:background="@color/white"
-    <strong>android:elevation</strong>="5dp" />
-</pre>
-
-<p>The new <code>translationZ</code> property lets you create animations that reflect temporary
-changes in the elevation of a view. For example, this is useful to respond to touch gestures.</p>
-
-<p>For more details, see <a href="{@docRoot}preview/material/views-shadows.html">Views and
-Shadows</a>.</p>
-
-
-<h2 id="widgets">Use the New UI Widgets</h2>
-
-<p><code>RecyclerView</code> is a more advanced version of <code>ListView</code> that provides
-performance improvements and is easier to use. <code>CardView</code> lets you show pieces of
-information inside cards with a consistent look across apps. To include a <code>CardView</code>
-in your layout:</p>
-
-<pre>
-&lt;android.support.v7.widget.CardView
-    android:id="@+id/card_view"
-    android:layout_width="200dp"
-    android:layout_height="200dp"
-    card_view:cardCornerRadius="3dp">
-    ...
-&lt;/android.support.v7.widget.CardView>
-</pre>
-
-<p>For more information, see <a href="{@docRoot}preview/material/ui-widgets.html">UI Widgets</a>.</p>
-
-
-<h2 id="animations">Customize Your Animations</h2>
-
-<p>The Android L Developer Preview includes new APIs to create custom animations in your app.
-For example, you can enable activity transitions and define an exit transition inside an
-activity:</p>
-
-<pre>
-// inside your activity
-getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
-
-// set an exit transition
-getWindow().setExitTransition(new Explode());
-</pre>
-
-<p>When you start another activity from this activity, the exit transition is activated.</p>
-
-<p>To learn about all the features in the new APIs, see <a
-href="{@docRoot}preview/material/animations.html">Animations</a>.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/images/SceneTransition.png b/docs/html/preview/material/images/SceneTransition.png
deleted file mode 100644
index ecaf472..0000000
--- a/docs/html/preview/material/images/SceneTransition.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/material/index.jd b/docs/html/preview/material/index.jd
deleted file mode 100644
index 9628e3a..0000000
--- a/docs/html/preview/material/index.jd
+++ /dev/null
@@ -1,130 +0,0 @@
-page.title=Material Design
-page.type=design
-page.image=images/material.png
-page.metaDescription=Learn how to apply material design to your apps.
-
-@jd:body
-
-<p itemprop="description">The Android L Developer Preview includes support for material design
-apps. Material design is a comprehensive guide for visual, motion, and interaction design across
-platforms and devices. To use material design in your Android apps, follow the guidelines defined
-in the <a href="http://www.google.com/design/spec">material design specification</a> and use the
-new components and functionality available in the Android L Developer Preview.</p>
-
-<p>The Android L Developer Preview provides the following elements for you to build material
-design apps:</p>
-
-<ul>
-  <li>A new theme</li>
-  <li>New widgets for complex views</li>
-  <li>New APIs for custom shadows and animations</li>
-</ul>
-
-
-<h3>Material Theme</h3>
-
-<p>The material theme provides a new style for your app, system widgets that let you set
-their color palette, and default animations for touch feedback and activity transitions.</p>
-
-<!-- two columns -->
-<div style="width:700px;margin-top:25px;margin-bottom:20px">
-<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
-  <img src="{@docRoot}preview/material/images/MaterialDark.png" width="500" height="238"/>
-  <div style="width:140px;margin:0 auto">
-  <p style="margin-top:8px">Dark Material theme</p>
-  </div>
-</div>
-<div style="float:left;width:250px;margin-right:0px;">
-  <img src="{@docRoot}preview/material/images/MaterialLight.png" width="500" height="238"/>
-  <div style="width:140px;margin:0 auto">
-  <p style="margin-top:8px">Light Material theme</p>
-  </div>
-</div>
-<br style="clear:left"/>
-</div>
-
-
-<h3>New Widgets</h3>
-
-<p>The Android L Developer Preview includes two new widgets for displaying complex views:</p>
-
-<!-- two columns -->
-<div style="width:700px;margin-top:25px;margin-bottom:20px">
-<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
-  <img src="{@docRoot}preview/material/images/list_mail.png" width="500" height="426"/>
-  <p>The new <code>RecyclerView</code> widget is a more advanced version of <code>ListView</code>
-  that provides performance improvements for dynamic views and is easier to use.</p>
-</div>
-<div style="float:left;width:250px;margin-right:0px;">
-  <img src="{@docRoot}preview/material/images/card_travel.png" width="500" height="426"/>
-  <p>The new <code>CardView</code> widget lets you display important pieces of information inside
-  cards that have a consistent look and feel.</p>
-</div>
-<br style="clear:left"/>
-</div>
-
-
-<h3>View Shadows</h3>
-
-<p>In addition to the X and Y properties, views in the Android L Developer Preview have a Z
-property. This new property represents the elevation of a view, which determines:</p>
-
-<ul>
-<li>The size of the shadow - Views with higher Z values cast bigger shadows.</li>
-<li>The drawing order - Views with higher Z values appear on top of other views.</li>
-</ul>
-
-<div style="width:290px;margin-left:35px;float:right">
-  <div class="framed-nexus5-port-span-5">
-  <video class="play-on-hover" autoplay>
-    <source src="/preview/material/videos/ContactsAnim.mp4"/>
-    <source src="/preview/material/videos/ContactsAnim.webm"/>
-    <source src="/preview/material/videos/ContactsAnim.ogv"/>
-  </video>
-  </div>
-  <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
-    <em>Click on the device screen to replay the movie</em>
-  </div>
-</div>
-
-<h3>Animations</h3>
-
-<p>The Android L Developer Preview provides new APIs that let you create custom animations for
-touch feedback in UI controls, view state changes, and activity transitions.</p>
-
-<p>The new animation APIs let you:</p>
-
-<ul>
-<li style="margin-bottom:15px">
-Respond to touch events in your views with <strong>touch feedback</strong> animations.
-</li>
-<li style="margin-bottom:15px">
-Hide and show views with <strong>reveal effect</strong> animations.
-</li>
-<li style="margin-bottom:15px">
-Switch between activities with custom <strong>activity transition</strong> animations.
-</li>
-<li style="margin-bottom:15px">
-Create more natural animations with <strong>curved motion</strong>.
-</li>
-<li style="margin-bottom:15px">
-Animate changes in one or more view properties with <strong>view state change</strong> animations.
-</li>
-<li style="margin-bottom:15px">
-Show animations in <strong>state list drawables</strong> between view state changes.
-</li>
-</ul>
-
-<p>Touch feedback animations are built into several standard views, such as buttons. The new APIs
-let you customize these animations and add animations to your custom views.</p>
-
-
-<h3>New Capabilities for Drawables</h3>
-
-<p>The Android L Developer Preview supports <strong>drawable tinting</strong>: you can define
-bitmaps as an alpha mask and tint them using a color resource. You create these assets only
-once and color each instance to match your theme. Drawables also now support specifying most XML
-properties as <strong>theme attributes</strong>.</p>
-
-<p>The Android L Developer Preview Support Library includes a <strong>color extraction</strong>
-library that lets you automatically extract prominent colors from a bitmap image.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/theme.jd b/docs/html/preview/material/theme.jd
deleted file mode 100644
index dceeb47..0000000
--- a/docs/html/preview/material/theme.jd
+++ /dev/null
@@ -1,102 +0,0 @@
-page.title=Material Theme
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#colorpalette">Customize the Color Palette</a></li>
-  <li><a href="#statusbar">Customize the Status Bar</a></li>
-  <li><a href="#inheritance">Theme Individual Views</a></li>
-</ol>
-</div>
-</div>
-
-<p>The new material theme provides:</p>
-
-<ul>
-  <li>System widgets that let you set their color palette</li>
-  <li>Touch feedback animations for the system widgets</li>
-  <li>Activity transition animations</li>
-</ul>
-
-<p>You can customize the look of the material theme
-according to your brand identity with a color palette you control. You can tint the action bar and
-the status bar using theme attributes, as shown in Figure 1.</p>
-
-<div style="float:right;margin-left:25px;margin-top:-50px">
-<img src="{@docRoot}preview/material/images/ThemeColors.png" style="width:250px"/>
-<p class="img-caption" style="margin-bottom:0px">
-<strong>Figure 1.</strong> Customizing the material theme.</p>
-</div>
-
-<p>The system widgets have a new design and touch feedback animations. You can customize the
-color palette, the touch feedback animations, and the activity transitions for your app.</p>
-
-<p>The material theme is defined as:</p>
-
-<ul>
-  <li><code>@android:style/Theme.Material</code> (dark version)</li>
-  <li><code>@android:style/Theme.Material.Light</code> (light version)</li>
-  <li><code>@android:style/Theme.Material.Light.DarkActionBar</code></li>
-</ul>
-
-<p>For a list of material styles that you can use, see the API reference for
-<code>android.R.style</code>.</p>
-
-<p class="note">
-<strong>Note:</strong> The material theme is only available in the Android L Developer Preview.
-For more information, see <a href="{@docRoot}preview/material/compatibility.html">Compatibility</a>.
-</p>
-
-
-<h2 id="colorpalette">Customize the Color Palette</h2>
-
-<p style="margin-bottom:30px">To customize the theme's base colors to fit your brand, define
-your custom colors using theme attributes when you inherit from the material theme:</p>
-
-<pre>
-&lt;resources>
-  &lt;!-- inherit from the material theme -->
-  &lt;style name="AppTheme" parent="android:Theme.Material">
-    &lt;!-- Main theme colors -->
-    &lt;!--   your app's branding color (for the app bar) -->
-    &lt;item name="android:colorPrimary">@color/primary&lt;/item>
-    &lt;!--   darker variant of colorPrimary (for status bar, contextual app bars) -->
-    &lt;item name="android:colorPrimaryDark">@color/primary_dark&lt;/item>
-    &lt;!--   theme UI controls like checkboxes and text fields -->
-    &lt;item name="android:colorAccent">@color/accent&lt;/item>
-  &lt;/style>
-&lt;/resources>
-</pre>
-
-
-<h2 id="statusbar">Customize the Status and Navigation Bar</h2>
-
-<p>The material theme lets you easily customize the status bar, so you can specify a
-color that fits your brand and provides enough contrast to show the white status icons. To
-set a custom color for the status bar, use the <code>android:statusBarColor</code> attribute when
-you extend the material theme. By default, <code>android:statusBarColor</code> inherits the
-value of <code>android:colorPrimaryDark</code>.</p>
-
-<p>To handle the color of the status bar yourself (for example, by adding a gradient in the
-background), set the <code>android:statusBarColor</code> attribute to
-<code>&#64;android:color/transparent</code> and adjust the window flags as required. You can
-also use the <code>Window.setStatusBarColor</code> method for animations or fading.</p>
-
-<p class="note"><strong>Note:</strong>
-The status bar should almost always have a clear delineation from the primary toolbar, except for
-full-bleed imagery cases and when you use a gradient as a protection.
-</p>
-
-<p>When customizing the navigation and status bars, make them both transparent or modify only
-the status bar. The navigation bar should remain black in all other cases.</p>
-
-
-<h2 id="inheritance">Theme Individual Views</h3>
-
-<p>Elements in XML layout definitions can specify the <code>android:theme</code> attribute,
-which references a theme resource. This attribute modifies the theme for the element and any
-elements inflated below it, which is useful to alter theme color palettes in a specific portion
-of an interface.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/ui-widgets.jd b/docs/html/preview/material/ui-widgets.jd
deleted file mode 100644
index 69b7d2d..0000000
--- a/docs/html/preview/material/ui-widgets.jd
+++ /dev/null
@@ -1,198 +0,0 @@
-page.title=UI Widgets
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#recyclerview">RecyclerView</a></li>
-  <li><a href="#cardview">CardView</a></li>
-</ol>
-</div>
-</div>
-
-<p>The support library in the Android L Developer Preview contains two new widgets,
-<code>RecyclerView</code> and <code>CardView</code>. Use these widgets to show complex lists
-and cards in your app. These widgets have material design style by default.</p>
-
-
-<h2 id="recyclerview">RecyclerView</h2>
-
-<p><code>RecyclerView</code> is a more advanced and flexible version of <code>ListView</code>.
-This widget is a container for large sets of views that can be recycled and scrolled very
-efficiently. Use the <code>RecyclerView</code> widget when you have lists with elements that
-change dynamically.</p>
-
-<p><code>RecyclerView</code> is easy to use, because it provides:</p>
-
-<ul>
-  <li>A layout manager for positioning items</li>
-  <li>Default animations for common item operations</li>
-</ul>
-
-<p>You also have the flexibility to define custom layout managers and animations for this
-widget.</p>
-
-<p>To use the <code>RecyclerView</code> widget, you have to specify an adapter and a layout
-manager. To create an adapter, you extend the <code>RecyclerView.Adapter</code> class. The details
-of the implementation depend on the specifics of your dataset and the type of views. For more
-information, see the <a href="#rvexamples">examples</a> below.</p>
-
-<img src="/preview/material/images/RecyclerView.png" alt="" id="figure1" style="width:550px"/>
-<p class="img-caption">
-  <strong>Figure 1</strong> - The <code>RecyclerView</code> widget.
-</p>
-
-<p>A <strong>layout manager</strong> positions item views inside a <code>RecyclerView</code> and
-determines when to reuse item views that are no longer visible to the user. To reuse (or
-<em>recycle</em>) a view, a layout manager may ask the adapter to replace the content of the
-view with a different element from the dataset. Recycling views in this manner improves
-performance by avoiding the creation of unnecessary views or performing expensive
-<code>findViewById</code> lookups.
-</p>
-
-<p><code>RecyclerView</code> provides <code>LinearLayoutManager</code>, which shows the items in a
-vertical or horizontal scrolling list. To create a custom layout, you extend the
-<code>RecyclerView.LayoutManager</code> class.</p>
-
-<h3>Animations</h3>
-
-<p>Animations for adding and removing items are enabled by default in <code>RecyclerView</code>.
-To customize these animations, extend the <code>RecyclerView.ItemAnimator</code> class and use
-the <code>RecyclerView.setItemAnimator</code> method.</p>
-
-<h3 id="rvexamples">Examples</h3>
-
-<p>To include a <code>RecyclerView</code> in your layout:</p>
-
-<pre>
-&lt;!-- A RecyclerView with some commonly used attributes -->
-&lt;android.support.v7.widget.RecyclerView
-    android:id="@+id/my_recycler_view"
-    android:scrollbars="vertical"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"/>
-</pre>
-
-<p>To get the <code>RecyclerView</code> object in your activity:</p>
-
-<pre>
-public class MyActivity extends Activity {
-    private RecyclerView mRecyclerView;
-    private RecyclerView.Adapter mAdapter;
-    private RecyclerView.LayoutManager mLayoutManager;
-
-    &#64;Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.my_activity);
-        mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);
-
-        // improve performance if you know that changes in content
-        // do not change the size of the RecyclerView
-        mRecyclerView.setHasFixedSize(true);
-
-        // use a linear layout manager
-        mLayoutManager = new LinearLayoutManager(this);
-        mRecyclerView.setLayoutManager(mLayoutManager);
-
-        // specify an adapter (see also next example)
-        mAdapter = new MyAdapter(myDataset);
-        mRecyclerView.setAdapter(mAdapter);
-    }
-    ...
-}
-</pre>
-
-<p>To create a simple adapter:</p>
-
-<pre>
-public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.ViewHolder> {
-    private String[] mDataset;
-
-    // Provide a reference to the type of views that you are using
-    // (custom viewholder)
-    public static class ViewHolder extends RecyclerView.ViewHolder {
-        public TextView mTextView;
-        public ViewHolder(TextView v) {
-            super(v);
-            mTextView = v;
-        }
-    }
-
-    // Provide a suitable constructor (depends on the kind of dataset)
-    public MyAdapter(String[] myDataset) {
-        mDataset = myDataset;
-    }
-
-    // Create new views (invoked by the layout manager)
-    &#64;Override
-    public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
-                                                   int viewType) {
-        // create a new view
-        View v = LayoutInflater.from(parent.getContext())
-                               .inflate(R.layout.my_text_view, parent, false);
-        // set the view's size, margins, paddings and layout parameters
-        ...
-        ViewHolder vh = new ViewHolder(v);
-        return vh;
-    }
-
-    // Replace the contents of a view (invoked by the layout manager)
-    &#64;Override
-    public void onBindViewHolder(ViewHolder holder, int position) {
-        // - get element from your dataset at this position
-        // - replace the contents of the view with that element
-        holder.mTextView.setText(mDataset[position]);
-
-    }
-
-    // Return the size of your dataset (invoked by the layout manager)
-    &#64;Override
-    public int getItemCount() {
-        return mDataset.length;
-    }
-}
-</pre>
-
-
-<h2 id="cardview">CardView</h2>
-
-<p><code>CardView</code> extends the <code>FrameLayout</code> class and lets you show information
-inside cards that have a consistent look on any app. <code>CardView</code> widgets can have
-shadows and rounded corners.</p>
-
-<p>To create a card with a shadow, use the <code>android:elevation</code> attribute.
-<code>CardView</code> uses real elevation and dynamic shadows
-and falls back to a programmatic shadow implementation on earlier versions. For more information,
-see <a href="{@docRoot}preview/material/compatibility.html">Compatibility</a>.</p>
-
-<p>Here's how to specify properties of <code>CardView</code>:</p>
-
-<ul>
-  <li>To set the corner radius in your layouts, use the <code>card_view:cardCornerRadius</code>
-  attribute.</li>
-  <li>To set the corner radius in your code, use the <code>CardView.setRadius</code> method.</li>
-  <li>To set the background color of a card, use the <code>card_view:cardBackgroundColor</code>
-attribute.</li>
-</ul>
-
-<p>To include a <code>CardView</code> in your layout:</p>
-
-<pre>
-&lt;!-- A CardView that contains a TextView -->
-&lt;android.support.v7.widget.CardView
-    xmlns:card_view="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/card_view"
-    android:layout_gravity="center"
-    android:layout_width="200dp"
-    android:layout_height="200dp"
-    card_view:cardCornerRadius="4dp">
-
-    &lt;TextView
-        android:id="@+id/info_text"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-&lt;/android.support.v7.widget.CardView>
-</pre>
\ No newline at end of file
diff --git a/docs/html/preview/material/views-shadows.jd b/docs/html/preview/material/views-shadows.jd
deleted file mode 100644
index 78c0062..0000000
--- a/docs/html/preview/material/views-shadows.jd
+++ /dev/null
@@ -1,95 +0,0 @@
-page.title=Views and Shadows
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-  <li><a href="#elevation">View Elevation</a></li>
-  <li><a href="#shadows">Shadows and Outlines</a></li>
-  <li><a href="#clip">Clipping Views</a></li>
-</ol>
-</div>
-</div>
-
-<p>The elevation of a view determines the size of its shadow:
-views with higher Z values cast bigger shadows. Views only cast shadows on the Z=0 plane under an
-orthographic projection (the views do not scale for different values of Z).</p>
-
-<p>Elevation is also useful to create animations where widgets temporarily rise above the
-view plane when performing some action.</p>
-
-
-<h2 id="elevation">View Elevation</h2>
-
-<p>The Z value for a view has two components, elevation and translation. The elevation is the
-static component, and the translation is used for animations:</p>
-
-<p><code>Z = elevation + translationZ</code></p>
-
-<p>To set the elevation of a view:</p>
-
-<ul>
-  <li>In a layout definition, use the <code>android:elevation</code> attribute.</li>
-  <li>In the code of an activity, use the <code>View.setElevation</code> method.</li>
-</ul>
-
-<p>To set the translation of a view, use the <code>View.setTranslationZ</code> method.</p>
-
-<p>The new <code>ViewPropertyAnimator.z</code> and <code>ViewPropertyAnimator.translationZ</code>
-methods enable you to easily animate the elevation of views. For more information, see
-the API reference for <code>ViewPropertyAnimator</code> and the <a
-href="{@docRoot}guide/topics/graphics/prop-animation.html#object-animator">Property Animation</a>
-developer guide.</p>
-
-<p>The Z values are measured in the same units as the X and Y values.</p>
-
-
-<h2 id="shadows">Shadows and Outlines</h2>
-
-<p>The bounds of a view's background drawable determine the default shape of its shadow.
-<strong>Outlines</strong> represent the outer shape of a graphics object and define the ripple
-area for touch feedback.</p>
-
-<p>For example, if you define a view with a background drawable:</p>
-
-<pre>
-&lt;TextView
-    android:id="@+id/myview"
-    ...
-    android:elevation="2dp"
-    android:background="@drawable/myrect" />
-</pre>
-
-<p>where the background drawable is defined as a rectangle with rounded corners:</p>
-
-<pre>
-&lt;!-- res/drawable/myrect.xml -->
-&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
-       android:shape="rectangle">
-    &lt;solid android:color="#42000000" />
-    &lt;corners android:radius="5dp" />
-&lt;/shape>
-</pre>
-
-<p>Then this view and drawable cast the appropriate shadow.</p>
-
-<p>You can also create outlines in your code using the methods in the <code>Outline</code> class,
-and you can assign them to views with the <code>View.setOutline</code> method.</p>
-
-<p>To prevent a view from casting a shadow, set its outline to <code>null</code>.</p>
-
-
-<h2 id="clip">Clipping Views</h2>
-
-<p>Clip a view to its outline area using the
-<code>View.setClipToOutline</code> method. Only rectangle, circle, and round rectangle outlines
-support clipping, as determined by the <code>Outline.canClip</code> method.</p>
-
-<p>To clip a view to the shape of a drawable, set the drawable as the background of the view
-(as shown above) and call the <code>View.setClipToOutline</code> method.</p>
-
-<p>Because clipping views is an expensive operation, don't animate the shape you use to
-clip a view. To achieve this effect, use a <a
-href="{@docRoot}preview/material/animations.html#reveal">Reveal Effect</a> animation.</p>
\ No newline at end of file
diff --git a/docs/html/preview/tv/publish/index.jd b/docs/html/preview/tv/publish/index.jd
deleted file mode 100644
index f834493..0000000
--- a/docs/html/preview/tv/publish/index.jd
+++ /dev/null
@@ -1,205 +0,0 @@
-page.title=Publishing TV Apps
-page.tags="requirements","usability"
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-  <h2>In this document</h2>
-  <ol>
-    <li><a href="#requirements">Publishing Requirements for TV Apps</a>
-      <ol>
-        <li><a href="#requirements-manifest">Manifest Requirements</a></li>
-        <li><a href="#requirements-usability">Usability Requirements</a></li>
-      </ol>
-    </li>
-    <li><a href="#faq">Frequently Asked Questions</a></li>
-  </ol>
-</div>
-</div>
-
-<p>
-  Apps for TV devices can be published like other Android apps. You must prepare your app for
-  release and then you can publish it through <a href=
-  "{@docRoot}distribute/googleplay/index.html">Google Play</a>. In order for your app to be
-  accepted as a TV app in Google Play, it must meet some additional requirements, which are covered
-  in this document.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> You will not be able to publish apps to TV devices through <a href=
-  "{@docRoot}distribute/googleplay/index.html">Google Play</a> until Android L SDK is released.
-</p>
-
-
-<h2 id="requirements">Publishing Requirements for TV Apps</h2>
-
-<p>
-  Your app must provide specific manifest declarations and meet some minimum usability requirements
-  before it can qualify as TV app on Google Play. Make sure your app meets these requirements to
-  get your app ready for TV devices.
-</p>
-
-<p class="caution">
-  <strong>Caution:</strong> Your app must meet all of the requirements described in this section in
-  order to qualify as a TV app on Google Play. If your app does not meet the usability requirements
-  described below, the Google Play team will contact you through the email address specified in main
-  <a href="https://play.google.com/apps/publish/">Google Play Developer Console</a> account
-  associated with the app.
-</p>
-
-<h3 id="requirements-manifest">Manifest Requirements</h3>
-
-<p>
-  Developers who want their apps to be considered for publishing on TV devices <em>must</em>
-  include a manifest entry that declares an activity which handles the {@code
-  android.intent.category.LEANBACK_LAUNCHER} intent filter. For more information about including
-  the required manifest entries, see <a href=
-  "{@docRoot}preview/tv/start/index.html#tv-activity">Get Started with TV Apps</a>.
-</p>
-
-<p class="caution">
-  <strong>Caution:</strong> If you do not include the <a href=
-  "{@docRoot}preview/tv/start/index.html#tv-activity">required manifest entries</a> for TV devices,
-  your app is not considered as a TV app. The app will not be reviewed for the TV app usability
-  requirements and will not be able to qualify as a TV app on Google Play.
-</p>
-
-
-<h3 id="requirements-usability">Usability Requirements</h3>
-
-<p>
-  Users bring a different set of expectations when watching TV. Apps for Android TV devices have a
-  different interaction, look and feel from Android apps on the phone or tablet. How users interact
-  with TVs (with a remote control device) and how they view them (sitting about 10 feet away),
-  significantly changes the requirements for what makes a good user experience in an app.
-</p>
-
-<p>
-  The first step toward creating a great experience for users on TV is to review and follow the
-  <a href="{@docRoot}preview/tv/design/index.html">Design for TV</a> guidelines. These guidelines
-  provide general directions for designing a TV app as well as some specific implementation
-  instructions.
-</p>
-
-<p>
-  Apps for TV devices must meet some specific requirements for usability. Only apps that meet the
-  following usability criteria will qualify as an TV app on Google Play:
-</p>
-
-<ul>
-  <li>App functionality must be navigable using 5-way D-pad controls, unless the app requires a
-    game controller.
-    (<a href="{@docRoot}preview/tv/ui/navigation.html#d-pad-navigation">details</a>)
-    <ul>
-      <li>If the app requires a game controller, all functionality must be navigable using
-        standard Android game controller keys.
-        (<a href="{@docRoot}training/game-controllers/controller-input.html#button">details</a>)
-      </li>
-    </ul>
-  </li>
-
-  <li>Layouts used on TV devices must be designed for landscape orientation.
-    (<a href="{@docRoot}preview/tv/ui/layouts.html#structure">details</a>)</li>
-
-  <li>Core text used in TV layouts must be at least 16sp in size and all text must be at least
-    12sp.</li>
-
-  <li>Text and functionality should be placed inside an overscan margin of at least 27dp from the
-    top and bottom edges and 48dp from the left and right edges of the TV screen.
-   (<a href="{@docRoot}preview/tv/ui/layouts.html#overscan">details</a>)</li>
-
-  <li>Apps that uses full-screen, non-video ads, must ensure that the ads are immediately
-    dismissible by the user with D-pad controls.</li>
-
-  <li>Apps must not depend on having a web browser app on TV devices. Apps can use <a href=
-    "http://developer.android.com/reference/android/webkit/WebView.html">WebView components</a> to
-    show web content where needed.</li>
-
-  <li>Apps that uses clickable, non-full screen, non-video ads must ensure that the ads do not link
-    to a web URL. These ads must also not link to an app or game that is not available on TV devices
-    and, therefore, not available in the Google Play store for TV.</li>
-
-  <li>Apps must display correctly on the Android TV launcher by doing the following:
-    <ul>
-      <li>Include in the app manifest an intent filter of type {@code ACTION_MAIN} with an intent
-        category {@code CATEGORY_LEANBACK_LAUNCHER}.
-        (<a href="{@docRoot}preview/tv/start/index.html#tv-activity">details</a>)
-      </li>
-
-      <li>Provide a 320x180px banner image resource and declare it in the manifest.</li>
-
-      <li>If the app is a game, it must set the {@code isGame} property to {@code true} in the
-        manifest. (<a href="{@docRoot}preview/tv/games/index.html#manifest">details</a>)
-      </li>
-    </ul>
-  </li>
-
-  <li>App must not partially obscure other apps. Apps must fill the entire screen and have a
-    non-transparent background.
-  </li>
-
-  <li>Music and audio apps that continue to play sound after a user has left the app must provide
-    a <strong>Now Playing</strong> card on the home screen recommendation row so users can easily
-    control playback. Developers should use the {@code android.media.session.MediaSession} API
-    to enable this card and link playback to a specific activity.
-  </li>
-
-  <li>Media apps that play video or music content must toggle between play and pause of media
-    playback when a <a href="{@docRoot}reference/android/view/KeyEvent.html#KEYCODE_MEDIA_PLAY_PAUSE">
-    play or pause key event</a> is sent during playback.
-  </li>
-
-  <li>Games that use a gamepad in order to play must define gamepad use in the app manifest.
-    (<a href="{@docRoot}preview/tv/games/index.html#gamepad">details</a>)
-  </li>
-
-  <li>Games that provide in-game instructions for game controllers must show a generic controller
-    layout that does not include any branding. You can download generic controller artwork from
-    here: <a href="http://storage.googleapis.com/androiddevelopers/design/android_tv_gamepad_template-2014-10.zip">
-    android_tv_gamepad_template_2014-10.zip</a>.
-  </li>
-</ul>
-
-
-<h2 id="faq">Frequently Asked Questions</h2>
-
-<p>
-  <strong>After I submit my app, how will find out if my app does not meet all the requirements for
-  TV devices?</strong>
-</p>
-<p>
-  If your app does not meet the usability requirements described on this page, the Play Store team
-  will contact you through the email address specified in main <a href=
-  "https://play.google.com/apps/publish/">Google Play Developer Console</a> account associated with
-  the app.
-</p>
-<p class="caution">
-  <strong>Caution:</strong> Make sure your app includes the <a href=
-  "{@docRoot}preview/tv/start/index.html#tv-activity">required manifest entries</a> for TV devices,
-  otherwise your app will not be considered a TV app and will not be reviewed for TV usability
-  requirements.
-</p>
-
-
-<p>
-  <strong>My app targets more than just TV devices. If my app does not meet the TV device
-  requirements, will my new or updated app still appear on Google Play for phones and
-  tablets?</strong>
-</p>
-<p>
-  Yes. The requirements described above only restrict distribution to the Google Play Store on TV
-  devices. Distribution to other device types, such as phones, tablets and other devices, is not
-  affected.
-</p>
-
-
-<p>
-  <strong>If my app meets the publishing requirements, when will it be available in the Google
-    Play Store on TV devices?</strong>
-</p>
-
-<p>
-  Apps that meet the requirements for TV will appear in the Google Play Store on TV devices
-  <em>after</em> the official release of Android L.
-</p>
\ No newline at end of file
diff --git a/docs/html/samples/new/index.jd b/docs/html/samples/new/index.jd
index ca44775..523b922 100644
--- a/docs/html/samples/new/index.jd
+++ b/docs/html/samples/new/index.jd
@@ -235,3 +235,116 @@
 **description**
 </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="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>
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index d91e7e8..3d9ef21 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -352,17 +352,18 @@
 <h5>Operating Systems</h5>
 <ul>
   <li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
-  <li>Mac OS X 10.5.8 or later (x86 only)</li>
-  <li>Linux (tested on Ubuntu Linux, Lucid Lynx)
+  <li>Mac OS X 10.8.5 or later</li>
+  <li>Linux
     <ul>
-      <li>GNU C Library (glibc) 2.7 or later is required.</li>
-      <li>On Ubuntu Linux, version 8.04 or later is required.</li>
-      <li>64-bit distributions must be capable of running 32-bit applications.</li>
+      <li>64-bit distribution capable of running 32-bit applications</li>
+      <li>GNU C Library (glibc) 2.11 or later is required.</li>
+      <li>Tested on Ubuntu 12.04, Precise Pangolin</li>
     </ul>
   </li>
 </ul>
 </div>
 
+
 <div class="col-7 reqs" style="margin:0 0 80px 20px;display:none;">
 
 <h5>Development tools</h5>
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index 233213e..b0567e7 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -311,7 +311,7 @@
 </td>
 <td>
 <ul>
-  <li>Mac OS X 10.5 or higher, up to 10.9 (Mavericks)</li>
+  <li>Mac OS X 10.8.5 or higher, up to 10.9 (Mavericks)</li>
   <li>1 GB of RAM minimum, 2 GB recommended</li>
   <li>400 MB of disk space</li>
   <li>At least 1 GB of additional disk space for the Android SDK, emulator system images, and caches</li>
@@ -324,6 +324,9 @@
 </td>
 <td>
 <ul>
+  <li>64-bit distribution capable of running 32-bit applications</li>
+  <li>GNU C Library (glibc) 2.11 or later is required.</li>
+  <li>Tested on Ubuntu 12.04, Precise Pangolin</li>
   <li>GNOME or KDE desktop</li>
   <li>1 GB of RAM minimum, 2 GB recommended</li>
   <li>400 MB of disk space</li>
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index e75f451..06474dc 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -2,60 +2,32 @@
 page.template=sdk
 
 
-ndk.mac64_download=android-ndk32-r10b-darwin-x86_64.tar.bz2
-ndk.mac64_bytes=413652124
-ndk.mac64_checksum=7ca4a84e9c56c38acdafb007e7cd33c5
+ndk.mac64_download=android-ndk-r10c-darwin-x86_64.bin
+ndk.mac64_bytes=436952863
+ndk.mac64_checksum=bc04ef44b920cf6cd2157b6f2c3531d6
 
-ndk.mac32_download=android-ndk32-r10b-darwin-x86.tar.bz2
-ndk.mac32_bytes=406998070
-ndk.mac32_checksum=db3626b2c5f3245d90e2724f7bcf4c3e
+ndk.mac32_download=android-ndk-r10c-darwin-x86.bin
+ndk.mac32_bytes=435858709
+ndk.mac32_checksum=6b3e143f7e64d5cd337b727513e27913
 
-ndk.linux64_download=android-ndk32-r10b-linux-x86_64.tar.bz2
-ndk.linux64_bytes=422237011
-ndk.linux64_checksum=5c0f301aa789a1a747d5d2aeb8c69ef3
+ndk.linux64_download=android-ndk-r10c-linux-x86_64.bin
+ndk.linux64_bytes=449013322
+ndk.linux64_checksum=792c61706cd9ec6713fa1b69b2f42996
 
-ndk.linux32_download=android-ndk32-r10b-linux-x86.tar.bz2
-ndk.linux32_bytes=421052081
-ndk.linux32_checksum=e8f55daa5c9de7ab79aaaf5d7d751b69
+ndk.linux32_download=android-ndk-r10c-linux-x86.bin
+ndk.linux32_bytes=438555265
+ndk.linux32_checksum=d1595d9ca5e15484e047f1ac326c4ceb
 
-ndk.win64_download=android-ndk32-r10b-windows-x86_64.zip
-ndk.win64_bytes=531912027
-ndk.win64_checksum=e4dd2e0c6f38e3ad936c366bdf6b1d4e
+ndk.win64_download=android-ndk-r10c-windows-x86_64.exe
+ndk.win64_bytes=458925419
+ndk.win64_checksum=af8edf5d316e1bf1a5a72e04a9faec41
 
-ndk.win32_download=android-ndk32-r10b-windows-x86.zip
-ndk.win32_bytes=502720425
-ndk.win32_checksum=9fa4f19bca7edd6eefa63fe788737987
+ndk.win32_download=android-ndk-r10c-windows-x86.exe
+ndk.win32_bytes=433102815
+ndk.win32_checksum=805a04810719886674d3c7bff5eca53f
 
 
 
-ndk.mac64_64_download=android-ndk64-r10b-darwin-x86_64.tar.bz2
-ndk.mac64_64_bytes=346423776
-ndk.mac64_64_checksum=5bae7feed20ebf0762c0baefe6b84b6d
-
-ndk.mac32_64_download=android-ndk64-r10b-darwin-x86.tar.bz2
-ndk.mac32_64_bytes=344052876
-ndk.mac32_64_checksum=4447049ac2b5877176b9b6b1cf3bcdb2
-
-ndk.linux64_64_download=android-ndk64-r10b-linux-x86_64.tar.bz2
-ndk.linux64_64_bytes=358835298
-ndk.linux64_64_checksum=2aa12a0d9a70bcab83e42d010a685136
-
-ndk.linux32_64_download=android-ndk64-r10b-linux-x86.tar.bz2
-ndk.linux32_64_bytes=358060577
-ndk.linux32_64_checksum=b77eb583626d8c7f5c11e49181fd5eac
-
-ndk.win64_64_download=android-ndk64-r10b-windows-x86_64.zip
-ndk.win64_64_bytes=437152652
-ndk.win64_64_checksum=df39185e6c5a4d72eb9fca3f9aaabc46
-
-ndk.win32_64_download=android-ndk64-r10b-windows-x86.zip
-ndk.win32_64_bytes=417290468
-ndk.win32_64_checksum=0f0324cb11f04e8b2641e5422ee39c81
-
-ndk.debug_info_download=android-ndk-r10b-cxx-stl-libs-with-debug-info.zip
-ndk.debug_info_bytes=227302317
-ndk.debug_info_checksum=bed1bb855a41bdb572a804dbf6d45aa6
-
 
 page.title=Android NDK
 @jd:body
@@ -407,12 +379,6 @@
 $('#Downloads').after($('#download-table'));
 </script>
 
-
-<p>With NDK revision 9 and higher, the release packages have been split to reduce download size.
-  The first download for each platform contains the default NDK toolchain. The additional download
-  contains legacy NDK toolchains for that platform, which is only required if you are not using
-  the current, recommended toolchain for your NDK builds.</p>
-
 <h2 id="Revisions">Revisions</h2>
 
 <p>The following sections provide information about releases of the NDK.</p>
@@ -422,6 +388,196 @@
  <p>
    <a href="#" onclick="return toggleContent(this)"> <img
      src="/assets/images/triangle-opened.png" class="toggle-content-img" alt=""
+   >Android NDK, Revision 10c</a> <em>(October 2014)</em>
+ </p>
+ <div class="toggle-content-toggleme">
+    <dl>
+      <dt>Important changes:</dt>
+      <dd>
+      <ul>
+ <li>Made the following changes to download structure:</li>
+       <ul>
+       <li>Each package now contains both the 32- and the 64-bit headers, libraries, and tools for
+       its respective platform.</li>
+       <li>STL libraries with debugging info no longer need be downloaded separately.</li>
+       </ul>
+  <li>Changed everything previously called <code>Android-L</code> to the official release
+  designation: <code>android-21</code>.</li>
+  <li>Updated GCC 4.9 by rebasing to the <code>google</code> branch
+  of the GCC repository. Major differences from the upstream version of GCC 4.9 include:</li>
+
+  <ul>
+  <li>The <code>-O2</code> option now turns on vectorization, without loop peeling but with more
+  aggressive unrolling.</li>
+  <li>Enhancements to FDO and <a href="https://gcc.gnu.org/wiki/LightweightIpo#LIPO_-_Profile_Feedback_Based_Lightweight_IPO">
+  LIPO</a></li>
+  <p>For more detailed information, see <em>Important bug fixes</em> below.</p>
+  </ul>
+
+  <li>Added Clang 3.5 support to all hosts: <code>NDK_TOOLCHAIN_VERSION=clang</code>
+  now picks Clang 3.5. Note that:</li>
+  <ul>
+
+  <li>ARM and x86 default to using the integrated assembler. If this causes issues, use
+  <code>-fno-integrated-as</code> as a workaround.</code>
+  <li>Clang 3.5 issues more warnings for unused flags, such as the <code>-finline-functions</code>
+  option that GCC supports.</li>
+  <p>When migrating from projects using GCC, you can use
+  <code>-Wno-invalid-command-line-argument</code> and <code>-Wno-unused-command-line-argument</code>
+  to ignore the unused flags until you're able decide on what to do with them longer-term.</p>
+
+     </ul>
+  <li>Made it possible to enter ART debugging mode, when debugging on an Android 5.0 device using
+  ART as its virtual machine, by specifying the <code>art-on</code> option. For more information,
+  see <code>prebuilt/common/gdb/common.setup</code> in the directory containing the NDK.</li>
+  <li>Removed support for Clang 3.3.</li>
+  <li>Deprecated GCC 4.6, and may remove it from future releases.</li>
+  <li>Updated mclinker to 2.8 with Identical Code Folding ("ICF") support. Specify ICF using the
+  <code>--icf</code> option.</li>
+  <li>Broadened <code>arm_neon.h</code> support in x86 and x86_64, attaining coverage of ~93% of
+  NEON intrinsics. For more information about NEON support:
+     <ul>
+     <li>Navigate to the NDK Programmer's Guide (<code>docs/Programmers_Guide/html/</code>), and see
+     Architectures and CPUs > Neon.</li>
+     <li>Examine the updated <code>hello-neon</code> sample in <code>samples/</code>.
+     <li>See Intel's guide to <a href="https://software.intel.com/en-us/blogs/2012/12/12/from-arm-neon-to-intel-mmxsse-automatic-porting-solution-tips-and-tricks"> porting from ARM NEON to Intel SSE.</a></li>
+     </ul>
+  <li>Documented support for <code>_FORTIFY_SOURCE</code> in <code>headers/libs/android-21</code>,
+  which appeared in r10 (when <code>android-21</code> was still called <code>Android-L</code>),
+  but had no documentation.</li>
+      </ul>
+      </dd>
+   <dl>
+
+
+     <dt>Important bug fixes:</dt>
+     <dd>
+     <ul>
+       <li>Fixed an internal compiler error with GCC4.9/aarch64 that was causing the following
+       error message (Issue <a href="http://b.android.com/77564">77564</a>):</li>
+<pre>
+internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1539
+</pre>
+       <li>Fixed incorrect code generation from GCC4.9/arm. (Issue
+       <a href="http://b.android.com/77567">77567<a>)</li>
+       <li>Fixed an internal compiler error with GCC4.9/mips involving inline-assembly. (Issue
+       <a href="http://b.android.com/77568">77568</a>)</li>
+       <li>Fixed incorrect code that GCC4.9/arm was generating for <code>x = (cond) ? y : x</code>.
+       (Issue <a href="http://b.android.com/77569">77569</a>)</li>
+       <li>Fixed GCC4.9/aarch64 and Clang3.5/aarch64 to work around the
+       <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116322.html">
+       Cortex-A53 erratum (835769)</a>  by default.  Disable the workaround by specifying
+       <code>-mno-fix-cortex-a53-835769</code>.</li>
+     </ul>
+     </dd>
+
+
+     <dt>Other bug fixes:</dt>
+     <dd>
+     <ul>
+     <li>Made the following header and library fixes to <code>android-21</code>:
+        <ul>
+
+        <li>Added more TV keycodes: <code>android/keycodes.h</code></li>
+        <li>Added more constants and six new sensor functions to <code>android/sensor.h</code>:
+        <code>ASensorManager_getDefaultSensorEx</code>, <code>ASensor_getFifoMaxEventCount</code>,
+        <code>ASensor_getFifoReservedEventCount</code>, <code>ASensor_getStringType</code>,
+        <code>ASensor_getReportingMode</code>, and <code>ASensor_isWakeUpSensor</code>.</li>
+        <li>Fixed <code>stdatomic.h</code> to improve compatibility with GCC 4.6, and provide support
+        for the <code>&lt;atomic&gt;</code> header.</li>
+        <li>Added <code>sys/ucontext.h</code> and <code>sys/user.h</code> to all API levels. The
+        <code>signal.h</code> header now includes <code>&lt;sys/ucontext.h&gt;</code>.  You may
+        remove any existing definition of <code>struct ucontext</code>.</li>
+        <li>Added <code>posix_memalign</code> to API levels 17, 18, and 19.</li>
+        <li>Added the following functions to all architectures:
+        <code>android_set_abort_message</code>, <code>posix_fadvise</code>,
+        <code>posix_fadvise64</code>, <code>pthread_gettid_np</code>.</li>
+        <li>Added the required permissions to the <code>native-media/AndroidManifest.xml</code>
+        sample.
+        (Issue <a href="https://android-review.googlesource.com/#/c/106640/">106640</a>)</li>
+        <li>Added <code>clock_nanosleep</code> and <code>clock_settime</code> to API level 21. (Issue
+        <a href="http://b.android.com/77372">77372</a>)
+        <li>Removed the following symbols from all architectures:
+        <code>get_malloc_leak_info</code>, <code>free_malloc_leak_info</code>,
+        <code>__srget</code>, <code>__swbuf</code>, <code>__srefill</code>, <code>__swsetup</code>,
+        <code>__sdidinit</code>, <code>__sflags</code>, <code>__sfp</code>,
+        <code>__sinit</code>, <code>__smakebuf</code>, <code>__sflush</code>, <code>__sread</code>,
+        <code>__swrite</code>, <code>__sseek</code>, <code>__sclose</code>,
+        <code>_fwalk</code>, <code>__sglue</code>, <code>__get_thread</code>, <code>__wait4</code>,
+        <code>__futex_wake</code>, <code>__open</code>, <code>__get_tls</code>,
+        <code>__getdents64</code>, and <code>dlmalloc</code>.</li>
+        <li>Removed the following functions from the 64-bit architectures: <code>basename_r</code>,
+        <code>dirname_r</code>, <code>__isthreaded</code>, <code>_flush_cache</code> (mips64).</li>
+        <li>Removed the following function from the 32-bit architectures:
+        <code>__signalfd4</code>.</li>
+        <li>Changed the type of the third argument from <code>size_t</code> to <code>int</code> in
+        the following functions: <code>strtoll_l</code>, <code>strtoull_l</code>,
+        <code>wcstoll_l</code>, and <code>wcstoull_l</code>.</li>
+        <li>Restored the following functions to the 64-bit architecture: <code>arc4random</code>,
+        <code>arc4random_buf</code>, and <code>arc4random_uniform</code>.</li>
+        <li>Moved <code>cxa_*</code> and the <code>new</code> and <code>delete</code> operators back
+        to <code>libstdc++.so</code>. This change restores r9d behavior; previous versions of r10
+        contained dummy files.</li>
+
+        </ul>
+     <li>Restored MXU support in GCC 4.8 and 4.9 for mips. This support had been absent from
+     r10 and r10b because those versions of GCC had been compiled with binutils-2.24, which did
+     not support MXU. It now does.</li>
+     <li>Fixed <code>--toolchain=</code> in <code>make-standalone-toolchain.sh</code> so that it
+     now properly supports use of a suffix specifying a version of Clang.</li>
+     <li>Fixed the libc++/armeabi <code>strtod()</code> functions.</li>
+     <li>Made fixes to NDK documentation in <code>docs/</code>.</li>
+     </ul>
+     </dd>
+
+     <dt>Other changes:</dt>
+     <dd>
+       <ul>
+       <li>Enhanced <code>cpu-features</code> to detect ARMv8 support for the following
+       instruction sets: AES, CRC32, SHA2, SHA1, and 64-bit PMULL/PMULL2. (Issue
+       <a href="https://android-review.googlesource.com/#/c/106360/">106360</a>)</li>
+
+       <li>Modified ndk-build to use <code>*-gcc-ar</code>, which is available in GCC 4.8, GCC 4.9, and
+       Clang. Clang specifies it, instead of <code>*-ar</code>. This setting brings improved LTO
+       support.</li>
+
+       <li>Removed the <code>include-fixed/linux/a.out.h</code> and
+       <code>include-fixed/linux/compiler.h</code> headers from the GCC compiler.
+       (Issue <a href ="http://b.android.com/73728">73728</a>)</li>
+
+       <li>Fixed an issue related to <code>-flto</code> with GCC 4.8 on Mac OS X. The error message
+       read:</li>
+
+       <pre>
+.../ld: error: .../libexec/gcc/arm-linux-androideabi/4.9/liblto_plugin.so
+Symbol not found: _environ
+</pre>
+
+       <li>Fixed a typo in <code>build-binary.mk.</code> (Issue
+       <a href="http://b.android.com/76992">76992</a>)</li>
+     </ul>
+     </dd>
+
+   <dt>Important known issues:</dt>
+     <dd>
+     <ul>
+     <li>Specifying -Os (<code>-fauto-profile</code>) in GCC4.9 may cause crashing.
+     (Issue <a href="http://b.android.com/77571">77571</a>)</li>
+     </ul>
+     </dd>
+
+   </dl>
+ </div>
+</div>
+
+
+
+
+
+<div class="toggle-content closed">
+ <p>
+   <a href="#" onclick="return toggleContent(this)"> <img
+     src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
    >Android NDK, Revision 10b</a> <em>(September 2014)</em>
  </p>
  <div class="toggle-content-toggleme">
@@ -484,20 +640,10 @@
      </dd>
      </ul>
 
-
-
    </dl>
  </div>
 </div>
 
-
-
-
-
-
-
-
-
 <div class="toggle-content closed">
  <p>
    <a href="#" onclick="return toggleContent(this)"> <img
@@ -3555,18 +3701,38 @@
 Software Requirements</a>
   for the NDK, if you haven't already.</p>
 
-  <p>To install the NDK, follow these steps:</p>
-
-  <ol>
-    <li>From the table at the top of this page, select the NDK package that is appropriate for your
-    development computer and download the package.</li>
-
-    <li>Uncompress the NDK download package using tools available on your computer. When
-    uncompressed, the NDK files are contained in a directory called
+  <p>To install the NDK, first download the appropriate package from the table at the top of this
+  page. Then, follow the procedure for your development platform:</p>
+       <ul>
+       <li>On Linux and Mac OS X (Darwin):
+          <ul>
+          <ol>
+          <li>Download the appropriate package from this page.</li>
+          <li>Open a terminal window.</li>
+          <li>Go to the directory to which you downloaded the package.</li>
+          <li>Run <code>chmod a+x</code> on the downloaded package.</li>
+          <li>Execute the package. For example:</li>
+          <pre>
+ndk$ chmod a+x android-ndk-r10c-darwin-x86_64.bin
+ndk$ ./android-ndk-r10c-darwin-x86_64.bin
+          </pre>
+          <p>The folder containing the NDK extracts itself.</p>
+          <p>Note that you can also use a program like 7z to extract the package.</p>
+          </ol>
+          </ul>
+    <li>On Windows:</li>
+       <ul>
+       <ol>
+       <li>Download the appropriate package from this page.</li>
+       <li>Navigate to the folder to which you downloaded the package.</li>
+       <li>Double-click the downloaded file. The folder containing the NDK extracts itself.</li>
+       </ol>
+       </ul>
+     </ul>When uncompressed, the NDK files are contained in a directory called
     <code>android-ndk-&lt;version&gt;</code>. You can rename the NDK directory if necessary and you
     can move it to any location on your computer. This documentation refers to the NDK directory as
-    <code>&lt;ndk&gt;</code>.</li>
-  </ol>
+    <code>&lt;ndk&gt;</code>.
+
 
   <p>You are now ready to start working with the NDK.</p>
 
@@ -3689,7 +3855,7 @@
 
   <h3 id="Tools">Development tools</h3>
 
-  <p>The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate
+  <p>The NDK includes a set of cross-toolchains (compilers, linkers, etc.) that can generate
   native ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms.</p>
 
   <p>It provides a set of system headers for stable native APIs that are guaranteed to be supported
diff --git a/docs/html/training/material/animations.jd b/docs/html/training/material/animations.jd
new file mode 100644
index 0000000..e8291b8
--- /dev/null
+++ b/docs/html/training/material/animations.jd
@@ -0,0 +1,548 @@
+page.title=Defining Custom Animations
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#Touch">Customize Touch Feedback</a></li>
+  <li><a href="#Reveal">Use the Reveal Effect</a></li>
+  <li><a href="#Transitions">Customize Activity Transitions</a></li>
+  <li><a href="#ViewState">Animate View State Changes</a></li>
+  <li><a href="#AnimVector">Animate Vector Drawables</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>Animations in material design give users feedback on their actions and provide visual
+continuity as users interact with your app. The material theme provides some default animations
+for buttons and activity transitions, and Android 5.0 (API level 21) and above lets you customize
+these animations and create new ones:</p>
+
+<ul>
+<li>Touch feedback</li>
+<li>Circular Reveal</li>
+<li>Activity transitions</li>
+<li>Curved motion</li>
+<li>View state changes</li>
+</ul>
+
+
+<h2 id="Touch">Customize Touch Feedback</h2>
+
+<p>Touch feedback in material design provides an instantaneous visual confirmation at the
+point of contact when users interact with UI elements. The default touch feedback animations
+for buttons use the new {@link android.graphics.drawable.RippleDrawable} class, which transitions
+between different states with a ripple effect.</p>
+
+<p>In most cases, you should apply this functionality in your view XML by specifying the view
+background as:</p>
+
+<ul>
+<li><code>?android:attr/selectableItemBackground</code> for a bounded ripple</li>
+<li><code>?android:attr/selectableItemBackgroundBorderless</code> for a ripple that extends beyond
+the view</li>
+</ul>
+
+<p class="note"><strong>Note:</strong> <code>selectableItemBackgroundBorderless</code> is a new
+attribute introduced in API level 21.</p>
+
+
+<p>Alternatively, you can define a {@link android.graphics.drawable.RippleDrawable}
+as an XML resource using the <code>ripple</code> element.</p>
+
+<p>You can assign a color to {@link android.graphics.drawable.RippleDrawable} objects. To change
+the default touch feedback color, use the theme's <code>android:colorControlHighlight</code>
+attribute.</p>
+
+<p>For more information, see the API reference for the {@link
+android.graphics.drawable.RippleDrawable} class.</p>
+
+
+<h2 id="Reveal">Use the Reveal Effect</h2>
+
+<p>Reveal animations provide users visual continuity when you show or hide a group of UI
+elements. The {@link android.view.ViewAnimationUtils#createCircularReveal
+ViewAnimationUtils.createCircularReveal()} method enables you to animate a clipping circle to
+reveal or hide a view.</p>
+
+<p>To reveal a previously invisible view using this effect:</p>
+
+<pre>
+// previously invisible view
+View myView = findViewById(R.id.my_view);
+
+// get the center for the clipping circle
+int cx = (myView.getLeft() + myView.getRight()) / 2;
+int cy = (myView.getTop() + myView.getBottom()) / 2;
+
+// get the final radius for the clipping circle
+int finalRadius = myView.getWidth();
+
+// create and start the animator for this view
+// (the start radius is zero)
+Animator anim =
+    ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);
+anim.start();
+</pre>
+
+<p>To hide a previously visible view using this effect:</p>
+
+<pre>
+// previously visible view
+final View myView = findViewById(R.id.my_view);
+
+// get the center for the clipping circle
+int cx = (myView.getLeft() + myView.getRight()) / 2;
+int cy = (myView.getTop() + myView.getBottom()) / 2;
+
+// get the initial radius for the clipping circle
+int initialRadius = myView.getWidth();
+
+// create the animation (the final radius is zero)
+Animator anim =
+    ViewAnimationUtils.createCircularReveal(myView, cx, cy, initialRadius, 0);
+
+// make the view invisible when the animation is done
+anim.addListener(new AnimatorListenerAdapter() {
+    &#64;Override
+    public void onAnimationEnd(Animator animation) {
+        super.onAnimationEnd(animation);
+        myView.setVisibility(View.INVISIBLE);
+    }
+});
+
+// start the animation
+anim.start();
+</pre>
+
+
+<h2 id="Transitions">Customize Activity Transitions</h2>
+
+<!-- shared transition video -->
+<div style="width:290px;margin-left:35px;float:right">
+  <div class="framed-nexus5-port-span-5">
+  <video class="play-on-hover" autoplay="">
+    <source src="{@docRoot}design/material/videos/ContactsAnim.mp4">
+    <source src="{@docRoot}design/material/videos/ContactsAnim.webm">
+    <source src="{@docRoot}design/material/videos/ContactsAnim.ogv">
+  </video>
+  </div>
+  <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
+    <p class="img-caption" style="margin-top:3px;margin-bottom:10px"><strong>Figure 1</strong> - A
+    transition with shared elements.</p>
+    <em>To replay the movie, click on the device screen</em>
+  </div>
+</div>
+
+<p>Activity transitions in material design apps provide visual connections between different states
+through motion and transformations between common elements. You can specify custom animations for
+enter and exit transitions and for transitions of shared elements between activities.</p>
+
+<ul>
+<li>An <strong>enter</strong> transition determines how views in an activity enter the scene.
+For example, in the <em>explode</em> enter transition, the views enter the scene from the outside
+and fly in towards the center of the screen.</li>
+
+<li>An <strong>exit</strong> transition determines how views in an activity exit the scene. For
+  example, in the <em>explode</em> exit transition, the views exit the scene away from the
+center.</li>
+
+<li>A <strong>shared elements</strong> transition determines how views that are shared between
+two activities transition between these activities. For example, if two activities have the same
+image in different positions and sizes, the <em>changeImageTransform</em> shared element transition
+translates and scales the image smoothly between these activities.</li>
+</ul>
+
+<p>Android 5.0 (API level 21) supports these enter and exit transitions:</p>
+
+<ul>
+<li><em>explode</em> - Moves views in or out from the center of the scene.</li>
+<li><em>slide</em> - Moves views in or out from one of the edges of the scene.</li>
+<li><em>fade</em> - Adds or removes a view from the scene by changing its opacity.</li>
+</ul>
+
+<p>Any transition that extends the {@link android.transition.Visibility} class is supported
+as an enter or exit transition. For more information, see the API reference for the
+{@link android.transition.Transition} class.</p>
+
+<p>Android 5.0 (API level 21) also supports these shared elements transitions:</p>
+
+<ul>
+<li><em>changeBounds</em> - Animates the changes in layout bounds of target views.</li>
+<li><em>changeClipBounds</em> - Animates the changes in clip bounds of target views.</li>
+<li><em>changeTransform</em> - Animates the changes in scale and rotation of target views.</li>
+<li><em>changeImageTransform</em> - Animates changes in size and scale of target images.</li>
+</ul>
+
+<p>When you enable activity transitions in your app, the default cross-fading transition is
+activated between the entering and exiting activities.</p>
+
+<img src="{@docRoot}training/material/images/SceneTransition.png" alt="" width="600" height="405"
+     style="margin-top:20px"/>
+<p class="img-caption">
+  <strong>Figure 2</strong> - A scene transition with one shared element.
+</p>
+
+<h3>Specify custom transitions</h3>
+
+<p>First, enable window content transitions with the <code>android:windowContentTransitions</code>
+attribute when you define a style that inherits from the material theme. You can also specify
+enter, exit, and shared element transitions in your style definition:</p>
+
+<pre>
+&lt;style name="BaseAppTheme" parent="android:Theme.Material">
+  &lt;!-- enable window content transitions -->
+  &lt;item name="android:windowContentTransitions">true&lt;/item>
+
+  &lt;!-- specify enter and exit transitions -->
+  &lt;item name="android:windowEnterTransition">@transition/explode&lt;/item>
+  &lt;item name="android:windowExitTransition">@transition/explode&lt;/item>
+
+  &lt;!-- specify shared element transitions -->
+  &lt;item name="android:windowSharedElementEnterTransition">
+    &#64;transition/change_image_transform&lt;/item>
+  &lt;item name="android:windowSharedElementExitTransition">
+    &#64;transition/change_image_transform&lt;/item>
+&lt;/style>
+</pre>
+
+<p>The <code>change_image_transform</code> transition in this example is defined as follows:</p>
+
+<pre>
+&lt;!-- res/transition/change_image_transform.xml -->
+&lt;!-- (see also Shared Transitions below) -->
+&lt;transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
+  &lt;changeImageTransform/>
+&lt;/transitionSet>
+</pre>
+
+<p>The <code>changeImageTransform</code> element corresponds to the
+{@link android.transition.ChangeImageTransform} class. For more information, see the API
+reference for {@link android.transition.Transition}.</p>
+
+<p>To enable window content transitions in your code instead, call the
+{@link android.view.Window#requestFeature Window.requestFeature()} method:</p>
+
+<pre>
+// inside your activity (if you did not enable transitions in your theme)
+getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
+
+// set an exit transition
+getWindow().setExitTransition(new Explode());
+</pre>
+
+<p>To specify transitions in your code, call these methods with a {@link
+android.transition.Transition} object:</p>
+
+<ul>
+  <li>{@link android.view.Window#setEnterTransition Window.setEnterTransition()}</li>
+  <li>{@link android.view.Window#setExitTransition Window.setExitTransition()}</li>
+  <li>{@link android.view.Window#setSharedElementEnterTransition
+      Window.setSharedElementEnterTransition()}</li>
+  <li>{@link android.view.Window#setSharedElementExitTransition
+      Window.setSharedElementExitTransition()}</li>
+</ul>
+
+<p>The {@link android.view.Window#setExitTransition setExitTransition()} and {@link
+android.view.Window#setSharedElementExitTransition setSharedElementExitTransition()} methods define
+the exit transition for the calling activity. The {@link android.view.Window#setEnterTransition
+setEnterTransition()} and {@link android.view.Window#setSharedElementEnterTransition
+setSharedElementEnterTransition()} methods define the enter transition for the called activity.</p>
+
+<p>To get the full effect of a transition, you must enable window content transitions on both the
+calling and called activities. Otherwise, the calling activity will start the exit transition,
+but then you'll see a window transition (like scale or fade).</p>
+
+<p>To start an enter transition as soon as possible, use the
+{@link android.view.Window#setAllowEnterTransitionOverlap Window.setAllowEnterTransitionOverlap()}
+method on the called activity. This lets you have more dramatic enter transitions.</p>
+
+<h3>Start an activity using transitions</h3>
+
+<p>If you enable transitions and set an exit transition for an activity, the transition is activated
+when you launch another activity as follows:</p>
+
+<pre>
+startActivity(intent,
+              ActivityOptions.makeSceneTransitionAnimation(this).toBundle());
+</pre>
+
+<p>If you have set an enter transition for the second activity, the transition is also activated
+when the activity starts. To disable transitions when you start another activity, provide
+a <code>null</code> options bundle.</p>
+
+<h3>Start an activity with a shared element</h3>
+
+<p>To make a screen transition animation between two activities that have a shared element:</p>
+
+<ol>
+<li>Enable window content transitions in your theme.</li>
+<li>Specify a shared elements transition in your style.</li>
+<li>Define your transition as an XML resource.</li>
+<li>Assign a common name to the shared elements in both layouts with the
+    <code>android:transitionName</code> attribute.</li>
+<li>Use the {@link android.app.ActivityOptions#makeSceneTransitionAnimation
+ActivityOptions.makeSceneTransitionAnimation()} method.</li>
+</ol>
+
+<pre>
+// get the element that receives the click event
+final View imgContainerView = findViewById(R.id.img_container);
+
+// get the common element for the transition in this activity
+final View androidRobotView = findViewById(R.id.image_small);
+
+// define a click listener
+imgContainerView.setOnClickListener(new View.OnClickListener() {
+    &#64;Override
+    public void onClick(View view) {
+        Intent intent = new Intent(this, Activity2.class);
+        // create the transition animation - the images in the layouts
+        // of both activities are defined with android:transitionName="robot"
+        ActivityOptions options = ActivityOptions
+            .makeSceneTransitionAnimation(this, androidRobotView, "robot");
+        // start the new activity
+        startActivity(intent, options.toBundle());
+    }
+});
+</pre>
+
+<p>For shared dynamic views that you generate in your code, use the
+{@link android.view.View#setTransitionName View.setTransitionName()} method to specify a common
+element name in both activities.</p>
+
+<p>To reverse the scene transition animation when you finish the second activity, call the
+{@link android.app.Activity#finishAfterTransition Activity.finishAfterTransition()}
+method instead of {@link android.app.Activity#finish Activity.finish()}.</p>
+
+<h3>Start an activity with multiple shared elements</h3>
+
+<p>To make a scene transition animation between two activities that have more than one shared
+element, define the shared elements in both layouts with the <code>android:transitionName</code>
+attribute (or use the {@link android.view.View#setTransitionName View.setTransitionName()} method
+in both activities), and create an {@link android.app.ActivityOptions} object as follows:</p>
+
+<pre>
+ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this,
+        Pair.create(view1, "agreedName1"),
+        Pair.create(view2, "agreedName2"));
+</pre>
+
+
+<h2 id="CurvedMotion">Use Curved Motion</h2>
+
+<p>Animations in material design rely on curves for time interpolation and spatial movement
+patterns. With Android 5.0 (API level 21) and above, you can define custom timing curves and
+curved motion patterns for animations.</p>
+
+<p>The {@link android.view.animation.PathInterpolator} class is a new interpolator based on a
+Bézier curve or a {@link android.graphics.Path} object. This interpolator specifies a motion curve
+in a 1x1 square, with anchor points at (0,0) and (1,1) and control points as specified using the
+constructor arguments. You can also define a path interpolator as an XML resource:</p>
+
+<pre>
+&lt;pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+    android:controlX1="0.4"
+    android:controlY1="0"
+    android:controlX2="1"
+    android:controlY2="1"/>
+</pre>
+
+<p>The system provides XML resources for the three basic curves in the material design
+specification:</p>
+
+<ul>
+  <li><code>&#64;interpolator/fast_out_linear_in.xml</code></li>
+  <li><code>&#64;interpolator/fast_out_slow_in.xml</code></li>
+  <li><code>&#64;interpolator/linear_out_slow_in.xml</code></li>
+</ul>
+
+<p>You can pass a {@link android.view.animation.PathInterpolator} object to the {@link
+android.animation.Animator#setInterpolator Animator.setInterpolator()} method.</p>
+
+<p>The {@link android.animation.ObjectAnimator} class has new constructors that enable you to animate
+coordinates along a path using two or more properties at once. For example, the following animator
+uses a {@link android.graphics.Path} object to animate the X and Y properties of a view:</p>
+
+<pre>
+ObjectAnimator mAnimator;
+mAnimator = ObjectAnimator.ofFloat(view, View.X, View.Y, path);
+...
+mAnimator.start();
+</pre>
+
+
+<h2 id="ViewState">Animate View State Changes</h2>
+
+<p>The {@link android.animation.StateListAnimator} class lets you define animators that run when
+the state of a view changes. The following example shows how to define an {@link
+android.animation.StateListAnimator}  as an XML resource:</p>
+
+<pre>
+&lt;!-- animate the translationZ property of a view when pressed -->
+&lt;selector xmlns:android="http://schemas.android.com/apk/res/android">
+  &lt;item android:state_pressed="true">
+    &lt;set>
+      &lt;objectAnimator android:propertyName="translationZ"
+        android:duration="@android:integer/config_shortAnimTime"
+        android:valueTo="2dp"
+        android:valueType="floatType"/>
+        &lt;!-- you could have other objectAnimator elements
+             here for "x" and "y", or other properties -->
+    &lt;/set>
+  &lt;/item>
+  &lt;item android:state_enabled="true"
+    android:state_pressed="false"
+    android:state_focused="true">
+    &lt;set>
+      &lt;objectAnimator android:propertyName="translationZ"
+        android:duration="100"
+        android:valueTo="0"
+        android:valueType="floatType"/>
+    &lt;/set>
+  &lt;/item>
+&lt;/selector>
+</pre>
+
+<p>To attach custom view state animations to a view, define an animator using the
+<code>selector</code> element in an XML resource file as in this example, and assign it to your
+view with the <code>android:stateListAnimator</code> attribute. To assign a state list animator
+to a view in your code, use the {@link android.animation.AnimatorInflater#loadStateListAnimator
+AnimationInflater.loadStateListAnimator()} method, and assign the animator to your view with the
+{@link android.view.View#setStateListAnimator View.setStateListAnimator()} method.</p>
+
+<p>When your theme extends the material theme, buttons have a Z animation by default. To avoid this
+behavior in your buttons, set the <code>android:stateListAnimator</code> attribute to
+<code>@null</code>.</p>
+
+<p>The {@link android.graphics.drawable.AnimatedStateListDrawable} class lets you create drawables
+that show animations between state changes of the associated view. Some of the system widgets in
+Android 5.0 use these animations by default. The following example shows how
+to define an {@link android.graphics.drawable.AnimatedStateListDrawable} as an XML resource:</p>
+
+<pre>
+&lt;!-- res/drawable/myanimstatedrawable.xml -->
+&lt;animated-selector
+    xmlns:android="http://schemas.android.com/apk/res/android">
+
+    &lt;!-- provide a different drawable for each state-->
+    &lt;item android:id="@+id/pressed" android:drawable="@drawable/drawableP"
+        android:state_pressed="true"/>
+    &lt;item android:id="@+id/focused" android:drawable="@drawable/drawableF"
+        android:state_focused="true"/>
+    &lt;item android:id="@id/default"
+        android:drawable="@drawable/drawableD"/>
+
+    &lt;!-- specify a transition -->
+    &lt;transition android:fromId="@+id/default" android:toId="@+id/pressed">
+        &lt;animation-list>
+            &lt;item android:duration="15" android:drawable="@drawable/dt1"/>
+            &lt;item android:duration="15" android:drawable="@drawable/dt2"/>
+            ...
+        &lt;/animation-list>
+    &lt;/transition>
+    ...
+&lt;/animated-selector>
+</pre>
+
+
+<h2 id="AnimVector">Animate Vector Drawables</h2>
+
+<p><a href="{@docRoot}training/material/drawables.html#VectorDrawables">Vector Drawables</a> are
+scalable without losing definition. The {@link android.graphics.drawable.AnimatedVectorDrawable}
+class lets you animate the properties of a vector drawable.</p>
+
+<p>You normally define animated vector drawables in three XML files:</p>
+
+<ul>
+<li>A vector drawable with the <code>&lt;vector&gt;</code> element in
+<code>res/drawable/</code></li>
+<li>An animated vector drawable with the <code>&lt;animated-vector&gt;</code> element in
+<code>res/drawable/</code></li>
+<li>One or more object animators with the <code>&lt;objectAnimator&gt;</code> element in
+<code>res/anim/</code></li>
+</ul>
+
+<p>Animated vector drawables can animate the attributes of the <code>&lt;group&gt;</code> and
+<code>&lt;path&gt;</code> elements. The <code>&lt;group&gt;</code> elements defines a set of
+paths or subgroups, and the <code>&lt;path&gt;</code> element defines paths to be drawn.</p>
+
+<p>When you define a vector drawable that you want to animate, use the <code>android:name</code>
+attribute to assign a unique name to groups and paths, so you can refer to them from your animator
+definitions. For example:</p>
+
+<pre>
+&lt;!-- res/drawable/vectordrawable.xml -->
+&lt;vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="64dp"
+    android:width="64dp"
+    android:viewportHeight="600"
+    android:viewportWidth="600">
+    &lt;group
+        <strong>android:name="rotationGroup"</strong>
+        android:pivotX="300.0"
+        android:pivotY="300.0"
+        android:rotation="45.0" >
+        &lt;path
+            <strong>android:name="v"</strong>
+            android:fillColor="#000000"
+            android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
+    &lt;/group>
+&lt;/vector>
+</pre>
+
+<p>The animated vector drawable definition refers to the groups and paths in the vector drawable
+by their names:</p>
+
+<pre>
+&lt;!-- res/drawable/animvectordrawable.xml -->
+&lt;animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+  android:drawable="@drawable/vectordrawable" >
+    &lt;target
+        android:name="rotationGroup"
+        android:animation="@anim/rotation" />
+    &lt;target
+        android:name="v"
+        android:animation="@anim/path_morph" />
+&lt;/animated-vector>
+</pre>
+
+<p>The animation definitions represent {@link android.animation.ObjectAnimator} or {@link
+android.animation.AnimatorSet} objects. The first animator in this example rotates the target
+group 360 degrees:</p>
+
+<pre>
+&lt;!-- res/anim/rotation.xml -->
+&lt;objectAnimator
+    android:duration="6000"
+    android:propertyName="rotation"
+    android:valueFrom="0"
+    android:valueTo="360" />
+</pre>
+
+<p>The second animator in this example morphs the vector drawable's path from one shape to
+another. Both paths must be compatible for morphing: they must have the same number of commands
+and the same number of parameters for each command.</p>
+
+<pre>
+&lt;!-- res/anim/path_morph.xml -->
+&lt;set xmlns:android="http://schemas.android.com/apk/res/android">
+    &lt;objectAnimator
+        android:duration="3000"
+        android:propertyName="pathData"
+        android:valueFrom="M300,70 l 0,-70 70,70 0,0   -70,70z"
+        android:valueTo="M300,70 l 0,-70 70,0  0,140 -70,0 z"
+        android:valueType="pathType" />
+&lt;/set>
+</pre>
+
+<p>For more information, see the API reference for {@link
+android.graphics.drawable.AnimatedVectorDrawable}.</p>
diff --git a/docs/html/training/material/compatibility.jd b/docs/html/training/material/compatibility.jd
new file mode 100644
index 0000000..5e03450
--- /dev/null
+++ b/docs/html/training/material/compatibility.jd
@@ -0,0 +1,172 @@
+page.title=Maintaining Compatibility
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#Theme">Define Alternative Styles</a></li>
+  <li><a href="#Layouts">Provide Alternative Layouts</a></li>
+  <li><a href="#SupportLib">Use the Support Library</a></li>
+  <li><a href="#CheckVersion">Check the System Version</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>Some material design features like the material theme and custom activity transitions are
+only available on Android 5.0 (API level 21) and above. However, you can design your apps to make
+use of these features when running on devices that support material design and still be compatible
+with devices running previous releases of Android.</p>
+
+
+<h2 id="Theme">Define Alternative Styles</h2>
+
+<p>You can configure your app to use the material theme on devices that support it and revert
+to an older theme on devices running earlier versions of Android:</p>
+
+<ol>
+<li>Define a theme that inherits from an older theme (like Holo) in
+    <code>res/values/styles.xml</code>.</li>
+<li>Define a theme with the same name that inherits from the material theme in
+    <code>res/values-v21/styles.xml</code>.</li>
+<li>Set this theme as your app's theme in the manifest file.</li>
+</ol>
+
+<p class="note"><strong>Note:</strong>
+If your app uses the material theme but does not provide an alternative theme in this manner,
+your app will not run on versions of Android earlier than 5.0.
+</p>
+
+
+<h2 id="Layouts">Provide Alternative Layouts</h2>
+
+<p>If the layouts that you design according to the material design guidelines do not use any of
+the new XML attributes introduced in Android 5.0 (API level 21), they will work on previous
+versions of Android. Otherwise, you can provide alternative layouts. You can also provide
+alternative layouts to customize how your app looks on earlier versions of Android.</p>
+
+<p>Create your layout files for Android 5.0 (API level 21) inside <code>res/layout-v21/</code> and
+your alternative layout files for earlier versions of Android inside <code>res/layout/</code>.
+For example, <code>res/layout/my_activity.xml</code> is an alternative layout for
+<code>res/layout-v21/my_activity.xml</code>.</p>
+
+<p>To avoid duplication of code, define your styles inside <code>res/values/</code>, modify the
+styles in <code>res/values-v21/</code> for the new APIs, and use style inheritance, defining base
+styles in <code>res/values/</code> and inheriting from those in <code>res/values-v21/</code>.</p>
+
+
+<h2 id="SupportLib">Use the Support Library</h2>
+
+<p>The <a href="{@docRoot}tools/support-library/features.html#v7">v7 Support Libraries</a>
+r21 and above includes the following material design features:</p>
+
+<ul>
+<li><a href="{@docRoot}training/material/theme.html">Material design styles</a> for some system
+    widgets when you apply one of the <code>Theme.AppCompat</code> themes.</li>
+<li><a href="{@docRoot}training/material/theme.html#ColorPalette">Color palette theme attributes</a>
+    in the <code>Theme.AppCompat</code> themes.</li>
+<li>The {@link android.support.v7.widget.RecyclerView} widget to <a
+    href="{@docRoot}training/material/lists-cards.html#RecyclerView">display data
+    collections</a>.</li>
+<li>The {@link android.support.v7.widget.CardView} widget to <a
+    href="{@docRoot}training/material/lists-cards.html#CardView">create cards</a>.</li>
+<li>The {@link android.support.v7.graphics.Palette} class to <a
+    href="{@docRoot}training/material/drawables.html#ColorExtract">extract prominent colors from
+    images</a>.</li>
+</ul>
+
+<h3>System widgets</h3>
+
+<p>The <code>Theme.AppCompat</code> themes provide material design styles for these widgets:</p>
+
+<ul>
+  <li>{@link android.widget.EditText}</li>
+  <li>{@link android.widget.Spinner}</li>
+  <li>{@link android.widget.CheckBox}</li>
+  <li>{@link android.widget.RadioButton}</li>
+  <li>{@link android.support.v7.widget.SwitchCompat}</li>
+  <li>{@link android.widget.CheckedTextView}</li>
+</ul>
+
+<h3>Color Palette</h3>
+
+<p>To obtain material design styles and customize the color palette with the Android v7 Support
+Library, apply one of the <code>Theme.AppCompat</code> themes:</p>
+
+<pre>
+&lt;!-- extend one of the Theme.AppCompat themes -->
+&lt;style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
+    &lt;!-- customize the color palette -->
+    &lt;item name="colorPrimary">@color/material_blue_500&lt;/item>
+    &lt;item name="colorPrimaryDark">@color/material_blue_700&lt;/item>
+    &lt;item name="colorAccent">@color/material_green_A200&lt;/item>
+&lt;/style>
+</pre>
+
+<h3>Lists and Cards</h3>
+
+<p>The {@link android.support.v7.widget.RecyclerView} and {@link
+android.support.v7.widget.CardView} widgets are available in earlier versions of Android through
+the Android v7 Support Library with these limitations:</p>
+<ul>
+<li>{@link android.support.v7.widget.CardView} falls back to a programmatic shadow implementation
+    using additional padding.</li>
+<li>{@link android.support.v7.widget.CardView} does not clip its children views that intersect
+    with rounded corners.</li>
+</ul>
+
+
+<h3>Dependencies</h3>
+
+<p>To use these features in versions of Android earlier than 5.0 (API level 21), include the
+Android v7 Support Library in your project as a <a
+href="{@docRoot}/sdk/installing/studio-build.html#dependencies">Gradle dependency</a>:</p>
+
+<pre>
+dependencies {
+    compile 'com.android.support:appcompat-v7:+'
+    compile 'com.android.support:cardview-v7:+'
+    compile 'com.android.support:recyclerview-v7:+'
+}
+</pre>
+
+
+<h2 id="CheckVersion">Check the System Version</h2>
+
+<p>The following features are available only in Android 5.0 (API level 21) and above:</p>
+
+<ul>
+<li>Activity transitions</li>
+<li>Touch feedback</li>
+<li>Reveal animations</li>
+<li>Path-based animations</li>
+<li>Vector drawables</li>
+<li>Drawable tinting</li>
+</ul>
+
+<p>To preserve compatibility with earlier versions of Android, check the system {@link
+android.os.Build.VERSION#SDK_INT version} at runtime before you invoke the APIs for any of these
+features:</p>
+
+<pre>
+// Check if we're running on Android 5.0 or higher
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+    // Call some material design APIs here
+} else {
+    // Implement this feature without material design
+}
+</pre>
+
+<p class="note"><strong>Note:</strong> To specify which versions of Android your app supports,
+use the <code>android:minSdkVersion</code> and <code>android:targetSdkVersion</code>
+attributes in your manifest file. To use the material design features in Android 5.0, set
+the <code>android:targetSdkVersion</code> attribute to <code>21</code>. For more information, see
+the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt; API
+guide</a>.</p>
diff --git a/docs/html/training/material/drawables.jd b/docs/html/training/material/drawables.jd
new file mode 100644
index 0000000..8d7f453
--- /dev/null
+++ b/docs/html/training/material/drawables.jd
@@ -0,0 +1,119 @@
+page.title=Working with Drawables
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#DrawableTint">Tint Drawable Resources</a></li>
+  <li><a href="#ColorExtract">Extract Prominent Colors from an Image</a></li>
+  <li><a href="#VectorDrawables">Create Vector Drawables</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+<p>The following capabilities for drawables help you implement material design in your apps:</p>
+
+<ul>
+<li>Drawable tinting</li>
+<li>Prominent color extraction</li>
+<li>Vector drawables</li>
+</ul>
+
+<p>This lesson shows you how to use these features in your app.</p>
+
+
+<h2 id="DrawableTint">Tint Drawable Resources</h2>
+
+<p>With Android 5.0 (API level 21) and above, you can tint bitmaps and nine-patches defined as
+alpha masks. You can tint them with color resources or theme attributes that resolve to color
+resources (for example, <code>?android:attr/colorPrimary</code>). Usually, you create these assets
+only once and color them automatically to match your theme.</p>
+
+<p>You can apply a tint to {@link android.graphics.drawable.BitmapDrawable} or {@link
+android.graphics.drawable.NinePatchDrawable} objects with the {@code setTint()} method. You can
+also set the tint color and mode in your layouts with the <code>android:tint</code> and
+<code>android:tintMode</code> attributes.</p>
+
+
+<h2 id="ColorExtract">Extract Prominent Colors from an Image</h2>
+
+<p>The Android Support Library r21 and above includes the {@link
+android.support.v7.graphics.Palette} class, which lets you extract prominent colors from an image.
+This class extracts the following prominent colors:</p>
+
+<ul>
+<li>Vibrant</li>
+<li>Vibrant dark</li>
+<li>Vibrant light</li>
+<li>Muted</li>
+<li>Muted dark</li>
+<li>Muted light</li>
+</ul>
+
+<p>To extract these colors, pass a {@link android.graphics.Bitmap} object to the
+{@link android.support.v7.graphics.Palette#generate Palette.generate()} static method in the
+background thread where you load your images. If you can't use that thread, call the
+{@link android.support.v7.graphics.Palette#generateAsync Palette.generateAsync()} method and
+provide a listener instead.</p>
+
+<p>You can retrieve the prominent colors from the image using the getter methods in the
+<code>Palette</code> class, such as <code>Palette.getVibrantColor</code>.</p>
+
+<p>To use the {@link android.support.v7.graphics.Palette} class in your project, add the following
+<a href="{@docRoot}sdk/installing/studio-build.html#dependencies">Gradle dependency</a> to your
+app's module:</p>
+
+<pre>
+dependencies {
+    ...
+    compile 'com.android.support:palette-v7:+'
+}
+</pre>
+
+<p>For more information, see the API reference for the {@link android.support.v7.graphics.Palette}
+class.</p>
+
+
+<h2 id="VectorDrawables">Create Vector Drawables</h2>
+
+<p>In Android 5.0 (API Level 21) and above, you can define vector drawables, which scale without
+losing definition. You need only one asset file for a vector image, as opposed to an asset file for
+each screen density in the case of bitmap images. To create a vector image, you define the details
+of the shape inside a <code>&lt;vector&gt;</code> XML element.</p>
+
+<p>The following example defines a vector image with the shape of a heart:</p>
+
+<pre>
+&lt;!-- res/drawable/heart.xml -->
+&lt;vector xmlns:android="http://schemas.android.com/apk/res/android"
+    &lt;!-- intrinsic size of the drawable -->
+    android:height="256dp"
+    android:width="256dp"
+    &lt;!-- size of the virtual canvas -->
+    android:viewportWidth="32"
+    android:viewportHeight="32">
+
+  &lt;!-- draw a path -->
+  &lt;path android:fillColor="#8fff"
+      android:pathData="M20.5,9.5
+                        c-1.955,0,-3.83,1.268,-4.5,3
+                        c-0.67,-1.732,-2.547,-3,-4.5,-3
+                        C8.957,9.5,7,11.432,7,14
+                        c0,3.53,3.793,6.257,9,11.5
+                        c5.207,-5.242,9,-7.97,9,-11.5
+                        C25,11.432,23.043,9.5,20.5,9.5z" />
+&lt;/vector>
+</pre>
+
+<p>Vector images are represented in Android as {@link android.graphics.drawable.VectorDrawable}
+objects. For more information about the <code>pathData</code> syntax, see the <a
+href="http://www.w3.org/TR/SVG11/paths.html#PathData">SVG Path reference</a>. For more information
+about animating the properties of vector drawables, see
+<a href="{@docRoot}training/material/animations.html#AnimVector">Animating Vector Drawables</a>.</p>
diff --git a/docs/html/training/material/get-started.jd b/docs/html/training/material/get-started.jd
new file mode 100644
index 0000000..b6088eb
--- /dev/null
+++ b/docs/html/training/material/get-started.jd
@@ -0,0 +1,173 @@
+page.title=Getting Started
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#ApplyTheme">Apply the Material Theme</a></li>
+  <li><a href="#Layouts">Design Your Layouts</a></li>
+  <li><a href="#Depth">Specify Elevation in Your Views</a></li>
+  <li><a href="#ListsCards">Create Lists and Cards</a></li>
+  <li><a href="#Animations">Customize Your Animations</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>To create apps with material design:</p>
+
+<ol>
+  <li style="margin-bottom:10px">
+    Review the <a href="http://www.google.com/design/spec">material design specification</a>.</li>
+  <li style="margin-bottom:10px">
+    Apply the material <strong>theme</strong> to your app.</li>
+  <li style="margin-bottom:10px">
+    Create your <strong>layouts</strong> following material design guidelines.</li>
+  <li style="margin-bottom:10px">
+    Specify the <strong>elevation</strong> of your views to cast shadows.</li>
+  <li style="margin-bottom:10px">
+    Use system <strong>widgets</strong> for lists and cards.</li>
+  <li style="margin-bottom:10px">
+    Customize the <strong>animations</strong> in your app.</li>
+</ol>
+
+<h3>Maintain backward compatibility</h3>
+
+<p>You can add many material design features to your app while maintaining compatibility with
+versions of Android earlier than 5.0. For more information, see
+<a href="{@docRoot}training/material/compatibility.html">Maintaining Compatibility</a>.</p>
+
+<h3>Update your app with material design</h3>
+
+<p>To update an existing app to incorporate material design, update your layouts following
+material design guidelines. Also make sure to incorporate depth, touch feedback, and
+animations.</p>
+
+<h3>Create new apps with material design</h3>
+
+<p>If you are creating a new app with material design features, the <a
+href="http://www.google.com/design/spec">material design guidelines</a> provide you with a
+cohesive design framework. Follow those guidelines and use the new functionality in the Android
+framework to design and develop your app.</p>
+
+
+<h2 id="ApplyTheme">Apply the Material Theme</h2>
+
+<p>To apply the material theme in your app, specify a style that inherits from
+<code>android:Theme.Material</code>:</p>
+
+<pre>
+&lt;!-- res/values/styles.xml -->
+&lt;resources>
+  &lt;!-- your theme inherits from the material theme -->
+  &lt;style name="AppTheme" parent="android:Theme.Material">
+    &lt;!-- theme customizations -->
+  &lt;/style>
+&lt;/resources>
+</pre>
+
+<p>The material theme provides updated system widgets that let you set their color palette and
+default animations for touch feedback and activity transitions. For more details, see
+<a href="{@docRoot}training/material/theme.html">Using the Material Theme</a>.</p>
+
+
+<h2 id="Layouts">Design Your Layouts</h2>
+
+<p>In addition to applying and customizing the material theme, your layouts should conform to
+the <a href="http://www.google.com/design/spec">material design guidelines</a>. When you design
+your layouts, pay special attention to the following:</p>
+
+<ul>
+<li>Baseline grids</li>
+<li>Keylines</li>
+<li>Spacing</li>
+<li>Touch target size</li>
+<li>Layout structure</li>
+</ul>
+
+
+<h2 id="Depth">Specify Elevation in Your Views</h2>
+
+<p>Views can cast shadows, and the elevation value of a view
+determines the size of its shadow and its drawing order. To set the elevation of a view, use the
+<code>android:elevation</code> attribute in your layouts:</p>
+
+<pre>
+&lt;TextView
+    android:id="&#64;+id/my_textview"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:text="&#64;string/next"
+    android:background="&#64;color/white"
+    android:elevation="5dp" />
+</pre>
+
+<p>The new <code>translationZ</code> property lets you create animations that reflect temporary
+changes in the elevation of a view. Elevation changes can be useful when
+<a href="{@docRoot}training/material/animations.html#ViewState">responding to touch
+gestures</a>.</p>
+
+<p>For more details, see <a href="{@docRoot}training/material/shadows-clipping.html">Defining
+Shadows and Clipping Views</a>.</p>
+
+
+<h2 id="ListsCards">Create Lists and Cards</h2>
+
+<p>{@link android.support.v7.widget.RecyclerView} is a more pluggable version of {@link
+android.widget.ListView} that supports different layout types and provides performance improvements.
+{@link android.support.v7.widget.CardView} lets you show pieces of information inside cards with
+a consistent look across apps. The following code example demonstrates how to include a
+{@link android.support.v7.widget.CardView} in your layout:</p>
+
+<pre>
+&lt;android.support.v7.widget.CardView
+    android:id="&#64;+id/card_view"
+    android:layout_width="200dp"
+    android:layout_height="200dp"
+    card_view:cardCornerRadius="3dp">
+    ...
+&lt;/android.support.v7.widget.CardView>
+</pre>
+
+<p>For more information, see <a href="{@docRoot}training/material/lists-cards.html">Creating Lists
+and Cards</a>.</p>
+
+
+<h2 id="Animations">Customize Your Animations</h2>
+
+<p>Android 5.0 (API level 21) includes new APIs to create custom animations in your app.
+For example, you can enable activity transitions and define an exit transition inside an
+activity:</p>
+
+<pre>
+public class MyActivity extends Activity {
+
+    &#64;Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // enable transitions
+        getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
+        setContentView(R.layout.activity_my);
+    }
+
+    public void onSomeButtonClicked(View view) {
+        getWindow().setExitTransition(new Explode());
+        Intent intent = new Intent(this, MyOtherActivity.class);
+        startActivity(intent,
+                      ActivityOptions
+                          .makeSceneTransitionAnimation(this).toBundle());
+    }
+}
+</pre>
+
+<p>When you start another activity from this activity, the exit transition is activated.</p>
+
+<p>To learn more about the new animation APIs, see <a
+href="{@docRoot}training/material/animations.html">Defining Custom Animations</a>.</p>
diff --git a/docs/html/preview/material/images/RecyclerView.png b/docs/html/training/material/images/RecyclerView.png
similarity index 100%
rename from docs/html/preview/material/images/RecyclerView.png
rename to docs/html/training/material/images/RecyclerView.png
Binary files differ
diff --git a/docs/html/training/material/images/SceneTransition.png b/docs/html/training/material/images/SceneTransition.png
new file mode 100644
index 0000000..ae82820
--- /dev/null
+++ b/docs/html/training/material/images/SceneTransition.png
Binary files differ
diff --git a/docs/html/preview/material/images/ThemeColors.png b/docs/html/training/material/images/ThemeColors.png
similarity index 85%
rename from docs/html/preview/material/images/ThemeColors.png
rename to docs/html/training/material/images/ThemeColors.png
index 53f695d..b3c570b 100644
--- a/docs/html/preview/material/images/ThemeColors.png
+++ b/docs/html/training/material/images/ThemeColors.png
Binary files differ
diff --git a/docs/html/training/material/images/shadows-depth.png b/docs/html/training/material/images/shadows-depth.png
new file mode 100644
index 0000000..26b6b4a
--- /dev/null
+++ b/docs/html/training/material/images/shadows-depth.png
Binary files differ
diff --git a/docs/html/training/material/index.jd b/docs/html/training/material/index.jd
new file mode 100644
index 0000000..542a941
--- /dev/null
+++ b/docs/html/training/material/index.jd
@@ -0,0 +1,62 @@
+page.title=Creating Apps with Material Design
+page.type=design
+page.image=design/material/images/MaterialLight.png
+page.metaDescription=Learn how to apply material design to your apps.
+
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+  <h2>Dependencies and Prerequisites</h2>
+  <ul>
+    <li>Android 5.0 (API level 21)</li>
+    <li>Android Studio 0.8</li>
+  </ul>
+</div>
+</div>
+
+<p>Material design is a comprehensive guide for visual, motion, and interaction design across
+platforms and devices. To use material design in your Android apps, follow the guidelines
+described in the
+<a href="http://www.google.com/design/spec/material-design/introduction.html">material design
+specification</a> and use the new components and functionality available in Android 5.0
+(API level 21).</p>
+
+<p>This class shows you how to create material design apps with the following elements:</p>
+
+<ul>
+<li>The material theme</li>
+<li>Widgets for cards and lists</li>
+<li>Custom shadows and view clipping</li>
+<li>Vector drawables</li>
+<li>Custom animations</li>
+</ul>
+
+<p>This class also teaches you how to maintain compatibility with versions of Android earlier than
+5.0 (API level 21) when you use material design features in your app.</p>
+
+<h2>Lessons</h2>
+
+<dl>
+  <dt><a href="{@docRoot}training/material/get-started.html">Getting Started</a></dt>
+  <dd>Learn how to update your app with material design features.</dd>
+
+  <dt><a href="{@docRoot}training/material/theme.html">Using the Material Theme</a></dt>
+  <dd>Learn how to apply material design styles to your app.</dd>
+
+  <dt><a href="{@docRoot}training/material/lists-cards.html">Creating Lists and Cards</a></dt>
+  <dd>Learn how to create lists and cards with a consistent look and feel using system widgets.</dd>
+
+  <dt><a href="{@docRoot}training/material/shadows-clipping.html">Defining Shadows and Clipping Views</a></dt>
+  <dd>Learn how to set elevation for your views to create custom shadows and how to clip views.</dd>
+
+  <dt><a href="{@docRoot}training/material/drawables.html">Working with Drawables</a></dt>
+  <dd>Learn how to create vector drawables and how to tint drawable resources.</dd>
+
+  <dt><a href="{@docRoot}training/material/animations.html">Defining Custom Animations</a></dt>
+  <dd>Learn how to create custom animations for views and activity transitions with shared elements.</dd>
+
+  <dt><a href="{@docRoot}training/material/compatibility.html">Maintaining Compatibility</a></dt>
+  <dd>Learn how to maintain compatibility with platform versions earlier than Android 5.0.</dd>
+</dl>
diff --git a/docs/html/training/material/lists-cards.jd b/docs/html/training/material/lists-cards.jd
new file mode 100644
index 0000000..eb45f0d
--- /dev/null
+++ b/docs/html/training/material/lists-cards.jd
@@ -0,0 +1,266 @@
+page.title=Creating Lists and Cards
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#RecyclerView">Create Lists</a></li>
+  <li><a href="#CardView">Create Cards</a></li>
+  <li><a href="#Dependencies">Add Dependencies</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>To create complex lists and cards with material design styles in your apps, you can use the
+{@link android.support.v7.widget.RecyclerView} and {@link android.support.v7.widget.CardView}
+widgets.</p>
+
+
+<h2 id="RecyclerView">Create Lists</h2>
+
+<p>The {@link android.support.v7.widget.RecyclerView} widget is a more advanced and flexible
+version of {@link android.widget.ListView}. This widget is a container for displaying large data
+sets that can be scrolled very efficiently by maintaining a limited number of views. Use the
+{@link android.support.v7.widget.RecyclerView} widget when you have data collections whose elements
+change at runtime based on user action or network events.</p>
+
+<p>The {@link android.support.v7.widget.RecyclerView} class simplifies the display and handling of
+large data sets by providing:</p>
+
+<ul>
+  <li>Layout managers for positioning items</li>
+  <li>Default animations for common item operations, such as removal or addition of items</li>
+</ul>
+
+<p>You also have the flexibility to define custom layout managers and animations for {@link
+android.support.v7.widget.RecyclerView} widgets.</p>
+
+<img src="{@docRoot}training/material/images/RecyclerView.png" alt="" width="550" height="106"/>
+<p class="img-caption">
+<strong>Figure 1</strong>. The <code>RecyclerView</code> widget.
+</p>
+
+<p>To use the {@link android.support.v7.widget.RecyclerView} widget, you have to specify an
+adapter and a layout manager. To create an adapter, extend the {@link
+android.support.v7.widget.RecyclerView.Adapter RecyclerView.Adapter} class. The details
+of the implementation depend on the specifics of your dataset and the type of views. For more
+information, see the <a href="#RVExamples">examples</a> below.</p>
+
+<div style="float:right">
+<img src="{@docRoot}design/material/images/list_mail.png" alt="" width="250" height="426"/>
+<p class="img-caption" style="margin-left:8px">
+<strong>Figure 2</strong> - Lists with <code>RecyclerView</code>.
+</p>
+</div>
+
+<p>A <strong>layout manager</strong> positions item views inside a {@link
+android.support.v7.widget.RecyclerView} and determines when to reuse item views that are no
+longer visible to the user. To reuse (or <em>recycle</em>) a view, a layout manager may ask the
+adapter to replace the contents of the view with a different element from the dataset. Recycling
+views in this manner improves performance by avoiding the creation of unnecessary views or
+performing expensive {@link android.app.Activity#findViewById findViewById()} lookups.</p>
+
+<p>{@link android.support.v7.widget.RecyclerView} provides these built-in layout managers:</p>
+
+<ul>
+<li>{@link android.support.v7.widget.LinearLayoutManager} shows items in a vertical or horizontal
+scrolling list.</li>
+<li>{@link android.support.v7.widget.GridLayoutManager} shows items in a grid.</li>
+<li>{@link android.support.v7.widget.StaggeredGridLayoutManager} shows items in a staggered grid.</li>
+</ul>
+
+<p>To create a custom layout manager, extend the {@link
+android.support.v7.widget.RecyclerView.LayoutManager RecyclerView.LayoutManager} class.</p>
+
+<h3>Animations</h3>
+
+<p>Animations for adding and removing items are enabled by default in {@link
+android.support.v7.widget.RecyclerView}. To customize these animations, extend the
+{@link android.support.v7.widget.RecyclerView.ItemAnimator RecyclerView.ItemAnimator} class and use
+the {@link android.support.v7.widget.RecyclerView#setItemAnimator RecyclerView.setItemAnimator()}
+method.</p>
+
+<h3 id="RVExamples">Examples</h3>
+
+<p>The following code example demonstrates how to add the
+{@link android.support.v7.widget.RecyclerView} to a layout:</p>
+
+<pre>
+&lt;!-- A RecyclerView with some commonly used attributes -->
+&lt;android.support.v7.widget.RecyclerView
+    android:id="@+id/my_recycler_view"
+    android:scrollbars="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"/>
+</pre>
+
+<p>Once you have added a {@link android.support.v7.widget.RecyclerView} widget to your layout,
+obtain a handle to the object, connect it to a layout manager, and attach an adapter for the data
+to be displayed:</p>
+
+<pre>
+public class MyActivity extends Activity {
+    private RecyclerView mRecyclerView;
+    private RecyclerView.Adapter mAdapter;
+    private RecyclerView.LayoutManager mLayoutManager;
+
+    &#64;Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.my_activity);
+        mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);
+
+        // use this setting to improve performance if you know that changes
+        // in content do not change the layout size of the RecyclerView
+        mRecyclerView.setHasFixedSize(true);
+
+        // use a linear layout manager
+        mLayoutManager = new LinearLayoutManager(this);
+        mRecyclerView.setLayoutManager(mLayoutManager);
+
+        // specify an adapter (see also next example)
+        mAdapter = new MyAdapter(myDataset);
+        mRecyclerView.setAdapter(mAdapter);
+    }
+    ...
+}
+</pre>
+
+<p>The adapter provides access to the items in your data set, creates views for items, and
+replaces the content of some of the views with new data items when the original item is no longer
+visible. The following code example shows a simple implementation for a data set that consists
+of an array of strings displayed using {@link android.widget.TextView} widgets:</p>
+
+<pre>
+public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.ViewHolder> {
+    private String[] mDataset;
+
+    // Provide a reference to the views for each data item
+    // Complex data items may need more than one view per item, and
+    // you provide access to all the views for a data item in a view holder
+    public static class ViewHolder extends RecyclerView.ViewHolder {
+        // each data item is just a string in this case
+        public TextView mTextView;
+        public ViewHolder(TextView v) {
+            super(v);
+            mTextView = v;
+        }
+    }
+
+    // Provide a suitable constructor (depends on the kind of dataset)
+    public MyAdapter(String[] myDataset) {
+        mDataset = myDataset;
+    }
+
+    // Create new views (invoked by the layout manager)
+    &#64;Override
+    public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
+                                                   int viewType) {
+        // create a new view
+        View v = LayoutInflater.from(parent.getContext())
+                               .inflate(R.layout.my_text_view, parent, false);
+        // set the view's size, margins, paddings and layout parameters
+        ...
+        ViewHolder vh = new ViewHolder(v);
+        return vh;
+    }
+
+    // Replace the contents of a view (invoked by the layout manager)
+    &#64;Override
+    public void onBindViewHolder(ViewHolder holder, int position) {
+        // - get element from your dataset at this position
+        // - replace the contents of the view with that element
+        holder.mTextView.setText(mDataset[position]);
+
+    }
+
+    // Return the size of your dataset (invoked by the layout manager)
+    &#64;Override
+    public int getItemCount() {
+        return mDataset.length;
+    }
+}
+</pre>
+
+
+<div style="float:right;margin-top:15px;margin-left:30px">
+<img src="{@docRoot}design/material/images/card_travel.png" alt="" width="225" height="383">
+<p class="img-caption" style="margin-left:12px">
+<strong>Figure 3</strong>. Card examples.
+</p>
+</div>
+
+<h2 id="CardView">Create Cards</h2>
+
+<p>{@link android.support.v7.widget.CardView} extends the {@link android.widget.FrameLayout} class
+and lets you show information inside cards that have a consistent look across the platform. {@link
+android.support.v7.widget.CardView} widgets can have shadows and rounded corners.</p>
+
+<p>To create a card with a shadow, use the <code>card_view:cardElevation</code> attribute.
+{@link android.support.v7.widget.CardView} uses real elevation and dynamic shadows on Android 5.0
+(API level 21) and above and falls back to a programmatic shadow implementation on earlier versions.
+For more information, see <a href="{@docRoot}training/material/compatibility.html">Maintaining
+Compatibility</a>.</p>
+
+<p>Use these properties to customize the appearance of the
+{@link android.support.v7.widget.CardView} widget:</p>
+
+<ul>
+  <li>To set the corner radius in your layouts, use the <code>card_view:cardCornerRadius</code>
+  attribute.</li>
+  <li>To set the corner radius in your code, use the <code>CardView.setRadius</code> method.</li>
+  <li>To set the background color of a card, use the <code>card_view:cardBackgroundColor</code>
+attribute.</li>
+</ul>
+
+<p>The following code example shows you how to include a {@link android.support.v7.widget.CardView}
+widget in your layout:</p>
+
+<pre>
+&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    xmlns:card_view="http://schemas.android.com/apk/res-auto"
+    ... >
+    &lt;!-- A CardView that contains a TextView -->
+    &lt;android.support.v7.widget.CardView
+        xmlns:card_view="http://schemas.android.com/apk/res-auto"
+        android:id="@+id/card_view"
+        android:layout_gravity="center"
+        android:layout_width="200dp"
+        android:layout_height="200dp"
+        card_view:cardCornerRadius="4dp">
+
+        &lt;TextView
+            android:id="@+id/info_text"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    &lt;/android.support.v7.widget.CardView>
+&lt;/LinearLayout>
+</pre>
+
+<p>For more information, see the API reference for {@link android.support.v7.widget.CardView}.</p>
+
+
+<h2 id="Dependencies">Add Dependencies</h2>
+
+<p>The {@link android.support.v7.widget.RecyclerView} and {@link android.support.v7.widget.CardView}
+widgets are part of the <a href="{@docRoot}tools/support-library/features.html#v7">v7 Support
+Libraries</a>. To use these widgets in your project, add these
+<a href="{@docRoot}sdk/installing/studio-build.html#dependencies">Gradle dependencies</a> to your
+app's module:</p>
+
+<pre>
+dependencies {
+    ...
+    compile 'com.android.support:cardview-v7:+'
+    compile 'com.android.support:recyclerview-v7:+'
+}
+</pre>
diff --git a/docs/html/training/material/shadows-clipping.jd b/docs/html/training/material/shadows-clipping.jd
new file mode 100644
index 0000000..f58d780
--- /dev/null
+++ b/docs/html/training/material/shadows-clipping.jd
@@ -0,0 +1,127 @@
+page.title=Defining Shadows and Clipping Views
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#Elevation">Assign Elevation to Your Views</a></li>
+  <li><a href="#Shadows">Customize View Shadows and Outlines</a></li>
+  <li><a href="#Clip">Clip Views</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+<p>Material design introduces depth for UI elements. Depth helps users understand the relative
+importance of each element and focus their attention to the task at hand.</p>
+
+<p>The elevation of a view, represented by the Z property, determines the size of its shadow:
+views with higher Z values cast bigger shadows. Views only cast shadows on the Z=0 plane; they
+don't cast shadows on other views placed below them and above the Z=0 plane.</p>
+
+<p>Views with higher Z values occlude views with lower Z values. However, the Z value of a view
+does not affect the view's size.</p>
+
+<p>Elevation is also useful to create animations where widgets temporarily rise above the
+view plane when performing some action.</p>
+
+
+<h2 id="Elevation">Assign Elevation to Your Views</h2>
+
+<p>The Z value for a view has two components, elevation and translation. The elevation is the
+static component, and the translation is used for animations:</p>
+
+<p><code>Z = elevation + translationZ</code></p>
+
+<img src="{@docRoot}training/material/images/shadows-depth.png" width="680" height="177" alt=""/>
+<p class="img-caption"><strong>Figure 1</strong> - Shadows for different view elevations.</p>
+
+<p>To set the elevation of a view in a layout definition, use the <code>android:elevation</code>
+attribute. To set the elevation of a view in the code of an activity, use the
+{@link android.view.View#setElevation View.setElevation()} method.</p>
+
+<p>To set the translation of a view, use the {@link android.view.View#setTranslationZ
+View.setTranslationZ()} method.</p>
+
+<p>The new {@link android.view.ViewPropertyAnimator#z ViewPropertyAnimator.z()} and {@link
+android.view.ViewPropertyAnimator#translationZ ViewPropertyAnimator.translationZ()} methods enable
+you to easily animate the elevation of views. For more information, see the API reference for
+{@link android.view.ViewPropertyAnimator} and the <a
+href="{@docRoot}guide/topics/graphics/prop-animation.html">Property Animation</a> developer
+guide.</p>
+
+<p>You can also use a {@link android.animation.StateListAnimator} to
+specify these animations in a declarative way. This is especially useful for cases where state
+changes trigger animations, like when a user presses a button. For more information, see
+<a href="{@docRoot}training/material/animations.html#ViewState">Animate View State Changes</a></p>.
+
+<p>The Z values are measured in the same units as the X and Y values.</p>
+
+
+<h2 id="Shadows">Customize View Shadows and Outlines</h2>
+
+<p>The bounds of a view's background drawable determine the default shape of its shadow.
+<strong>Outlines</strong> represent the outer shape of a graphics object and define the ripple
+area for touch feedback.</p>
+
+<p>Consider this view, defined with a background drawable:</p>
+
+<pre>
+&lt;TextView
+    android:id="@+id/myview"
+    ...
+    android:elevation="2dp"
+    android:background="@drawable/myrect" />
+</pre>
+
+<p>The background drawable is defined as a rectangle with rounded corners:</p>
+
+<pre>
+&lt;!-- res/drawable/myrect.xml -->
+&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+    &lt;solid android:color="#42000000" />
+    &lt;corners android:radius="5dp" />
+&lt;/shape>
+</pre>
+
+<p>The view casts a shadow with rounded corners, since the background drawable defines the
+view's outline. Providing a custom outline overrides the default shape of a view's shadow.</p>
+
+<p>To define a custom outline for a view in your code:<p>
+
+<ol>
+<li>Extend the {@link android.view.ViewOutlineProvider} class.</li>
+<li>Override the {@link android.view.ViewOutlineProvider#getOutline getOutline()} method.</li>
+<li>Assign the new outline provider to your view with the {@link
+android.view.View#setOutlineProvider View.setOutlineProvider()} method.</li>
+</ol>
+
+<p>You can create oval and rectangular outlines with rounded corners using the methods in the
+{@link android.graphics.Outline} class. The default outline provider for views obtains the outline
+from the view's background. To prevent a view from casting a shadow, set its outline provider
+to <code>null</code>.</p>
+
+
+<h2 id="Clip">Clip Views</h2>
+
+<p>Clipping views enables you to easily change the shape of a view. You can clip views for
+consistency with other design elements or to change the shape of a view in response to user input.
+You can clip a view to its outline area using the {@link android.view.View#setClipToOutline
+View.setClipToOutline()} method or the <code>android:clipToOutline</code> attribute. Only
+rectangle, circle, and round rectangle outlines support clipping, as determined by the
+{@link android.graphics.Outline#canClip Outline.canClip()} method.</p>
+
+<p>To clip a view to the shape of a drawable, set the drawable as the background of the view
+(as shown above) and call the {@link android.view.View#setClipToOutline View.setClipToOutline()}
+method.</p>
+
+<p>Clipping views is an expensive operation, so don't animate the shape you use to
+clip a view. To achieve this effect, use the <a
+href="{@docRoot}training/material/animations.html#Reveal">Reveal Effect</a> animation.</p>
diff --git a/docs/html/training/material/theme.jd b/docs/html/training/material/theme.jd
new file mode 100644
index 0000000..17894f6
--- /dev/null
+++ b/docs/html/training/material/theme.jd
@@ -0,0 +1,131 @@
+page.title=Using the Material Theme
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+  <li><a href="#ColorPalette">Customize the Color Palette</a></li>
+  <li><a href="#StatusBar">Customize the Status Bar</a></li>
+  <li><a href="#Inheritance">Theme Individual Views</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+  <li><a href="http://www.google.com/design/spec">Material design specification</a></li>
+  <li><a href="{@docRoot}design/material/index.html">Material design on Android</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>The new material theme provides:</p>
+
+<ul>
+  <li>System widgets that let you set their color palette</li>
+  <li>Touch feedback animations for the system widgets</li>
+  <li>Activity transition animations</li>
+</ul>
+
+<p>You can customize the look of the material theme
+according to your brand identity with a color palette you control. You can tint the action bar and
+the status bar using theme attributes, as shown in <a href="#fig3">Figure 3</a>.</p>
+
+<p>The system widgets have a new design and touch feedback animations. You can customize the
+color palette, the touch feedback animations, and the activity transitions for your app.</p>
+
+<p>The material theme is defined as:</p>
+
+<ul>
+  <li><code>@android:style/Theme.Material</code> (dark version)</li>
+  <li><code>@android:style/Theme.Material.Light</code> (light version)</li>
+  <li><code>@android:style/Theme.Material.Light.DarkActionBar</code></li>
+</ul>
+
+<p>For a list of material styles that you can use, see the API reference for
+{@link android.R.style R.style}.</p>
+
+<!-- two columns, dark/light material theme example -->
+<div style="width:700px;margin-top:25px;margin-bottom:10px">
+<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
+  <img src="{@docRoot}design/material/images/MaterialDark.png" width="500" height="238">
+  <div style="width:170px;margin:0 auto">
+  <p style="margin-top:8px;font-size:12px"><strong>Figure 1</strong>. Dark material theme</p>
+  </div>
+</div>
+<div style="float:left;width:250px;margin-right:0px;">
+  <img src="{@docRoot}design/material/images/MaterialLight.png" width="500" height="238">
+  <div style="width:170px;margin:0 auto">
+  <p style="margin-top:8px;font-size:12px"><strong>Figure 2</strong>. Light material theme</p>
+  </div>
+</div>
+<br style="clear:left">
+</div>
+
+<p class="note">
+<strong>Note:</strong> The material theme is only available in Android 5.0 (API level 21) and
+above. The <a href="{@docRoot}tools/support-library/features.html#v7">v7 Support Libraries</a>
+provide themes with material design styles for some widgets and support for customizing the color
+palette. For more information, see
+<a href="{@docRoot}training/material/compatibility.html">Maintaining Compatibility</a>.
+</p>
+
+
+<h2 id="ColorPalette">Customize the Color Palette</h2>
+
+<p style="margin-bottom:30px">To customize the theme's base colors to fit your brand, define
+your custom colors using theme attributes when you inherit from the material theme:</p>
+
+<pre>
+&lt;resources>
+  &lt;!-- inherit from the material theme -->
+  &lt;style name="AppTheme" parent="android:Theme.Material">
+    &lt;!-- Main theme colors -->
+    &lt;!--   your app branding color for the app bar -->
+    &lt;item name="android:colorPrimary">@color/primary&lt;/item>
+    &lt;!--   darker variant for the status bar and contextual app bars -->
+    &lt;item name="android:colorPrimaryDark">@color/primary_dark&lt;/item>
+    &lt;!--   theme UI controls like checkboxes and text fields -->
+    &lt;item name="android:colorAccent">@color/accent&lt;/item>
+  &lt;/style>
+&lt;/resources>
+</pre>
+
+<div style="float:right;margin-left:25px;margin-top:20px;margin-bottom:10px" id="fig3">
+<img src="{@docRoot}training/material/images/ThemeColors.png" width="250" height="445"/>
+<p class="img-caption" style="margin-bottom:0px">
+<strong>Figure 3.</strong> Customizing the material theme.</p>
+</div>
+
+
+<h2 id="StatusBar">Customize the Status Bar</h2>
+
+<p>The material theme lets you easily customize the status bar, so you can specify a
+color that fits your brand and provides enough contrast to show the white status icons. To
+set a custom color for the status bar, use the <code>android:statusBarColor</code> attribute when
+you extend the material theme. By default, <code>android:statusBarColor</code> inherits the
+value of <code>android:colorPrimaryDark</code>.</p>
+
+<p>You can also draw behind the status bar yourself. For example, if you want to show
+the status bar transparently over a photo, with a subtle dark gradient to ensure the white
+status icons are visible. To do so, set the <code>android:statusBarColor</code> attribute to
+<code>&#64;android:color/transparent</code> and adjust the window flags as required. You can
+also use the {@link android.view.Window#setStatusBarColor Window.setStatusBarColor()} method for
+animations or fading.</p>
+
+<p class="note">
+<strong>Note:</strong> The status bar should almost always have a clear delineation from the
+primary toolbar, except for cases where you show edge-to-edge rich imagery or media content behind
+these bars and when you use a gradient to ensure that the icons are still visible.
+</p>
+
+<p>When you customize the navigation and status bars, either make them both transparent or modify
+only the status bar. The navigation bar should remain black in all other cases.</p>
+
+
+<h2 id="Inheritance">Theme Individual Views</h3>
+
+<p>Elements in XML layout definitions can specify the <code>android:theme</code> attribute,
+which references a theme resource. This attribute modifies the theme for the element and any
+child elements, which is useful for altering theme color palettes in a specific portion
+of an interface.</p>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 03fb812..0fee771 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -836,9 +836,9 @@
       </li>
     </ul>
   </li>
-
   <!-- End Building for wearables -->
 
+
   <!-- Start: Building for TV -->
   <li class="nav-section">
     <div class="nav-section-header">
@@ -892,13 +892,17 @@
             <a href="<?cs var:toroot ?>training/tv/playback/details.html">
               Building a Details View</a>
           </li>
+          <li>
+            <a href="<?cs var:toroot ?>training/tv/playback/now-playing.html">
+              Displaying a Now Playing Card</a>
+          </li>
         </ul>
       </li>
 
       <li class="nav-section">
         <div class="nav-section-header">
           <a href="<?cs var:toroot ?>training/tv/discovery/index.html"
-             description="How to help users discovery content from your app.">
+             description="How to help users discover content from your app.">
              Helping Users Find Content on TV</a>
         </div>
         <ul>
@@ -920,8 +924,9 @@
       </li>
 
       <li>
-        <a href="<?cs var:toroot ?>training/tv/tif/index.html">
-          TV Input Framework</a>
+        <a href="<?cs var:toroot ?>training/tv/tif/index.html"
+           description="How to build Live TV apps.">
+           Building Live TV Apps</a>
       </li>
     </ul>
   </li>
@@ -1241,6 +1246,45 @@
         </ul>
       </li>
 
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/material/index.html"
+             description=
+             "How to implement material design on Android."
+            >Creating Apps with Material Design</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/material/get-started.html">
+            Getting Started
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/theme.html">
+            Using the Material Theme
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/lists-cards.html">
+            Creating Lists and Cards
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/shadows-clipping.html">
+            Defining Shadows and Clipping Views
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/drawables.html">
+            Working with Drawables
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/animations.html">
+            Defining Custom Animations
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/material/compatibility.html">
+            Maintaining Compatibility
+          </a>
+          </li>
+        </ul>
+      </li>
+
     </ul>
   </li>
   <!-- End User Interface -->
diff --git a/docs/html/training/tv/discovery/recommendations.jd b/docs/html/training/tv/discovery/recommendations.jd
index 048b649..a6eb152 100644
--- a/docs/html/training/tv/discovery/recommendations.jd
+++ b/docs/html/training/tv/discovery/recommendations.jd
@@ -29,7 +29,7 @@
   bring users back to your app.
 </p>
 
-<img src="{@docRoot}preview/tv/images/home-recommendations.png" alt="" id="figure1" />
+<img src="{@docRoot}images/tv/home-recommendations.png" alt="" id="figure1" />
 <p class="img-caption">
   <strong>Figure 1.</strong> An example of the recommendations row.
 </p>
diff --git a/docs/html/training/tv/playback/index.jd b/docs/html/training/tv/playback/index.jd
index d7167e7..118fc6c 100644
--- a/docs/html/training/tv/playback/index.jd
+++ b/docs/html/training/tv/playback/index.jd
@@ -46,4 +46,7 @@
 
   <dt><b><a href="details.html">Building a Details View</a></b></dt>
     <dd>Learn how to use the Leanback support library to build a details page for media items.</dd>
+
+  <dt><b><a href="now-playing.html">Displaying a Now Playing Card</a></b></dt>
+    <dd>Learn how to use a MediaSession to display a Now Playing card on the home screen.</dd>
 </dl>
diff --git a/docs/html/training/tv/playback/now-playing.jd b/docs/html/training/tv/playback/now-playing.jd
new file mode 100644
index 0000000..b64beb0
--- /dev/null
+++ b/docs/html/training/tv/playback/now-playing.jd
@@ -0,0 +1,167 @@
+page.title=Displaying a Now Playing Card
+page.tags="nowplaying","mediasession"
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+  <h2>This lesson teaches you to</h2>
+  <ol>
+    <li><a href="#session">Start a Media Session</a></li>
+    <li><a href="#card">Display a Now Playing Card</a></li>
+    <li><a href="#state">Update the Playback State</a></li>
+    <li><a href="#respond">Respond to User Action</a></li>
+  </ol>
+
+</div>
+</div>
+
+<p>TV apps may allow users to play music or other media in the background while using other
+applications. If your app allows this type of use, it must must
+provide a means for the user to return to the app to pause the music or switch to a new song. The
+Android framework enables TV apps to do this by displaying a <em>Now Playing</em> card on the home
+screen in the recommendations row.</p>
+
+<p>The Now Playing card is a system artifact that displays on the
+home screen in the recommendations row for an active media session. It includes the media metadata
+such as the album art, title, and app icon. When the user selects it, the system opens the the app
+that owns the session.</p>
+
+<p>This lesson shows how to use the {@link android.media.session.MediaSession} class to implement
+the Now Playing card.</p>
+
+<h2 id="session">Start a Media Session</h2>
+
+<p>A playback app can run as an <a href="{@docRoot}guide/components/activities">activity</a> or
+as a <a href="{@docRoot}guide/components/services">service</a>. The service is required for
+background playback because it can continue to play media even after the activity that launched it
+has been destroyed. For this discussion, the media playback app is assumed to be running in a
+{@link android.service.media.MediaBrowserService}.</p>
+
+<p>In your service's {@link android.service.media.MediaBrowserService#onCreate() onCreate()}
+method, create a new {@link android.media.session.MediaSession#MediaSession(android.content.Context, java.lang.String) MediaSession},
+set the callback and flags appropriate to a media app, and set the session token for the
+{@link android.service.media.MediaBrowserService}.</p>
+
+<pre>
+mSession = new MediaSession(this, "MusicService");
+mSession.setCallback(new MediaSessionCallback());
+mSession.setFlags(MediaSession.FLAG_HANDLES_MEDIA_BUTTONS |
+        MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS);
+
+// for the MediaBrowserService
+setSessionToken(mSession.getSessionToken());
+</pre>
+
+<p class="note"<strong>Note:</strong> The Now Playing card will display only for a media session with
+the {@link android.media.session.MediaSession#FLAG_HANDLES_TRANSPORT_CONTROLS} flag set.</p>
+
+<h2 id="card">Display a Now Playing Card</h2>
+
+<p>The Now Playing card shows up after {@link android.media.session.MediaSession#setActive(boolean) setActive(true)}
+is called, if the session is the highest priority session in the system. Also, note that your app
+must request the audio focus, as described in <a href="{@docRoot}training/managing-audio/audio-focus">
+Managing Audio Focus</a>.</p>
+
+<pre>
+private void handlePlayRequest() {
+
+    tryToGetAudioFocus();
+
+    if (!mSession.isActive()) {
+        mSession.setActive(true);
+    }
+...
+</pre>
+
+<p>The card is removed from the home screen when {@link android.media.session.MediaSession#setActive(boolean) setActive(false)}
+is called or if another app initiates media playback. You may want to remove the card from the home
+screen some time after playback is paused, depending on how long you want to keep the card up,
+usually 5 to 30 minutes.</p>
+
+<h2 id="state">Update the Playback State</h2>
+
+<p>As with any media app, update the playback state in the {@link android.media.session.MediaSession}
+so that the card can display the current metadata, as shown in the following example:</p>
+
+<pre>
+private void updatePlaybackState() {
+    long position = PlaybackState.PLAYBACK_POSITION_UNKNOWN;
+    if (mMediaPlayer != null &amp;&amp; mMediaPlayer.isPlaying()) {
+        position = mMediaPlayer.getCurrentPosition();
+    }
+    PlaybackState.Builder stateBuilder = new PlaybackState.Builder()
+            .setActions(getAvailableActions());
+    stateBuilder.setState(mState, position, 1.0f);
+    mSession.setPlaybackState(stateBuilder.build());
+}
+private long getAvailableActions() {
+    long actions = PlaybackState.ACTION_PLAY |
+            PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
+            PlaybackState.ACTION_PLAY_FROM_SEARCH;
+    if (mPlayingQueue == null || mPlayingQueue.isEmpty()) {
+        return actions;
+    }
+    if (mState == PlaybackState.STATE_PLAYING) {
+        actions |= PlaybackState.ACTION_PAUSE;
+    }
+    if (mCurrentIndexOnQueue &gt; 0) {
+        actions |= PlaybackState.ACTION_SKIP_TO_PREVIOUS;
+    }
+    if (mCurrentIndexOnQueue &lt; mPlayingQueue.size() - 1) {
+        actions |= PlaybackState.ACTION_SKIP_TO_NEXT;
+    }
+    return actions;
+}
+</pre>
+
+<h2 id="metadata">Display the Media Metadata</h2>
+
+<p>For the track currently playing, set the {@link android.media.MediaMetadata} with the
+{@link android.media.session.MediaSession#setMetadata(android.media.MediaMetadata) setMetadata()}
+method. This method of the media session object lets you provide information to the Now Playing card
+about the track such as the title, subtitle, and various icons. The following example assumes your
+track's data is stored in a custom data class, {@code MediaData}.</p>
+
+<pre>
+private void updateMetadata(MediaData myData) {
+    MediaMetadata.Builder metadataBuilder = new MediaMetadata.Builder();
+    // To provide most control over how an item is displayed set the
+    // display fields in the metadata
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_DISPLAY_TITLE,
+            myData.displayTitle);
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_DISPLAY_SUBTITLE,
+            myData.displaySubtitle);
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_DISPLAY_ICON_URI,
+            myData.artUri);
+    // And at minimum the title and artist for legacy support
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_TITLE,
+            myData.title);
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_ARTIST,
+            myData.artist);
+    // A small bitmap for the artwork is also recommended
+    metadataBuilder.putString(MediaMetadata.METADATA_KEY_ART,
+            myData.artBitmap);
+    // Add any other fields you have for your data as well
+    mSession.setMetadata(metadataBuilder.build());
+}
+</pre>
+
+<h2 id="respond">Respond to User Action</h2>
+
+<p>When the user selects the Now Playing card, the system opens the app that owns the session.
+If your app provides a {@link android.app.PendingIntent} to pass to
+{@link android.media.session.MediaSession#setSessionActivity(android.app.PendingIntent) setSessionActivity()},
+the system launches the activity you specify, as demonstrated below. If not, the default system
+intent opens. The activity you specify must provide playback controls that allow users to pause or
+stop playback.</p>
+
+<pre>
+Intent intent = new Intent(mContext, MyActivity.class);
+    PendingIntent pi = PendingIntent.getActivity(context, 99 /*request code*/,
+            intent, PendingIntent.FLAG_UPDATE_CURRENT);
+    mSession.setSessionActivity(pi);
+</pre>
+
diff --git a/docs/html/training/tv/tif/index.jd b/docs/html/training/tv/tif/index.jd
index aac640c..4746e42 100644
--- a/docs/html/training/tv/tif/index.jd
+++ b/docs/html/training/tv/tif/index.jd
@@ -1,8 +1,19 @@
-page.title=TV Input Framework
+page.title=Building Live TV Apps
 page.tags=tif
+page.article=true
 
 @jd:body
 
+<div id="tb-wrapper">
+<div id="tb">
+  <h2>You should also read</h2>
+  <ul>
+    <li><a href="{@docRoot}reference/android/media/tv/package-summary.html">
+      android.media.tv</a></li>
+  </ul>
+</div>
+</div>
+
 <p>
   Watching live television shows and other continuous, channel-based content is a big part of the
   TV experience. Android supports receiving and playback of live video content through the TV Input
diff --git a/docs/html/preview/tv/adt-1/index.jd b/docs/html/tv/adt-1/index.jd
similarity index 95%
rename from docs/html/preview/tv/adt-1/index.jd
rename to docs/html/tv/adt-1/index.jd
index b37a55a..82760ed 100644
--- a/docs/html/preview/tv/adt-1/index.jd
+++ b/docs/html/tv/adt-1/index.jd
@@ -1,8 +1,14 @@
 page.title=ADT-1 Developer Kit
 page.tags="emote","e-mote","adt"
+fullpage=1
 
 @jd:body
 
+
+<div class="wrap" style="width:940px;">
+
+<h1>ADT-1 Developer Kit</h1>
+
 <div id="qv-wrapper">
 <div id="qv">
   <h2>In this document</h2>
@@ -29,9 +35,9 @@
 <p class="note">
   <strong>Note:</strong> The ADT-1 kit <em>is not required</em> for building and testing apps
   for Android TV. You can build apps for TV and test them using an emulator for TV devices. The
-  L Developer Preview includes all the software needed to build TV apps and an emulator for running
+  Android SDK includes all the software needed to build TV apps and an emulator for running
   and testing them. For more information, see the
-  <a href="{@docRoot}preview/tv/start/index.html">Get Started</a> guide for TV apps.
+  <a href="{@docRoot}training/tv/start/index.html">Get Started</a> guide for TV apps.
 </p>
 
 <h2 id="faq">ADT-1 Frequently Asked Questions</h2>
@@ -280,7 +286,7 @@
 <h2 id="emote">Android TV Remote Control App</h2>
 
 <div class="figure" style="width:250px;margin-top:0">
-<img src="/preview/tv/images/android-tv-remote.png" alt="Android TV Remote Screenshots">
+<img src="{@docRoot}tv/images/android-tv-remote.png" alt="Android TV Remote Screenshots">
 </div>
 
 <p>A remote control app is available for Android phones and tablets that allows you to interact
@@ -308,3 +314,9 @@
   <li><a href="regulatory.html">Regulatory Disclosures</a></li>
   <li><a href="safety.html">Important Safety Information</a></li>
 </ul>
+
+</div> <!-- end.class.wrap -->
+
+<div class="layout-content-col col-16" style="padding-top:1px">
+  <!-- layout div, so auto-gen footer sits correctly; do not remove -->
+</div>
diff --git a/docs/html/preview/tv/adt-1/regulatory.jd b/docs/html/tv/adt-1/regulatory.jd
similarity index 94%
rename from docs/html/preview/tv/adt-1/regulatory.jd
rename to docs/html/tv/adt-1/regulatory.jd
index 2f5bf7e..f92ce3e 100644
--- a/docs/html/preview/tv/adt-1/regulatory.jd
+++ b/docs/html/tv/adt-1/regulatory.jd
@@ -1,9 +1,12 @@
 page.title=Regulatory Disclosures for ADT-1
-parent.title=ADT-1 Developer Kit
-parent.link=index.html
+fullpage=1
 
 @jd:body
 
+<div class="wrap" style="width:940px;">
+
+<h1>Regulatory Disclosures for ADT-1</h1>
+
 <p>Disclosures for the <a href="index.html">ADT-1</a> device.</p>
 
 <p>
@@ -77,3 +80,9 @@
   doit être utilisé de sorte que la possibilité d'un contact humain pendant le fonctionnement
   normal soit limitée.
 </p>
+
+</div> <!-- end.class.wrap -->
+
+<div class="layout-content-col col-16" style="padding-top:1px">
+  <!-- layout div, so auto-gen footer sits correctly; do not remove -->
+</div>
diff --git a/docs/html/preview/tv/adt-1/safety.jd b/docs/html/tv/adt-1/safety.jd
similarity index 95%
rename from docs/html/preview/tv/adt-1/safety.jd
rename to docs/html/tv/adt-1/safety.jd
index 1984853..79a9736 100644
--- a/docs/html/preview/tv/adt-1/safety.jd
+++ b/docs/html/tv/adt-1/safety.jd
@@ -1,9 +1,12 @@
 page.title=Important Safety Instructions for ADT-1
-parent.title=ADT-1 Developer Kit
-parent.link=index.html
+fullpage=1
 
 @jd:body
 
+<div class="wrap" style="width:940px;">
+
+<h1>Important Safety Instructions for ADT-1</h1>
+
 <p>Safety information for the <a href="index.html">ADT-1</a> device.</p>
 
 <p>
@@ -138,3 +141,10 @@
 
 <p>Le défaut de suivre ces instructions de sécurité pourrait provoquer un feu, un choc
   électrique, un dommage à l’Appareil ou à d’autres objets ou des lésions corporelles.</p>
+
+
+</div> <!-- end.class.wrap -->
+
+<div class="layout-content-col col-16" style="padding-top:1px">
+  <!-- layout div, so auto-gen footer sits correctly; do not remove -->
+</div>
diff --git a/docs/html/preview/tv/images/android-tv-remote.png b/docs/html/tv/images/android-tv-remote.png
similarity index 100%
rename from docs/html/preview/tv/images/android-tv-remote.png
rename to docs/html/tv/images/android-tv-remote.png
Binary files differ
diff --git a/docs/html/tv/images/atv-framed.png b/docs/html/tv/images/atv-framed.png
index 4cedab2..947f94e 100644
--- a/docs/html/tv/images/atv-framed.png
+++ b/docs/html/tv/images/atv-framed.png
Binary files differ
diff --git a/docs/html/tv/index.jd b/docs/html/tv/index.jd
index ff70977..71e177b 100644
--- a/docs/html/tv/index.jd
+++ b/docs/html/tv/index.jd
@@ -36,7 +36,7 @@
               </div>
 
               <div class="landing-body">
-                <a href="{@docRoot}preview/tv/start/index.html" class="landing-button
+                <a href="{@docRoot}training/tv/index.html" class="landing-button
                   landing-primary" style="margin-top: 40px;">
                   Get Started
                 </a>
@@ -73,7 +73,7 @@
               effort.
             </p>
             <p class="landing-small">
-              <a href="{@docRoot}preview/tv/design/index.html">Learn about design for TV</a>
+              <a href="{@docRoot}design/tv/index.html">Learn about design for TV</a>
             </p>
           </div>
 
@@ -104,7 +104,7 @@
                   catalogs.
                 </p>
                 <p class="landing-small">
-                  <a href="{@docRoot}preview/tv/ui/browse.html">Learn pre-built fragments</a>
+                  <a href="{@docRoot}training/tv/playback/index.html">Learn pre-built fragments</a>
                 </p>
               </div>
 
@@ -117,7 +117,7 @@
                   Help users find your content quickly with in-app searching.
                 </p>
                 <p class="landing-small">
-                  <a href="{@docRoot}preview/tv/ui/in-app-search.html">Learn about app search</a>
+                  <a href="{@docRoot}training/tv/discovery/in-app-search.html">Learn about app search</a>
                 </p>
               </div>
 
@@ -130,7 +130,7 @@
                   Suggest content from your app to keep your users coming back.
                 </p>
                 <p class="landing-small">
-                  <a href="{@docRoot}preview/tv/ui/recommendations.html">Learn about
+                  <a href="{@docRoot}training/tv/discovery/recommendations.html">Learn about
                     recommendations</a>
                 </p>
               </div>
@@ -141,78 +141,106 @@
         </div>  <!-- end .wrap -->
       </div> <!-- end .landing-section -->
 
-      <div class="landing-section landing-red-background" id="start">
+
+      <div class="landing-section landing-red-background">
         <div class="wrap">
           <div class="landing-section-header">
             <div class="landing-h1 landing-align-left">Get Started with Android TV</div>
-            <div class="landing-body">
-              <p>Begin building TV apps right away using these developer resources:</p>
+
+            <div class="landing-subhead landing-subhead-red">
+              <p>
+                 Set up your development environment to build apps for TV.
+                 Start creating your big-screen experience!
+              </p>
             </div>
           </div>
-
           <div class="landing-body">
-            <div class="landing-breakout cols">
-              <div class="col-8" style="margin-left: -8px;">
-                <p style="font-size: 24px;">L Developer Preview</p>
-                <p>
-                   Get all the tools you need to build and test TV apps. Download the preview and
-                   start creating your big-screen experience.
-                </p>
-
-              </div>
-
-              <div class="col-8">
-                <p style="font-size: 24px;">ADT-1 Developer Kit</p>
-                <p>
-                  Request an <a href="{@docRoot}preview/tv/adt-1/index.html"
-                  style="color: white;"><u>ADT-1 Developer Kit</u></a>, a compact and powerful
-                  streaming media player and gamepad, ideal for developing and testing apps for TV.
-                </p>
-
-              </div>
-
-            </div>
+            <a href="{@docRoot}training/tv/start/index.html" class="landing-button landing-primary"
+              style="margin-top: 20px;">
+              Get Started
+            </a>
           </div>
-
-          <div class="landing-body">
-            <div class="landing-breakout cols">
-
-              <div class="col-8">
-                <a href="{@docRoot}preview/tv/start/index.html" class="landing-button landing-primary">
-                  Get Started
-                </a>
-              </div>
-
-              <div class="col-8">
-                <a href="https://support.google.com/googleplay/android-developer/contact/adt_request"
-                  class="landing-button landing-primary">
-                  Request the ADT-1 Developer Kit
-                </a>
-              </div>
-            </div>
-          </div>
-
         </div>  <!-- end .wrap -->
       </div> <!-- end .landing-section -->
 
+      <div class="landing-section">
+        <div class="wrap">
+          <div class="cols">
+            <div class="landing-body">
+
+              <div class="col-3-wide">
+                <a target="_blank" href="http://android-developers.blogspot.com/2014/06/android-tv-and-google-cast.html">
+                  <img class="landing-social-image" src="{@docRoot}wear/images/blogger.png" alt="">
+                </a>
+                <div class="landing-social-copy">
+                  <p>Blog Post</p>
+                  <p class="landing-small">
+                    Read more about Android TV development
+                    on our blog. Just search for "Android TV".
+                  </p>
+                    <p class="landing-small">
+                    <a target="_blank" href="http://android-developers.blogspot.com">Android
+                      Developers Blog</a>
+                    </p>
+                  <p></p>
+                </div>
+              </div>
+
+              <div class="col-3-wide">
+                <a target="_blank" href="http://g.co/androidtvdev">
+                  <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="+Android Wear Developers">
+                </a>
+                <div class="landing-social-copy">
+                  <p>G+ Community</p>
+                  <p class="landing-small">
+                    Follow us on Google+ to stay up-to-date with Android TV development and to
+                    join the discussion!
+                  </p>
+                  <p class="landing-small">
+                    <a target="_blank" href="http://g.co/androidtvdev">+Android TV Developers</a>
+                  </p>
+                </div>
+              </div>
+
+              <div class="col-3-wide">
+                  <a target="_blank" href="{@docRoot}tv/adt-1/index.html">
+                  <img class="landing-social-image" src="{@docRoot}wear/images/blogger.png" alt="">
+                  </a>
+                <div class="landing-social-copy">
+                  <p>ADT-1 Kit</p>
+                    <p class="landing-small">
+                    Get information about the streaming media player
+                    for developing and testing apps for TV.
+                    </p>
+                    <p class="landing-small">
+                      <a target="_blank" href="{@docRoot}tv/adt-1/index.html">ADT-1 Development
+                        Kit</a>
+                    </p>
+                </div>
+              </div>
+
+            </div>
+          </div>
+        </div> <!-- end .wrap -->
+      </div> <!-- end .landing-section -->
+
     </div> <!-- end .landing-rest-of-page -->
 
-      <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement"
-        style="border-top: none;">
-        <div class="layout-content-col col-16" style="padding-top:4px">
-          <style>#___plusone_0 {float:right !important;}</style>
-          <div class="g-plusone" data-size="medium"></div>
-        </div>
+    <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
+      <div class="layout-content-col col-16" style="padding-top:4px">
+        <style>#___plusone_0 {float:right !important;}</style>
+        <div class="g-plusone" data-size="medium"></div>
       </div>
-      <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
-        <div id="copyright">
-          Except as noted, this content is
-          licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
-          Creative Commons Attribution 2.5</a>. For details and
-          restrictions, see the <a href="/license.html">Content
-          License</a>.
-        </div>
+    </div>
+    <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
+      <div id="copyright">
+        Except as noted, this content is
+        licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
+        Creative Commons Attribution 2.5</a>. For details and
+        restrictions, see the <a href="/license.html">Content
+        License</a>.
       </div>
+    </div>
 
   </div> <!-- end .landing-hero-container -->
 
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index cd82c45..aaa350c 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -238,8 +238,11 @@
     <!-- Volume: time to delay dismissing the volume panel after a click is performed -->
     <integer name="volume_panel_dismiss_delay">200</integer>
 
-    <!-- Tiles with feature timeouts: number of days to show after feature is used. -->
-    <integer name="days_to_show_timeout_tiles">30</integer>
+    <!-- Hotspot tile: number of days to show after feature is used. -->
+    <integer name="days_to_show_hotspot_tile">30</integer>
+
+    <!-- Color inversion tile: number of days to show after feature is used. -->
+    <integer name="days_to_show_color_inversion_tile">7</integer>
 
     <!-- Number of times to show the strong alarm warning text in the volume dialog -->
     <integer name="zen_mode_alarm_warning_threshold">5</integer>
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index f69f2e6..8ef3791 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -158,7 +158,6 @@
                 .setContentTitle(mContext.getString(R.string.invalid_charger_title))
                 .setContentText(mContext.getString(R.string.invalid_charger_text))
                 .setPriority(Notification.PRIORITY_MAX)
-                .setCategory(Notification.CATEGORY_SYSTEM)
                 .setVisibility(Notification.VISIBILITY_PUBLIC)
                 .setColor(mContext.getResources().getColor(
                         com.android.internal.R.color.system_notification_accent_color));
@@ -182,7 +181,6 @@
                 .setContentText(mContext.getString(textRes, percentage))
                 .setOnlyAlertOnce(true)
                 .setPriority(Notification.PRIORITY_MAX)
-                .setCategory(Notification.CATEGORY_SYSTEM)
                 .setVisibility(Notification.VISIBILITY_PUBLIC)
                 .setColor(mContext.getResources().getColor(
                         com.android.internal.R.color.battery_saver_mode_color));
@@ -214,7 +212,6 @@
                 .setContentText(mContext.getString(R.string.battery_saver_notification_text))
                 .setOngoing(true)
                 .setShowWhen(false)
-                .setCategory(Notification.CATEGORY_SYSTEM)
                 .setVisibility(Notification.VISIBILITY_PUBLIC)
                 .setColor(mContext.getResources().getColor(
                         com.android.internal.R.color.battery_saver_mode_color));
diff --git a/packages/SystemUI/src/com/android/systemui/qs/UsageTracker.java b/packages/SystemUI/src/com/android/systemui/qs/UsageTracker.java
index ad79aba..a1092a3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/UsageTracker.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/UsageTracker.java
@@ -22,7 +22,6 @@
 import android.content.IntentFilter;
 import android.content.SharedPreferences;
 
-import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.Listenable;
 
 public class UsageTracker implements Listenable {
@@ -35,11 +34,10 @@
 
     private boolean mRegistered;
 
-    public UsageTracker(Context context, Class<?> tile) {
+    public UsageTracker(Context context, Class<?> tile, int timeoutResource) {
         mContext = context;
         mPrefKey = tile.getSimpleName() + "LastUsed";
-        mTimeToShowTile = MILLIS_PER_DAY * mContext.getResources()
-                .getInteger(R.integer.days_to_show_timeout_tiles);
+        mTimeToShowTile = MILLIS_PER_DAY * mContext.getResources().getInteger(timeoutResource);
         mResetAction = "com.android.systemui.qs." + tile.getSimpleName() + ".usage_reset";
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
index 01849c1..7ba1dc0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
@@ -44,7 +44,8 @@
                 }
             }
         };
-        mUsageTracker = new UsageTracker(host.getContext(), ColorInversionTile.class);
+        mUsageTracker = new UsageTracker(host.getContext(), ColorInversionTile.class,
+                R.integer.days_to_show_color_inversion_tile);
         if (mSetting.getValue() != 0 && !mUsageTracker.isRecentlyUsed()) {
             mUsageTracker.trackUsage();
         }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index ce99cc3..b30a1d3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -34,7 +34,7 @@
     public HotspotTile(Host host) {
         super(host);
         mController = host.getHotspotController();
-        mUsageTracker = new UsageTracker(host.getContext(), HotspotTile.class);
+        mUsageTracker = newUsageTracker(host.getContext());
         mUsageTracker.setListening(true);
     }
 
@@ -84,6 +84,10 @@
         }
     }
 
+    private static UsageTracker newUsageTracker(Context context) {
+        return new UsageTracker(context, HotspotTile.class, R.integer.days_to_show_hotspot_tile);
+    }
+
     private final class Callback implements HotspotController.Callback {
         @Override
         public void onHotspotChanged(boolean enabled) {
@@ -101,7 +105,7 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             if (mUsageTracker == null) {
-                mUsageTracker = new UsageTracker(context, HotspotTile.class);
+                mUsageTracker = newUsageTracker(context);
             }
             mUsageTracker.trackUsage();
         }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index af4ae44..fe4b7b9 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3390,7 +3390,14 @@
     private int getEncryptionStatus() {
         String status = SystemProperties.get("ro.crypto.state", "unsupported");
         if ("encrypted".equalsIgnoreCase(status)) {
-            return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
+            final long token = Binder.clearCallingIdentity();
+            try {
+                return LockPatternUtils.isDeviceEncrypted()
+                        ? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE
+                        : DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
+            } finally {
+                Binder.restoreCallingIdentity(token);
+            }
         } else if ("unencrypted".equalsIgnoreCase(status)) {
             return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
         } else {