am dcbd4ef2: Merge "Use correct frequency range for near ultrasound" into mnc-docs

* commit 'dcbd4ef241b901da2538d3cc2137dbee6890646a':
  Use correct frequency range for near ultrasound
diff --git a/docs/html/about/about_toc.cs b/docs/html/about/about_toc.cs
index 45e8eb3..fed6c8d 100644
--- a/docs/html/about/about_toc.cs
+++ b/docs/html/about/about_toc.cs
@@ -1,5 +1,19 @@
 <ul id="nav">
 
+    <li class="nav-section">
+    <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/marshmallow/index.html">
+      <span class="en">Marshmallow</span></a></div>
+      <ul>
+        <li><a href="<?cs var:toroot ?>about/versions/marshmallow/android-6.0.html">
+        Android 6.0 APIs</a></li>
+        <li><a href="<?cs var:toroot ?>about/versions/marshmallow/android-6.0-changes.html">
+        Android 6.0 Changes</a></li>
+        <li><a href="<?cs var:toroot ?>about/versions/marshmallow/testing.html">Testing</a></li>
+        <li><a href="<?cs var:toroot ?>about/versions/marshmallow/samples.html">Samples</a></li>
+        <li><a href="<?cs var:toroot ?>about/versions/marshmallow/download.html">Downloads</a></li>
+  </li>
+      </ul>
+  </li>
   <li class="nav-section">
     <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/lollipop.html"
               zh-tw-lang="Lollipop"
diff --git a/docs/html/preview/behavior-changes.jd b/docs/html/about/versions/marshmallow/android-6.0-changes.jd
similarity index 91%
rename from docs/html/preview/behavior-changes.jd
rename to docs/html/about/versions/marshmallow/android-6.0-changes.jd
index ae35561..22f33da 100644
--- a/docs/html/preview/behavior-changes.jd
+++ b/docs/html/about/versions/marshmallow/android-6.0-changes.jd
@@ -1,6 +1,6 @@
-page.title=Behavior Changes
-page.keywords=preview,sdk,compatibility
-sdk.platform.apiLevel=MNC
+page.title=Android 6.0 Changes
+page.keywords=androidm,sdk,compatibility,marshmallow
+sdk.platform.apiLevel=23
 @jd:body
 
 <div id="qv-wrapper">
@@ -28,19 +28,19 @@
 
 <h2>API Differences</h2>
 <ol>
-<li><a href="{@docRoot}preview/download.html">API level 22 to M Preview &raquo;</a> </li>
+<li><a href="{@docRoot}about/versions/marshmallow/download.html">API level 22 to 23 &raquo;</a> </li>
 </ol>
 
 
 <h2>See Also</h2>
 <ol>
-<li><a href="{@docRoot}preview/api-overview.html">M Developer Preview API Overview</a> </li>
+<li><a href="{@docRoot}about/versions/marshmallow/android-6.0.html">Android 6.0 API Overview</a> </li>
 </ol>
 
 </div>
 </div>
 
-<p>Along with new features and capabilities, the M Developer Preview includes a variety of
+<p>Along with new features and capabilities, Android 6.0 (API level 23) includes a variety of
 system changes and API behavior changes. This document highlights
 some of the key changes that you should understand and account for in your apps.</p>
 
@@ -48,26 +48,26 @@
 platform affect your app.</p>
 
 <h2 id="behavior-runtime-permissions">Runtime Permissions</h1>
-<p>This preview introduces a new permissions model, where users can now directly manage
+<p>This release introduces a new permissions model, where users can now directly manage
 app permissions at runtime. This model gives users improved visibility and control over
 permissions, while streamlining the installation and auto-update processes for app developers.
 Users can grant or revoke permissions individually for installed apps. </p>
 
-<p>On your apps that target the M Preview release or higher, make sure to check for and request
+<p>On your apps that target Android 6.0 (API level 23) or higher, make sure to check for and request
 permissions at runtime. To determine if your app has been granted a permission, call the
 new {@link android.content.Context#checkSelfPermission(java.lang.String) checkSelfPermission()}
 method. To request a permission, call the new
 {@link android.app.Activity#requestPermissions(java.lang.String[], int) requestPermissions()}
-method. Even if your app is not targeting the M Preview release, you should test your app under
+method. Even if your app is not targeting Android 6.0 (API level 23), you should test your app under
 the new permissions model.</p>
 
 <p>For details on supporting the new permissions model in your app, see the
-<a href="{@docRoot}preview/features/runtime-permissions.html">
-Permissions</a> developer preview page. For tips on how to assess the impact on your app,
-see the <a href="{@docRoot}preview/testing/guide.html#runtime-permissions">Testing Guide</a></p>
+<a href="{@docRoot}training/permissions/index.html">
+Permissions</a> training page. For tips on how to assess the impact on your app,
+see the <a href="{@docRoot}about/versions/marshmallow/testing.html">Testing Guide</a></p>
 
 <h2 id="behavior-power">Power-Saving Optimizations</h2>
-<p>This preview introduces new power-saving optimizations for idle devices and apps.</p>
+<p>This release introduces new power-saving optimizations for idle devices and apps.</p>
 <ul>
 <li><strong>Doze</strong>: If a user unplugs a device and leaves it stationary, with its screen off,
 for a period of time, the device goes into <em>Doze</em> mode, where it attempts to keep the system
@@ -80,11 +80,12 @@
 </ul>
 
 <p>To learn more about these power-saving changes, see
-<a href="{@docRoot}preview/features/power-mgmt.html">Power-Saving Optimizations</a>.</p>
+<a href="{@docRoot}training/monitoring-device-state/battery-monitoring.html">Monitoring the
+Battery Level and Charging State</a>.</p>
 
 <h2 id="behavior-adoptable-storage">Adoptable Storage Devices</h2>
 <p>
-With this preview, users can <em>adopt</em> external storage devices such as SD cards. Adopting an
+With this release, users can <em>adopt</em> external storage devices such as SD cards. Adopting an
 external storage device encrypts and formats the device to behave like internal storage. This
 feature allows users to move both apps and private data of those apps between storage devices. When
 moving apps, the system respects the
@@ -122,7 +123,7 @@
 </li>
 </ul>
 
-<p>To debug this feature in the developer preview, you can enable adoption of a USB drive that is
+<p>To debug this feature, you can enable adoption of a USB drive that is
 connected to an Android device through a USB On-The-Go (OTG) cable, by running this command:</p>
 
 <pre class="no-prettyprint">
@@ -130,7 +131,7 @@
 </pre>
 
 <h2 id="behavior-apache-http-client">Apache HTTP Client Removal</h2>
-<p>This preview removes support for the Apache HTTP client. If your app is using this client and
+<p>This release removes support for the Apache HTTP client. If your app is using this client and
 targets Android 2.3 (API level 9) or higher, use the {@link java.net.HttpURLConnection} class
 instead. This API is more efficient because it reduces network use through transparent compression
 and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you
@@ -176,7 +177,7 @@
 
 <h2 id="behavior-test-selection">Text Selection</h2>
 
-<img src="{@docRoot}preview/images/text-selection.gif"
+<img src="{@docRoot}images/android-6.0/text-selection.gif"
 style="float:right; margin:0 0 20px 30px" width="360" height="640" />
 
 <p>When users select text in your app, you can now display text selection actions such as
@@ -205,7 +206,7 @@
 
 <p>If you are using <a href="{@docRoot}tools/support-library/index.html">
 Android Support Library</a> revision 22.2, be aware that floating toolbars are not
-backward-compatible and appcompat takes control over {@link android.view.ActionMode} objects by
+backward-compatible and appcompat takes control over {@link android.view.ActionMode} objects bywith th
 default. This prevents floating toolbars from being displayed. To enable
 {@link android.view.ActionMode} support in an
 {@link android.support.v7.app.AppCompatActivity}, call
@@ -214,12 +215,13 @@
 setHandleNativeActionModesEnabled()} on the returned
 {@link android.support.v7.app.AppCompatDelegate} object and set the input
 parameter to {@code false}. This call returns control of {@link android.view.ActionMode} objects to
-the framework. In devices running the M Preview, that allows the framework to support
-{@link android.support.v7.app.ActionBar} or floating toolbar modes, while on pre-M Preview devices,
-only the {@link android.support.v7.app.ActionBar} modes are supported.</p>
+the framework. In devices running Android 6.0 (API level 23), that allows the framework to support
+{@link android.support.v7.app.ActionBar} or floating toolbar modes, while on devices running
+Android 5.1 (API level 22) or lower, only the {@link android.support.v7.app.ActionBar} modes are
+supported.</p>
 
 <h2 id="behavior-keystore">Android Keystore Changes</h2>
-<p>With this preview, the
+<p>With this release, the
 <a href="{@docRoot}training/articles/keystore.html">Android Keystore provider</a> no longer supports
 DSA. ECDSA is still supported.</p>
 
@@ -229,7 +231,7 @@
 
 <h2 id="behavior-network">Wi-Fi and Networking Changes</h2>
 
-<p>This preview introduces the following behavior changes to the Wi-Fi and networking APIs.</p>
+<p>This release introduces the following behavior changes to the Wi-Fi and networking APIs.</p>
 <ul>
 <li>Your apps can now change the state of {@link android.net.wifi.WifiConfiguration} objects only
 if you created these objects. You are not permitted to modify or delete
@@ -239,7 +241,7 @@
 Previously, if an app forced the device to connect to a specific Wi-Fi network by using
 {@link android.net.wifi.WifiManager#enableNetwork(int,boolean) enableNetwork()} with the
 {@code disableAllOthers=true} setting, the device disconnected from other networks such as
-cellular data. In this preview, the device no longer disconnects from such other networks. If
+cellular data. In This release, the device no longer disconnects from such other networks. If
 your app’s {@code targetSdkVersion} is {@code “20”} or lower, it is pinned to the selected
 Wi-Fi network. If your app’s {@code targetSdkVersion} is {@code “21”} or higher, use the
 multinetwork APIs (such as
@@ -250,7 +252,7 @@
 </ul>
 
 <h2 id="behavior-camera">Camera Service Changes</h2>
-<p>In this preview, the model for accessing shared resources in the camera service has been changed
+<p>In This release, the model for accessing shared resources in the camera service has been changed
 from the previous “first come, first serve” access model to an access model where high-priority
 processes are favored.  Changes to the service behavior include:</p>
 <ul>
@@ -294,7 +296,7 @@
 you must update your app to use to the latest versions of these libraries. Otherwise, make sure that
 any custom classes referenced from XML are updated so that their class constructors are accessible.</p>
 
-<p>This preview updates the behavior of the dynamic linker. The dynamic linker now understands the
+<p>This release updates the behavior of the dynamic linker. The dynamic linker now understands the
 difference between a library’s {@code soname} and its path
 (<a href="https://code.google.com/p/android/issues/detail?id=6670" class="external-link">
 public bug 6670</a>), and search by {@code soname} is now
@@ -339,7 +341,7 @@
 {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} permission.</li>
 </ul>
 
-<p class="note"><strong>Note</strong>: When a device running M Developer Preview initiates a
+<p class="note"><strong>Note</strong>: When a device running Android 6.0 (API level 23) initiates a
 background Wi-Fi or Bluetooth scan, the operation is visible to external devices as
 originating from a randomized MAC address.</p>
 
@@ -356,7 +358,7 @@
 </p>
 
 <h2 id="behavior-afw">Android for Work Changes</h2>
-<p>This preview includes the following behavior changes for Android for Work:</p>
+<p>This release includes the following behavior changes for Android for Work:</p>
 <ul>
   <li><strong>Work contacts in personal contexts.</strong> The Google Dialer
 Call Log now displays work contacts when the user views past calls.
@@ -410,7 +412,7 @@
 in future.
 {@link android.app.admin.DevicePolicyManager#EXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM}
 now only accepts SHA-256.</li>
-  <li>Device initializer APIs which existed in the M Developer Preview are now removed.</li>
+  <li>Device initializer APIs which existed in the Android 6.0 (API level 23) are now removed.</li>
     <li><code>EXTRA_PROVISIONING_RESET_PROTECTION_PARAMETERS</code> is removed so NFC bump
 provisioning cannot programmatically unlock a factory reset protected device.</li>
 <li>You can now use the {@link android.app.admin.DevicePolicyManager#EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}
diff --git a/docs/html/preview/api-overview.jd b/docs/html/about/versions/marshmallow/android-6.0.jd
similarity index 87%
rename from docs/html/preview/api-overview.jd
rename to docs/html/about/versions/marshmallow/android-6.0.jd
index 55829d3..b23c7b8 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/about/versions/marshmallow/android-6.0.jd
@@ -1,7 +1,7 @@
-page.title=API Overview
-page.keywords=preview,sdk,compatibility
-page.tags=previewresources, androidm
-sdk.platform.apiLevel=22-mnc
+page.title=Android 6.0 APIs
+page.keywords=marshmallow,sdk,compatibility
+page.tags=androidm
+sdk.platform.apiLevel=23
 page.image=images/cards/card-api-overview_16-9_2x.png
 @jd:body
 
@@ -45,63 +45,66 @@
 
 <h2>API Differences</h2>
 <ol>
-<li><a href="{@docRoot}sdk/api_diff/23/changes.html">API level 22 to 23 (Preview 3) &raquo;</a> </li>
+<li><a href="{@docRoot}sdk/api_diff/23/changes.html">API level 22 to 23 &raquo;</a> </li>
 </ol>
 
 </div>
 </div>
 
-<p>The M Developer Preview gives you an advance look at the upcoming release
-for the Android platform, which offers new features for users and app
-developers. This document provides an introduction to the most notable APIs.</p>
+<p>Android 6.0 (<a href="{@docRoot}reference/android/os/Build.VERSION_CODES.html#MARSHMALLOW">MARSHMALLOW</a>)
+offers new features for users and app developers. This document provides an introduction to the
+most notable APIs.</p>
 
-<p>
-  The M Developer Preview 3 release includes the <strong>final APIs for Android 6.0 (API level
-  23)</strong>. If you are preparing an app for use on Android 6.0,
-  <a href="{@docRoot}preview/setup-sdk.html">download the latest SDK</a> and to complete your
-  final updates and release testing. You can review the final APIs in the
-  <a href="{@docRoot}reference/packages.html">API Reference</a> and see the API differences in
-  the <a href="{@docRoot}sdk/api_diff/23/changes.html">Android API Differences Report</a>.
-</p>
+<h3 id="Start">Start developing</h3>
 
-</p>
+<p>To start building apps for Android 6.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 6.0 SDK Platform and System Images.</p>
 
-<p class="caution"><strong>Important:</strong>
-  You may now publish apps that target Android 6.0 (API level 23) to the Google Play store.
-</p>
 
-<p class="note"><strong>Note:</strong>
-  If you have been working with previous preview releases and want to see the differences
-  between the final API and previous preview versions, download the additional difference
-  reports included in the <a href="{@docRoot}preview/download.html#docs">preview docs
-  reference</a>.
-</p>
+<h3 id="ApiLevel">Update your target API level</h3>
 
+<p>To better optimize your app for devices running Android {@sdkPlatformVersion},
+  set your <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> to
+<code>"{@sdkPlatformApiLevel}"</code>, install your app on an Android
+{@sdkPlatformVersion} system image, test it, then publish the updated app with
+this change.</p>
+
+<p>You can use Android {@sdkPlatformVersion} APIs while also supporting older
+versions by adding conditions to your code that check for the system API level
+before executing APIs not supported by your <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>.
+To learn more about maintaining backward compatibility, read <a
+href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting
+Different Platform Versions</a>.</p>
+
+<p>For more information about how API levels work, read <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
 <h3>Important behavior changes</h3>
 
 <p>If you have previously published an app for Android, be aware that your app might be affected
 by changes in the platform.</p>
 
-<p>Please see <a href="behavior-changes.html">Behavior Changes</a> for complete information.</p>
+<p>Please see <a href="android-6.0-changes.html">Android 6.0 Changes</a> for complete information.</p>
 
 <h2 id="app-linking">App Linking</h2>
-<p>This preview enhances Android’s intent system by providing more powerful app linking.
+<p>This release enhances Android’s intent system by providing more powerful app linking.
 This feature allows you to associate an app with a web domain you own. Based on this
 association, the platform can determine the default app to use to handle a particular
-web link and skip prompting users to select an app. To learn how to implement this feature, see
-<a href="{@docRoot}preview/features/app-linking.html">App Linking</a>.
+web link and skip prompting users to select an app. To learn how to implement this feature, see the
+<a href="{@docRoot}training/app-links/app-linking.html">App Linking</a> training.
 
 <h2 id="backup">Auto Backup for Apps</h2>
-<p>The system now performs automatic full data backup and restore for apps. For the
-duration of the <a href="{@docRoot}preview/overview.html">M Developer Preview program</a>, all
-apps are backed up, independent of which SDK version they target. After the final M SDK release,
-your app must target M to enable this behavior; you do not need to add any additional code. If users
-delete their Google accounts, their backup data is deleted as well. To learn how this feature
-works and how to configure what to back up on the file system, see
-<a href="{@docRoot}preview/backup/index.html">Auto Backup for Apps</a>.</p>
+<p>The system now performs automatic full data backup and restore for apps. Your app must target
+  Android 6.0 (API level 23) to enable this behavior; you do not need to add any additional code.
+  If users delete their Google accounts, their backup data is deleted as well. To learn how this
+  feature works and how to configure what to back up on the file system, see the
+  <a href="{@docRoot}training/backup/auto-backup.html">Auto Backup for Apps</a> training.</p>
 
 <h2 id="authentication">Authentication</h2>
-<p>This preview offers new APIs to let you authenticate users by using their fingerprint scans on
+<p>This release offers new APIs to let you authenticate users by using their fingerprint scans on
 supported devices, and check how recently the user was last authenticated using a device unlocking
 mechanism (such as a lockscreen password). Use these APIs in conjunction with
 the <a href="{@docRoot}training/articles/keystore.html">Android Keystore system</a>.</p>
@@ -127,8 +130,8 @@
 &lt;uses-permission
         android:name="android.permission.USE_FINGERPRINT" /&gt;
 </pre>
-<img src="{@docRoot}preview/images/fingerprint-screen.png"
-srcset="{@docRoot}preview/images/fingerprint-screen.png 1x, {@docRoot}preview/images/fingerprint-screen_2x.png 2x"
+<img src="{@docRoot}images/android-6.0/fingerprint-screen.png"
+srcset="{@docRoot}images/android-6.0/fingerprint-screen.png 1x, {@docRoot}images/android-6.0/fingerprint-screen_2x.png 2x"
 style="float:right; margin:0 0 10px 20px" width="282" height="476" />
 
 <p>To see an app implementation of fingerprint authentication, refer to the
@@ -179,11 +182,11 @@
 
 <h2 id="direct-share">Direct Share</h2>
 
-<img src="{@docRoot}preview/images/direct-share-screen.png"
-srcset="{@docRoot}preview/images/direct-share-screen.png 1x, {@docRoot}preview/images/direct-share-screen_2x.png 2x"
+<img src="{@docRoot}images/android-6.0/direct-share-screen.png"
+srcset="{@docRoot}images/android-6.0/direct-share-screen.png 1x, {@docRoot}images/android-6.0/direct-share-screen_2x.png 2x"
 style="float:right; margin:0 0 20px 30px" width="312" height="329" />
 
-<p>This preview provides you with APIs to make sharing intuitive and quick for users. You can now
+<p>This release provides you with APIs to make sharing intuitive and quick for users. You can now
 define <em>direct share targets</em> that launch a specific activity in your app. These direct share
 targets are exposed to users via the <em>Share</em> menu. This feature allows users to share
 content to targets, such as contacts, within other apps. For example, the direct share target might
@@ -228,7 +231,7 @@
 
 <h2 id="voice-interactions">Voice Interactions</h2>
 <p>
-This preview provides a new voice interaction API which, together with
+This release provides a new voice interaction API which, together with
 <a href="https://developers.google.com/voice-actions/" class="external-link">Voice Actions</a>,
 allows you to build conversational voice experiences into your apps. Call the
 {@link android.app.Activity#isVoiceInteraction()} method to determine if a voice action triggered
@@ -251,7 +254,7 @@
 
 <h2 id="assist">Assist API</h2>
 <p>
-This preview offers a new way for users to engage with your apps through an assistant. To use this
+This release offers a new way for users to engage with your apps through an assistant. To use this
 feature, the user must enable the assistant to use the current context. Once enabled, the user
 can summon the assistant within any app, by long-pressing on the <strong>Home</strong> button.</p>
 <p>Your app can elect to not share the current context with the assistant by setting the
@@ -273,7 +276,7 @@
 </ol>
 
 <h2 id="notifications">Notifications</h2>
-<p>This preview adds the following API changes for notifications:</p>
+<p>This release adds the following API changes for notifications:</p>
 <ul>
   <li>New {@link android.app.NotificationManager#INTERRUPTION_FILTER_ALARMS} filter level that
     corresponds to the new <em>Alarms only</em> do not disturb mode.</li>
@@ -296,7 +299,7 @@
 </ul>
 
 <h2 id="bluetooth-stylus">Bluetooth Stylus Support</h2>
-<p>This preview provides improved support for user input using a Bluetooth stylus. Users can pair
+<p>This release provides improved support for user input using a Bluetooth stylus. Users can pair
 and connect a compatible Bluetooth stylus with their phone or tablet.  While connected, position
 information from the touch screen is fused with pressure and button information from the stylus to
 provide a greater range of expression than with the touch screen alone. Your app can listen for
@@ -310,7 +313,7 @@
 <li>If the user touches a stylus with a button on the screen of your app, the
 {@link android.view.MotionEvent#getToolType(int) getTooltype()} method returns
 {@link android.view.MotionEvent#TOOL_TYPE_STYLUS}.</li>
-<li>For apps targeting M Preview, the
+<li>For apps targeting Android 6.0 (API level 23), the
 {@link android.view.MotionEvent#getButtonState() getButtonState()}
 method returns {@link android.view.MotionEvent#BUTTON_STYLUS_PRIMARY} when the user
 presses the primary stylus button. If the stylus has a second button, the same method returns
@@ -336,7 +339,7 @@
 
 <h2 id="hotspot">Hotspot 2.0 Release 1 Support</h2>
 <p>
-This preview adds support for the Hotspot 2.0 Release 1 spec on Nexus 6 and Nexus 9 devices. To
+This release adds support for the Hotspot 2.0 Release 1 spec on Nexus 6 and Nexus 9 devices. To
 provision Hotspot 2.0 credentials in your app, use the new methods of the
 {@link android.net.wifi.WifiEnterpriseConfig} class, such as
 {@link android.net.wifi.WifiEnterpriseConfig#setPlmn(java.lang.String) setPlmn()} and
@@ -364,7 +367,7 @@
 
 <h2 id="behavior-themeable-colorstatelists">Themeable ColorStateLists</h2>
 <p>Theme attributes are now supported in
-{@link android.content.res.ColorStateList} for devices running the M Preview. The
+{@link android.content.res.ColorStateList} for devices running on Android 6.0 (API level 23). The
 {@link android.content.res.Resources#getColorStateList(int) getColorStateList()} and
 {@link android.content.res.Resources#getColor(int) getColor()} methods have been deprecated. If
 you are calling these APIs, call the new
@@ -374,7 +377,7 @@
 
 <h2 id="audio">Audio Features</h2>
 
-<p>This preview adds enhancements to audio processing on Android, including: </p>
+<p>This release adds enhancements to audio processing on Android, including: </p>
 <ul>
   <li>Support for the <a href="http://en.wikipedia.org/wiki/MIDI" class="external-link">MIDI</a>
 protocol, with the new {@link android.media.midi} APIs. Use these APIs to send and receive MIDI
@@ -396,7 +399,7 @@
 </ul>
 
 <h2 id="video">Video Features</h2>
-<p>This preview adds new capabilities to the video processing APIs, including:</p>
+<p>This release adds new capabilities to the video processing APIs, including:</p>
 <ul>
 <li>New {@link android.media.MediaSync} class which helps applications to synchronously render
 audio and video streams. The audio buffers are submitted in non-blocking fashion and are
@@ -421,7 +424,7 @@
 </ul>
 
 <h2 id="camera">Camera Features</h2>
-<p>This preview includes the following new APIs for accessing the camera’s flashlight and for
+<p>This release includes the following new APIs for accessing the camera’s flashlight and for
 camera reprocessing of images:</p>
 
 <h3 id="flashlight">Flashlight API</h3>
@@ -476,7 +479,7 @@
 more images, and send them to the {@link android.media.ImageWriter} for camera reprocessing.</p>
 
 <h2 id="afw">Android for Work Features</h2>
-<p>This preview includes the following new APIs for Android for Work:</p>
+<p>This release includes the following new APIs for Android for Work:</p>
 <ul>
   <li><strong>Enhanced controls for Corporate-Owned, Single-Use devices:</strong> The Device Owner
 can now control the following settings to improve management of
@@ -534,8 +537,8 @@
 installKeyPair()}</li>
 </ul>
 </li>
-<img src="{@docRoot}preview/images/work-profile-screen.png"
-srcset="{@docRoot}preview/images/work-profile-screen.png 1x, {@docRoot}preview/images/work-profile-screen_2x.png 2x"
+<img src="{@docRoot}images/android-6.0/work-profile-screen.png"
+srcset="{@docRoot}images/android-6.0/work-profile-screen.png 1x, {@docRoot}images/android-6.0/work-profile-screen_2x.png 2x"
 style="float:right; margin:0 0 10px 20px" width="282" height="476" />
 <li><strong>Data usage tracking.</strong> A Profile or Device Owner can now query for the
 data usage statistics visible in <strong>Settings > Data</strong> usage by using the new
@@ -562,8 +565,3 @@
 the user that they are within the work profile.
 </li>
 </ul>
-
-<p class="note">
-  For a detailed view of all API changes in the M Developer Preview, see the <a href=
-  "{@docRoot}preview/download.html">API Differences Report</a>.
-</p>
diff --git a/docs/html/preview/download.jd b/docs/html/about/versions/marshmallow/download.jd
similarity index 93%
rename from docs/html/preview/download.jd
rename to docs/html/about/versions/marshmallow/download.jd
index d00f90cbf..20a595e 100644
--- a/docs/html/preview/download.jd
+++ b/docs/html/about/versions/marshmallow/download.jd
@@ -1,4 +1,4 @@
-page.title=Downloads
+page.title=M Preview Downloads
 page.image=images/cards/card-download_16-9_2x.png
 
 @jd:body
@@ -164,15 +164,8 @@
   <div id="qv">
     <h2>In this document</h2>
       <ol>
-        <li><a href="#sdk">Android 6.0 SDK</a></li>
-        <li><a href="#docs">Developer Documentation</a></li>
         <li><a href="#images">Hardware System Images</a></li>
       </ol>
-
-     <h2>Legacy downloads</h2>
-        <ol>
-           <li><a href="{@docRoot}preview/download_mp1.html">Developer Preview Archive</a></li>
-        </ol>
   </div>
 </div>
 
@@ -183,43 +176,6 @@
   describes how to get the downloadable components of the preview for testing your app.
 </p>
 
-
-<h2 id="sdk">Android 6.0 SDK</h2>
-
-<p>
-  With Developer Preview 3, the official Android 6.0 SDK is now available for download through the <a href=
-  "{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>. For more information on
-  downloading and configuring the SDK, see <a href=
-  "{@docRoot}preview/setup-sdk.html#downloadSdk">Set Up the SDK</a>.
-</p>
-
-
-<h2 id="docs">Developer Documentation</h2>
-
-<p>
-  The developer documentation for Developer Preview 3 is released as Android 6.0 (API level 23) and
-  is available online, including the <a href="{@docRoot}reference/packages.html">API level 23
-  reference</a> and <a href="{@docRoot}sdk/api_diff/23/changes.html">diff report</a>. The following
-  developer documentation download package provides additional, incremental difference reports
-  between the preview releases.
-</p>
-
-<table>
-  <tr>
-    <th scope="col">Description</th>
-    <th scope="col">Download / Checksums</th>
-  </tr>
-  <tr id="docs-dl">
-    <td>Android M Preview 3<br>Developer Docs</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >m-preview-3-developer-docs.zip</a><br>
-      MD5: d99b14b0c06d31c8dfecb25072654ca3<br>
-      SHA-1: 9cefeeda07676130da606a1796e1c00fffc667c1
-    </td>
-  </tr>
-<table>
-
-
 <h2 id="images">Hardware System Images</h2>
 
 <p>
diff --git a/docs/html/about/versions/marshmallow/index.jd b/docs/html/about/versions/marshmallow/index.jd
new file mode 100644
index 0000000..ff988d8
--- /dev/null
+++ b/docs/html/about/versions/marshmallow/index.jd
@@ -0,0 +1,86 @@
+page.title=Android 6.0
+page.tags="marshmallow",
+meta.tags="marshamallow, M", androidm
+fullpage=true
+section.landing=true
+header.hide=1
+footer.hide=1
+@jd:body
+
+<section class="dac-expand dac-hero dac-light" >
+  <div class="wrap">
+    <div class="cols dac-hero-content">
+      <div class="col-9of16 col-push-7of16 dac-hero-figure">
+        <img class="dac-hero-image" src="{@docRoot}images/home/devices-hero_620px_2x.png"
+             srcset="{@docRoot}images/home/devices-hero_620px.png 1x,
+             {@docRoot}images/home/devices-hero_620px_2x.png 2x">
+      </div>
+      <div class="col-7of16 col-pull-9of16">
+        <h1 class="dac-hero-title">Android 6.0</h1>
+        <p class="dac-hero-description">
+          <strong>The official Android 6.0 SDK is now available!</strong>
+          Explore what's new &mdash; <strong>runtime permissions</strong>,
+          <strong>Doze</strong> and <strong>App Standby</strong> power-saving features, new
+          <strong>assist technology</strong>, and more.
+        </p>
+
+        <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/android-6.0.html">
+          <span class="dac-sprite dac-auto-chevron"></span>
+          Get started
+        </a><br>
+      </div>
+    </div>
+    <div class="dac-section dac-small">
+      <div class="resource-widget resource-flow-layout col-16"
+           data-query="collection:marshmallow/landing/resources"
+           data-cardSizes="6x2"
+           data-maxResults="3">
+      </div>
+    </div>
+  </div>
+</section>
+
+<div class="wrap dac-offset-parent">
+  <a class="dac-fab dac-scroll-button" data-scroll-button href="#latest">
+    <i class="dac-sprite dac-arrow-down-gray"></i>
+  </a>
+</div>
+
+<section class="dac-section dac-gray dac-small dac-invert" id="latest"><div class="wrap">
+  <h2 class="norule">Latest</h2>
+  <div class="resource-widget resource-flow-layout col-16"
+      data-query="type:blog+tag:marshmallow"
+      data-sortOrder="-timestamp"
+      data-cardSizes="6x6"
+      data-maxResults="12"
+      data-initial-results="3"></div>
+</div></section>
+</section>
+
+<section class="dac-section" id="videos"><div class="wrap">
+  <h1 class="dac-section-title">Videos</h1>
+  <div class="dac-section-subtitle">
+    Watch these videos to understand and use the features provided in Android
+    Marshmallow.
+  </div>
+
+  <div class="resource-widget resource-flow-layout col-16"
+       data-query="collection:marshmallow/landing/videos"
+       data-sortOrder="-timestamp"
+       data-cardSizes="6x6"
+       data-initial-results="3"></div>
+  </div>
+</section>
+
+<section class="dac-section dac-gray" id="resources"><div class="wrap">
+  <h1 class="dac-section-title">Resources</h1>
+  <div class="dac-section-subtitle">
+    Essential information to help you get your apps ready for Android 6.0.
+  </div>
+
+  <div class="resource-widget resource-flow-layout col-16"
+       data-query="collection:marshmallow/landing/more"
+       data-cardSizes="6x6"
+       data-initial-results="3"></div>
+  </div>
+</section>
\ No newline at end of file
diff --git a/docs/html/about/versions/marshmallow/samples.jd b/docs/html/about/versions/marshmallow/samples.jd
new file mode 100644
index 0000000..654bdec
--- /dev/null
+++ b/docs/html/about/versions/marshmallow/samples.jd
@@ -0,0 +1,85 @@
+page.title=Samples
+page.image=images/cards/samples-new_2x.png
+page.keywords=marshmallow,androidm,samples
+@jd:body
+
+<p>
+  The following code samples are provided for Android 6.0 (API level 23). To download
+  the samples in Android Studio, select the <b>File > Import Samples</b> menu option.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> These downloadable projects are designed
+   for use with Gradle and Android Studio.
+</p>
+
+<ul>
+<li id="ActiveNotification">
+<a href="href="{@docRoot}samples/ActiveNotifications/index.html">Active Notification</a>: This sample demonstrates how the
+  <a href="{@docRoot}reference/android/app/NotificationManager.html"><code>NotificationManager</code></a>
+  can tell you how many notifications your app is currently showing.
+</li>
+
+<li id="AutomaticBackup">
+<a href="{@docRoot}samples/AutoBackupForApps/index.html">Auto Backup for Apps</a>: Android 6.0
+(API level 23) introduces automatic backup for app settings. This sample demonstrates how to add
+filtering rules to an app in order to manage settings backup.
+</li>
+
+<li id="CameraRaw">
+<a href="{@docRoot}samples/Camera2Raw/index.html">Camera 2 Raw</a>: This sample demonstrates how to
+use the <code>Camera2</code> API to capture RAW camera buffers and save them as
+<code>DNG</code> files.
+</li>
+
+<li id="ConfirmCredential">
+  <a href="{@docRoot}samples/ConfirmCredential/index.html">Confirm Credential</a>: This sample
+  demonstrates how to use device credentials as an authentication method in your app.
+</li>
+
+<li id="DeviceOwner"><a href="{@docRoot}samples/DeviceOwner/index.html">Device Owner</a>: This
+  sample demonstrates how to use the device owner features to manage and
+  configure a device.
+</li>
+
+<li id="DirectShare"><a href="{@docRoot}samples/DirectShare/index.html">Direct Share</a>:
+  This sample demonstrates how to provide the
+  <a href="{@docRoot}about/versions/marshmallow/android-6.0.html#direct-share">Direct Share</a>
+  feature. The app shows some options directly in the list of share intent candidates.
+</li>
+
+<li id="FingerprintDialog">
+  <a href="{@docRoot}samples/FingerprintDialog/index.html">Fingerprint
+  Dialog</a>:
+  This sample demonstrates how to recognize registered fingerprints to
+  authenticate your app's user.
+</li>
+
+<li id="MidiScope">
+  <a href="{@docRoot}samples/MidiScope/index.html">MidiScope</a>:
+  This sample demonstrates how to use the <a href=
+  "{@docRoot}reference/android/media/midi/package-summary.html">MIDI API</a> to
+  receive and process MIDI signals coming from an attached input device.
+</li>
+
+<li id="MidiSynth">
+  <a href="{@docRoot}samples/MidiSynth/index.html">MidiSynth</a>:
+  This sample demonstrates how to use the <a href=
+  "{@docRoot}reference/android/media/midi/package-summary.html">MIDI API</a> to
+  receive and play MIDI messages coming from an attached input device.
+</li>
+
+<li id="NfcProvisioning"><a href="{@docRoot}samples/NfcProvisioning/index.html">NFC Provisioning</a>:
+  This sample demonstrates how to use NFC to provision other devices with a
+  specific device owner.
+</li>
+
+<li id="RuntimePermissions">
+  <a href=
+  "{@docRoot}samples/RuntimePermissions/index.html">RuntimePermissions</a>:
+  This sample shows runtime permissions available in Android 6.0 (API level 23)
+  and higher. Display the log on screen to follow the execution. If executed on
+  an Android 6.0 device, the app displays an additional option to access
+  contacts using an 6.0-only optional permission.
+</li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/about/versions/marshmallow/testing.jd b/docs/html/about/versions/marshmallow/testing.jd
new file mode 100644
index 0000000..9309536
--- /dev/null
+++ b/docs/html/about/versions/marshmallow/testing.jd
@@ -0,0 +1,32 @@
+page.title=Android 6.0 Testing Guide
+page.image=images/cards/card-build_16x9_2x.png
+page.keywords=marshmallow,androidm,testing,permissions
+
+@jd:body
+
+<p>
+  Android 6.0 (API level 23) includes a number of APIs and behavior changes that can
+  impact your app, as described in the <a href="{@docRoot}about/versions/marshmallow/android-6.0.html">API
+  Overview</a> and <a href="{@docRoot}about/versions/masrhmallow/android-6.0-changes.html">Behavior Changes</a>.
+  In testing your app with the preview, there are some specific system changes that you should
+  focus on to ensure that users have a good experience.
+</p>
+
+<p>
+  The following resources describe what and how to test Android 6.0 (API level 23) features with
+  your app. You should prioritize testing of these specific Android 6.0 (API level 23) features,
+  due to their high potential impact on your app's behavior:
+</p>
+
+<ul>
+  <li><a href="{@docRoot}training/permissions/index.html">Permissions</a>:
+    Information on the behavior of runtime permissions, of runtime permissions, testing, and best
+    practices.
+  </li>
+  <li><a href="{@docRoot}training/monitoring-device-state/battery-monitoring.html">Doze and App Standby</a>:
+    Information on the behavior of Doze and App Standby, testing, and best practices.
+  </li>
+  <li><a href="{@docRoot}training/backup/auto-backup.html">Auto Backup and Device Identifiers</a>:
+    Information on the behavior of auto backup for apps, testing, and best practices.
+  </li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index f3f2e5e..cfcee1f 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -183,6 +183,7 @@
       <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></li> <!-- ##api level 4## -->
       <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-library-element.html">&lt;uses-library&gt;</a></li>
       <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></li>
+      <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-permission-sdk23-element.html">&lt;uses-permission-sdk23&gt;</a></li>
       <li><a href="<?cs var:toroot ?>guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></li>
     </ul>
   </li><!-- end of the manifest file -->
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index 7717696..4eb32cb 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -35,6 +35,7 @@
 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html">&lt;uses-configuration&gt;</a></code>  <!-- ##api level 3## -->
 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-sdk23-element.html">&lt;uses-permission-sdk23&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk&gt;</a></code></dd>
 
 <p>
diff --git a/docs/html/guide/topics/manifest/uses-permission-element.jd b/docs/html/guide/topics/manifest/uses-permission-element.jd
index bb93a70..38432bf 100644
--- a/docs/html/guide/topics/manifest/uses-permission-element.jd
+++ b/docs/html/guide/topics/manifest/uses-permission-element.jd
@@ -43,14 +43,15 @@
 
 <dt>description:</dt>
 <dd itemprop="description">Requests a permission that the application must be granted in
-order for it to operate correctly.  Permissions are granted by the user when the 
-application is installed, not while it's running.
+order for it to operate correctly. Permissions are granted by the user when the 
+application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher).
 
 <p>
 For more information on permissions, see the 
 <a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a></code> 
-section in the introduction and the separate 
-<a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> document.  
+section in the introduction and the separate
+<a href="{@docRoot}guide/topics/security/permissions.html">System
+Permissions</a> API guide.
 A list of permissions defined by the base platform can be found at 
 {@link android.Manifest.permission android.Manifest.permission}.
 
@@ -60,8 +61,10 @@
 <dd>The name of the permission.  It can be a permission defined by the 
 application with the <code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code> 
 element, a permission defined by another application, or one of the 
-standard system permissions, such as "{@code android.permission.CAMERA}" 
-or "{@code android.permission.READ_CONTACTS}".  As these examples show, 
+standard system permissions (such as
+{@link android.Manifest.permission#CAMERA "android.permission.CAMERA"}
+or {@link android.Manifest.permission#READ_CONTACTS
+"android.permission.READ_CONTACTS"}).  As these examples show,
 a permission name typically includes the package name as a prefix.</dd>
 
 <dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt>
@@ -94,6 +97,8 @@
 <dd>
 <ul>
   <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
+  <li><a href="uses-permission-sdk23-element.html"
+      ><code>&lt;uses-permission-sdk23&gt;</code></a></li>
   <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
 </ul>
 </dd>
diff --git a/docs/html/guide/topics/manifest/uses-permission-sdk23-element.jd b/docs/html/guide/topics/manifest/uses-permission-sdk23-element.jd
new file mode 100644
index 0000000..0b71ed6
--- /dev/null
+++ b/docs/html/guide/topics/manifest/uses-permission-sdk23-element.jd
@@ -0,0 +1,92 @@
+page.title=&lt;uses-permission-sdk23&gt;
+page.tags="uses-permission-sdk23","permissions"
+parent.title=The AndroidManifest.xml File
+parent.link=manifest-intro.html
+@jd:body
+
+<dl class="xml">
+
+<dt>syntax:</dt>
+<dd><pre class="stx">&lt;uses-permission-sdk23 android:<a href="#nm">name</a>="<i>string</i>"
+        android:<a href="#maxSdk">maxSdkVersion</a>="<i>integer</i>" /&gt;</pre></dd>
+
+<dt>Contained in:</dt>
+<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
+
+<dt>
+  Description:
+</dt>
+
+<dd itemprop="description">
+  Specifies that an app wants a particular permission, but <em>only</em> if
+  the app is running on a device with SDK version 23 or higher. If the device
+  is running SDK version 22 or lower, the app does not have the specified
+  permission.
+
+<p>
+  This element is useful when you update an app to include a new
+  feature that requires an additional permission. If a user updates an app on a
+  device that is running SDK version 22 or lower, the system prompts the user
+  at install time to grant all new permissions that are declared in that
+  update. If a new feature is minor enough, you may prefer to disable
+  the feature altogether on those devices, so the user does not have to grant
+  additional permissions to update the app. By using the
+  <code>&lt;uses-permission-sdk23&gt;</code> element instead of <a href=
+  "uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a>,
+  you can request the permission <em>only</em> if the app is running on
+  platforms that support the runtime permissions model, in which the user
+  grants permissions to the app while it is running.
+</p>
+
+  <p>
+    For more information on permissions, see the <a href=
+    "{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a>
+    section in the introduction and the separate <a href=
+    "{@docRoot}guide/topics/security/permissions.html">System Permissions</a>
+    API guide. A list of permissions defined by the base platform is available
+    at {@link android.Manifest.permission android.Manifest.permission}.
+  </p>
+</dd>
+
+<dt>Attributes:</dt>
+
+  <dd>
+    <dl class="attr">
+
+      <dt><a name="nm"></a>{@code android:name}</dt>
+
+      <dd>
+        The name of the permission. This permission can be defined by the
+        app with the <code><a href=
+        "{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code>
+        element, it can be a permission defined by another app, or it can be one
+        of the standard system permissions, such as
+        {@link android.Manifest.permission#CAMERA "android.permission.CAMERA"}
+        or {@link android.Manifest.permission#READ_CONTACTS
+        "android.permission.READ_CONTACTS"}.
+      </dd>
+
+      <dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt>
+      <dd>
+        The highest API level at which this permission should be granted to your
+        app. If the app is installed on a device with a later API level, the app
+        is not granted the permission and cannot use any related functionality.
+      </dd>
+    </dl>
+  </dd>
+
+<!-- ##api level indication## -->
+<dt>introduced in:</dt>
+<dd>API Level 23</dd>
+
+<dt>see also:</dt>
+<dd>
+<ul>
+  <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
+  <li><a href=
+    "uses-permission-element.html"><code>&lt;uses-permission&gt;</code></a></li>
+  <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
+</ul>
+</dd>
+
+</dl>
diff --git a/docs/html/guide/topics/security/normal-permissions.jd b/docs/html/guide/topics/security/normal-permissions.jd
new file mode 100644
index 0000000..9f7a3c6
--- /dev/null
+++ b/docs/html/guide/topics/security/normal-permissions.jd
@@ -0,0 +1,173 @@
+page.title=Normal Permissions
+page.tags=permissions,normal
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<!--
+<h2>In this document</h2>
+<ol>
+  <li></li>
+</ol>
+-->
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.Manifest.permission}</li>
+  </ol>
+
+  <h2>See Also</h2>
+  <ol>
+    <li><a href="{@docRoot}training/permissions/index.html">Working with System
+        Permissions</a></li>
+  </ol>
+
+<!--
+<h2>See also</h2>
+<ol>
+  <li></li>
+</ol>
+-->
+
+</div>
+</div>
+
+<p>
+  Many permissions are designated as {@link
+  android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL},
+  which indicates that
+  there's no great risk to the user's privacy or security in letting apps have
+  those permissions. For example, users would reasonably want to know whether
+  an app can read their contact information, so users have to grant this
+  permission explicitly. By contrast, there's no great risk in allowing an app
+  to vibrate the device, so that permission is designated as <em>normal.</em>
+</p>
+
+<p>
+  If an app declares in its
+  manifest that it needs a normal permission, the system automatically grants
+  the app
+  that permission at install time. The system does not prompt the user
+  to grant normal
+  permissions, and users cannot revoke these permissions.
+</p>
+
+<p>As of API level 23, the following permissions are classified as {@link
+    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}:</p>
+
+<ul>
+  <li>{@link android.Manifest.permission#ACCESS_LOCATION_EXTRA_COMMANDS
+  ACCESS_LOCATION_EXTRA_COMMANDS}
+  </li>
+
+  <li>{@link android.Manifest.permission#ACCESS_NETWORK_STATE
+  ACCESS_NETWORK_STATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#ACCESS_NOTIFICATION_POLICY
+  ACCESS_NOTIFICATION_POLICY}
+  </li>
+
+  <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE ACCESS_WIFI_STATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#BLUETOOTH BLUETOOTH}
+  </li>
+
+  <li>{@link android.Manifest.permission#BLUETOOTH_ADMIN BLUETOOTH_ADMIN}
+  </li>
+
+  <li>{@link android.Manifest.permission#BROADCAST_STICKY BROADCAST_STICKY}
+  </li>
+
+  <li>{@link android.Manifest.permission#CHANGE_NETWORK_STATE
+  CHANGE_NETWORK_STATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#CHANGE_WIFI_MULTICAST_STATE
+  CHANGE_WIFI_MULTICAST_STATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE CHANGE_WIFI_STATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#DISABLE_KEYGUARD DISABLE_KEYGUARD}
+  </li>
+
+  <li>{@link android.Manifest.permission#EXPAND_STATUS_BAR EXPAND_STATUS_BAR}
+  </li>
+
+  <li>{@link android.Manifest.permission#FLASHLIGHT FLASHLIGHT}
+  </li>
+
+  <li>{@link android.Manifest.permission#GET_PACKAGE_SIZE GET_PACKAGE_SIZE}
+  </li>
+
+  <li>{@link android.Manifest.permission#INTERNET INTERNET}
+  </li>
+
+  <li>{@link android.Manifest.permission#KILL_BACKGROUND_PROCESSES
+  KILL_BACKGROUND_PROCESSES}
+  </li>
+
+  <li>{@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS
+  MODIFY_AUDIO_SETTINGS}
+  </li>
+
+  <li>{@link android.Manifest.permission#NFC NFC}
+  </li>
+
+  <li>{@link android.Manifest.permission#READ_SYNC_SETTINGS READ_SYNC_SETTINGS}
+  </li>
+
+  <li>{@link android.Manifest.permission#READ_SYNC_STATS READ_SYNC_STATS}
+  </li>
+
+  <li>{@link android.Manifest.permission#RECEIVE_BOOT_COMPLETED
+  RECEIVE_BOOT_COMPLETED}
+  </li>
+
+  <li>{@link android.Manifest.permission#REORDER_TASKS REORDER_TASKS}
+  </li>
+
+  <li>{@link android.Manifest.permission#REQUEST_INSTALL_PACKAGES
+  REQUEST_INSTALL_PACKAGES}
+  </li>
+
+  <li>{@link android.Manifest.permission#SET_TIME_ZONE SET_TIME_ZONE}
+  </li>
+
+  <li>{@link android.Manifest.permission#SET_WALLPAPER SET_WALLPAPER}
+  </li>
+
+  <li>{@link android.Manifest.permission#SET_WALLPAPER_HINTS
+  SET_WALLPAPER_HINTS}
+  </li>
+
+  <li>{@link android.Manifest.permission#TRANSMIT_IR TRANSMIT_IR}
+  </li>
+
+  <li>{@link android.Manifest.permission#USE_FINGERPRINT USE_FINGERPRINT}
+  </li>
+
+  <li>{@link android.Manifest.permission#VIBRATE VIBRATE}
+  </li>
+
+  <li>{@link android.Manifest.permission#WAKE_LOCK WAKE_LOCK}
+  </li>
+
+  <li>{@link android.Manifest.permission#WRITE_SYNC_SETTINGS
+  WRITE_SYNC_SETTINGS}
+  </li>
+
+  <li>{@link android.Manifest.permission#SET_ALARM SET_ALARM}
+  </li>
+
+  <li>{@link android.Manifest.permission#INSTALL_SHORTCUT INSTALL_SHORTCUT}
+  </li>
+
+  <li>{@link android.Manifest.permission#UNINSTALL_SHORTCUT UNINSTALL_SHORTCUT}
+  </li>
+</ul>
diff --git a/docs/html/guide/topics/security/permissions.jd b/docs/html/guide/topics/security/permissions.jd
index cfab3c9..b5a5250 100644
--- a/docs/html/guide/topics/security/permissions.jd
+++ b/docs/html/guide/topics/security/permissions.jd
@@ -1,4 +1,5 @@
 page.title=System Permissions
+page.tags=permissions
 @jd:body
 
 <div id="qv-wrapper">
@@ -10,7 +11,12 @@
 <li><a href="#signing">Application Signing</a></li>
 <li><a href="#userid">User IDs and File Access</a></li>
 <li><a href="#permissions">Using Permissions</a></li>
-<li><a href="#declaring">Declaring and Enforcing Permissions</a>
+<li><a href="#normal-dangerous">Normal and Dangerous Permissions</a>
+  <ol>
+    <li><a href="#perm-groups">Permission Groups</a></li>
+  </ol>
+</li>
+<li><a href="#defining">Defining and Enforcing Permissions</a>
 	<ol>
 	<li><a href="#manifest">...in AndroidManifest.xml</a></li>
 	<li><a href="#broadcasts">...when Sending Broadcasts</a></li>
@@ -18,9 +24,46 @@
 	</ol></li>
 <li><a href="#uri">URI Permissions</a></li>
 </ol>
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.Manifest.permission}</li>
+    <li>{@link android.Manifest.permission_group}</li>
+  </ol>
+
+  <h2>See Also</h2>
+  <ol>
+    <li><a href="{@docRoot}training/permissions/index.html">Working with System
+        Permissions</a></li>
+  </ol>
+
+<!--
+  <h2>See also</h2>
+  <ol>
+    <li></li>
+  </ol>
+-->
 </div>
 </div>
 
+<a class="notice-designers"
+    href="https://www.google.com/design/spec/patterns/permissions.html">
+  <div>
+    <h3>Design Patterns</h3>
+    <p>Permissions</p>
+  </div>
+</a>
+
+<!-- video box -->
+<a class="notice-developers-video"
+    href="https://www.youtube.com/watch?v=f17qe9vZ8RM">
+<div>
+    <h3>Video</h3>
+    <p>Google I/O 2015—Android M Permissions: Best Practices for
+      Developers</p>
+</div>
+</a>
+
 <p>Android is a privilege-separated operating system, in which each
 application runs with a distinct system identity (Linux user ID and group
 ID).  Parts of the system are also separated into distinct identities.
@@ -51,8 +94,7 @@
 must explicitly share resources and data. They do this by declaring the
 <em>permissions</em> they need for additional capabilities not provided by
 the basic sandbox. Applications statically declare the permissions they
-require, and the Android system prompts the user for consent at the time the
-application is installed.</p>
+require, and the Android system prompts the user for consent.</p>
 
 <p>The application sandbox does not depend on the technology used to build
 an application. In particular the Dalvik VM is not a security boundary, and
@@ -110,15 +152,16 @@
 been set appropriately so any other application can see it.</p>
 
 
-<a name="permissions"></a>
-<h2>Using Permissions</h2>
+<h2 id="permissions">Using Permissions</h2>
 
 <p>A basic Android application has no permissions associated with it by default,
 meaning it cannot do anything that would adversely impact the user experience
 or any data on the device.  To make use of protected features of the device,
-you must include in your <code>AndroidManifest.xml</code> one or more
-<code>{@link android.R.styleable#AndroidManifestUsesPermission &lt;uses-permission&gt;}</code>
-tags declaring the permissions that your application needs.</p>
+you must include one or more
+<a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"
+    ><code>&lt;uses-permission&gt;</code></a>
+tags in your <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">app
+manifest</a>.</p>
 
 <p>For example, an application that needs to monitor incoming SMS messages would
 specify:</p>
@@ -129,14 +172,50 @@
     ...
 &lt;/manifest&gt;</pre>
 
-<p>At application install time, permissions requested by the application are
-granted to it by the package installer, based on checks against the
-signatures of the applications declaring those permissions and/or interaction
-with the user. <em>No</em> checks with the user
-are done while an application is running; the app is either granted a particular
-permission when installed, and can use that feature as desired, or the
-permission is not granted and any attempt to use the feature fails
-without prompting the user.</p>
+<div class="sidebox-wrapper">
+<div class="sidebox">
+  <h3>Permission Levels</h3>
+  <p>For more information about the different protection levels for
+    permissions, see <a href="#normal-dangerous">Normal and Dangerous
+    Permissions</a>.</p>
+</div>
+</div>
+
+<p>
+  If your app lists <em>normal</em> permissions in its manifest (that is,
+  permissions that don't pose much risk to the user's privacy or the device's
+  operation), the system automatically grants those permissions.
+  If your app lists <em>dangerous</em> permissions in its manifest (that is,
+  permissions that could potentially affect the user's privacy or the device's
+  normal operation), the system asks the user to explicitly grant those
+  permissions. The way Android makes the requests depends on the system
+  version, and the system version targeted by your app:
+</p>
+
+<ul>
+  <li>If the device is running Android 6.0 (API level 23) or higher,
+  <em>and</em> the app's <a
+  href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+  ><code>targetSdkVersion</code></a>
+  is 23 or higher, the app requests permissions from the user at run-time.
+  The user can revoke the permissions at any time, so the app needs to
+  check whether it has the permissions every time it runs.
+  For more information about requesting permissions in your app, see the
+  <a href="{@docRoot}training/permissions/index.html">Working with System
+  Permissions</a> training guide.
+  </li>
+
+  <li>If the device is running Android 5.1 (API level 22) or lower, <em>or</em>
+  the app's <a
+  href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+  ><code>targetSdkVersion</code></a>
+  is 22 or lower, the system asks the user to grant the permissions when the
+  user installs the app. If you add a new permission to an updated version of
+  the app, the system asks the user to grant that permission when the user
+  updates the app. Once the user installs the app, the only way they can
+  revoke the permission is by uninstalling the app.
+  </li>
+</ul>
 
 <p>Often times a permission failure will result in a {@link
 java.lang.SecurityException} being thrown back to the application. However,
@@ -146,12 +225,6 @@
 will not receive an exception if there are permission failures. In almost all
 cases, however, a permission failure will be printed to the system log.</p>
 
-<p>However, in a normal user situation (such as when the app is installed
-from Google Play Store), an app cannot be installed if the user does not grant the app
-each of the requested permissions. So you generally don't need to worry about runtime failures
-caused by missing permissions because the mere fact that the app is installed at all
-means that your app has been granted its desired permissions.</p>
-
 <p>The permissions provided by the Android system can be found at {@link
 android.Manifest.permission}. Any application may also define and enforce its
 own permissions, so this is not a comprehensive list of all possible
@@ -173,8 +246,9 @@
 
 
 
-<div class="caution">
-<p><strong>Caution:</strong> Over time,
+<h3 id="auto-adjustments">Automatic permission adjustments</h3>
+
+<p> Over time,
 new restrictions may be added to the platform such that, in order
 to use certain APIs, your app must request a permission that it previously did not need.
 Because existing apps assume access to those APIs is freely available,
@@ -189,18 +263,260 @@
 added in API level 4 to restrict access to the shared storage space. If your <a
 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
 is 3 or lower, this permission is added to your app on newer versions of Android.</p>
-<p>Beware that if this happens to your app, your app listing on Google Play will show these
-required permissions even though your app might not actually require them.</p>
+
+<p class="caution">
+  <strong>Caution:</strong> If a permission is automatically added to your app,
+  your app listing on Google Play lists these additional permissions even
+  though your app might not actually require them.
+</p>
+
 <p>To avoid this and remove the default permissions you don't need, always update your <a
 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
 to be as high as possible. You can see which permissions were added with each release in the
 {@link android.os.Build.VERSION_CODES} documentation.</p>
 </div>
 
+<h2 id="normal-dangerous">Normal and Dangerous Permissions</h2>
+
+<p>
+  System permissions are divided into several protection levels. The two most
+  important protection levels to know about are <em>normal</em> and
+  <em>dangerous</em> permissions:
+</p>
+
+<ul>
+  <li>
+    <em>Normal</em> permissions cover areas where your app needs to access data
+    or resources outside the app's sandbox, but where there's very little risk
+    to the user's privacy or the operation of other apps. For example,
+    permission to turn on the flashlight is a normal permission. If an app
+    declares that it needs a normal permission, the system automatically grants
+    the permission to the app. For a full listing of the current normal
+    permissions, see <a href="normal-permissions.html">Normal permissions</a>.
+  </li>
+
+  <li>
+    <em>Dangerous</em> permissions cover areas where the app wants data or
+    resources that involve the user's private information, or could potentially
+    affect the user's stored data or the operation of other apps. For example,
+    the ability to read the user's contacts is a dangerous permission. If an
+    app declares that it needs a dangerous permission, the user has to
+    explicitly grant the permission to the app.
+  </li>
+</ul>
+
+<h3 id="perm-groups">Permission groups</h3>
+
+<p>
+  All dangerous Android system permissions belong to permission groups.
+  If the device is running Android 6.0 (API level 23) and the app's <a href=
+  "{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+  ><code>targetSdkVersion</code></a> is 23 or higher, the following system
+  behavior applies when you app requests a dangerous permission:
+</p>
+
+<ul>
+  <li>If an app requests a dangerous permission listed in its manifest, and the app
+  does not currently have any permissions in the permission group, the system
+  shows a dialog box to the user describing the permission group that the app
+  wants access to. The dialog box does not describe the specific permission
+  within that group. For example, if an app requests the {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} permission, the
+  system dialog box just says the app needs access to the device's contacts. If
+  the user grants approval, the system gives the app just the permission it
+  requested.
+  </li>
+
+  <li>If an app requests a dangerous permission listed in its manifest, and the app
+  already has another dangerous permission in the same permission group, the
+  system immediately grants the permission without any interaction with the
+  user. For example, if an app had previously requested and been granted the
+  {@link android.Manifest.permission#READ_CONTACTS READ_CONTACTS} permission,
+  and it then requests {@link android.Manifest.permission#WRITE_CONTACTS
+  WRITE_CONTACTS}, the system immediately grants that permission.
+  </li>
+</ul>
+
+<p class="aside">
+  Any permission can belong to a permission group, including normal permissions
+  and permissions defined by your app.
+  However, a permission's group only affects the user experience if the
+  perimission is dangerous. You can ignore the permission group for normal
+  permissions.
+</p>
+
+<p>
+  If the device is running Android 5.1 (API level 22) or lower, or the app's
+  <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+  ><code>targetSdkVersion</code></a> is 22 or lower, the system asks the user
+  to grant the permissions at install time. Once again, the system just tells
+  the user what permission <em>groups</em> the app needs, not the individual
+  permissions
+</p>
+
+<p class="table-caption" id="permission-groups">
+  <strong>Table 1.</strong> Dangerous permissions and permission groups.</p>
+<table>
+  <tr>
+    <th scope="col">Permission Group</th>
+    <th scope="col">Permissions</th>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#CALENDAR CALENDAR}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#READ_CALENDAR READ_CALENDAR}
+        </li>
+      </ul>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#WRITE_CALENDAR WRITE_CALENDAR}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#CAMERA CAMERA}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#CAMERA CAMERA}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#CONTACTS CONTACTS}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#READ_CONTACTS READ_CONTACTS}
+        </li>
+        <li>
+          {@link android.Manifest.permission#WRITE_CONTACTS WRITE_CONTACTS}
+        </li>
+        <li>
+          {@link android.Manifest.permission#GET_ACCOUNTS GET_ACCOUNTS}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#LOCATION LOCATION}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}
+        </li>
+        <li>
+          {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#MICROPHONE MICROPHONE}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#RECORD_AUDIO RECORD_AUDIO}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#PHONE PHONE}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+        </li>
+        <li>
+          {@link android.Manifest.permission#CALL_PHONE CALL_PHONE}
+        </li>
+        <li>
+          {@link android.Manifest.permission#READ_CALL_LOG READ_CALL_LOG}
+        </li>
+        <li>
+          {@link android.Manifest.permission#WRITE_CALL_LOG WRITE_CALL_LOG}
+        </li>
+        <li>
+          {@link android.Manifest.permission#ADD_VOICEMAIL ADD_VOICEMAIL}
+        </li>
+        <li>
+          {@link android.Manifest.permission#USE_SIP USE_SIP}
+        </li>
+        <li>
+          {@link android.Manifest.permission#PROCESS_OUTGOING_CALLS PROCESS_OUTGOING_CALLS}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#SENSORS SENSORS}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#BODY_SENSORS BODY_SENSORS}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>{@link android.Manifest.permission_group#SMS SMS}</td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#SEND_SMS SEND_SMS}
+        </li>
+        <li>
+          {@link android.Manifest.permission#RECEIVE_SMS RECEIVE_SMS}
+        </li>
+        <li>
+          {@link android.Manifest.permission#READ_SMS READ_SMS}
+        </li>
+        <li>
+          {@link android.Manifest.permission#RECEIVE_WAP_PUSH RECEIVE_WAP_PUSH}
+        </li>
+        <li>
+          {@link android.Manifest.permission#RECEIVE_MMS RECEIVE_MMS}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+  <tr>
+    <td>
+      {@link android.Manifest.permission_group#STORAGE STORAGE}
+    </td>
+    <td>
+      <ul>
+        <li>
+          {@link android.Manifest.permission#READ_EXTERNAL_STORAGE
+              READ_EXTERNAL_STORAGE}
+        </li>
+        <li>
+          {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE
+              WRITE_EXTERNAL_STORAGE}
+        </li>
+      </ul>
+    </td>
+  </tr>
+
+</table>
 
 
 <a name="declaring"></a>
-<h2>Declaring and Enforcing Permissions</h2>
+<h2 id="defining">Defining and Enforcing Permissions</h2>
 
 <p>To enforce your own permissions, you must first declare them in your
 <code>AndroidManifest.xml</code> using one or more
diff --git a/docs/html/preview/images/direct-share-screen.png b/docs/html/images/android-6.0/direct-share-screen.png
similarity index 100%
rename from docs/html/preview/images/direct-share-screen.png
rename to docs/html/images/android-6.0/direct-share-screen.png
Binary files differ
diff --git a/docs/html/preview/images/direct-share-screen_2x.png b/docs/html/images/android-6.0/direct-share-screen_2x.png
similarity index 100%
rename from docs/html/preview/images/direct-share-screen_2x.png
rename to docs/html/images/android-6.0/direct-share-screen_2x.png
Binary files differ
diff --git a/docs/html/preview/images/fingerprint-screen.png b/docs/html/images/android-6.0/fingerprint-screen.png
similarity index 100%
rename from docs/html/preview/images/fingerprint-screen.png
rename to docs/html/images/android-6.0/fingerprint-screen.png
Binary files differ
diff --git a/docs/html/preview/images/fingerprint-screen_2x.png b/docs/html/images/android-6.0/fingerprint-screen_2x.png
similarity index 100%
rename from docs/html/preview/images/fingerprint-screen_2x.png
rename to docs/html/images/android-6.0/fingerprint-screen_2x.png
Binary files differ
diff --git a/docs/html/preview/images/text-selection.gif b/docs/html/images/android-6.0/text-selection.gif
similarity index 100%
rename from docs/html/preview/images/text-selection.gif
rename to docs/html/images/android-6.0/text-selection.gif
Binary files differ
diff --git a/docs/html/preview/images/work-profile-screen.png b/docs/html/images/android-6.0/work-profile-screen.png
similarity index 100%
rename from docs/html/preview/images/work-profile-screen.png
rename to docs/html/images/android-6.0/work-profile-screen.png
Binary files differ
diff --git a/docs/html/preview/images/work-profile-screen_2x.png b/docs/html/images/android-6.0/work-profile-screen_2x.png
similarity index 100%
rename from docs/html/preview/images/work-profile-screen_2x.png
rename to docs/html/images/android-6.0/work-profile-screen_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-doze_16-9_2x.png b/docs/html/images/cards/card-doze_16-9_2x.png
new file mode 100644
index 0000000..0db640f
--- /dev/null
+++ b/docs/html/images/cards/card-doze_16-9_2x.png
Binary files differ
diff --git a/docs/html/preview/images/perf-test-frame-latency.png b/docs/html/images/performance-testing/perf-test-frame-latency.png
similarity index 100%
rename from docs/html/preview/images/perf-test-frame-latency.png
rename to docs/html/images/performance-testing/perf-test-frame-latency.png
Binary files differ
diff --git a/docs/html/preview/images/perf-test-framestats.png b/docs/html/images/performance-testing/perf-test-framestats.png
similarity index 100%
rename from docs/html/preview/images/perf-test-framestats.png
rename to docs/html/images/performance-testing/perf-test-framestats.png
Binary files differ
diff --git a/docs/html/images/training/doze.png b/docs/html/images/training/doze.png
new file mode 100644
index 0000000..32d0d5d
--- /dev/null
+++ b/docs/html/images/training/doze.png
Binary files differ
diff --git a/docs/html/images/training/permissions/request_permission_dialog.png b/docs/html/images/training/permissions/request_permission_dialog.png
new file mode 100644
index 0000000..fad5f11
--- /dev/null
+++ b/docs/html/images/training/permissions/request_permission_dialog.png
Binary files differ
diff --git a/docs/html/images/training/permissions/request_permission_dialog_2x.png b/docs/html/images/training/permissions/request_permission_dialog_2x.png
new file mode 100644
index 0000000..ee63ded
--- /dev/null
+++ b/docs/html/images/training/permissions/request_permission_dialog_2x.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 10519f7..a9bdbab 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -11,7 +11,7 @@
 
 <!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
 <article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="/preview/index.html">
+<a href="about/versions/marshmallow/index.html">
   <div class="wrap" style="max-width:1100px;margin-top:0">
     <div class="cols dac-hero-content">
       <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
@@ -24,17 +24,12 @@
         <div class="col-6of16 col-push-1of16">
         <p class="dac-hero-description" style="color:white"><strong>The
         official Android 6.0 SDK is now available!</strong> Update to
-        Developer Preview 3 and get your apps ready for Android Marshmallow!</p>
+        Android Marshmallow to get the latest features</p>
 
-        <a class="dac-hero-cta" href="/preview/index.html">
+        <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
           <span class="dac-sprite dac-auto-chevron"></span>
-          Get started
+          Learn more
         </a><br>
-
-        <a class="dac-hero-cta mprev" href="/preview/support.html">
-          <span class="dac-sprite dac-auto-chevron"></span>
-          Update to Developer Preview 3 (final SDK)
-        </a>
       </div>
       </div>
     </div>
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index c481277..3b26f779 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -176,17 +176,6 @@
       "https://www.udacity.com/course/ud867"
     ]
   },
-  "preview/landing/more": {
-    "title": "",
-    "resources": [
-      "https://www.youtube.com/watch?v=yYU4DHLwoRk",
-      "preview/features/runtime-permissions.html",
-      "preview/behavior-changes.html",
-      "preview/backup/index.html",
-      "preview/features/app-linking.html",
-      "preview/testing/guide.html"
-    ]
-  },
   "distribute/landing/carousel": {
     "title": "",
     "resources": [
@@ -1420,15 +1409,12 @@
       "https://support.google.com/googleplay/answer/2651410"
     ]
   },
-  "preview/landing/resources": {
+  "marshmallow/landing/resources": {
     "title": "",
     "resources": [
-      "preview/overview.html",
-      "preview/download.html",
-      "preview/setup-sdk.html",
-      "preview/samples.html",
-      "preview/api-overview.html",
-      "preview/support.html"
+      "about/versions/marshmallow/android-6.0.html",
+      "about/versions/marshmallow/samples.html",
+      "about/versions/marshmallow/download.html"
     ]
   },
   "autolanding": {
@@ -1653,5 +1639,38 @@
        "tools/performance/batterystats-battery-historian/index.html",
        "tools/performance/batterystats-battery-historian/charts.html"
     ]
-  }
+  },
+  "marshmallow/landing/resources": {
+    "title": "",
+    "resources": [
+       "about/versions/marshmallow/android-6.0.html",
+       "about/versions/marshmallow/download.html",
+       "about/versions/marshmallow/samples.html"
+    ]
+  },
+  "marshmallow/landing/videos": {
+    "title": "",
+    "resources": [
+       "https://www.youtube.com/watch?v=yYU4DHLwoRk",
+       "https://www.youtube.com/watch?v=ndBdf1_oOGA",
+       "https://www.youtube.com/watch?v=C8lUdPVSzDk",
+       "https://www.youtube.com/watch?v=VOn7VrTRlA4",
+       "https://www.youtube.com/watch?v=HXacyy0HSW0",
+       "https://www.youtube.com/watch?v=vcSj8ln-BlE",
+       "https://www.youtube.com/watch?v=OW1A4XFRuyc",
+       "https://www.youtube.com/watch?v=f17qe9vZ8RM",
+       "https://www.youtube.com/watch?v=j3QC6hcpy90"
+    ]
+  },
+  "marshmallow/landing/more": {
+  "title": "",
+  "resources": [
+      "about/versions/marshmallow/android-6.0-changes.html",
+      "training/permissions/requesting.html",
+      "training/backup/autosyncapi.html",
+      "training/app-links/index.html",
+      "training/monitoring-device-state/battery-optimization.html",
+      "about/versions/marshmallow/testing.html"
+    ]
+  },
 }
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index d63ccbd..f7664e7 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -3056,12 +3056,96 @@
     "summary":"This video covers how to get started with the preview, important APIs to test and how to provide feedback on the preview.",
     "url":"https://www.youtube.com/watch?v=yYU4DHLwoRk",
     "group":"",
-    "keywords": ["Marshmallow", "Preview"],
+    "keywords": ["Marshmallow"],
     "tags": [],
     "image":"http://i1.ytimg.com/vi/yYU4DHLwoRk/maxresdefault.jpg",
     "lang":"en",
     "type":"Video"
   },
+  {
+    "title":"Google I/O 2015 - What's new in Android",
+    "titleFriendly":"",
+    "summary":"This session will highlight the most exciting new developer features of the Android platform.",
+    "url":"https://www.youtube.com/watch?v=ndBdf1_oOGA",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/ndBdf1_oOGA/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"Fingerprint and payments APIs",
+    "titleFriendly":"",
+    "summary":"New fingerprint and payments APIs are introduced in M, to enable enhanced UX and security for online purchasing, banking, and retail payments.",
+    "url":"https://www.youtube.com/watch?v=VOn7VrTRlA4",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/VOn7VrTRlA4/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"Introduction to Voice Interaction API",
+    "titleFriendly":"",
+    "summary":"This video covers how to use the Voice Interaction API to support system or custom voice actions.",
+    "url":"https://www.youtube.com/watch?v=OW1A4XFRuyc",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/OW1A4XFRuyc/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"Android Auto Backup for Apps",
+    "titleFriendly":"",
+    "summary":"Android Backup is the automatic, cloud-based backup and restore of users’ apps when they set up a new device.",
+    "url":"https://www.youtube.com/watch?v=HXacyy0HSW0",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/HXacyy0HSW0/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"New APIs in M for Android for Work",
+    "titleFriendly":"",
+    "summary":"Android M extends Android for Work functionality with a new set of APIs for Enterprise Mobility Management providers to offer new features and policy controls to IT Departments.",
+    "url":"https://www.youtube.com/watch?v=vcSj8ln-BlE",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/vcSj8ln-BlE/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"Android for Work: Single Use Devices",
+    "titleFriendly":"",
+    "summary":"Android M is bringing the power of Android to all kinds of workplaces.",
+    "url":"https://www.youtube.com/watch?v=j3QC6hcpy90",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/j3QC6hcpy90/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
+  {
+    "title":"Runtime Permissions in Android 6.0 Marshmallow",
+    "titleFriendly":"",
+    "summary":"Learn how to integrate runtime permissions into your Android app.",
+    "url":"https://www.youtube.com/watch?v=C8lUdPVSzDk",
+    "group":"",
+    "keywords": ["Marshmallow"],
+    "tags": [],
+    "image":"http://i1.ytimg.com/vi/C8lUdPVSzDk/maxresdefault.jpg",
+    "lang":"en",
+    "type":"Video"
+  },
 
   {
     "lang": "ja",
diff --git a/docs/html/jd_tag_helpers.js b/docs/html/jd_tag_helpers.js
index f03b1d7..7538e4d 100644
--- a/docs/html/jd_tag_helpers.js
+++ b/docs/html/jd_tag_helpers.js
@@ -13,7 +13,6 @@
   GOOGLE_RESOURCES,
   GUIDE_RESOURCES,
   SAMPLES_RESOURCES,
-  PREVIEW_RESOURCES,
   TOOLS_RESOURCES,
   TRAINING_RESOURCES,
   YOUTUBE_RESOURCES,
@@ -71,7 +70,6 @@
   'google': GOOGLE_RESOURCES,
   'guide': GUIDE_RESOURCES,
   'samples': SAMPLES_RESOURCES,
-  'preview': PREVIEW_RESOURCES,
   'tools': TOOLS_RESOURCES,
   'training': TRAINING_RESOURCES,
   'youtube': YOUTUBE_RESOURCES,
@@ -88,7 +86,6 @@
   {map:GOOGLE_BY_TAG,arr:GOOGLE_RESOURCES},
   {map:GUIDE_BY_TAG,arr:GUIDE_RESOURCES},
   {map:SAMPLES_BY_TAG,arr:SAMPLES_RESOURCES},
-  {map:PREVIEW_BY_TAG,arr:PREVIEW_RESOURCES},
   {map:TOOLS_BY_TAG,arr:TOOLS_RESOURCES},
   {map:TRAINING_BY_TAG,arr:TRAINING_RESOURCES},
   {map:YOUTUBE_BY_TAG,arr:YOUTUBE_RESOURCES},
diff --git a/docs/html/preview/download_mp1.jd b/docs/html/preview/download_mp1.jd
deleted file mode 100644
index 5838f20..0000000
--- a/docs/html/preview/download_mp1.jd
+++ /dev/null
@@ -1,355 +0,0 @@
-page.title=Developer Preview 1 Archive
-page.image=images/cards/card-download_16-9_2x.png
-
-@jd:body
-
-<div style="position:relative; min-height:600px">
-
-  <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
-
-    <p class="sdk-terms-intro">Before downloading and installing components of the Android Preview
-      SDK, 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:678px">
-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 id="landing">
-
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
-        <li><a href="#sdk">Developer Preview 1 SDK</a></li>
-        <li><a href="#docs">Developer Documentation</a></li>
-        <li><a href="#images">Hardware System Images</a></li>
-      </ol>
-  </div>
-</div>
-
-
-<p>
-  The Android M Preview SDK includes development tools, Android system files, and library files to
-  help you test your app and the new APIs coming in the next release of the platform. This document
-  describes how to get the downloadable components of the preview for testing your app.
-</p>
-
-
-<h2 id="sdk">Developer Preview 1 SDK</h2>
-
-<p>
-  The Preview SDK is available for download through the <a href=
-  "{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>. For more information on
-  downloading and configuring the Preview SDK, see <a href=
-  "{@docRoot}preview/setup-sdk.html#downloadSdk">Set Up the Preview SDK</a>.
-</p>
-
-
-<h2 id="docs">Developer Documentation</h2>
-
-<p>
-  The developer documentation download package provides detailed API reference information and an API difference report for the preview.
-</p>
-
-<table>
-  <tr>
-    <th scope="col">Description</th>
-    <th scope="col">Download / Checksums</th>
-  </tr>
-  <tr id="docs-dl">
-    <td>Android M Preview 1<br>Developer Docs</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >m-preview-1-developer-docs.zip</a><br>
-      MD5: b65201b0d35416f5a1b7a071b52854a7<br>
-      SHA-1: d47e856aa65e06897e6edd902ad8d2b1f05ac3ec
-    </td>
-  </tr>
-<table>
-
-
-<h2 id="images">Hardware System Images</h2>
-
-<p>
-  These system images allow you to install a preview version of the platform on a physical device for
-  testing. By configuring a device with one of these images, you can install and test your app to
-  see how it performs on the next version of the platform. The process of installing a system image
-  on a device <em>removes all data from the device</em>, so you should backup your data before
-  installing a system image.
-</p>
-
-<p class="warning">
-  <b>Warning:</b> The following Android system images are previews and are subject to change. Your
-  use of these system images is governed by the Android SDK Preview License Agreement. The Android
-  preview system images are not stable releases, and may contain errors and defects that can result
-  in damage to your computer systems, devices, and data. The preview Android system images are not
-  subject to the same testing as the factory OS and can cause your phone and installed services and
-  applications to stop working.
-</p>
-
-<table>
-  <tr>
-    <th scope="col">Device</th>
-    <th scope="col">Download / Checksums</th>
-  </tr>
-  <tr id="hammerhead">
-    <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >hammerhead-MPZ44Q-preview-55d76d3a.tgz</a><br>
-      MD5: 9e2631b06c6525e401ceaae3677ff320<br>
-      SHA-1: 55d76d3a379b18f3363f28d8a462c236ab96fc36
-    </td>
-  </tr>
-  <tr id="shamu">
-    <td>Nexus 6 <br>"shamu"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >shamu-MPZ44Q-preview-c1d6506a.tgz</a><br>
-      MD5: 307cbf9dab0a38df4ab2639d02be12aa<br>
-      SHA-1: c1d6506a74094bdb2f4b8677c7fe4967334f9ea8
-    </td>
-  </tr>
-  <tr id="volantis">
-    <td>Nexus 9 <br>"volantis"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >volantis-MPZ44Q-preview-d15ad483.tgz</a><br>
-      MD5: fae40377fd999d2b09128665c915264d<br>
-      SHA-1: 7ab05f96093b2cb370b226f65931202714cbc2ca
-    </td>
-  </tr>
-  <tr id="fugu">
-    <td>Nexus Player <br>"fugu"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >fugu-MPZ44Q-preview-2406ba05.tgz</a><br>
-      MD5: 815902141a85cc65e7725f005cad31d5<br>
-      SHA-1: 2406ba0598dea1e69110497ac0bc8e16789bc8fb
-    </td>
-  </tr>
-</table>
-
-<h3 id="install-image">Install an Image to a Device</h3>
-
-<p>
-  In order to use a device image for testing, you must install it on a compatible device. Follow
-  the instructions below to install a system image:
-</p>
-
-<ol>
-  <li>Download and uncompress one of the system image packages listed here.</li>
-  <li>Backup any data you want to preserve from the device.</li>
-  <li>Follow the instructions at
-  <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
-  to flash the image onto your device.</li>
-</ol>
-
-<p class="note">
-  <strong>Note:</strong> Once you have flashed a development device the preview system image,
-  it is upgraded automatically with the next preview release through over-the-air (OTA) updates.
-</p>
-
-<h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
-
-<p>
-  If you want to uninstall the preview and revert the device to factory specifications, go to
-  <a href="http://developers.google.com/android/nexus/images">developers.google.com/android</a> and
-  download the image you want to flash to for your device. Follow the instructions on that page to
-  flash the image to your device.
-</p>
-
-  </div><!-- landing -->
-
-</div><!-- relative wrapper -->
-
-
-
-<script>
-  var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/preview/";
-  function onDownload(link) {
-
-    $("#downloadForRealz").html("Download " + $(link).text());
-    $("#downloadForRealz").attr('href', urlRoot + $(link).text());
-
-    $("#tos").fadeIn('fast');
-    $("#landing").fadeOut('fast');
-
-    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');
-    }
-  }
-
-  function onDownloadForRealz(link) {
-    if ($("input#agree").is(':checked')) {
-    /*
-      $("#tos").fadeOut('fast');
-      $("#landing").fadeIn('fast');
-    */
-
-      ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
-
-    /*
-      location.hash = "";
-    */
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  $(window).hashchange( function(){
-    if (location.hash == "") {
-      location.reload();
-    }
-  });
-
-</script>
diff --git a/docs/html/preview/download_mp2.jd b/docs/html/preview/download_mp2.jd
deleted file mode 100644
index 0208b5e..0000000
--- a/docs/html/preview/download_mp2.jd
+++ /dev/null
@@ -1,367 +0,0 @@
-page.title=Developer Preview 2 Archive
-page.image=images/cards/card-download_16-9_2x.png
-
-@jd:body
-
-<div style="position:relative; min-height:600px">
-
-  <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
-
-    <p class="sdk-terms-intro">Before downloading and installing components of the Android Preview
-      SDK, 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:678px">
-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 id="landing">
-
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
-        <li><a href="#sdk">Developer Preview 2 SDK</a></li>
-        <li><a href="#docs">Developer Documentation</a></li>
-        <li><a href="#images">Hardware System Images</a></li>
-      </ol>
-
-     <h2>Legacy downloads</h2>
-        <ol>
-           <li><a href="{@docRoot}preview/download_mp1.html">Developer Preview Archive</a></li>
-        </ol>
-  </div>
-</div>
-
-
-<p>
-  The Android M Preview SDK includes development tools, Android system files, and library files to
-  help you test your app and the new APIs coming in the next release of the platform. This document
-  describes how to get the downloadable components of the preview for testing your app.
-</p>
-
-
-<h2 id="sdk">Developer Preview 2 SDK</h2>
-
-<p>
-  The Preview SDK is available for download through the <a href=
-  "{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>. For more information on
-  downloading and configuring the Preview SDK, see <a href=
-  "{@docRoot}preview/setup-sdk.html#downloadSdk">Set Up the Preview SDK</a>.
-</p>
-
-
-<h2 id="docs">Developer Documentation</h2>
-
-<p>
-  The developer documentation download package provides detailed API reference information and an API difference report for the preview.
-</p>
-
-<table>
-  <tr>
-    <th scope="col">Description</th>
-    <th scope="col">Download / Checksums</th>
-  </tr>
-  <tr id="docs-dl">
-    <td>Android M Preview 2<br>Developer Docs</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >m-preview-2-developer-docs.zip</a><br>
-      MD5: 1db6fff9c722b0339757e1cdf43663a8<br>
-      SHA-1: 5a4ae88d644e63824d21b0e18f8e3977a7665157
-    </td>
-  </tr>
-<table>
-
-
-<h2 id="images">Hardware System Images</h2>
-
-<p>
-  These system images allow you to install a preview version of the platform on a physical device for
-  testing. By configuring a device with one of these images, you can install and test your app to
-  see how it performs on the next version of the platform. The process of installing a system image
-  on a device <em>removes all data from the device</em>, so you should backup your data before
-  installing a system image.
-</p>
-
-<p class="warning">
-  <b>Warning:</b> The following Android system images are previews and are subject to change. Your
-  use of these system images is governed by the Android SDK Preview License Agreement. The Android
-  preview system images are not stable releases, and may contain errors and defects that can result
-  in damage to your computer systems, devices, and data. The preview Android system images are not
-  subject to the same testing as the factory OS and can cause your phone and installed services and
-  applications to stop working.
-</p>
-
-<table>
-  <tr>
-    <th scope="col">Device</th>
-    <th scope="col">Download / Checksums</th>
-  </tr>
-  <tr id="hammerhead">
-    <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >hammerhead-MPZ79M-preview-b1f4bde4.tgz</a><br>
-      MD5: 2ca9f18bf47a061b339bab52647ceb0d<br>
-      SHA-1: b1f4bde447eccbf8ce5d9b8b8ba954e3eac8e939
-    </td>
-  </tr>
-  <tr id="shamu">
-    <td>Nexus 6 <br>"shamu"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >shamu-MPZ79M-preview-e1024040.tgz</a><br>
-      MD5: 24a2118da340b9afedfbdfc026f6ff81<br>
-      SHA-1: e10240408859d5188c4aae140e1c539130ba614b
-    </td>
-  </tr>
-  <tr id="volantis">
-    <td>Nexus 9 <br>"volantis"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >volantis-MPZ79M-preview-9f305342.tgz</a><br>
-      MD5: 9edabf0a4c61b247f1cbb9dfdc0a899e<br>
-      SHA-1: 9f30534216f10899a6a75495fc7e92408ea333a7
-    </td>
-  </tr>
-
-  <tr id="fugu">
-    <td>Nexus Player <br>"fugu"</td>
-    <td><a href="#top" onclick="onDownload(this)"
-      >fugu-MPZ79N-preview-fb63af98.tgz</a><br>
-      MD5: e8d081137a20b66df595ee69523314b5<br>
-      SHA-1: fb63af98302dd97be8de9313734d389ccdcce250
-    </td>
-  </tr>
-
-</table>
-
-<h3 id="install-image">Install an Image to a Device</h3>
-
-<p>
-  In order to use a device image for testing, you must install it on a compatible device. Follow
-  the instructions below to install a system image:
-</p>
-
-<ol>
-  <li>Download and uncompress one of the system image packages listed here.</li>
-  <li>Backup any data you want to preserve from the device.</li>
-  <li>Follow the instructions at
-  <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
-  to flash the image onto your device.</li>
-</ol>
-
-<h3 id="update-image">Updating a Device with the Preview</h3>
-
-<p>
-  Once you have installed a preview system image on a development device, the device is upgraded
-  automatically with the next preview release through over-the-air (OTA) updates. When the update
-  is available, the device displays notification that an update is available and allows you to
-  install it. You can also manually install the next preview image by repeating the procedure in
-  the previous section.
-</p>
-
-<h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
-
-<p>
-  If you want to uninstall the preview and revert the device to factory specifications, go to
-  <a href="http://developers.google.com/android/nexus/images">developers.google.com/android</a> and
-  download the image you want to flash to for your device. Follow the instructions on that page to
-  flash the image to your device.
-</p>
-
-  </div><!-- landing -->
-
-</div><!-- relative wrapper -->
-
-
-
-<script>
-  var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/preview/";
-  function onDownload(link) {
-
-    $("#downloadForRealz").html("Download " + $(link).text());
-    $("#downloadForRealz").attr('href', urlRoot + $(link).text());
-
-    $("#tos").fadeIn('fast');
-    $("#landing").fadeOut('fast');
-
-    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');
-    }
-  }
-
-  function onDownloadForRealz(link) {
-    if ($("input#agree").is(':checked')) {
-    /*
-      $("#tos").fadeOut('fast');
-      $("#landing").fadeIn('fast');
-    */
-
-      ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
-
-    /*
-      location.hash = "";
-    */
-      return true;
-    } else {
-      return false;
-    }
-  }
-
-  $(window).hashchange( function(){
-    if (location.hash == "") {
-      location.reload();
-    }
-  });
-
-</script>
diff --git a/docs/html/preview/features/images/app-permissions-screen.png b/docs/html/preview/features/images/app-permissions-screen.png
deleted file mode 100644
index 679b7ad..0000000
--- a/docs/html/preview/features/images/app-permissions-screen.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/features/images/app-permissions-screen_2x.png b/docs/html/preview/features/images/app-permissions-screen_2x.png
deleted file mode 100644
index e3eb13f..0000000
--- a/docs/html/preview/features/images/app-permissions-screen_2x.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/features/power-mgmt.jd b/docs/html/preview/features/power-mgmt.jd
deleted file mode 100644
index 0e5b5ae..0000000
--- a/docs/html/preview/features/power-mgmt.jd
+++ /dev/null
@@ -1,121 +0,0 @@
-page.title=Power-Saving Optimizations
-page.keywords=preview,sdk,compatibility
-sdk.platform.apiLevel=MNC
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-<h2>In this document</h2>
-
-<ol  class="hide-nested">
-    <li><a href="#behavior-doze">Doze</a></li>
-    <li><a href="#behavior-app-standby">App Standby</a></li>
-</ol>
-
-<h2>API Differences</h2>
-<ol>
-<li><a href="{@docRoot}preview/download.html">API level 22 to M Preview &raquo;</a> </li>
-</ol>
-
-
-<h2>See Also</h2>
-<ol>
-<li><a href="{@docRoot}preview/api-overview.html">M Developer Preview API Overview</a> </li>
-</ol>
-
-</div>
-</div>
-
-<p>Android M Preview helps prolong battery life by introducing new power-saving optimizations:
-<em>Doze</em> mode improves the sleep efficiency of idle devices. <em>App Standby</em> prevents apps
-from eating up power while idle.</p>
-
-<h2 id="behavior-doze">Doze</h2>
-<p>If a user leaves a device unplugged and stationary for a period of time, with the screen off,
-the device enters Doze mode. Doze attempts to keep the system in a sleep state as long as the
-device remains undisturbed. In this mode, devices periodically resume normal operations for brief periods of time so that the system can perform app syncing and any other pending operations.</p>
-
-<p>The following restrictions apply to your apps while in Doze:</p>
-<ul>
-<li>Network access is disabled, unless your app receives a high-priority
-<a href="https://developers.google.com/cloud-messaging/" class="external-link">
-Google Cloud Messaging</a> tickle.</li>
-<li>The system ignores <a href="{@docRoot}reference/android/os/PowerManager.WakeLock.html">
-Wake locks</a>.</li>
-<li>Alarms scheduled using the {@link android.app.AlarmManager} class are deferred, unless you have
-exempted them using the
-{@link android.app.AlarmManager#setAndAllowWhileIdle setAndAllowWhileIdle()} method.</li>
-<li>The system does not perform Wi-Fi scans.</li>
-<li>The system does not permit syncs or jobs for your sync adapters.</li>
-<li>The system does not allow {@link android.app.job.JobScheduler} to run.</li>
-</ul>
-</p>
-<p>When the device exits Doze mode, it executes any jobs and syncs that are pending.</p>
-
-<h3>Testing apps with Doze</h3>
-
-<p>You can test Doze mode by connecting your development host to a device running the M Preview,
-and calling the following commands:
-</p>
-<pre class="no-prettyprint">
-$ adb shell dumpsys battery unplug
-$ adb shell dumpsys deviceidle step
-$ adb shell dumpsys deviceidle -h
-</pre>
-<p class="note"><strong>Note</strong>: As of M Preview 3 release,
-<a href="https://developers.google.com/cloud-messaging/" class="external-link">
-Google Cloud Messaging</a> (GCM) lets you designate
-<a href="https://developers.google.com/cloud-messaging/downstream#setting-the-priority-of-a-message">
-high-priority messages</a>. If your app receives a high-priority GCM message</a>, the system grants
-brief network access even when the device is dozing.
-</p>
-
-<p>See the
-<a href="{@docRoot}preview/testing/guide.html#doze-standby">Testing Guide</a> for tips on how
-to test Doze in your apps. </p>
-
-<h2 id="behavior-app-standby">App Standby</h2>
-<p>App Standby allows the system to determine that an app is idle when the user is not actively
-using it. The system makes this determination when the user does not touch the app for a certain
-period of time, and none of the following conditions applies:</p>
-
-<ul>
-<li>The user explicitly launches the app.</li>
-<li>The app has a process currently in the foreground (either as an activity or foreground service,
-or in use by another activity or foreground service).</li>
-<li>The app generates a notification that users see on the lock screen or in the
-notification tray.</li>
-<li>The user explicitly asks for the app to be exempt from optimizations,
-via the Settings app.</li>
-</ul>
-
-<p>When the user plugs the device into a power supply, the system releases apps from the standby
-state, allowing them to freely access the network and to execute any pending jobs and syncs. If the
-device is idle for long periods of time, the system allows idle apps network access around once a
-day.</p>
-
-<h3>Testing apps with App Standby</h3>
-<p>You can test App Standby by connecting your development host to a device running the M Preview,
-and calling the following commands:
-</p>
-<pre class="no-prettyprint">
-$ adb shell dumpsys battery unplug
-$ adb shell am set-inactive &lt;packageName&gt; true
-$ adb shell am set-inactive &lt;packageName&gt; false
-$ adb shell am get-inactive &lt;packageName&gt;
-</pre>
-
-<p class="note"><strong>Note</strong>:
-As of M Preview 3 release,
-<a href="https://developers.google.com/cloud-messaging/" class="external-link">
-Google Cloud Messaging</a> (GCM) lets you
-designate
-<a href="https://developers.google.com/cloud-messaging/downstream#setting-the-priority-of-a-message">
-high-priority messages</a>. If your app receives high-priority GCM messages, the system grants
-brief network access even when the app is idle.
-</p>
-
-<p>See the
-<a href="{@docRoot}preview/testing/guide.html#doze-standby">Testing Guide</a> for tips on how
-to test App Standby in your apps. </p>
diff --git a/docs/html/preview/features/runtime-permissions.jd b/docs/html/preview/features/runtime-permissions.jd
deleted file mode 100644
index bc15bcb..0000000
--- a/docs/html/preview/features/runtime-permissions.jd
+++ /dev/null
@@ -1,1080 +0,0 @@
-page.title=Permissions
-page.tags=previewresources, androidm
-page.keywords=permissions, runtime, preview
-page.image=images/permissions_check.png
-@jd:body
-
-
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>Quickview</h2>
-    <ul>
-      <li>If your app targets the M Preview SDK, it prompts users to grant
-        permissions at runtime, instead of install time.</li>
-      <li>Users can revoke permissions at any time from the app Settings
-        screen.</li>
-      <li>Your app needs to check that it has the permissions it needs every
-        time it runs.</li>
-    </ul>
-
-    <h2>In this document</h2>
-    <ol>
-      <li><a href="#overview">Overview</a></li>
-      <li><a href="#coding">Coding for Runtime Permissions</a></li>
-      <li><a href="#testing">Testing Runtime Permissions</a></li>
-      <li><a href="#best-practices">Best Practices and Usage Notes</a></li>
-    </ol>
-
-<!--
-  <h2>Related Samples</h2>
-  <ol>
-    <li></li>
-  </ol>
--->
-
-<!--
-  <h2>See also</h2>
-  <ol>
-    <li>
-    </li>
-  </ol>
--->
-
-  </div> <!-- qv -->
-</div> <!-- qv-wrapper -->
-
-<!-- video box -->
-<a class="notice-developers-video"
-    href="https://www.youtube.com/watch?v=f17qe9vZ8RM">
-<div>
-    <h3>Video</h3>
-    <p>Google I/O 2015—Android M Permissions: Best Practices for
-      Developers</p>
-</div>
-</a>
-
-<p>
-  The M Developer Preview introduces a new app permissions model which
-  streamlines the process for users to install and upgrade apps. If an app
-  running on the M Preview supports the new permissions model, the user does not have to
-  grant any permissions when they install or upgrade the app. Instead, the app
-  requests permissions as it needs them, and the system shows a dialog to the
-  user asking for the permission.
-</p>
-
-<p>
-  If an app supports the new permissions model, it can still be installed and
-  run on devices running older versions of Android, using the old permissions
-  model on those devices.
-</p>
-
-<h2 id="overview">
-  Overview
-</h2>
-
-<p>
-  With the M Developer Preview, the platform introduces a new app permissions
-  model. Here's a summary of the key components of this new model:
-</p>
-
-<ul>
-  <li>
-    <strong>Declaring Permissions:</strong> The app declares all the
-    permissions it needs in the manifest, as in earlier Android platforms.
-  </li>
-
-  <li>
-    <strong>Permission Groups:</strong> Permissions are divided into
-    <em>permission groups</em>, based on their functionality. For example, the
-    <code>CONTACTS</code> permission group contains permissions to read and
-    write the user's contacts and profile information.
-  </li>
-
-  <li>
-    <p><strong>Limited Permissions Granted at Install Time:</strong> When the
-    user installs or updates the app, the system grants the app all
-    permissions listed in the manifest that fall under {@link
-    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}.
-    For example, alarm clock and internet permissions fall under {@link
-    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}, so
-    they are automatically granted at install time. For more information about
-    how normal permissions are handled, see <a href="#normal">Normal
-    Permissions</a>.
-    </p>
-
-    <p>The system may also grant the app signature permissions, as
-    described in <a href="#system-apps">System components and signature
-    permissions</a>. The user is <em>not</em> prompted to grant any permissions
-    at install time.</p>
-  </li>
-
-  <li>
-    <strong>User Grants Permissions at Run-Time:</strong> When the app requests
-    a permission, the system shows a dialog to the user, then calls the app's
-    callback function to notify it whether the user granted the permission.
-  </li>
-
-</ul>
-
-<p>
-  This permission model changes the way your app behaves for features that
-  require permissions. Here's a summary of the development practices you should
-  follow to adjust to this model:
-</p>
-
-<ul>
-
-  <li>
-    <strong>Always Check for Permissions:</strong> When the app needs to
-    perform any action that requires a permission, it should first check
-    whether it has that permission already. If it does not, it requests to be
-    granted that permission. You do not need to check for permissions that
-    fall under {@link
-    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}.
-  </li>
-
-  <li>
-    <strong>Handle Lack of Permissions Gracefully:</strong> If the app is not
-    granted an appropriate permission, it should handle the failure cleanly.
-    For example, if the permission is just needed for an added feature, the app
-    can disable that feature. If the permission is essential for the app to
-    function, the app might disable all its functionality and inform the user
-    that they need to grant that permission.
-  </li>
-
-  <div class="figure" style="width:220px" id="fig-perms-screen">
-    <img src="images/app-permissions-screen_2x.png"
-    srcset="images/app-permissions-screen.png 1x, images/app-permissions-screen_2x.png 2x"
-    alt="" width="220">
-    <p class="img-caption">
-      <strong>Figure 1.</strong> Permission screen in the app's Settings.
-    </p>
-  </div>
-
-  <li>
-    <strong>Permissions are Revocable:</strong> Users can revoke an app's
-    permissions at any time. If a user turns off an app's permissions, the app
-    is <em>not</em> notified. Once again, your app should verify that it has
-    needed permissions before performing any restricted actions.
-  </li>
-</ul>
-
-<p class="note">
-  <strong>Note:</strong> If an app targets the M Developer Preview, it
-  <em>must</em> use the new permissions model.
-</p>
-
-<p>
-  As of the launch of the M Developer Preview, not all Google apps fully
-  implement the new permissions model. Google is updating these apps over
-  the course of the M Developer Preview to properly respect Permissions toggle
-  settings.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> If your app has its own API surface, do not proxy
-  permissions without first ensuring the caller has the requisite permissions
-  to access that data.
-</p>
-
-<h3 id="perm-groups">Permission groups</h3>
-
-<p>
-  Related permissions are divided into <em>permission groups</em> to allow
-  users to grant related permissions to an app in a single action. The user
-  only has to grant permission once per app for each permission group. If the
-  app subsequently requests a permission from the same permission group, the
-  system automatically grants the permission without any action from the user.
-  The system calls your app's {@link
-  android.app.Activity#onRequestPermissionsResult onRequestPermissionsResult()}
-  method just as if the user had granted permission through the dialog box.
-</p>
-
-<p>
-  For example, suppose an app lists in its manifest that it needs the
-  <code>SEND_SMS</code> and <code>RECEIVE_SMS</code> permissions, which both
-  belong to <code>android.permission-group.SMS</code>. When the app needs to
-  send a message, it requests the <code>SEND_SMS</code> permission. The system
-  shows the user a dialog box asking if the app can have access to SMS. If the
-  user agrees, the system grants the app the <code>SEND_SMS</code> permission it
-  requested. Later, the app requests <code>RECEIVE_SMS</code>. The
-  system automatically grants this permission, since the user had already
-  approved a permission in the same permission group.
-</p>
-
-<h3 id="system-apps">
-  System components and signature permissions
-</h3>
-
-<p>
-  Ordinarily, when the user installs an app, the system only grants the app the
-  permissions listed in the manifest that fall under
-  {@link android.content.pm.PermissionInfo#PROTECTION_NORMAL
-  PROTECTION_NORMAL}. However, under some circumstances the system grants the
-  app more permissions:
-</p>
-
-<ul>
-  <li>System components automatically receive all
-  the permissions listed in their manifests.
-  </li>
-
-  <li>If the app requests permissions in the manifest that fall under {@link
-  android.content.pm.PermissionInfo#PROTECTION_SIGNATURE PROTECTION_SIGNATURE},
-  and the app is signed with the same certificate as the app that declared
-  those permissions, the system grants the requesting app those permissions on
-  installation. Apps cannot request signature permissions at runtime.</li>
-</ul>
-
-<h3 id="compatibility">
-  Forwards and backwards compatibility
-</h3>
-
-<p>
-  If an app does not target the M Developer Preview, the app continues to use
-  the old permissions model even on M Preview devices. When the user installs
-  the app, the system asks the user to grant all permissions listed in the
-  app's manifest.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> On devices running the M Developer Preview, a user can
-  turn off permissions for any app (including legacy apps) from the app's
-  Settings screen. If a user turns off permissions for a legacy app, the system
-  silently disables the appropriate functionality. When the app attempts to
-  perform an operation that requires that permission, the operation will not
-  necessarily cause an exception. Instead, it might return an empty data set,
-  signal an error, or otherwise exhibit unexpected behavior. For example, if you
-  query a calendar without permission, the method returns an empty data set.
-</p>
-
-<p>
-  If you install an app using the new permissions model on a device that is not
-  running the M Preview,
-  the system treats it the same as any other app: the system asks
-  the user to grant all declared permissions at install time.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> For the preview release, you must set the minimum SDK
-  version to the M Preview SDK to compile with the preview SDK. This means you
-  will not be able to test such apps on older platforms during the developer
-  preview.
-</p>
-
-<h3 id="perms-vs-intents">Permissions versus intents</h3>
-
-<p>
-  In many cases, you can choose between two ways for your app to perform a
-  task. You can have your app ask for permission to perform the operation
-  itself. Alternatively, you can have the app use an intent to have another app
-  perform the task.
-</p>
-
-<p>
-  For example, suppose your app needs to be able to take pictures with the
-  device camera. Your app can request the
-  <code>android.permission.CAMERA</code> permission, which allows your app to
-  access the camera directly. Your app would then use the camera APIs
-  to control the camera and take a picture. This approach gives your app full
-  control over the photography process, and lets you incorporate the camera UI
-  into your app.
-</p>
-
-<p>
-  However, if you don't need such control, you can just use an {@link
-  android.provider.MediaStore#ACTION_IMAGE_CAPTURE ACTION_IMAGE_CAPTURE} intent
-  to request an image. When you start the intent, the user is prompted to
-  choose a camera app (if there isn't already a default camera app), and that
-  app takes the picture. The camera app returns the picture to your app's {@link
-  android.app.Activity#onActivityResult onActivityResult()} method.
-</p>
-
-<p>
-  Similarly, if you need to make a phone call, access the user's contacts, and
-  so on, you can do that by creating an appropriate intent, or you can request
-  the permission and access the appropriate objects directly. There are
-  advantages and disadvantages to each approach.
-</p>
-
-<p>
-  If you use permissions:
-</p>
-
-<ul>
-  <li>Your app has full control over the user experience when you perform the
-  operation. However, such broad control adds to the complexity of your task,
-  since you need to design an appropriate UI.
-  </li>
-
-  <li>The user is prompted to give permission once, the first time you perform
-  the operation. After that, your app can perform the operation without
-  requiring additional interaction from the user. However, if the user doesn't
-  grant the permission (or revokes it later on), your app becomes unable to
-  perform the operation at all.
-  </li>
-</ul>
-
-<p>
-  If you use an intent:
-</p>
-
-<ul>
-  <li>You do not have to design the UI for the operation. The app that handles
-  the intent provides the UI. However, this means you have
-  no control over the user experience. The user could be interacting with an
-  app you've never seen.
-  </li>
-
-  <li>If the user does not have a default app for the operation, the system
-  prompts the user to choose an app. If the user does not designate a default
-  handler, they may have to go
-  through an extra dialog every time they perform the operation.
-  </li>
-</ul>
-
-<h2 id="coding">Coding for Runtime Permissions</h2>
-
-<p>
-  If your app targets the new M Developer Preview, you must use the new
-  permissions model. This means that in addition to declaring your needed
-  permissions in the manifest, you must also check to see if you have the
-  permissions at run time, and request the permissions if you do not already
-  have them.
-</p>
-
-<h3 id="enabling">
-  Enabling the new permissions model
-</h3>
-
-<p>
-  To enable the new M Developer Preview permissions model, set the app's
-  <code>targetSdkVersion</code> attribute to <code>"MNC"</code>, and
-  <code>compileSdkVersion</code> to <code>"android-MNC"</code>. Doing so
-  enables all the new permissions features.
-</p>
-
-<p>
-  For the preview release, you must set <code>minSdkVersion</code> to
-  <code>"MNC"</code> to compile with the preview SDK.
-</p>
-
-<h3 id="m-only-perm">
-  Designating a permission for the M Preview only
-</h3>
-
-<p>
-  You can use the new <code>&lt;uses-permission-sdk-m&gt;</code> element in the app manifest
-  to indicate that a permission is only needed on the M Developer Preview. If
-  you declare a permission this way, then whenever the app is installed on an
-  older device, the system does not prompt the user or grant the
-  permission to the app. By using the <code>&lt;uses-permission-sdk-m&gt;</code>
-  element, you can add new permissions
-  to updated versions of your app without forcing users to grant permissions
-  when they install the update.
-</p>
-
-<p>
-  If the app is running on a device with the M Developer Preview,
-  <code>&lt;uses-permission-sdk-m&gt;</code> behaves the same as
-  <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"
-      >&lt;uses-permission&gt;</a></code>.
-  The system does not prompt the user to grant any permissions when they install
-  the app, and the app requests permissions as they are needed.
-</p>
-
-<h3 id="prompting">
-  Prompting for permissions
-</h3>
-
-<p>
-  If your app uses the new M Developer Preview permissions model, the user is
-  not asked to grant all permissions when the app is first launched on a device
-  running the M Preview. Instead, your app requests permissions as they are
-  needed. When your app requests a permission, the system shows a dialog to the
-  user.
-</p>
-
-<p>
-  If your app runs on a device that has SDK 22 or lower, the app uses the old
-  permissions model. When the user installs the app, they are prompted to grant
-  all the permissions your app requests in its manifest, except for those
-  permissions which are labeled with <code>&lt;uses-permission-sdk-m&gt;</code>.
-</p>
-
-<h4 id="check-platform">Check what platform the app is running on</h4>
-
-<p>
-  This permissions model is only supported on devices running the M Developer
-  Preview. Before calling any of these methods, the app should verify
-  what platform it's running on
-  by checking the value of {@link android.os.Build.VERSION#CODENAME
-  Build.VERSION.CODENAME}. If the device is running the M Developer Preview,
-  {@link android.os.Build.VERSION#CODENAME CODENAME} is <code>"MNC"</code>.
-</p>
-
-<p>
-  Alternatively, you can use the new methods introduced with revision 23 of the
-  v4 and v13 support libraries. The support library methods behave
-  appropriately whether or not the app is running on the M Developer Preview.
-  For more information, see <a href="#support-lib">Support library methods for
-  handling permissions</a>.
-</p>
-
-<h4 id="check-for-permission">Check if the app has the needed permission</h4>
-
-<p>
-  When the user tries to do something that requires a permission, the app
-  checks to see if it currently has permission to perform this operation. To do
-  this, the app calls {@link android.content.Context#checkSelfPermission
-  checkSelfPermission()}. The app should perform this check even if it knows
-  the user has already granted that permission, since the user can revoke an
-  app's permissions at any time. For example, if a user wants to use an app to
-  take a picture, the app calls
-  <code>Context.checkSelfPermission(Manifest.permission.CAMERA)</code>.
-</p>
-
-<p class="table-caption" id="permission-groups">
-  <strong>Table 1.</strong> Permissions and permission groups.</p>
-<table>
-  <tr>
-    <th scope="col">Permission Group</th>
-    <th scope="col">Permissions</th>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.CALENDAR</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.READ_CALENDAR</code>
-        </li>
-      </ul>
-      <ul>
-        <li>
-          <code>android.permission.WRITE_CALENDAR</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.CAMERA</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.CAMERA</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.CONTACTS</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.READ_CONTACTS</code>
-        </li>
-        <li>
-          <code>android.permission.WRITE_CONTACTS</code>
-        </li>
-        <li>
-          <code>android.permission.GET_ACCOUNTS</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.LOCATION</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.ACCESS_FINE_LOCATION</code>
-        </li>
-        <li>
-          <code>android.permission.ACCESS_COARSE_LOCATION</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.MICROPHONE</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.RECORD_AUDIO</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.PHONE</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.READ_PHONE_STATE</code>
-        </li>
-        <li>
-          <code>android.permission.CALL_PHONE</code>
-        </li>
-        <li>
-          <code>android.permission.READ_CALL_LOG</code>
-        </li>
-        <li>
-          <code>android.permission.WRITE_CALL_LOG</code>
-        </li>
-        <li>
-          <code>com.android.voicemail.permission.ADD_VOICEMAIL</code>
-        </li>
-        <li>
-          <code>android.permission.USE_SIP</code>
-        </li>
-        <li>
-          <code>android.permission.PROCESS_OUTGOING_CALLS</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.SENSORS</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.BODY_SENSORS</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td><code>android.permission-group.SMS</code></td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.SEND_SMS</code>
-        </li>
-        <li>
-          <code>android.permission.RECEIVE_SMS</code>
-        </li>
-        <li>
-          <code>android.permission.READ_SMS</code>
-        </li>
-        <li>
-          <code>android.permission.RECEIVE_WAP_PUSH</code>
-        </li>
-        <li>
-          <code>android.permission.RECEIVE_MMS</code>
-        </li>
-        <li>
-          <code>android.permission.READ_CELL_BROADCASTS</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-  <tr>
-    <td>
-      <code>android.permission-group.STORAGE</code>
-    </td>
-    <td>
-      <ul>
-        <li>
-          <code>android.permission.READ_EXTERNAL_STORAGE</code>
-        </li>
-        <li>
-          <code>android.permission.WRITE_EXTERNAL_STORAGE</code>
-        </li>
-      </ul>
-    </td>
-  </tr>
-
-</table>
-
-<h4 id="explain-need">Explain why the app needs permissions</h4>
-
-<p>
-  In some circumstances, you might want to help the user understand why your
-  app needs a permission. For example, if a user launches a photography app,
-  the user probably won't be surprised that the app asks for permission to use
-  the camera. But if the user turns down that permission request, then launches
-  the photography app again, that might indicate that the user needs some help
-  understanding why the permission is needed.
-</p>
-
-<p>
-  To help find the situations where you need to provide extra explanation, the
-  system provides the {@link
-  android.app.Activity#shouldShowRequestPermissionRationale
-  shouldShowRequestPermissionRationale()} method. This method returns
-  <code>true</code> if the app has requested this permission previously and the
-  user denied the request. That indicates that you should probably explain to
-  the user why you need the permission.
-</p>
-
-<p>
-  If the user turned down the permission request in the past and chose the
-  <em>Don't ask again</em> option in the permission request system dialog, this
-  method returns <code>false</code>. The method also returns <code>false</code>
-  if the device policy prohibits the app from having that permission.
-</p>
-
-
-
-<h4 id="request-permissions">Request permissions if necessary</h4>
-
-<p>If the app doesn't already have the permission it needs, the app calls the
-  {@link android.app.Activity#requestPermissions requestPermissions()} method to
-  request the appropriate permission or permissions. The app passes the
-  permission or permissions it wants, and also an integer "request code".
-  This method functions asynchronously: it returns right away, and after
-  the user responds to the dialog box, the system calls the app's callback
-  method with the results, passing the same "request code" that the app passed
-  to {@link android.app.Activity#requestPermissions requestPermissions()}.</p>
-
-  <p>The following code checks if the app has permission to read the
-    user's contacts, and requests the permission if necessary:</p>
-
-<pre>
-if (checkSelfPermission(Manifest.permission.READ_CONTACTS)
-        != PackageManager.PERMISSION_GRANTED) {
-
-    // Should we show an explanation?
-    if (shouldShowRequestPermissionRationale(
-            Manifest.permission.READ_CONTACTS)) {
-        // Explain to the user why we need to read the contacts
-    }
-
-    requestPermissions(new String[]{Manifest.permission.READ_CONTACTS},
-            MY_PERMISSIONS_REQUEST_READ_CONTACTS);
-
-    // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
-    // app-defined int constant
-
-    return;
-}
-</pre>
-
-<p class="note">
-  <strong>Note:</strong> When your app calls the framework's {@link
-  android.app.Activity#requestPermissions requestPermissions()} method, the
-  system shows a standard dialog box to the user. Your app <em>cannot</em>
-  configure or alter that dialog box. If you need to provide any information or
-  explanation to the user, you should do that <em>before</em> you call {@link
-  android.app.Activity#requestPermissions requestPermissions()}, as described
-  in <a href="#explain-need">Explain why the app needs permissions</a>.
-</p>
-
-<h4 id="handle-response">Handle the permissions request response</h4>
-
-<p>
-  When an app requests permissions, the system presents a dialog box to the
-  user. When the user responds, the system invokes your app's {@link
-  android.app.Activity#onRequestPermissionsResult} passing it the user
-  response. Your app needs to override that method. The callback is passed the
-  same request code you passed to {@link
-  android.app.Activity#requestPermissions requestPermissions()}. For example,
-  if an app requests <code>READ_CONTACTS</code> access it might have the
-  following callback method:
-</p>
-
-<pre>
-&#64;Override
-public void onRequestPermissionsResult(int requestCode,
-        String permissions[], int[] grantResults) {
-    switch (requestCode) {
-        case MY_PERMISSIONS_REQUEST_READ_CONTACTS: {
-            if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
-
-                // permission was granted, yay! do the
-                // calendar task you need to do.
-
-            } else {
-
-                // permission denied, boo! Disable the
-                // functionality that depends on this permission.
-            }
-            return;
-        }
-
-        // other 'switch' lines to check for other
-        // permissions this app might request
-    }
-}
-</pre>
-
-<p>
-  If the user denies a permission request, your app should take appropriate
-  action. For example, your app might show a dialog explaining why it could not
-  perform the user's original request.
-</p>
-
-<p>
-  When the system asks the user to grant a permission, the user has the option
-  of telling the system not to ask for that permission again. In that case,
-  when an app uses {@link android.app.Activity#requestPermissions
-  requestPermissions()} to ask for that permission, the system immediately
-  denies the request. In this case, the system calls your {@link
-  android.app.Activity#onRequestPermissionsResult onRequestPermissionsResult()}
-  the same way it would if the user had explicitly rejected your request again.
-  For this reason, your app cannot assume that any direct interaction with the
-  user has taken place.
-</p>
-
-<h2 id="testing">Testing Runtime Permissions</h2>
-
-<p>
-  If your app targets the M Developer Preview, you must test that it
-  handles permissions properly. You cannot assume that your app has any
-  particular permissions when it runs. When the app is first launched, it is
-  likely to have no permissions, and the user can revoke or restore permissions
-  at any time.
-</p>
-
-<p>
-  You should test your app to make sure it behaves properly under all
-  permission situations. With the M Preview SDK, we have provided new
-  <a href="{@docRoot}tools/help/adb.html">Android
-  Debug Bridge (adb)</a> commands to enable you to test your app with whatever
-  permissions settings you need to try.
-</p>
-
-<h3>
-  New adb commands and options
-</h3>
-
-<p>
-  The M Preview SDK Platform-tools provides several new commands to let you test
-  how your app handles permissions.
-</p>
-
-<h4>
-  Install with permissions
-</h4>
-
-<p>
-  You can use the <a href="{@docRoot}tools/help/adb.html#move"><code>adb
-  install</code></a> command's new <code>-g</code> option, which installs the
-  app and grants all permissions listed in its manifest:
-</p>
-
-<pre class="no-pretty-print">
-$ adb install -g &lt;path_to_apk&gt;
-</pre>
-
-<h4>
-  Grant and revoke permissions
-</h4>
-
-<p>
-  You can use new ADB <a href="{@docRoot}tools/help/adb.html#pm">package manager
-  (pm)</a> commands to grant and revoke permissions to an installed app.
-  This functionality can be useful for automated testing.
-</p>
-
-<p>
-  To grant a permission, use the package manager's <code>grant</code> command:
-</p>
-
-<pre class="no-pretty-print">
-$ adb shell pm grant &lt;package_name&gt; &lt;permission_name&gt;
-</pre>
-
-<p>
-  For example, to grant the com.example.myapp package permission to record
-  audio, use this command:
-</p>
-
-<pre class="no-pretty-print">
-$ adb shell pm grant com.example.myapp android.permission.RECORD_AUDIO
-</pre>
-
-<p>
-  To revoke a permission, use the package manager's <code>revoke</code> command:
-</p>
-
-<pre class="no-pretty-print">
-$ adb shell pm revoke &lt;package_name&gt; &lt;permission_name&gt;
-</pre>
-
-<h2 id="best-practices">Best Practices and Usage Notes</h2>
-
-<p>
-  The new permissions model gives users a smoother experience, and makes it
-  easier for them to install apps and feel comfortable with what the apps are
-  doing. We recommend the following best practices to take full advantage of
-  the new model.
-</p>
-
-
-<h3 id="bp-what-you-need">Only ask for permissions you need</h3>
-
-<p>
-  Every time you ask for a permission, you force the user to make a decision.
-  If the user turns down the request, that reduces your app's functionality.
-  You should minimize the number of times you make these requests.
-</p>
-
-<p>
-  For example, quite often your app can get needed functionality by using an
-  <a href="{@docRoot}guide/components/intents-filters.html">intent</a> instead
-  of asking for permissions. If your app needs to take pictures with the
-  phone's camera, your app can use a {@link
-  android.provider.MediaStore#ACTION_IMAGE_CAPTURE
-  MediaStore.ACTION_IMAGE_CAPTURE} intent. When your app executes the intent, the
-  system prompts the user to choose an already-installed camera app to take the
-  picture.
-</p>
-
-<h3 id="bp-dont-overwhelm">
-  Don't overwhelm the user
-</h3>
-
-<p>
-  If you confront the user with a lot of requests for permissions at once, you may
-  overwhelm the user and cause them to quit your app. Instead, you should ask
-  for permissions as you need them.
-</p>
-
-<p>
-  In some cases, one or more permissions might be absolutely essential to your
-  app. In that case, it might make sense to ask for all the permissions as soon
-  as the app launches. For example, if you make a photography app, the app
-  would need access to the device camera. When the user launches the app for
-  the first time, they won't be surprised to be asked for permission to use
-  the camera. But if the same app also had a feature to share photos with the
-  user's contacts, you probably should <em>not</em> ask for that permission at
-  first launch. Instead, wait until the user tries to use the "sharing" feature
-  and ask for the permission then.
-</p>
-
-<p>
-  If your app provides a tutorial, it may make sense to request the app's essential
-  permissions at the end of the tutorial sequence.
-</p>
-
-<h3 id="bp-explain">
-  Explain why you need permissions
-</h3>
-
-<p>
-  The permissions dialog shown by the system when you call {@link
-  android.app.Activity#requestPermissions requestPermissions()} says what
-  permission your app wants, but doesn't say why. In some cases, the user may
-  find that puzzling. It's a good idea to explain to the user why your app
-  wants the permissions before calling {@link
-  android.app.Activity#requestPermissions requestPermissions()}.
-</p>
-
-<p>
-  For example, a photography app might want to use location services, so it can
-  geotag the photos. A typical user might not understand that a photo can
-  contain location information, and would be puzzled why their photography app
-  wanted to know the location. So in this case, it's a good idea for the app to
-  tell the user about this feature <em>before</em> calling
-  {@link android.app.Activity#requestPermissions requestPermissions()}.
-</p>
-
-<p>
-  One way to do this is to incorporate these requests into an app tutorial. The
-  tutorial can show each of the app's features in turn, and as it does this, it
-  can explain what permissions are needed. For example, the photography app's
-  tutorial can demonstrate its "share photos with your contacts" feature, then
-  tell the user that they need to give permission for the app to see the user's
-  contacts. The app can then call {@link
-  android.app.Activity#requestPermissions requestPermissions()} to ask the user
-  for that access. Of course, not every user is going to follow the tutorial,
-  so you still need to check for and request permissions during the app's
-  normal operation.
-</p>
-
-<h3 id="support-lib">Support library methods for handling permissions</h3>
-
-<p>
-  Revision 23 of the v4 and v13 support libraries provide several new methods
-  for managing permissions. The support library methods work properly on any
-  device that can use those libraries. Thus, if you use the support library
-  methods, you do not need to check whether your app is running on a device
-  with the M Developer Preview. If an app is installed on a device running the
-  M Preview, the support library methods behave the same as their framework
-  equivalents. If the device is running an earlier version of Android, the
-  methods behave appropriately, as described below.
-</p>
-
-<p>
-  The v4 support library provides the following permissions methods:
-</p>
-
-<dl>
-  <dt>
-    {@link android.support.v4.content.ContextCompat#checkSelfPermission
-    ContextCompat.checkSelfPermission()}
-  </dt>
-
-  <dd>
-    Returns {@link android.content.pm.PackageManager#PERMISSION_GRANTED
-    PERMISSION_GRANTED} if the app has the specified permission, whether
-    or not the device is using the M Preview. If the app does not have the
-    specified permission, returns {@link
-    android.content.pm.PackageManager#PERMISSION_DENIED PERMISSION_DENIED}.
-  </dd>
-
-  <dt>
-    {@link android.support.v4.app.ActivityCompat#requestPermissions
-    ActivityCompat.requestPermissions()}
-  </dt>
-
-  <dd>
-    If the device is not running the M Preview, invokes the callback
-    method in {@link
-    android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback}.
-    Passes {@link android.content.pm.PackageManager#PERMISSION_GRANTED
-    PERMISSION_GRANTED} if the app already has the specified permission, or
-    {@link android.content.pm.PackageManager#PERMISSION_DENIED
-    PERMISSION_DENIED} if it does not.
-  </dd>
-
-  <dt>
-    {@link
-    android.support.v4.app.ActivityCompat#shouldShowRequestPermissionRationale
-    ActivityCompat.shouldShowRequestPermissionRationale()}
-  </dt>
-
-  <dd>
-    If the device is not running the M Preview, always returns
-    <code>false</code>.
-  </dd>
-</dl>
-
-<p>
-  The v4 support library also contains the
-  {@link android.support.v4.content.PermissionChecker}
-  class, which provides several static utility methods for apps that use IPC to
-  provide services for other apps. For example,
-  {@link android.support.v4.content.PermissionChecker#checkCallingPermission
-  PermissionChecker.checkCallingPermission()}
-  checks whether an IPC
-  made by a particular package has a specified permission.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> If your app acts on behalf of third-party apps to call
-  platform methods that require runtime permissions on behalf of a third-party
-  app, you should use the appropriate {@link
-  android.support.v4.content.PermissionChecker} methods to ensure that the
-  other app is allowed to perform the operation. The platform has a
-  compatibility mode that allows users to revoke a legacy app's access to
-  permission-protected methods. If the user revokes access in compatibility
-  mode the app's permissions are not actually revoked; instead, access to the
-  APIs is restricted. The {@link android.support.v4.content.PermissionChecker}
-  methods verify app permissions in both normal and legacy modes.
-</p>
-
-<p>
-  The v13 support library provides the following permissions methods:
-</p>
-
-<dl>
-  <dt>
-    {@link android.support.v13.app.FragmentCompat#requestPermissions
-    FragmentCompat.requestPermissions()}
-  </dt>
-
-  <dd>
-    If the device is not running the M Preview, invokes the callback
-    method in <code>FragmentCompat.OnRequestPermissionsResultCallback</code>.
-    Passes {@link android.content.pm.PackageManager#PERMISSION_GRANTED
-    PERMISSION_GRANTED} if the app already has the specified permission, or
-    {@link android.content.pm.PackageManager#PERMISSION_DENIED
-    PERMISSION_DENIED} if it does not.
-  </dd>
-
-  <dt>
-    {@link
-    android.support.v13.app.FragmentCompat#shouldShowRequestPermissionRationale
-    FragmentCompat.shouldShowRequestPermissionRationale()}
-  </dt>
-
-  <dd>
-    If the device is not running the M Preview, always returns
-    <code>false</code>.
-  </dd>
-</dl>
-
-<h3 id="normal">Normal permissions</h3>
-
-<p>
-  Many permissions are designated as {@link
-  android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL},
-  which indicates that
-  there's no great risk to the user's privacy or security in letting apps have
-  those permissions. For example, users would reasonably want to know whether
-  an app can read their contact information, so users have to grant this
-  permission explicitly. By contrast, there's no great risk in allowing an app
-  to vibrate the device, so that permission is designated as <em>normal.</em>
-</p>
-
-<p>
-  If an app declares in its
-  manifest that it needs a normal permission, the system automatically grants
-  the app
-  that permission at install time. The system does not prompt the user
-  to grant normal
-  permissions, and users cannot revoke these permissions.
-</p>
-
-<p>
-  If your app declares that it needs normal permissions, the app does not need
-  to call {@link android.content.Context#checkSelfPermission
-  checkSelfPermission()} or {@link android.app.Activity#requestPermissions
-  requestPermissions()} for those permissions. Since you declared the
-  permissions in the manifest, you can be sure your app was granted those
-  permissions at install time.
-</p>
-
-<p>Currently, the following permissions are classified as {@link
-    android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}:</p>
-
-<ul>
-  <li><code>android.permission.ACCESS_LOCATION_EXTRA_COMMANDS</code></li>
-  <li><code>android.permission.ACCESS_NETWORK_STATE</code></li>
-  <li><code>android.permission.ACCESS_NOTIFICATION_POLICY</code></li>
-  <li><code>android.permission.ACCESS_WIFI_STATE</code></li>
-  <li><code>android.permission.ACCESS_WIMAX_STATE</code></li>
-  <li><code>android.permission.BLUETOOTH</code></li>
-  <li><code>android.permission.BLUETOOTH_ADMIN</code></li>
-  <li><code>android.permission.BROADCAST_STICKY</code></li>
-  <li><code>android.permission.CHANGE_NETWORK_STATE</code></li>
-  <li><code>android.permission.CHANGE_WIFI_MULTICAST_STATE</code></li>
-  <li><code>android.permission.CHANGE_WIFI_STATE</code></li>
-  <li><code>android.permission.CHANGE_WIMAX_STATE</code></li>
-  <li><code>android.permission.DISABLE_KEYGUARD</code></li>
-  <li><code>android.permission.EXPAND_STATUS_BAR</code></li>
-  <li><code>android.permission.FLASHLIGHT</code></li>
-  <li><code>android.permission.GET_PACKAGE_SIZE</code></li>
-  <li><code>android.permission.INTERNET</code></li>
-  <li><code>android.permission.KILL_BACKGROUND_PROCESSES</code></li>
-  <li><code>android.permission.MODIFY_AUDIO_SETTINGS</code></li>
-  <li><code>android.permission.NFC</code></li>
-  <li><code>android.permission.READ_SYNC_SETTINGS</code></li>
-  <li><code>android.permission.READ_SYNC_STATS</code></li>
-  <li><code>android.permission.RECEIVE_BOOT_COMPLETED</code></li>
-  <li><code>android.permission.REORDER_TASKS</code></li>
-  <li><code>android.permission.REQUEST_INSTALL_PACKAGES</code></li>
-  <li><code>android.permission.SET_TIME_ZONE</code></li>
-  <li><code>android.permission.SET_WALLPAPER</code></li>
-  <li><code>android.permission.SET_WALLPAPER_HINTS</code></li>
-  <li><code>android.permission.SUBSCRIBED_FEEDS_READ</code></li>
-  <li><code>android.permission.TRANSMIT_IR</code></li>
-  <li><code>android.permission.USE_FINGERPRINT</code></li>
-  <li><code>android.permission.VIBRATE</code></li>
-  <li><code>android.permission.WAKE_LOCK</code></li>
-  <li><code>android.permission.WRITE_SYNC_SETTINGS</code></li>
-  <li><code>com.android.alarm.permission.SET_ALARM</code></li>
-  <li><code>com.android.launcher.permission.INSTALL_SHORTCUT</code></li>
-  <li><code>com.android.launcher.permission.UNINSTALL_SHORTCUT</code></li>
-</ul>
diff --git a/docs/html/preview/images/m-preview-timeline-crop.png b/docs/html/preview/images/m-preview-timeline-crop.png
deleted file mode 100644
index 724a6af..0000000
--- a/docs/html/preview/images/m-preview-timeline-crop.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/images/m-preview-timeline.png b/docs/html/preview/images/m-preview-timeline.png
deleted file mode 100644
index e9a339e..0000000
--- a/docs/html/preview/images/m-preview-timeline.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
deleted file mode 100644
index db9a957..0000000
--- a/docs/html/preview/index.jd
+++ /dev/null
@@ -1,73 +0,0 @@
-page.title=Android M Developer Preview
-page.tags="preview",
-meta.tags="preview, M preview", androidm
-fullpage=true
-section.landing=true
-header.hide=1
-footer.hide=1
-@jd:body
-
-<section class="dac-expand dac-hero dac-light" >
-  <div class="wrap">
-    <div class="cols dac-hero-content">
-      <div class="col-9of16 col-push-7of16 dac-hero-figure">
-        <img class="dac-hero-image" src="{@docRoot}images/home/devices-hero_620px_2x.png"
-             srcset="{@docRoot}images/home/devices-hero_620px.png 1x,
-             {@docRoot}images/home/devices-hero_620px_2x.png 2x">
-      </div>
-      <div class="col-7of16 col-pull-9of16">
-        <h1 class="dac-hero-title">Android M Developer Preview</h1>
-        <p class="dac-hero-description">
-          <strong>The official Android 6.0 SDK is now available!</strong>
-          Get your apps ready for the next version of Android. Test on Nexus 5, 6, 9, and
-          Player. Explore what's new &mdash; <strong>runtime permissions</strong>,
-          <strong>Doze</strong> and <strong>App Standby</strong> power-saving features, new
-          <strong>assist technology</strong>, and more.
-        </p>
-
-        <a class="dac-hero-cta" href="{@docRoot}preview/overview.html">
-          <span class="dac-sprite dac-auto-chevron"></span>
-          Get started
-        </a><br>
-        <a class="dac-hero-cta" href="{@docRoot}preview/support.html">
-          <span class="dac-sprite dac-auto-chevron"></span>
-          Update to Developer Preview 3 (final SDK)
-        </a><br>
-      </div>
-    </div>
-    <div class="dac-section dac-small">
-      <div class="resource-widget resource-flow-layout col-16"
-           data-query="collection:preview/landing/resources"
-           data-cardSizes="6x2"
-           data-maxResults="6"></div>
-    </div>
-  </div>
-</section>
-
-<section class="dac-section dac-gray"><div class="wrap">
-  <h1 class="dac-section-title">Resources</h1>
-  <div class="dac-section-subtitle">
-    Essential information to help you get your apps ready for Android M.
-  </div>
-
-  <div class="resource-widget resource-flow-layout col-16"
-       data-query="collection:preview/landing/more"
-       data-cardSizes="6x6"
-       data-maxResults="16"></div>
-
-    <ul class="dac-section-links">
-      <li class="dac-section-link">
-        <a href="https://code.google.com/p/android-developer-preview/">
-          <span class="dac-sprite dac-auto-chevron"></span>
-          Report Issues
-        </a>
-      </li>
-      <li class="dac-section-link"><a href="http://g.co/dev/AndroidMDevPreview">
-        <span class="dac-sprite dac-auto-chevron"></span>
-        Join G+ Community
-        </a>
-      </li>
-    </ul>
-  </div>
-</section>
-
diff --git a/docs/html/preview/license.jd b/docs/html/preview/license.jd
deleted file mode 100644
index 5ff52ba..0000000
--- a/docs/html/preview/license.jd
+++ /dev/null
@@ -1,143 +0,0 @@
-page.title=License Agreement
-
-@jd:body
-
-<p>
-To get started with the Android SDK Preview, you must agree to the following terms and conditions. 
-As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk.  The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
-</p>
-
-<p>
-This is the Android SDK Preview License Agreement (the “License Agreement”).
-</p>
-<div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px">
-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>
\ No newline at end of file
diff --git a/docs/html/preview/overview.jd b/docs/html/preview/overview.jd
deleted file mode 100644
index fb2e266..0000000
--- a/docs/html/preview/overview.jd
+++ /dev/null
@@ -1,389 +0,0 @@
-page.title=Program Overview
-page.metaDescription=Welcome to the Android M Developer Preview, a program that gives you everything you need to test and optimize your apps for the next version of Android.
-page.image=images/cards/card-preview_16-9_2x.png
-page.tags="preview", "developer", "android"
-
-@jd:body
-
-<div class="cols" style=
-"background-color:#f2daf5; padding: 5px 0;margin-bottom:1em; text-align:center;">
-<h3>
-    Developer Preview 3 is now available
-  </h3>
-  <p>Includes final SDK and near-final system images</p>
-   <div style="margin:auto 1em">
- <ul class="dac-section-links">
-    <li class="dac-section-link">
-      <a href="{@docRoot}preview/support.html#preview3-notes">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Read the Notes</a>
-    </li>
-
-    <li class="dac-section-link">
-      <a href="{@docRoot}preview/support.html#preview3-get">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Get the Update</a>
-    </li>
-
-    <li class="dac-section-link">
-      <a href="https://code.google.com/p/android-developer-preview/">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Report Issues</a>
-    </li>
-  </ul>
-  </div>
-</div>
-
-<p>
-  Welcome to the <strong>Android M Developer Preview</strong>, a program that gives you
-  everything you need to test and optimize your apps for the next version of
-  Android. It's free, and you can get started right away just by downloading
-  the M Developer Preview tools.
-</p>
-
-<div style="background-color:#eceff1;padding:1em;">
-<div class="wrap">
-  <div class="cols">
-    <div class="col-4of12">
-      <h5>
-        Hardware and emulator system images
-      </h5>
-
-      <p>
-        Run and test your apps on Nexus 5, 6, 9, and Player (for TV), as well
-        as emulator.
-      </p>
-    </div>
-
-    <div class="col-4of12">
-      <h5>
-        Latest platform code
-      </h5>
-
-      <p>
-        We’ll provide multiple updates during the Preview, so you’ll be testing
-        against the latest platform changes.
-      </p>
-    </div>
-
-    <div class="col-4of12">
-      <h5>
-        Updates delivered by OTA
-      </h5>
-
-      <p>
-        You  can get updates over-the-air, once you’ve flashed a
-        device to the initial preview.
-      </p>
-    </div>
-  </div>
-
-  <div class="cols">
-
-
-    <div class="col-4of12">
-      <h5>
-        New behaviors and capabilities
-      </h5>
-
-      <p>
-        Start work early to support new platform behaviors such as
-        the new runtime permissions model and power-saving features.
-      </p>
-    </div>
-
-    <div class="col-4of12">
-      <h5>
-        Priority window for developer-reported issues
-      </h5>
-
-      <p>
-        During the first several weeks we’ll give priority to developer-reported
-        issues, so test and give feedback as soon as possible.
-      </p>
-    </div>
-
-    <div class="col-4of12">
-      <h5>
-        Feedback and support
-      </h5>
-
-      <p>
-        Report issues and give us feedback using our <a href=
-        "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
-        Connect with other developers in the <a
-        href="http://g.co/dev/AndroidMDevPreview">M&nbsp;Developer Community</a>.
-
-      </p>
-    </div>
-  </div>
-</div>
-</div>
-
-<!--
-<p>
-  With the M Developer Preview, you'll get an early start on testing your apps,
-  with enough time to make adjustments before the public platform release later
-  in the year. We'll provide several updates to the Preview tools in the weeks
-  ahead, so you can keep in sync with the latest changes as the platform moves
-  toward launch.
-</p>
-<img src="{@docRoot}preview/images/m-preview-timeline.png" alt=
-"Preview program timeline" id="timeline">
-<p>
-  You can help us improve the platform by <a href=
-  "https://code.google.com/p/android-developer-preview/">reporting issues</a>
-  through our feedback channels. This is especially
-  critical in the first month of the preview, when we’ll be giving priority to
-  developer-reported issues and feedback.
-</p> -->
-
-
-<h2 id="timeline">
-  Timeline and updates
-</h2>
-<img src="{@docRoot}preview/images/m-preview-timeline-crop.png" alt=
-"Preview program timeline" id="timeline">
-<p>
-  The M Developer Preview runs from May 28 until the final Android M public release planned for Q3
-  2015.
-</p>
-
-<p>
-  At key development milestones, we’ll deliver updates for your test devices.
-  The milestones are
-</p>
-
-<ul>
-  <li>
-    <strong><a href="{@docRoot}preview/download_mp1.html">Preview&nbsp;1</a></strong> (available).
-  </li>
-
-  <li>
-    <strong><a href="{@docRoot}preview/download_mp2.html">Preview&nbsp;2</a></strong> (available).
-  </li>
-
-  <li>
-  <strong><a href="{@docRoot}preview/download.html">Preview&nbsp;3</a></strong>
-    (final APIs and official Android 6.0 SDK, available).
-  </li>
-</ul>
-
-<p>
-  These updates culminate in the <strong>official Android 6.0 SDK</strong> (now available),
-  which lets you build with the final APIs for the new version of Android, as well as
-  near-final system images to let you test system behaviors and features.
-</p>
-
-<p>
-  As you test and develop on Android M, we strongly recommend <strong>keeping
-  your development environment up-to-date</strong> as Preview updates are released.
-  To make the process easier, we'll deliver <strong>updates over-the-air
-  (OTA)</strong> to devices already flashed to a Preview build, as well as
-  providing system images that you can download and flash manually.
-</p>
-<p class="note">
-  <strong>Note:</strong> Developer Preview 3 includes final APIs and near-final
-  system images available by both download and OTA. At the full public release of
-  Android M later in Q3, final system images will be available by download only,
-  so you'll need to <strong>flash manually</strong> to
-  your test devices.</strong>
-</p>
-
-<p>
-  We’ll notify you when Preview updates are available via the <a href=
-  "http://android-developers.blogspot.com/">Android Developers Blog</a>, as
-  well as this site and the
-  <a href="http://g.co/dev/AndroidMDevPreview">Android M Developer Community</a>.
-</p>
-
-<h2 id="preview_tools">
-  What’s in the Preview?
-</h2>
-
-<p>
-  The M Developer Preview includes everything you need to test your existing
-  apps on a variety of screen sizes, network technologies, CPU/GPU chipsets,
-  and hardware architectures.
-</p>
-
-<h4>
-  SDK tools
-</h4>
-
-<p>
-  You can download these components through the SDK Manager in <a href=
-  "{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>:
-</p>
-
-<ul>
-  <li><strong>Official Android 6.0 SDK and tools</strong>
-  </li>
-
-  <li>M Developer Preview <strong>emulator system image</strong> (32-bit &amp;
-  64-bit)
-  </li>
-
-  <li>M Developer Preview <strong>emulator system Image for Android TV</strong>
-  (32-bit)
-  </li>
-</ul>
-
-<h4>
-  Hardware system images
-</h4>
-
-<p>
-  You can download these hardware system images for Nexus devices from the
-  <a href="download.html">Downloads page</a>:
-</p>
-
-<ul>
-  <li>
-    <strong>Nexus 5</strong> (GSM/LTE) “hammerhead” device system image
-  </li>
-
-  <li>
-    <strong>Nexus 6</strong> “shamu” device system image
-  </li>
-
-  <li>
-    <strong>Nexus 9</strong> (Wi-Fi) “volantis” device system image
-  </li>
-
-  <li>
-    <strong>Nexus Player</strong> (Android TV) “fugu” device system image
-  </li>
-</ul>
-
-<h4>
-  Documentation and sample code
-</h4>
-
-<p>
-  These documentation resources help you learn about the Preview:
-</p>
-
-<ul>
-  <li>
-    <a href="setup-sdk.html">Set Up the SDK</a> has step-by-step instructions
-    for getting started.
-  </li>
-
-  <li>
-    <a href="{@docRoot}preview/testing/guide.html">Testing Guide</a> and <a href=
-    "behavior-changes.html">Behavior Changes</a> point you to key areas to test.
-  </li>
-
-  <li>Documentation of new APIs, including an <a href="api-overview.html">API Overview</a>,
-  downloadable <a href="{@docRoot}preview/download.html#docs">API Reference</a>, and detailed developer guides on
-  key features such as
-  <a href="{@docRoot}preview/features/runtime-permissions.html">permissions</a>,
-  <a href="{@docRoot}preview/backup/index.html">app backup</a>, and others.
-  </li>
-
-  <li>
-    <a href="{@docRoot}preview/samples.html">Sample code</a> that demonstrates how to support
-    permissions and other new features.
-  </li>
-
-  <li>
-    <a href="{@docRoot}preview/support.html#release-notes">Release notes</a> for the current version
-    of the M Developer Preview, including change notes and diff reports.
-  </li>
-</ul>
-
-<h4>
-  Support resources
-</h4>
-
-<p>
-  Use these support resources as you test and develop on the M
-  Developer Preview:
-</p>
-
-<ul>
-  <li><a href="https://code.google.com/p/android-developer-preview/">M
-  Developer Preview Issue Tracker</a> is your <strong>primary feedback
-  channel.</strong> You can report bugs, performance issues, and general
-  feedback through the issue tracker. You can also check for <a
-  href="https://code.google.com/p/android-developer-preview/wiki/KnownIssues">known issues</a>
-  and find workaround steps.
-  </li>
-
-  <li>The <a href="http://g.co/dev/AndroidMDevPreview">Android M Developer
-  Community</a> is a Google+ community where you can <strong>connect with
-  other developers</strong> working with Android M. You can share
-  observations or ideas or find answers to questions about Android M.
-  </li>
-</ul>
-
-
-<h2 id="preview_apis_and_publishing">
-  Final SDK, targeting, and publishing
-</h2>
-
-<p>
-   <p>With Developer Preview 3, the platform APIs are now official (API level 23) and the
-   <strong>official Android 6.0 SDK is now available</strong>.  We recommend updating your environment
-   right away through Android Studio. Once you've updated your environment, you can target
-   the new API level, compile against the new platform, and publish at your convenience
-   to Google Play (including alpha, beta, or release channels).
-
-  <p>If you want to opt out
-  of compatibility behaviors (which is strongly recommended),
-  you can target the Android 6.0 platform by setting your app's <code><a href=
-  "/guide/topics/manifest/uses-sdk-element.html">targetSdkVersion</a></code>
-  to <code>“23”</code>.
-</p>
-
-  <p>Before releasing an app that targets API level 23, we strongly
-  recommend distributing it to a group of testers through the new <a
-  href="http://android-developers.blogspot.com/2015/07/iterate-faster-on-google-play-with.html"> 
-  beta testing features available in the Google Play Developer Console. See the
-  <a href="https://support.google.com/googleplay/android-developer/answer/3131213">Help
-  Center article</a> for more information. 
-</p>
-
-<h2 id="get_started">
-  How to get started
-</h2>
-
-<p>
-  To get started testing your app with Android M:
-</p>
-
-<ol>
-  <li>Review the <a href="{@docRoot}preview/api-overview.html">API Overview</a>
-    and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to get an
-    idea of what's new and how it affects your apps. In particular, learn about
-    the new <a href="{@docRoot}preview/features/runtime-permissions.html">runtime
-    permissions</a> model, power-saving features, and auto backup.
-  </li>
-
-  <li>Set up your environment by following the instructions for
-    <a href="{@docRoot}preview/setup-sdk.html">Setting up the Preview SDK</a>
-    and configuring test devices.
-  </li>
-
-  <li>Follow the <a href="https://developers.google.com/android/nexus/images">
-    flashing instructions</a> to flash the latest M developer preview system image
-    for Nexus 5, 6, 9, and Player. Once you've flashed your development device,
-    Preview updates will be delivered through over-the-air (OTA) updates.</a>
-  </li>
-
-  <li>Review the <a href="{@docRoot}reference/packages.html">API
-  Reference</a> and <a href="{@docRoot}preview/samples.html">M Preview
-  samples</a> to gain more insight into new API features and how to use them in
-  your app.
-  </li>
-
-  <li>Join the <a href="http://g.co/dev/AndroidMDevPreview">Android M
-  Developer Community</a> to get the latest news and connect with other
-  developers working with the new platform.
-  </li>
-</ol>
-
-<p>
-  Thank you for your participation in the Android M Developer Preview program!
-</p>
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
deleted file mode 100644
index 90df59e..0000000
--- a/docs/html/preview/preview_toc.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-<ul id="nav">
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/overview.html"
-   es-lang="Información general del programa"
-   ja-lang="プログラム概要"
-   ko-lang="프로그램 개요"
-   pt-br-lang="Visão geral do programa"
-   ru-lang="Обзор программы"
-   zh-cn-lang="计划概览"
-   zh-tw-lang="程式總覽">
-   Program Overview</a></div>
-  </li>
-
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/download.html"
-      es-lang="Descargas"
-      ja-lang="ダウンロード"
-      ko-lang="다운로드"
-      pt-br-lang="Downloads"
-      ru-lang="Загрузки"
-      zh-cn-lang="下载"
-      zh-tw-lang="下載">
-      Downloads</a></div>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html"
-      es-lang="Configurar el SDK de la versión preliminar"
-      ja-lang="Preview SDK のセットアップ"
-      ko-lang="미리 보기 SDK 설정하기"
-      pt-br-lang="Configuração do Preview SDK"
-      ru-lang="Настройка пакета SDK Preview"
-      zh-cn-lang="设置预览版 SDK"
-      zh-tw-lang="設定預覽版 SDK">
-      Set up the SDK</a></div>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/testing/guide.html"
-      es-lang="Guía de prueba"
-      ja-lang="テストガイド"
-      ko-lang="테스트 가이드"
-      pt-br-lang="Guia de teste"
-      ru-lang="Руководство по тестированию"
-      zh-cn-lang="测试指南"
-      zh-tw-lang="測試指南">
-      Testing Guide</a></div>
-      <ul>
-        <li><a href="<?cs var:toroot ?>preview/testing/performance.html"
-      es-lang="Prueba de rendimiento de video"
-      ja-lang="表示パフォーマンスのテスト"
-      ko-lang="표시 성능 테스트"
-      pt-br-lang="Teste de desempenho de exibição"
-      ru-lang="Тестирование скорости отображения"
-      zh-cn-lang="测试显示性能"
-      zh-tw-lang="測試顯示效能">
-      Performance Testing</a></li>
-      </ul>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/api-overview.html"
-      es-lang="Información general de la API"
-      ja-lang="API の概要"
-      ko-lang="API 개요"
-      pt-br-lang="Visão geral da API"
-      ru-lang="Обзор API-интерфейсов"
-      zh-cn-lang="API 概览"
-      zh-tw-lang="API 總覽">API Overview
-      </a></div>
-      <ul>
-        <li><a href="<?cs var:toroot ?>preview/features/runtime-permissions.html"
-      es-lang="Permisos"
-      ja-lang="パーミッション"
-      ko-lang="권한"
-      pt-br-lang="Permissões"
-      ru-lang="Разрешения"
-      zh-cn-lang="权限"
-      zh-tw-lang="權限">Permissions
-          </a></li>
-        <li><a href="<?cs var:toroot ?>preview/features/app-linking.html"
-      es-lang="Vínculos de la aplicación"
-      ja-lang="App Links"
-      ko-lang="앱 링크"
-      pt-br-lang="Links de aplicativos"
-      ru-lang="Связи приложений"
-      zh-cn-lang="应用链接"
-      zh-tw-lang="應用程式連結">
-      App Links</a></li>
-        <li><a href="<?cs var:toroot ?>preview/backup/index.html"
-      es-lang="Copia de seguridad automática para aplicaciones"
-      ja-lang="アプリの自動バックアップ"
-      ko-lang="앱용 자동 백업"
-      pt-br-lang="Backup automático para aplicativos"
-      ru-lang="Автоматическое резервное копирование для приложений"
-      zh-cn-lang="自动备份应用"
-      zh-tw-lang="針對應用程式進行自動備份">
-          Auto Backup for Apps</a></li>
-        <li><a href="<?cs var:toroot ?>preview/features/power-mgmt.html"
-      es-lang="Optimizaciones de ahorro de energía"
-      ja-lang="省電力の最適化"
-      ko-lang="절전 최적화"
-      pt-br-lang="Otimizações de economia de energia"
-      ru-lang="Оптимизация экономии энергии"
-      zh-cn-lang="节能优化"
-      zh-tw-lang="省電最佳化">
-      Power-Saving Optimizations</a></li>
-      </ul>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/behavior-changes.html"
-      es-lang="Cambios en los comportamientos"
-      ja-lang="動作の変更点"
-      ko-lang="동작 변경"
-      pt-br-lang="Mudanças de comportamento"
-      ru-lang="Изменения в работе"
-      zh-cn-lang="行为变更"
-      zh-tw-lang="行為變更">Behavior Changes
-       </a></div>
-  </li>
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/samples.html"
-      es-lang="Ejemplos"
-      ja-lang="サンプル"
-      ko-lang="샘플"
-      pt-br-lang="Exemplos"
-      ru-lang="Примеры"
-      zh-cn-lang="示例"
-      zh-tw-lang="範例">
-      Samples</a></div>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html">
-      Support & Release Notes</a></div>
-  </li>
-
-  <li class="nav-section">
-    <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/license.html"
-      es-lang="Contrato de licencia"
-      ja-lang="使用許諾契約"
-      ko-lang="라이선스 계약"
-      pt-br-lang="Contrato de licença"
-      ru-lang="Лицензионное соглашение"
-      zh-cn-lang="许可协议"
-      zh-tw-lang="授權協議">
-      License Agreement</a></div>
-  </li>
-
-</ul>
diff --git a/docs/html/preview/samples.jd b/docs/html/preview/samples.jd
deleted file mode 100644
index 7d47e0e..0000000
--- a/docs/html/preview/samples.jd
+++ /dev/null
@@ -1,70 +0,0 @@
-page.title=Samples
-page.image=images/cards/samples-new_2x.png
-@jd:body
-
-<p>
-  The following code samples are provided for the M Developer Preview. To download
-  the samples in Android Studio, select the <b>File > Import Samples</b> menu option.
-</p>
-
-<p class="note">
-  <strong>Note:</strong> These downloadable projects are designed
-   for use with Gradle and Android Studio.
-</p>
-
-
-<h3 id="RuntimePermissions">Runtime Permissions</h3>
-
-<p>
- Android M changes the way system permissions work. Users are asked to approve permission
- requests at runtime instead of during installation. This sample shows how to request these
- permissions.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-RuntimePermissions">Get it on GitHub</a></p>
-
-<h3 id="ConfirmCredentials">Confirm Credential</h3>
-
-<p>
- This sample demonstrates how to use device credentials as an authentication method in your app.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-ConfirmCredential">Get it on
-GitHub</a></p>
-
-<h3 id="FingerprintDialog">Fingerprint Dialog</h3>
-
-<p>
- This sample demonstrates how to recognize registered fingerprints to authenticate the user
- in your app.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-FingerprintDialog">Get it on GitHub</a></p>
-
-<h3 id="AutomaticBackup">Auto Backup for Apps</h3>
-
-<p>
- Android M introduces automatic backup for app settings. This sample demonstrates how to add
- filtering rules to an app in order to manage settings backup.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-AutoBackupForApps">Get it on GitHub</a></p>
-
-<h3 id="CameraRaw">Camera 2 Raw</h3>
-
-<p>
-  Demonstrates how to use the <code>Camera2</code> API to capture RAW camera buffers and save
-  them as <code>DNG</code> files.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-Camera2Raw">Get it on GitHub</a></p>
-
-<h3 id="ActiveNotification">Active Notification</h3>
-
-<p>
-  This sample demonstrates how the
-  <a href="{@docRoot}reference/android/app/NotificationManager.html"><code>NotificationManager</code></a>
-  can tell you how many notifications your app is currently showing.
-</p>
-
-<p><a href="https://github.com/googlesamples/android-ActiveNotifications">Get it on GitHub</a></p>
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
deleted file mode 100644
index 7a2a666..0000000
--- a/docs/html/preview/setup-sdk.jd
+++ /dev/null
@@ -1,178 +0,0 @@
-page.title=Set Up the SDK
-page.image=images/cards/card-set-up_16-9_2x.png
-
-@jd:body
-
-
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
-        <li><a href="#get-as13">Get Android Studio 1.3</a></li>
-        <li><a href="#get-sdk">Get the Android 6.0 SDK</a></li>
-        <li><a href="#create-update">Create or Update a Project</a></li>
-        <li><a href="#setup-test">Set Up for Testing</a></li>
-      </ol>
-  </div>
-</div>
-
-<p>With Developer Preview 3, the <strong>official Android 6.0 SDK is now available</strong> from the Android SDK
-Manager. This document assumes that you are familiar with Android app development, such
-as using the Android SDK Manager and creating projects. If you are new to
-Android, see <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First
-App</a> training lesson first.</p>
-
-
-<h2 id="get-as13">Get Android Studio 1.3</h2>
-
-<p>
-  It is highly recommended that you install the Android Studio 1.3 to work best with
-  the Android 6.0 SDK. Please update your Android Studio installation to version 1.3 or
-  higher, or follow the instructions for
-  <a href="{@docRoot}sdk/installing/index.html?pkg=studio">Installing Android Studio</a>.
-</p>
-
-
-<h2 id="get-sdk">Get the Android 6.0 SDK</h2>
-
-<p>To add the Android 6.0 SDK components to your development environment:</p>
-
-<ol>
-  <li>Launch Android Studio 1.3 or higher.
-  </li>
-
-  <li>Open the <strong>Settings</strong> window (on Windows, you can do this
-  by choosing <strong>File &gt; Settings</strong>). Choose the
-  <strong>Appearance &amp; Behavior &gt; System
-  Settings &gt; Updates</strong> panel.
-
-    <p class="aside">On Mac OS X, you can find the <strong>Appearance &amp;
-    Behavior</strong> panel
-    in Android Studio's <strong>Preferences</strong> window.</p>
-  </li>
-
-  <li>On the <strong>Updates</strong> panel, choose the option for
-  <strong>Automatically check updates for Android SDK: Preview Channel</strong>.
-  </li>
-
-  <li>Launch the <strong>Android SDK Manager</strong>. (With Android Studio 1.3,
-  the SDK Manager is integrated into Android Studio instead of being a
-  standalone application.)
-  </li>
-
-  <li>Under the <strong>Platforms</strong> section, select <strong>Android 6.0</strong>.
-  </li>
-
-  <li>In the <strong>Tools</strong> section, select the latest Android <strong>
-    SDK Tools</strong>, <strong>Platform-tools</strong>, and
-    <strong>Build-tools</strong>.
-  </li>
-
-  <li>Click <strong>Install packages</strong> and accept the licensing
-    agreement for all of the packages.
-  </li>
-
-  <li>Verify that the Android 6.0 SDK is installed by opening the <strong>
-    Settings</strong> window and choosing the <strong>Appearance &amp; Behavior
-    &gt; System Settings &gt; Android SDK</strong> panel.</li>
-
-  <li>On the <strong>Android SDK</strong> panel, choose
-    the <strong>SDK Platforms</strong> tab. <strong>Android 6.0</strong> should be listed as <em>Installed</em>. Also, open the
-    <strong>SDK Tools</strong> tab to verify that the latest tools are
-    installed.
-  </li>
-</ol>
-<p>After completing these steps, the preview components are available in your development
-  environment. </p>
-
-
-<h2 id="create-update">Create or Update a Project</h2>
-
-<p>
-  In order to use the preview APIs, you must create or update a development project to use
-  the preview components.
-</p>
-
-
-<h3 id="create">Create a new project</h3>
-
-<p>
-  We recommend using Android Studio to create a project with the preview. Follow the steps
-  described in <a href="{@docRoot}sdk/installing/create-project.html">Creating a Project</a>
-  until you arrive at the <em>Form Factors</em> screen in the project wizard. Then perform
-  the following steps to create a project configured for the preview.
-</p>
-
-<ul>
-  <li>Check <strong>Phone and Tablet</strong>.</li>
-  <li>Select <strong>API 23: Android 6.0 (Marshmallow)</strong> in <strong>Minimum
-    SDK</strong>.</li>
-</ul>
-
-
-<h3 id="update">Update an existing project</h3>
-
-<p>
-  For existing projects, if you are using Android 6.0 APIs (API level 23) you must
-  modify the project configuration. In your development environment, open the
-  <code>build.gradle</code> file for your module and
-  set these values as follows:
-</p>
-
-<ul>
-  <li><code>compileSdkVersion</code> is set to <code>'23'</code></li>
-  <li><code>targetSdkVersion</code> is set to <code>'23'</code></li>
-</ul>
-
-
-<h2 id="setup-test">Set Up for Testing</h2>
-
-<p>
-  Testing an app with the preview requires that you have a device or virtual device configured with
-  the preview version of the platform. If you have a compatible device, you can install the preview
-  platform for testing. Otherwise, you can configure a virtual device for testing.
-</p>
-
-<h3 id="setup-device">Set up a physical device</h3>
-
-<p>
-  If you have a Nexus 5, Nexus 6, Nexus 9, or Android TV, you can install a preview
-  system image on these devices for testing your app.
-  You can set up a virtual device with the preview version of the platform from within Android Studio
-  using the Android Virtual Device Manager tool.
-</p>
-
-<p class="caution">
-  <strong>Important:</strong> Installing a preview image on a device <em>removes all data from
-  it</em>, so you should backup any data before installing a preview image.
-</p>
-
-<h3 id="setupAVD">Set up a virtual device</h3>
-
-<p>
-  You can set up virtual device with the preview version of the platform from within Android Studio
-  using the Android Virtual Device Manager tool.
-</p>
-
-<p>To create an AVD with the AVD Manager:</p>
-
-<ol>
-  <li>Install the Preview SDK in your development environment, as described
-      in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview
-      SDK.</a></li>
-  <li>Follow the steps in
-      <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
-      Manager</a>. Use the following settings:
-    <ul>
-      <li><strong>Device:</strong> Nexus 5, Nexus 6, Nexus 9, or Android TV</li>
-      <li><strong>Target:</strong>
-       Android M (Preview) - API Level M</li>
-      <li><strong>ABI:</strong> x86</li>
-    </ul>
-  </li>
-</ol>
-
-<p>
-  For more information about creating virtual devices for testing, see <a href=
-  "{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
-</p>
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
deleted file mode 100644
index cfd9467..0000000
--- a/docs/html/preview/support.jd
+++ /dev/null
@@ -1,533 +0,0 @@
-page.title=Support and Release Notes
-page.tags="preview", "developer preview"
-page.image=images/cards/card-support_16-9_2x.png
-
-@jd:body
-
-<div class="cols" style=
-"background-color:#f2daf5; padding: 5px 0;margin-bottom:1em; text-align:center;">
-<h3>
-    Developer Preview 3 is now available
-  </h3>
-  <p>Includes final SDK and near-final system images</p>
-   <div style="margin:auto 1em">
- <ul class="dac-section-links">
-    <li class="dac-section-link">
-      <a href="#preview3-notes">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Read the Notes</a>
-    </li>
-
-    <li class="dac-section-link">
-      <a href="#preview3-get">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Get the Update</a>
-    </li>
-
-    <li class="dac-section-link">
-      <a href="https://code.google.com/p/android-developer-preview/">
-      <span class="dac-sprite dac-auto-chevron"></span>
-      Report Issues</a>
-    </li>
-  </ul>
-  </div>
-</div>
-
-<p>
-  Two primary support channels are available to you when developing and testing
-  with the Android M Developer Preview. If you've encountered bugs or have
-  feedback about the M Developer Preview, you can <a href=
-  "https://code.google.com/p/android-developer-preview/">create an issue</a> on
-  our issue tracker. We'll triage the issue for further review and provide
-  updates as needed.
-</p>
-
-<p>
-  To discuss issues or ideas with other developers working with Android M, join
-  the <a href="http://g.co/dev/AndroidMDevPreview">M Developer Preview Google+
-  community</a>.
-</p>
-
-<h2 id="preview3-notes">
-  Developer Preview 3
-</h2>
-
-<div class="wrap">
-  <div class="cols">
-    <div class="col-9of16">
-      <p>
-        <em>Date: August 2015<br>
-        Build: MPA44I<br>
-        Hardware support: Nexus 5, 6, 9, Player<br>
-        Emulator support: x86 &amp; ARM 32/64-bit<br>
-        Google Play services: 7.8</em>
-      </p>
-    </div>
-  </div>
-</div>
-
-<p>
-  Developer Preview 3 is the <strong>final incremental update</strong>
-  to the Android M preview platform that was originally released in May 2015.
-  The update includes <strong>final APIs and the official Android 6.0 SDK</strong>,
-  as well as near-final system images for testing your apps. The
-  updated system images bring a variety of fixes and enhancements across
-  the system, including those related to issues reported by developers
-  through the external issue tracker.
-</p>
-
-<p>
-  If you are currently developing or testing on Android M, you should <strong>update
-  your environment</strong> as soon as possible, so that
-  you can begin <strong>final compatibility testing</strong> in preparation for
-  the public release to device manufacturers later this year.</p>
-
-<p class="important">Updating to the Android 6.0 SDK and the latest
-   system images 3 ensures that you are building against final
-   platform APIs in <strong>API level 23</strong> and testing
-   against final behaviors. If you are just getting started,
-   follow the instructions in <a href=
-  "/preview/setup-sdk.html">Set up the Preview SDK</a>.
-</p>
-
-<h3>
-  What's included
-</h3>
-
-<p>
-  Developer Preview 3 includes the official Android 6.0
-  SDK as well as updated preview system images, documentation,
-  and samples for developing against the Android 6.0
-  development platform.
-</p>
-
-<ul>
-  <li>
-    <strong>SDK platform</strong> and <strong>system images</strong> (Nexus and
-    emulator) for building and testing. You can download the Android 6.0 SDK and tools from
-    the SDK Manager, and the system images are available by over-the-air (OTA)
-    update or download (see below).
-  </li>
-
-  <li>
-    <strong>Updated documentation</strong>. The <a href=
-    "{@docRoot}preview/behavior-changes.html">Behavior Changes</a>, <a href=
-    "{@docRoot}preview/api-overview.html">API Overview</a>, and <a href=
-    "{@docRoot}preview/features/runtime-permissions.html">Permissions</a> documents have
-    been updated to reflect the latest changes in the platform. An updated
-    <a href="/preview/download.html">Developer Documentation download
-    package</a> is available, including full reference docs and API diff
-    reports. Reference documentation is also now <a
-    href="{@docRoot}reference/packages.html">available online</a>.
-  </li>
-
-  <li>
-    <strong>Translations</strong> of the documentation are available. Use
-    the language selector at the bottom right corner of any page to switch
-    languages. Note that some of the translated docs are not yet updated for
-    Developer Preview 3.
-  </li>
-
-  <li>The <a href="{@docRoot}preview/samples.html">Android M code samples</a> are also
-  updated to account for API and behavior changes:
-    <ul>
-      <li>
-        <a href=
-        "https://github.com/googlesamples/android-RuntimePermissions">RuntimePermissions</a>
-        and <a href=
-        "https://github.com/googlesamples/android-RuntimePermissionsBasic">RuntimePermissionsBasic</a>
-        are updated to reflect latest permissions API changes, including
-        <code>shouldShowRequestPermissionRationale()</code>.
-      </li>
-      <li>
-        Other samples are updated to support runtime permissions.
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<h3 id="changes">
-  Key changes
-</h3>
-<ul>
-  <li>General
-    <ul>
-      <li>Updated the Fingerprint API to enables better error reporting,
-        better fingerprint enrollment experience, and enumeration support for greater
-        reliability.</li>
-      <li>Modified app access to BLE and Wi-Fi scans to require the location permisssion when they
-        target Android 6.0 (API level 23) or higher. Apps targeting API 22 or earlier can
-        still perform BTLE and WiFi scans, but only when they are in the foreground. While in the background, those apps will get no results from BTLE and WiFi scans.</li>
-    </ul>
-  </li>
-  <li>Permission changes
-    <ul>
-      <li>Updated the user interface for permissions and enhanced some of the permissions
-        behaviors.</li>
-      <li>The {@link android.Manifest.permission#GET_ACCOUNTS} permission is now a member of the
-        {@link android.Manifest.permission_group#CONTACTS} permission group and it has a
-        {@code android:protectionLevel} of {@code dangerous}. This change means that when
-        targeting Android 6.0 (API level 23), you must check for and request this permission if
-        your app requires it.
-      </li>
-
-      <li>The {@code android.permission.READ_PROFILE} and {@code android.permission.WRITE_PROFILE}
-       permissions have been removed from the {@link android.Manifest.permission_group#CONTACTS}
-       permission group.
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<p>
-  For a complete list of changes, including renamed and removed APIs, see the API Diff report for
-  <a href="{@docRoot}sdk/api_diff/23/changes.html">API level 22 to 23</a>.
-</p>
-
-<h3 id="ki">
-  Known issues
-</h3>
-
-<ul>
-  <li>General issues:
-    <ul>
-      <li>On LTE devices, including Nexus 9, GPS is not functioning properly, which may
-        interfere with navigation services.
-      </li>
-      <li>During Hangouts calls, users may experience distorted or low audio on some devices.
-      </li>
-      <li>The Google Apps Device Policy app bundled with MPA44G is unable to set up an Android for
-Work Profile, so you cannot create a new Work Profile with that version of the app. This issue is
-resolved in the Google Apps Device Policy app bundled with MPA44I. Other apps that provide Android
-for Work functionality remain unaffected on either build.
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<p>
-  For a complete list of reported issues, please refer to the <a href=
-  "https://code.google.com/p/android/issues/list">open issues list</a> on the
-  Developer Preview <a href=
-  "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
-</p>
-
-<h3 id="preview3-get">
-  Get Developer Preview 3
-</h3>
-
-<p>
-  You can download the official Android 6.0 SDK platform and
-  Developer Preview 3 emulator images from the SDK Manager.
-</p>
-
-<p>
-  Developer Preview 3 system images for supported Nexus devices are available
-  by download and by over-the-air (OTA) update. The OTA update is available
-  only to supported devices that are currently running a Developer Preview build.
-  If your device is running a Developer Preview build, you should automatically receive
-  the OTA update within a few days of availability.
-</p>
-
-<p>
-  For instructions on how to download and flash your device to the latest Developer
-  Preview, see the links and instructions on the <a href=
-  "{@docRoot}preview/download.html">Downloads</a> page.
-</p>
-
-<p>
-  For instructions on how to start developing and testing with Android 6.0
-  Marshmallow, read <a href="{@docRoot}preview/setup-sdk.html">Setting
-  up the SDK</a>.
-</p>
-
-<h2 id="preview2-notes">
-  Developer Preview 2
-</h2>
-
-<div class="wrap">
-  <div class="cols">
-    <div class="col-9of16">
-      <p>
-        <em>Date: July 2015<br>
-        Builds: MPZ79M (Nexus 5, 6, 9), MPZ79N (Nexus Player)<br>
-        Hardware support: Nexus 5, 6, 9, Player<br>
-        Emulator support: x86 &amp; ARM 32/64-bit<br>
-        Google Play services: 7.6</em>
-      </p>
-    </div>
-  </div>
-</div>
-
-<p>
-  Android M Developer Preview 2 is an <strong>incremental update</strong> to
-  the Android M preview platform that was originally released in May 2015. The
-  update includes a variety of enhancements and bug fixes made across the
-  system, including those related to issues reported by developers through the
-  external issue tracker.
-</p>
-
-<p>
-  If you are currently developing or testing on Android M, you should
-  <strong>update your environment</strong> to Developer Preview 2 as soon as
-  possible. This ensures that you are building with the latest platform APIs
-  and testing against the latest behaviors. If you are just getting started
-  with the Android M Developer Preview SDK, follow the instructions in <a href=
-  "{@docRoot}preview/setup-sdk.html">Set up the Preview SDK</a>, then update your
-  environment for Developer Preview 2.
-</p>
-
-<h3>
-  What's included
-</h3>
-
-<p>
-  Developer Preview 2 includes an updated SDK with system images,
-  documentation, and samples for developing against the latest Android M
-  platform.
-</p>
-
-<ul>
-  <li>
-    <strong>SDK platform</strong> and <strong>system images</strong> (Nexus and
-    emulator) for building and testing. You can download the updated tools from
-    the SDK Manager, and the system images are available by over-the-air (OTA)
-    update or download (see below).
-  </li>
-
-  <li>
-    <strong>Updated documentation</strong>. The <a href=
-    "{@docRoot}preview/behavior-changes.html">Behavior Changes</a>, <a href=
-    "{@docRoot}preview/api-overview.html">API Overview</a>, and <a href=
-    "{@docRoot}preview/features/runtime-permissions.html">Permissions</a> documents have
-    been updated to reflect the latest changes in the platform. An updated
-    <a href="{@docRoot}preview/download.html">Developer Documentation download
-    package</a> is available, including full reference docs and API diff
-    reports.
-  </li>
-
-  <li>
-    <strong>Translations</strong> of the documentation are now available. Use
-    the language selector at the bottom right corner of any page to switch
-    languages. Note that some of the translated docs are not yet updated for
-    Developer Preview 2 (coming soon).
-  </li>
-
-  <li>The <a href="{@docRoot}preview/samples.html">Android M code samples</a> are also
-  updated to account for API and behavior changes:
-    <ul>
-      <li>
-        <a href=
-        "https://github.com/googlesamples/android-RuntimePermissions">RuntimePermissions</a>
-        / <a href=
-        "https://github.com/googlesamples/android-RuntimePermissionsBasic">RuntimePermissionsBasic</a>
-        are updated to reflect latest permissions API changes, including
-        <code>shouldShowRequestPermissionRationale()</code>.
-      </li>
-      <li>
-        <a href=
-        "https://github.com/googlesamples/android-FingerprintDialog">FingerprintDialog</a>
-        adds a flow to ask for passwords when new fingerprints are added as
-        well as a preference if the app will use fingerprints as a method of
-        authentication.
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<h3 id="changes-p2">
-  Key changes
-</h3>
-
-<ul>
-  <li>Permissions changes
-    <ul>
-      <li>The <code>android.permission.USE_FINGERPRINT</code> permission now
-      has "normal" protection level, so it is no longer necessary to request
-      this permission directly from the user. The <code>USE_FINGERPRINT</code>
-      permission enables fingerprints to be enabled for authentication, but
-      does not give the requesting app access to the enrollment/fingerprint
-      administration flow.
-      </li>
-
-      <li>The <code>android.permission.WRITE_EXTERNAL_STORAGE</code> permission
-      has protection level "dangerous", meaning that apps wanting to write to
-      external storage will need to request permission from the user at
-      runtime. Both <code>READ_EXTERNAL_STORAGE</code> and
-      <code>WRITE_EXTERNAL_STORAGE</code> are members of the
-      <code>STORAGE</code> permission group.
-      </li>
-
-      <li>Remote Bluetooth/Wi-Fi MAC's now require either the
-      <code>android.permission.ACCESS_COARSE_LOCATION</code> or
-      <code>android.permission.ACCESS_FINE_LOCATION</code> permission.
-      </li>
-
-      <li>Some accounts and identity permissions are moved to
-      <code>CONTACTS</code> permissions group and others are removed or granted
-      based on account type. In particular,
-      <code>android.permission.USE_CREDENTIALS</code>,
-      <code>android.permission.MANAGE_ACCOUNTS</code>, and
-      <code>android.permission.AUTHENTICATE_ACCOUNTS</code> are ungrouped
-      pending further changes in a later release.
-      </li>
-
-      <li>The Wi-Fi permissions
-      <code>android.permission.CHANGE_WIFI_STATE</code>,
-      <code>android.permission.CHANGE_WIMAX_STATE</code>, and
-      <code>android.permission.CHANGE_WIFI_MULTICAST_STATE</code> now have
-      protection level "normal".
-      </li>
-
-      <li>The Bluetooth permissions <code>android.permission.BLUETOOTH</code>
-      and <code>android.permission.BLUETOOTH_ADMIN</code> now have protection
-      level "normal".
-      </li>
-
-      <li>Bookmarks and subscribed feeds permissions are removed.
-      </li>
-
-      <li>Apps included in the system image are no longer granted dangerous
-      permissions automatically. All apps should check for and request
-      permissions at runtime.
-      </li>
-
-      <li>Introduces the utility method
-      <code>Activity.shouldShowRequestPermissionRationale(String)</code>, which
-      lets your app see whether users have previously rejected a permission
-      request. This lets you know that your app should explain the the user why
-      it needs that permission. For more information see the <a href=
-      "{@docRoot}preview/features/runtime-permissions.html#explain-need">Permissions</a>
-      developer guide.
-      </li>
-    </ul>
-  </li>
-
-  <li>Other changes
-    <ul>
-      <li>The <code>android.app.AssistContent</code> and
-      <code>android.app.AssistStructure</code> classes are moved into a new
-      package, <code>android.app.assist</code>.
-      </li>
-
-      <li>Bluetooth Stylus APIs are updated and include new callback events.
-      The <code>View.OnStylusButtonPressListener</code> class is renamed to
-      <code>View.OnContextClickListener</code> and
-      <code>GestureDetector.OnStylusButtonPressListener</code> class to <code>
-        GestureDetector.OnContextClickListener</code>.
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<p>
-  For a complete list of changes, including renamed and removed APIs, please
-  refer to the API Diff Reports included in the <a href=
-  "{@docRoot}preview/download.html#docs">Developer Documentation download package</a>.
-</p>
-
-<h3 id="ki-p2">
-  Known issues
-</h3>
-
-<ul>
-  <li>General issues:
-    <ul>
-      <li>The system Messenger app crashes on the 64-bit emulator.</li>
-      <li>After updating to Developer Preview 2, Contacts sync experiences
-      intermittent issues. The workaround is to clear and re-sync Contact Storage
-      data after update. To clear data, go to <strong>Settings &gt; Apps &gt; Show
-      system &gt; Contacts Storage</strong>. Select "Storage" and then
-      <strong>Clear data</strong>.</li>
-      <li>In YouTube app, it's not possible to share a video. The share window is
-      blank.</li>
-      <li>The bundled Google Apps Device Policy app included in Developer Preview 2 is unable to
-      properly set up an Android for Work Profile, so you cannot create a new Work Profile with this
-      app after you update. This issue is specific to the Google Apps Device Policy app, and not the
-      Android for Work platform (or our partner EMM providers). As a workaround for users of the
-      Google Apps Device Policy app, be sure to create a Work Profile in Developer Preview 1 before
-      updating to Developer Preview 2.
-      </li>
-    </ul>
-  </li>
-  <li>Issues specific to MPZ79N on Nexus Player:
-    <ul>
-      <li>Bluetooth share crashes after clearing data. Please <strong>do not
-      clear app data for system services</strong>, otherwise you will need to Factory
-      Reset your device</li>
-      <li>Remote control can experience intermittent connectivity issues. </li>
-      <li>Movies show black screen with some ANRs on exiting the video.</li>
-      <li>In YouTube app, lower-resolution videos have a green bar at the top
-      and some color-ghosting</li>
-      </li>
-    </ul>
-  </li>
-</ul>
-
-<p>
-  For a complete list of reported issues, please refer to the <a href=
-  "https://code.google.com/p/android/issues/list">open issues list</a> on the
-  Developer Preview <a href=
-  "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
-</p>
-
-<h3 id="preview2-get">
-  Get Developer Preview 2
-</h3>
-
-<p>
-  You can download the Developer Preview 2 platform and emulator images from
-  the SDK Manager.
-</p>
-
-<p>
-  Developer Preview 2 system images for supported Nexus devices are available
-  by download and by over-the-air (OTA) update. The OTA update is available
-  only to supported devices that are currently running Developer Preview 1. If
-  your devices are running Developer Preview 1, you should automatically receive
-  the OTA update within a few days of availability.
-</p>
-
-<p>
-  If you are just getting started with Android M Developer Preview, and want
-  to receive Developer Preview 2 via OTA, download the appropriate
-  Developer Preview 1 <a href="{@docRoot}preview/download_mp1.html#images">
-  system image</a>, and flash it to your device. Then,
-  leave the device powered on for several hours. It registers with the
-  OTA service, and receives Developer Preview 2 by OTA.
-</p>
-
-<p>
-  For instructions on how to download and flash your device to the Developer
-  Preview, see the links and instructions on the <a href=
-  "{@docRoot}preview/download.html">Downloads</a> page.
-</p>
-
-<p>
-  For instructions on how to start developing and testing with Android M, read
-  <a href="{@docRoot}preview/setup-sdk.html">Setting up the SDK</a>.
-</p>
-
-<h2 id="preview1-notes">
-  Developer Preview 1
-</h2>
-
-<div class="wrap">
-  <div class="cols">
-    <div class="col-6of12">
-      <p>
-        <em>Date: May 2015<br>
-        Build: MPZ44Q<br>
-        Hardware support: Nexus 5, 6, 9, Player<br>
-        Emulator support: x86 &amp; ARM (32/64-bit)<br>
-        Google Play services: 7.5</em>
-      </p>
-    </div>
-  </div>
-</div>
-
-<p>
-  Initial release.
-</p>
-
-
diff --git a/docs/html/preview/testing/guide.jd b/docs/html/preview/testing/guide.jd
deleted file mode 100644
index c60cc31..0000000
--- a/docs/html/preview/testing/guide.jd
+++ /dev/null
@@ -1,187 +0,0 @@
-page.title=Testing Guide
-page.image=images/cards/card-build_16x9_2x.png
-page.keywords=previewresources,androidm,testing,permissions
-
-@jd:body
-
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
-        <li><a href="#runtime-permissions">Testing Permissions</a></li>
-        <li><a href="#doze-standby">Testing Doze and App Standby</a></li>
-        <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
-      </ol>
-  </div>
-</div>
-
-<p>
-  The Android M Developer Preview gives you an opportunity to ensure your apps work with the next
-  version of the platform. This preview includes a number of APIs and behavior changes that can
-  impact your app, as described in the <a href="{@docRoot}preview/api-overview.html">API
-  Overview</a> and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a>. In testing
-  your app with the preview, there are some specific system changes that you should focus on to
-  ensure that users have a good experience.
-</p>
-
-<p>
-  This guide describes the what and how to test preview features with your app. You should
-  prioritize testing of these specific preview features, due to their high potential impact on your
-  app's behavior:
-</p>
-
-<ul>
-  <li><a href="#runtime-permissions">Permissions</a>
-  </li>
-  <li><a href="#doze-standby">Doze and App Standby</a>
-  </li>
-  <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
-</ul>
-
-<p>
-  For more information about how to set up devices or virtual devices with a preview system image
-  for testing, see <a href="{@docRoot}preview/setup-sdk.html">Set up the Preview SDK</a>.
-</p>
-
-
-<h2 id="runtime-permissions">Testing Permissions</h2>
-
-<p>
-  The new <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> model
-  changes the way that permissions are allocated to your app by the user. Instead of granting all
-  permissions during the install procedure, your app must ask the user for individual permissions
-  at runtime. For users this behavior provides more granular control over each app’s activities, as
-  well as better context for understanding why the app is requesting a specific permission. Users
-  can grant or revoke the permissions granted to an app individually at any time. This feature of
-  the preview is most likely to have an impact on your app's behavior and may prevent some of your
-  app features from working, or they may work in a degraded state.
-</p>
-
-<p class="caution">
-  This change affects all apps running on the new platform, even those not targeting the new
-  platform version. The platform provides a limited compatibility behavior for legacy apps, but you
-  should begin planning your app’s migration to the new permissions model now, with a goal of
-  publishing an updated version of your app at the official platform launch.
-</p>
-
-
-<h3 id="permission-test-tips">Test tips</h3>
-
-<p>
-  Use the following test tips to help you plan and execute testing of your app with the new
-  permissions behavior.
-</p>
-
-<ul>
-  <li>Identify your app’s current permissions and the related code paths.</li>
-  <li>Test user flows across permission-protected services and data.</li>
-  <li>Test with various combinations of granted/revoked permission.</li>
-  <li>Use the {@code adb} tool to manage permssions from the command line:
-    <ul>
-      <li>List permissions and status by group:
-        <pre>adb shell pm list permissions -d -g</pre>
-      </li>
-      <li>Grant or revoke one or more permissions using the following syntax:<br>
-        <pre>adb shell pm [grant|revoke] &lt;permission.name&gt; ...</pre>
-      </li>
-    </ul>
-  </li>
-  <li>Analyze your app for services that use permissions.</li>
-</ul>
-
-<h3 id="permission-test-strategy">Test strategy</h3>
-
-<p>
-  The permissions change affects the structure and design of your app, as well as
-  the user experience and flows you provide to users. You should assess your app’s current
-  permissions use and start planning for the new flows you want to offer. The official release of
-  the platform provides compatibility behavior, but you should plan on updating your app and not
-  rely on these behaviors.
-</p>
-
-<p>
-  Identify the permissions that your app actually needs and uses, and then find the various code
-  paths that use the permission-protected services. You can do this through a combination of
-  testing on the new platform and code analysis. In testing, you should focus on opting in to
-  runtime permissions by changing the app’s {@code targetSdkVersion} to the preview version. For
-  more information, see <a href="{@docRoot}preview/setup-sdk.html#">Set up the Preview SDK</a>.
-</p>
-
-<p>
-  Test with various combinations of permissions revoked and added, to highlight the user flows that
-  depend on permissions. Where a dependency is not obvious or logical you should consider
-  refactoring or compartmentalizing that flow to eliminate the dependency or make it clear why the
-  permission is needed.
-</p>
-
-<p>
-  For more information on the behavior of runtime permissions, testing, and best practices, see the
-  <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> developer
-  preview page.
-</p>
-
-
-<h2 id="doze-standby">Testing Doze and App Standby</h2>
-
-<p>
-  The power saving features of Doze and App Standby limit the amount of background processing that
-  your app can perform when a device is in an idle state or while your app is not in focus. The
-  restrictions the system may impose on apps include limited or no network access,
-  suspended background tasks, suspended Notifications, ignored wake requests, and alarms. To ensure
-  that your app behaves properly with these power saving optimizations, you should test your app by
-  simulating these low power states.
-</p>
-
-<h4 id="doze">Testing your app with Doze</h4>
-
-<p>To test Doze with your app:</p>
-
-<ol>
-<li>Configure a hardware device or virtual device with a M Preview system image.</li>
-<li>Connect the device to your development machine and install your app.</li>
-<li>Run your app and leave it active.</li>
-<li>Simulate the device going into Doze mode by running the following commands:
-
-<pre>
-$ adb shell dumpsys battery unplug
-$ adb shell dumpsys deviceidle step
-$ adb shell dumpsys deviceidle -h
-</pre>
-
-  </li>
-  <li>Observe the behavior of your app when the device is re-activated. Make sure it
-    recovers gracefully when the device exits Doze.</li>
-</ol>
-
-
-<h4 id="standby">Testing apps with App Standby</h4>
-
-<p>To test the App Standby mode with your app:</p>
-
-<ol>
-  <li>Configure a hardware device or virtual device with a M Preview system image.</li>
-  <li>Connect the device to your development machine and install your app.</li>
-  <li>Run your app and leave it active.</li>
-  <li>Simulate the app going into standby mode by running the following commands:
-
-<pre>
-$ adb shell am broadcast -a android.os.action.DISCHARGING
-$ adb shell am set-inactive &lt;packageName&gt; true
-</pre>
-
-  </li>
-  <li>Simulate waking your app using the following command:
-    <pre>$ adb shell am set-inactive &lt;packageName&gt; false</pre>
-  </li>
-  <li>Observe the behavior of your app when it is woken. Make sure it recovers gracefully
-    from standby mode. In particular, you should check if your app's Notifications and background
-    jobs continue to function as expected.</li>
-</ol>
-
-<h2 id="ids">Auto Backup for Apps and Device-Specific Identifiers</h2>
-
-<p>If your app is persisting any device-specific identifiers, such as Google
-Cloud Messaging registration ID, in internal storage,
-make sure to follow best practices to exclude the storage
-location from auto-backup, as described in <a href="{@docRoot}preview/backup/index.html">Auto
-Backup for Apps</a>. </p>
diff --git a/docs/html/samples/new/index.jd b/docs/html/samples/new/index.jd
index 80765c7..a7ffa8c 100644
--- a/docs/html/samples/new/index.jd
+++ b/docs/html/samples/new/index.jd
@@ -4,8 +4,8 @@
 @jd:body
 
 <p>The following code samples were recently published. You can
-download them in the Android SDK Manager under the <b>SDK Samples</b> component
-for API 21.</p>
+download them in the Android SDK Manager under the <b>Samples for SDK</b>
+component for Android 6.0 (API 23).</p>
 
 <p class="note">
   <strong>Note:</strong> The downloadable projects are designed
@@ -14,342 +14,115 @@
 
 <!-- NOTE TO EDITORS: add most recent samples first -->
 
-<h3 id="MediaBrowserService"><a href="/samples/MediaBrowserService/index.html">Media Browser Service</a></h3>
+<h3 id="ActiveNotification">
+  <a href="{@docRoot}samples/ActiveNotifications/index.html">Active
+  Notification</a>
+</h3>
 
 <p>
-This sample is a simple audio media app that exposes its media
-library and provides metadata and playback controls through the new
-MediaBrowserService and MediaSession APIs from API 21.
-The sample is compatible with Android Auto and also provides a basic UI
-when not connected to a car.
+  This sample demonstrates how to use the {@link
+  android.app.NotificationManager} to tell you how many notifications your app
+  is currently showing.
 </p>
 
-<p class="note">
-  <strong>Note:</strong> This sample is compatible with <a
-  href="http://android.com/auto">Android Auto</a>.
-</p>
-
-
-<h3 id="MessagingService"><a href="/samples/MessagingService/index.html">Messaging Service</a></h3>
+<h3 id="AutomaticBackup">
+  <a href="{@docRoot}samples/AutoBackupForApps/index.html">Auto Backup for
+  Apps</a>
+</h3>
 
 <p>
-This sample shows a simple service that sends notifications using
-NotificationCompat. In addition to sending a notification, it also extends
-the notification with a CarExtender to make it compatible with Android Auto.
-Each unread conversation from a user is sent as a distinct notification.
+  Android 6.0 (API level 23) introduces automatic backup for app settings. This
+  sample demonstrates how to add filtering rules to an app to manage settings
+  backup.
 </p>
 
-<p class="note">
-  <strong>Note:</strong> This sample is compatible with <a
-  href="http://android.com/auto">Android Auto</a>.
+<h3 id="Camera2Raw">
+  <a href="{@docRoot}samples/Camera2Raw/index.html">Camera 2 Raw</a>
+</h3>
+
+<p>
+  This sample demonstrates how to use the
+  <a href="{@docRoot}reference/android/hardware/camera2/package-summary.html">
+  <code>Camera2</code></a> API to capture RAW camera buffers and save them as
+  DNG files.
 </p>
 
-
-<h3 id="SpeedTracker"><a href="/samples/SpeedTracker/index.html">Speed Tracker (Wear)</a></h3>
+<h3 id="ConfirmCredential">
+  <a href="{@docRoot}samples/ConfirmCredential/index.html">Confirm
+  Credential</a>
+</h3>
 
 <p>
-This sample uses the FusedLocation APIs of Google Play Services on Android Wear 
-devices that have a hardware GPS built in. In those cases, this sample provides
-a simple screen that shows the current speed of the wearable device. User can
-set a speed limit and if the speed approaches that limit, it changes the color
-to yellow and if it exceeds the limit, it turns red. User can also enable
-recording of coordinates and when it pairs back with the phone, this data
-is synced with the phone component of the app and user can see a track
-made of those coordinates on a map on the phone.
+ This sample demonstrates how to use device credentials as an authentication method in your app.
 </p>
 
-
-<h3 id="AppRestrictionSchema"><a href="/samples/AppRestrictionSchema/index.html">AppRestrictionSchema</a></h3>
+<h3 id="DeviceOwner">
+  <a href="{@docRoot}samples/DeviceOwner/index.html">Device Owner</a>
+</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.
+  This sample demonstrates how to use the device owner features to manage and
+  configure a device.
 </p>
 
-
-<h3 id="AppRestrictionEnforcer"><a href="/samples/AppRestrictionEnforcer/index.html">AppRestrictionEnforcer</a></h3>
+<h3 id="DirectShare">
+  <a href="{@docRoot}samples/DirectShare/index.html">Direct Share</a>
+</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.
+  This sample demonstrates how to provide the
+  <a href="{@docRoot}about/versions/marshmallow/android-6.0.html#direct-share">Direct
+  Share</a> feature. The app shows some options directly in the list of share
+  intent candidates.
 </p>
 
-
-<h3 id="DocumentCentricRelinquishIdentity"><a href="/samples/DocumentCentricRelinquishIdentity/index.html">DocumentCentricRelinquishIdentity</a></h3>
+<h3 id="FingerprintDialog">
+  <a href="{@docRoot}samples/FingerprintDialog/index.html">Fingerprint
+  Dialog</a>
+</h3>
 
 <p>
-This sample shows how to relinquish identity to activities above it in the task stack.
+  This sample demonstrates how to recognize registered fingerprints to
+  authenticate your app's user.
 </p>
 
-
-<h3 id="DocumentCentricApps"><a href="/samples/DocumentCentricApps/index.html">DocumentCentricApps</a></h3>
+<h3 id="MidiScope">
+  <a href="{@docRoot}samples/MidiScope/index.html">MidiScope</a>
+</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.
+  This sample demonstrates how to use the <a href=
+  "{@docRoot}reference/android/media/midi/package-summary.html">MIDI API</a> to
+  receive and process MIDI signals coming from an attached input device.
 </p>
 
-
-<h3 id="HdrViewfinder"><a href="/samples/HdrViewfinder/index.html">HdrViewfinder</a></h3>
+<h3 id="MidiSynth">
+  <a href="{@docRoot}samples/MidiSynth/index.html">MidiSynth</a>
+</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.
+  This sample demonstrates how to use the <a href=
+  "{@docRoot}reference/android/media/midi/package-summary.html">MIDI API</a> to
+  receive and play MIDI messages coming from an attached input device.
 </p>
 
-
-<h3 id="Interpolator"><a href="/samples/Interpolator/index.html">Interpolator</a></h3>
+<h3 id="NfcProvisioning">
+  <a href="{@docRoot}samples/NfcProvisioning/index.html">NFC Provisioning</a>
+</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.
+  This sample demonstrates how to use NFC to provision other devices with a
+  specific device owner.
 </p>
 
-
-<h3 id="DrawableTinting"><a href="/samples/DrawableTinting/index.html">DrawableTinting</a></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>
-
-
-<h3 id="LNotifications"><a href="/samples/LNotifications/index.html">LNotifications</a></h3>
+<h3 id="RuntimePermissions">
+  <a href=
+  "{@docRoot}samples/RuntimePermissions/index.html">RuntimePermissions</a>
+</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>
-
-
-<h3 id="CardView"><a href="/samples/CardView/index.html">CardView</a></h3>
-
-<p>
-This sample demonstrates how to use the CardView UI widget introduced in Android 5.0, using the support library for backward compatibility.
+  This sample shows runtime permissions available in Android 6.0 (API level 23)
+  and higher. Display the log on screen to follow the execution. If executed on
+  an Android 6.0 device, the app displays an additional option to access
+  contacts using an 6.0-only optional permission.
 </p>
-
-
-<h3 id="RecyclerView"><a href="/samples/RecyclerView/index.html">RecyclerView</a></h3>
-
-<p>
-Demonstration of using RecyclerView with a LayoutManager to create a vertical ListView.
-</p>
-
-
-<h3 id="RevealEffectBasic"><a href="/samples/RevealEffectBasic/index.html">RevealEffectBasic</a></h3>
-
-<p>
-A sample demonstrating how to perform a reveal effect for UI elements within the Material Design framework.
-</p>
-
-
-<h3 id="FloatingActionButtonBasic"><a href="/samples/FloatingActionButtonBasic/index.html">FloatingActionButtonBasic</a></h3>
-
-<p>
-This sample shows the two sizes of Floating Action Buttons and how to interact with
-them.
-</p>
-
-
-<!--
-<h3 id="">SampleName</h3>
-
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
-
-<p>
-**description**
-</p>
--->
-
-<h3 id="JobSchedulerSample"><a href="/samples/JobScheduler/index.html">JobScheduler</a></h3>
-
-<p>
-This sample app allows the user to schedule jobs through the UI, and shows
-visual cues when the jobs are executed.
-</p>
-
-
-<h3 id="AndroidTVLeanbackSample"><a href="https://github.com/googlesamples/androidtv-leanback">AndroidTVLeanbackSample</a></h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample demonstrates use of the Android TV Leanback Support Library.
-</p>
-
-<h3 id="Visual-Game-Controller"><a href="https://github.com/googlesamples/androidtv-VisualGameController">Visual-Game-Controller</a></h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample displays events received from a game controller shown on the screen.
-</p>
-
-
-<h3 id="GameControllerSample"><a href="https://github.com/googlesamples/androidtv-GameController/">GameControllerSample</a></h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample implements a multi-player game, demonstrating game controller input
-handling.
-</p>
-
-
-<h3 id="ClippingBasic"><a href="/samples/ClippingBasic/index.html">ClippingBasic</a></h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample demonstrates clipping on a {@link android.view.View}.
-</p>
-
-<div class="figure" style="width:220px">
-  <img src="{@docRoot}samples/images/JobSchedulerSample.png"
-      srcset="{@docRoot}samples/images/JobSchedulerSample@2x.png 2x"
-      alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure 1.</strong> The JobSchedulerSample sample app.
-  </p>
-</div>
-
-
-<h3 id="ElevationDrag"><a href="/samples/ElevationDrag/index.html">ElevationDrag</a></h3>
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>This sample demonstrates a drag and drop action on different shapes.
-Elevation and z-translation are used to render the shadows. The views are
-clipped using different outlines.</p>
-
-
-<h3 id="ElevationBasic"><a href="/samples/ElevationBasic/index.html">ElevationBasic</a></h3>
-<!--
-<div class="figure" style="width:220px">
-<img src="" srcset="@2x.png 2x" alt="" height="375" />
-    <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>
-This sample demonstrates two alternative ways to move a view in the z-axis:</p>
-
-<ul>
-  <li>With a fixed elevation, using XML.</li>
-  <li>Raising the elevation when the user taps on it, using
-      <code>setTranslationZ()</code>.</li>
-</ul>
-
-
-<h3 id="ActivitySceneTransitionBasic"><a href="/samples/ActivitySceneTransitionBasic/index.html">ActivitySceneTransitionBasic</a></h3>
-<div class="figure" style="width:220px">
-  <img src="{@docRoot}samples/images/ActivitySceneTransitionBasic.png"
-      srcset="{@docRoot}samples/images/ActivitySceneTransitionBasic@2x.png 2x"
-      alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure 2.</strong> The ActivitySceneTransitionBasic sample app.
-  </p>
-  </div>
-
-<p> This sample demonstrates how to the use {@link android.app.Activity} scene
-transitions when transitioning from one activity to another. Uses a combination
-of <code>moveImage</code> and <code>changeBounds</code> to nicely transition
-from a grid of images to an activity with a large image and detail text. </p>
-
-
-<h3 id="Camera2Video"><a href="/samples/Camera2Video/index.html">Camera2Video</a></h3>
-<!--
-<div class="figure" style="width:220px">
-<img src="" srcset="@2x.png 2x" alt="" height="375" />
-    <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>This sample demonstrates how to record video using the Camera2 API.</p>
-
-
-<h3 id="Camera2Basic"><a href="/samples/Camera2Basic/index.html">Camera2Basic</a></h3>
-
-<!--
-<div class="figure" style="width:220px">
-  <img src="" srcset="@2x.png 2x" alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure n.</strong> Single sentence summarizing the figure.
-  </p>
-</div>
--->
-
-<p>This sample demonstrates the basic use of the Camera2 API. The sample code
-demonstrates how you can display camera preview and take pictures.</p>
-
-
-<h3 id="BasicManagedProfile"><a href="/samples/BasicManagedProfile/index.html">BasicManagedProfile</a></h3>
-<div class="figure" style="width:220px">
-  <img src="{@docRoot}samples/images/BasicManagedProfile.png"
-     srcset="{@docRoot}samples/images/BasicManagedProfile@2x.png 2x"
-     alt="" height="375" />
-  <p class="img-caption">
-    <strong>Figure 3.</strong> The BasicManagedProfile sample app.
-  </p>
-</div>
-
-<p>This sample demonstrates how to create a managed profile. You can also:</p>
-<ul>
-  <li>Enable or disable other apps, and set restrictions on them.</li>
-  <li>Configure intents to be forwarded between the primary account and the
-   managed profile.</li>
-  <li>Wipe all the data associated with the managed profile.</li>
-</ul>
-
-<p class="note"><strong>Note:</strong> There can be only one managed profile on
-  a device at a time.</p>
-
diff --git a/docs/html/tools/help/shell.jd b/docs/html/tools/help/shell.jd
index d2de40e..40f0771 100644
--- a/docs/html/tools/help/shell.jd
+++ b/docs/html/tools/help/shell.jd
@@ -570,6 +570,7 @@
     <li>{@code -s}: Install package on the shared mass storage (such as sdcard).
     <li>{@code -f}: Install package on the internal system memory.
     <li>{@code -d}: Allow version code downgrade.
+    <li>{@code -g}: Grant all permissions listed in the app manifest.
   </ul>
 </td>
 </tr>
@@ -622,21 +623,23 @@
 
 <tr>
 <td><code>
-grant &lt;PACKAGE_PERMISSION>
+grant &lt;PACKAGE_NAME&gt; &lt;PERMISSION&gt;
 </code></td>
-<td>Grant permissions
-  to applications.  Only optional permissions the application has
-  declared can be granted.
+<td>Grant a permission to an app. On devices running Android 6.0 (API level 23)
+and higher, may be any permission declared in the app manifest. On devices
+running Android 5.1 (API level 22) and lower, must be an optional permission defined by the
+app.
 </td>
 </tr>
 
 <tr>
 <td><code>
-revoke &lt;PACKAGE_PERMISSION>
+revoke &lt;PACKAGE_NAME&gt; &lt;PERMISSION&gt;
 </code></td>
-<td>Revoke permissions
-  to applications.  Only optional permissions the application has
-  declared can be revoked.
+<td>Revoke a permission from an app. On devices running Android 6.0 (API level
+23) and higher, may be any permission declared in the app manifest. On devices
+running Android 5.1 (API level 22) and lower, must be an optional permission defined by the
+app.
 </td>
 </tr>
 
diff --git a/docs/html/preview/features/app-linking.jd b/docs/html/training/app-links/index.jd
similarity index 98%
rename from docs/html/preview/features/app-linking.jd
rename to docs/html/training/app-links/index.jd
index d603c96..3b553ad 100644
--- a/docs/html/preview/features/app-linking.jd
+++ b/docs/html/training/app-links/index.jd
@@ -3,20 +3,21 @@
 page.keywords=applinking, deeplinks, intents
 @jd:body
 
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
+<div id="tb-wrapper">
+  <div id="tb">
+    <h2>This lesson teaches you to</h2>
+    <ol>
         <li><a href="#url-handling">Understanding URL Request Handling</a> </li>
         <li><a href="#intent-handler">Create an Intent Handler for URLs</a></li>
         <li><a href="#request-verify">Request App Links Verification</a></li>
         <li><a href="#web-assoc">Declare Website Associations</a></li>
         <li><a href="#testing">Testing App Links</a></li>
-      </ol>
+    </ol>
   </div>
 </div>
 
 
+
 <p>
   The M Developer Preview introduces a new option for handling website links. It allows clicked
   links to go directly to the website's official app &mdash; instead of asking the user to choose 
diff --git a/docs/html/preview/backup/index.jd b/docs/html/training/backup/auto-backup.jd
similarity index 95%
rename from docs/html/preview/backup/index.jd
rename to docs/html/training/backup/auto-backup.jd
index 6735379..a28849e 100644
--- a/docs/html/preview/backup/index.jd
+++ b/docs/html/training/backup/auto-backup.jd
@@ -4,18 +4,24 @@
 page.image=images/cards/card-auto-backup_2x.png
 @jd:body
 
-<div id="qv-wrapper">
-  <div id="qv">
-    <h2>In this document</h2>
-      <ol>
-        <li><a href="#overview">Overview</a></li>
-        <li><a href="#configuring">Configuring Data Backup</a></li>
-        <li><a href="#testing">Testing Backup Configuration</a></li>
-        <li><a href="#issues">Known Issues</a></li>
-      </ol>
+<div id="tb-wrapper">
+  <div id="tb">
+    <h2>This lesson teaches you to</h2>
+    <ol>
+        <li><a href="#configuring">Configure Data Backup</a></li>
+        <li><a href="#testing">Test Backup Configuration</a></li>
+        <li><a href="#issues">Anticipate Known Issues</a></li>
+    </ol>
+    <h2>You should also read</h2>
+    <ul>
+      <li><a
+        href="http://developer.android.com/guide/topics/data/backup.html">Data
+        Backup</a></li>
+    </ul>
   </div>
 </div>
 
+
 <p>
   Users often invest significant time and effort creating data and setting preferences within
   apps. Preserving that data for users if they replace a broken device or upgrade to a new one is
diff --git a/docs/html/training/cloudsync/backupapi.jd b/docs/html/training/backup/backupapi.jd
similarity index 100%
rename from docs/html/training/cloudsync/backupapi.jd
rename to docs/html/training/backup/backupapi.jd
diff --git a/docs/html/training/cloudsync/index.jd b/docs/html/training/backup/index.jd
similarity index 100%
rename from docs/html/training/cloudsync/index.jd
rename to docs/html/training/backup/index.jd
diff --git a/docs/html/training/monitoring-device-state/battery-monitoring.jd b/docs/html/training/monitoring-device-state/battery-monitoring.jd
index f4dadff..db75aaf 100644
--- a/docs/html/training/monitoring-device-state/battery-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/battery-monitoring.jd
@@ -3,12 +3,14 @@
 parent.link=index.html
 
 trainingnavtop=true
-next.title=Determining and Monitoring the Docking State and Type
-next.link=docking-monitoring.html
-
+parent.link=index.html
+previous.title=Optimizing for Doze and App Standby
+previous.link=doze-standby.html
+next.title= Determining and Monitoring the Connectivity Status
+next.link=connectivity-monitoring.html
 @jd:body
- 
-<div id="tb-wrapper"> 
+
+<div id="tb-wrapper">
 <div id="tb">
 
 <h2>This lesson teaches you to</h2>
@@ -24,9 +26,9 @@
   <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
 </ul>
 
-</div> 
 </div>
- 
+</div>
+
 <p>When you're altering the frequency of your background updates to reduce the effect of those
 updates on battery life, checking the current battery level and charging state is a good place to
 start.</p>
@@ -41,8 +43,8 @@
 even stopping&mdash;your updates when the battery charge is nearly exhausted.</p>
 
 
-<h2 id="DetermineChargeState">Determine the Current Charging State</h2> 
- 
+<h2 id="DetermineChargeState">Determine the Current Charging State</h2>
+
 <p>Start by determining the current charge status. The {@link android.os.BatteryManager}
 broadcasts all battery and charging details in a sticky {@link android.content.Intent} that includes
 the charging status.</p>
@@ -74,7 +76,7 @@
 further if the battery is discharging.</p>
 
 
-<h2 id="MonitorChargeState">Monitor Changes in Charging State</h2> 
+<h2 id="MonitorChargeState">Monitor Changes in Charging State</h2>
 
 <p>The charging status can change as easily as a device can be plugged in, so it's important to
 monitor the charging state for changes and alter your refresh rate accordingly.</p>
@@ -99,11 +101,11 @@
 
 <pre>public class PowerConnectionReceiver extends BroadcastReceiver {
     &#64;Override
-    public void onReceive(Context context, Intent intent) { 
+    public void onReceive(Context context, Intent intent) {
         int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
         boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
                             status == BatteryManager.BATTERY_STATUS_FULL;
-    
+
         int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
         boolean usbCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_USB;
         boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;
@@ -111,7 +113,7 @@
 }</pre>
 
 
-<h2 id="CurrentLevel">Determine the Current Battery Level</h2> 
+<h2 id="CurrentLevel">Determine the Current Battery Level</h2>
 
 <p>In some cases it's also useful to determine the current battery level. You may choose to reduce
 the rate of your background updates if the battery charge is below a certain level.</p>
@@ -125,7 +127,7 @@
 float batteryPct = level / (float)scale;</pre>
 
 
-<h2 id="MonitorLevel">Monitor Significant Changes in Battery Level</h2> 
+<h2 id="MonitorLevel">Monitor Significant Changes in Battery Level</h2>
 
 <p>You can't easily continually monitor the battery state, but you don't need to.</p>
 
@@ -154,3 +156,6 @@
 lesson shows you how to determine the current dock state and monitor for changes in device
 docking.</p>
 
+
+
+
diff --git a/docs/html/training/monitoring-device-state/docking-monitoring.jd b/docs/html/training/monitoring-device-state/docking-monitoring.jd
index 5c8bfd6..0994b63 100644
--- a/docs/html/training/monitoring-device-state/docking-monitoring.jd
+++ b/docs/html/training/monitoring-device-state/docking-monitoring.jd
@@ -3,14 +3,14 @@
 parent.link=index.html
 
 trainingnavtop=true
-previous.title= Monitoring the Battery Level and Charging State
-previous.link=battery-monitoring.html
+next.title=Optimizing for Power-Saving
+next.link=battery-optimization.html
 next.title= Determining and Monitoring the Connectivity Status
 next.link=connectivity-monitoring.html
 
 @jd:body
 
-<div id="tb-wrapper"> 
+<div id="tb-wrapper">
 <div id="tb">
 
 <h2>This lesson teaches you to</h2>
@@ -26,7 +26,7 @@
   <li><a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>
 </ul>
 
-</div> 
+</div>
 </div>
 
 <p>Android devices can be docked into several different kinds of docks. These include car or home
@@ -42,8 +42,8 @@
 query if the device is docked or not, and if so, in which kind of dock.</p>
 
 
-<h2 id="CurrentDockState">Determine the Current Docking State</h2> 
- 
+<h2 id="CurrentDockState">Determine the Current Docking State</h2>
+
 <p>The dock-state details are included as an extra in a sticky broadcast of the {@link
 android.content.Intent#ACTION_DOCK_EVENT} action. Because it's sticky, you don't need to register a
 {@link android.content.BroadcastReceiver}. You can simply call {@link
@@ -59,9 +59,9 @@
 boolean isDocked = dockState != Intent.EXTRA_DOCK_STATE_UNDOCKED;</pre>
 
 
-<h2 id="DockType">Determine the Current Dock Type</h2> 
+<h2 id="DockType">Determine the Current Dock Type</h2>
 
-<p>If a device is docked, it can be docked in any one of four different type of dock: 
+<p>If a device is docked, it can be docked in any one of four different type of dock:
 <ul><li>Car</li>
 <li>Desk</li>
 <li>Low-End (Analog) Desk</li>
@@ -72,12 +72,12 @@
 being digital or analog specifically:</p>
 
 <pre>boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
-boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK || 
+boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
                  dockState == EXTRA_DOCK_STATE_LE_DESK ||
                  dockState == EXTRA_DOCK_STATE_HE_DESK;</pre>
 
 
-<h2 id="MonitorDockState">Monitor for Changes in the Dock State or Type</h2> 
+<h2 id="MonitorDockState">Monitor for Changes in the Dock State or Type</h2>
 
 <p>Whenever the device is docked or undocked, the {@link
 android.content.Intent#ACTION_DOCK_EVENT} action is broadcast. To monitor changes in the
diff --git a/docs/html/training/monitoring-device-state/doze-standby.jd b/docs/html/training/monitoring-device-state/doze-standby.jd
new file mode 100644
index 0000000..8cb24c1
--- /dev/null
+++ b/docs/html/training/monitoring-device-state/doze-standby.jd
@@ -0,0 +1,505 @@
+page.title=Optimizing for Doze and App Standby
+page.metaDescription=Test and optimize your app for the power-saving features in Android 6.0.
+page.tags="doze", "app standby", "marshmallow", "alarms"
+meta.tags="battery", "marshmallow", "alarms"
+page.image=/images/cards/doze_16-9_2x.png
+page.article=true
+parent.link=index.html
+
+trainingnavtop=true
+next.title=Monitoring the Battery Level and Charging State
+next.link=battery-monitoring.html
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+    <h2>In this document</h2>
+    <ol>
+      <li><a href="#understand_doze">Understanding Doze</a>
+      <ol>
+        <li><a href="#restrictions">Doze Restrictions</a></li>
+        <li><a href="#assessing_your_app">Assessing Your App</a></li>
+        <li><a href="#using_gcm">Using GCM to Interact with Your App</a></li>
+        <li><a href="#support_for_other_use">Support for Other Use-Cases</a></li>
+      </ol>
+      </li>
+      <li><a href="#understand_app_standby">Understanding App Standby</a></li>
+      <li><a href="#testing_doze_and_app_standby">Testing</a>
+      <ol>
+        <li><a href="#testing_your_app_with_doze">With Doze</a></li>
+        <li><a href="#testing_your_app_with_app_standby">With App Standby</a></li>
+      </ol>
+      </li>
+      <li><a href="#appendix">Appendix</a></li>
+    </ol>
+  </div>
+</div>
+
+<p>
+  Starting from Android 6.0 (API level 23), Android introduces two
+  power-saving features that extend battery life for users by managing how apps behave when a
+  device is not plugged into a power source. <em>Doze</em> reduces power consumption by deferring
+  background
+  CPU and network activity for apps when the device is unused for long periods
+  of time. <em>App Standby</em> defers background network activity for apps
+  that are not recently used.
+</p>
+
+<p>
+  Doze and App Standby manage the behavior of all apps running on Android 6.0
+  or higher, regardless whether they are specifically targeting API level 23.
+  To ensure the best experience for users, test your app in Doze and App
+  Standby modes and make any necessary adjustments to your code. The sections
+  below provide details.
+</p>
+
+
+<h2 id="understand_doze">Understanding Doze</h2>
+<p>
+  If a user leaves a device unplugged and stationary for a period of time, with
+  the screen off, the device enters Doze mode. In Doze mode, the system
+  attempts to conserve battery by restricting apps ‘ access to network and
+  CPU-intensive services. It prevents apps from accessing the network and
+  defers their jobs, syncs, and standard alarms.
+</p>
+
+<p>
+  Periodically, the system exits Doze for a brief time to let apps complete
+  their deferred activities. During this <em>maintenance window</em>, the
+  system runs all pending syncs, jobs, and alarms and lets apps access the
+  network.
+</p>
+
+<div style="margin:1em 0em;">
+  <img src="{@docRoot}images/training/doze.png">
+  <p class="img-caption" style="text-align:center;">
+    Doze provides a recurring maintenance window for apps to use the network
+    and handle pending activities.
+  </p>
+</div>
+
+<p>
+  At the conclusion of each maintenance window, the system again enters Doze,
+  suspending network access and deferring jobs, syncs, and alarms. Over time,
+  the system schedules maintenance windows less and less frequently, helping to
+  save battery in cases of longer-term inactivity when the device is not
+  connected to a charger.
+</p>
+
+
+<p>
+  As soon as the user wakes the device by moving it, turning on the screen, or
+  connecting a charger, the system exits Doze and all apps return to normal
+  activity.
+</p>
+
+
+<h3 id="restrictions">Doze restrictions</h3>
+
+<p>
+  The following restrictions apply to your apps while in Doze:
+</p>
+
+<ul>
+  <li>Network access is suspended
+  </li>
+
+  <li>The system ignores {@link android.os.PowerManager.WakeLock Wakelocks}.
+  </li>
+
+  <li>Standard {@link android.app.AlarmManager} alarms (including {@link
+  android.app.AlarmManager#setExact(int, long, android.app.PendingIntent) setExact()} and
+  {@link android.app.AlarmManager#setWindow(int, long, long,
+  android.app.PendingIntent) setWindow()} are deferred to the next mainenance window.
+  </li>
+
+  <li style="list-style: none; display: inline">
+    <ul>
+      <li>If you need to set alarms that fire while in Doze, you can use {@link
+      android.app.AlarmManager#setAndAllowWhileIdle(int,long,android.app.PendingIntent)
+      setAndAllowWhileIdle()}
+      or {@link android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
+      android.app.PendingIntent) setExactAndAllowWhileIdle()}.
+      </li>
+
+      <li>Alarms set with {@link
+      android.app.AlarmManager#setAlarmClock(android.app.AlarmManager.AlarmClockInfo,
+      android.app.PendingIntent) setAlarmClock()} continue to fire normally &mdash; the system
+      exits Doze shortly before those alarms fire.
+      </li>
+    </ul>
+  </li>
+
+  <li>The system does not perform Wi-Fi scans.
+  </li>
+
+  <li>The system does not permit syncs or jobs for your sync adapters.
+  </li>
+
+  <li>The system does not allow {@link android.app.job.JobScheduler} to run.
+  </li>
+</ul>
+
+
+<div id="qv-wrapper">
+<div id="qv" style="width:300px">
+<h2>Doze checklist</h2>
+<ol>
+<ul>
+  <li>If possible, use GCM for <a href=
+  "https://developers.google.com/cloud-messaging/downstream">downstream
+  messaging</a>
+  </li>
+
+  <li>If your users must see a notification right away, make sure to use a <a href=
+  "https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message">GCM
+  high priority message</a>.
+  </li>
+
+  <li>Place enough information in the <a href=
+  "https://developers.google.com/cloud-messaging/concept-options#payload">message
+  payload</a> to show in the notification; do not rely on subsequent network
+  access.
+  </li>
+
+  <li>Set critical alarms with {@link
+  android.app.AlarmManager#setAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setAndAllowWhileIdle()} and {@link
+  android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setExactAndAllowWhileIdle()}.
+  </li>
+
+  <li>
+    <a href="#testing_with_doze">Test your app in Doze</a>
+  </li>
+</ul>
+</ol>
+</div>
+</div>
+
+<h3 id="assessing_your_app">Assessing your app</h3>
+
+<p>
+  To assess your app in Doze, you can use adb commands to force the system to
+  enter and exit Doze and observe your app’s behavior. See the Testing section
+  for details.
+</p>
+
+<p>
+  Doze can affect apps differently, depending on the capabilities they offer
+  and the services they use. Many apps will function normally across Doze
+  cycles without modification. In some cases, you will need to optimize the way
+  that your app manages network, alarms, jobs, and syncs. Apps should be able
+  to efficiently manage activities during each maintenance window.
+</p>
+<p>
+  In particular, activities managed by AlarmManager alarms and timers may be
+  affected, since legacy alarms (API level 22 and lower) do not fire when the
+  system is in Doze.
+</p>
+
+<p>
+  To help with scheduling alarms, Android 6.0 Marshmallow introduces two new
+  AlarmManager methods &mdash; {@link
+  android.app.AlarmManager#setAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setAndAllowWhileIdle()} and {@link
+  android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setExactAndAllowWhileIdle()}. With these methods,
+  you can set alarms that will fire even if the device is Doze.
+</p>
+
+<p>Keep in mind these characteristics of alarm frequency, however: </p>
+
+<ul>
+  <li>The system restricts {@link
+  android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setExactAndAllowWhileIdle()} alarms to firing at most once per 10 seconds per
+  app while in Doze, and at most once per 5 seconds otherwise.
+  </li>
+
+  <li>The system restricts {@link
+  android.app.AlarmManager#setAndAllowWhileIdle(int, long,
+  android.app.PendingIntent) setAndAllowWhileIdle()} alarms to firing at most once per 15 minutes per
+  app while in Doze.
+  </li>
+</ul>
+
+<p>
+  The Doze restriction on network access is also likely to affect your app,
+  especially if the app relies on realtime messages such as tickles or
+  notifications. If your app requires a persistent connection to the network to
+  receive messages, you should use Google Cloud Messaging (GCM) if possible,
+  <a href="#using_gcm">as described below</a>.
+</p>
+
+
+<h3 id="using_gcm">Using GCM to interact with app while the device is idle</h3>
+
+<p>
+  <a href="https://developers.google.com/cloud-messaging/">Google Cloud
+  Messaging (GCM)</a> is a cloud-to-device service that lets you support
+  realtime downstream messaging between backend messaging services and apps on
+  Android devices. GCM provides a single persistent connection to the cloud
+  that can be shared among all apps needing realtime messaging. This shared
+  connection significantly optimizes battery by making it unnecessary for
+  multiple apps to each maintain a separate persistent connection, which can
+  deplete the battery rapidly.
+</p>
+
+<p>
+  If your app requires realtime integration with a backend service, it’s highly
+  recommended that you <strong>use GCM if possible</strong>, rather than
+  maintaining your own persistent network connection. Also, GCM is optimized to
+  work with Doze and App Standby idle modes by means of <a href=
+  "https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message">
+  high-priority GCM messages</a>.
+</p>
+
+<p>
+  GCM high-priority messages let you reliably wake your app to access the
+  network, even if the user’s device is in Doze or the app is in App Standby.
+  In Doze or App Standby mode, the system delivers the message and gives the
+  app temporary access to network services and partial wakelocks, then returns
+  to idle state.
+</p>
+
+<p>
+  High-priority GCM messages don’t wake the device from Doze and they don’t
+  affect the state of any other app, This means that you can use them to
+  efficiently communicate with your app while minimizing battery impacts across
+  the system and device.
+</p>
+
+<p>
+  As a general best practice, if your app requires downstream messaging, you
+  should use GCM. If you are already using GCM, make sure that you use
+  high-priority messages to for critical messages, since this will reliably
+  wake apps even when the device is in Doze.
+</p>
+
+<h3 id="support_for_other_use-cases">Support for other use-cases</h3>
+
+<p>
+  Almost all apps should be able to support Doze by managing network, alarms,
+  jobs, and syncs properly and using GCM high-priority messages. For a narrow
+  set of use cases, this might not be sufficient. For those, the system
+  provides a configurable whitelist of apps that are <strong>partially
+  exempt</strong> from Doze and App Standby optimizations.
+</p>
+
+<p>
+  An app that is whitelisted can use the network and hold {@link
+  android.os.PowerManager#PARTIAL_WAKE_LOCK partial wake locks} during Doze and
+  App Standby. However, <strong>other restrictions still apply</strong> to the
+  whitelisted app, just as they do to other apps. For example, the whitelisted
+  app’s jobs and syncs are deferred and its regular AlarmManager alarms do not
+  fire.
+</p>
+
+<p>
+  Users can manually configure the whitelist in <strong>Settings &gt; Battery
+  &gt; Battery Optimization.</strong> Alternatively, the system provides
+  low-friction ways for apps to ask users to whitelist them.
+</p>
+
+<ul>
+  <li>Apps can fire the {@link
+  android.provider.Settings#ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS} intent
+  to take the user directly to Battery Optimization settings to add the app.
+  </li>
+
+  <li>Apps holding the {@link
+  android.Manifest.permission#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} permission
+  can trigger a system dialog to let the user add the app to the whitelist
+  directly, without going to settings. The app fires a {@link
+  android.provider.Settings#ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} Intent
+  to trigger dialog.
+  </li>
+
+  <li>An app can check whether it is currently on the exemption whitelist by
+  calling {@link
+  android.os.PowerManager#isIgnoringBatteryOptimizations(java.lang.String)
+  isIgnoringBatteryOptimizations()}.
+  </li>
+
+  <li>The user can manually remove apps from the whitelist as needed.
+  </li>
+</ul>
+
+<p>Before asking the user to add your app to the whitelist, make sure the app
+
+meets the acceptable use-cases for whitelisting listed below. </p>
+
+
+<p class="caution">
+  <strong>Note:</strong> Google Play policies prohibit apps from requesting
+  direct exemption from Power Management features in Android 6.0+ (Doze and App
+  Standby) unless the core function of the app is adversely affected.
+</p>
+
+
+<h2 id="understand_app_standby">Understanding App Standby</h2>
+
+<p>
+  App Standby allows the system to determine that an app is idle when the user
+  is not actively using it. The system makes this determination when the user
+  does not touch the app for a certain period of time and none of the following
+  conditions applies:
+</p>
+
+<ul>
+  <li>The user explicitly launches the app.
+  </li>
+
+  <li>The app has a process currently in the foreground (either as an activity
+  or foreground service, or in use by another activity or foreground service).
+  </li>
+
+  <li>The app generates a notification that users see on the lock screen or in
+  the notification tray.
+  </li>
+</ul>
+
+<p>
+  When the user plugs the device into a power supply, the system releases apps
+  from the standby state, allowing them to freely access the network and to
+  execute any pending jobs and syncs. If the device is idle for long periods of
+  time, the system allows idle apps network access around once a day.
+</p>
+
+
+<h2 id="testing_doze_and_app_standby>Testing with Doze and App Standby</h2>
+
+<p>
+  The power-saving features of Doze and App Standby limit the amount of
+  background processing that your app can perform when a device is in an idle
+  state or while your app is not in focus. The restrictions the system may
+  impose on apps include limited or no network access, suspended background
+  tasks, suspended Notifications, ignored wake requests, and alarms. To ensure
+  that your app behaves properly with these power-saving optimizations, you
+  should test it by simulating these low-power states.
+</p>
+
+<h3 id="testing_your_app_with_doze">Testing your app with Doze</h3>
+
+<p>
+  The power-saving features of Doze and App Standby limit the amount of
+  background processing that your app can perform when a device is in an idle
+  state or while your app is not in focus. The restrictions the system may
+  impose on apps include limited or no network access, suspended background
+  tasks, suspended Notifications, ignored wake requests, and alarms. To ensure
+  that your app behaves properly with these power-saving optimizations, you
+  should test it by simulating these low-power states.
+</p>
+
+
+
+<p>You can test Doze mode by following these steps:</p>
+
+<ol>
+  <li>Configure a hardware device or virtual device with an Android 6.0 (API
+  level 23) or higher system image.
+  </li>
+
+  <li>Connect the device to your development machine and install your app.
+  </li>
+
+  <li>Run your app and leave it active.
+  </li>
+
+  <li>Force the system to cycle through Doze modes by running the following
+  commands:
+  </li>
+
+  <pre class="no-pretty-print">$ adb shell dumpsys battery unplug
+$ adb shell dumpsys deviceidle step
+$ adb shell dumpsys deviceidle -h</pre>
+  <!--(TODO: App Standby tells how to wake app. We should explain this here, as well.)-->
+  </li>
+
+  <li> Observe the behavior of your app after you reactivate the device. Make
+  sure the app recovers gracefully when the device exits Doze.
+  </li>
+</ol>
+
+<h3 id="testing_your_app_with_app_standby">Testing your app with App Standby</h3>
+
+<p>To test the App Standby mode with your app:</p>
+
+<ol>
+  <li> Configure a hardware device or virtual device with an Android 6.0 (API level
+  23) or higher system image.
+  </li>
+  <li> Connect the device to your development machine and install your app.</li>
+  <li> Run your app and leave it active.</li>
+  <li> Force the app into App Standby mode by running the following commands:
+
+  <pre class="no-pretty-print">$ adb shell dumpsys battery unplug
+$ adb shell am set-inactive &lt;packageName&gt; true</pre>
+  <li>Simulate waking your app using the following commands:
+
+  <pre class="no-pretty-print">$ adb shell am set-inactive &lt;packageName&gt; false
+$ adb shell am get-inactive &lt;packageName&gt;</pre>
+  <!--// TODO: Testing page didn't have this fourth line. Do we need it? If not,
+  change "following commands" to "following command". -->
+  </li>
+  <li>Observe the behavior of your app after waking it. Make sure the app recovers gracefully
+    from standby mode. In particular, you should check if your app's Notifications and background
+    jobs continue to function as expected.
+  </li>
+</ol>
+
+
+<h2 id="appendix">Appendix. Example Whitelisting Use-Cases</h2>
+
+<p>The table below highlights the acceptable use-cases for requesting or being on
+   the Battery Optimizations exceptions whitelist. For more information, see
+   <a href="">Other supported use cases</a>.</p>
+
+   <p>In general, your app should not be on the whitelist Doze and
+   App Standby break the core function of the app and you cannot use GCM high-priority
+   messages because of a technical reason. </p>
+
+<table>
+ <tr>
+    <th>Type</td>
+    <th>Use-case</td>
+    <th>Can use GCM?</td>
+    <th>Whitelisting acceptable?</td>
+    <th>Notes</td>
+ </tr>
+
+ <tr>
+    <td rowspan="2">Instant messaging, chat, or calling app. </td>
+    <td rowspan="3">Requires delivery of realtime messages to users while device is in Doze or app
+    is in App Standby.</td>
+    <td>Yes, using GCM</td>
+    <td rowspan="2" style="color:red">Not Acceptable</td>
+    <td rowspan="2">Should use GCM high-priority messages to wake the app and access the netowrk.</td>
+ </tr>
+
+ <tr>
+    <td>Yes, but wants to use another messaging service for non-technical reason. </td>
+ </tr>
+
+ <tr>
+    <td rowspan="1">Instant messaging, chat, or calling app;
+    enterprise VOIP apps</td>
+    <td>No, can not use GCM because of technical dependency on another messaging
+    service</td>
+    <td style="color:green">Acceptable</td>
+    <td></td>
+ </tr>
+
+ <tr>
+    <td>Calendar or timer app</td>
+    <td>Needs to notify user</td>
+    <td></td>
+    <td style="color:red">Not acceptable</td>
+    <td>Use {@link android.app.AlarmManager} and {@link android.app.job.JobScheduler}
+    APIs to optmize notifications, sync, etc.</td>
+ </tr>
+
+</table>
+
+
diff --git a/docs/html/training/monitoring-device-state/index.jd b/docs/html/training/monitoring-device-state/index.jd
index 949c1da..fce9f81 100644
--- a/docs/html/training/monitoring-device-state/index.jd
+++ b/docs/html/training/monitoring-device-state/index.jd
@@ -11,7 +11,6 @@
 
 <h2>Dependencies and prerequisites</h2> 
 <ul>
-  <li>Android 2.0 (API level 5) or higher</li>
   <li>Experience with <a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a></li>
 </ul>
 
@@ -24,7 +23,7 @@
 </div>
 
 <p>For your app to be a good citizen, it should seek to limit its impact on the battery life of its
-host device. After this class you will be able to build apps that monitor modify their functionality
+host device. After this class you will be able to build apps that modify their functionality
 and behavior based on the state of the host device.</p>
 
 <p>By taking steps such as disabling background service updates when you lose connectivity, or
@@ -38,6 +37,10 @@
 will want to jump to a lesson or not.--> 
  
 <dl>
+  <dt><b><a href="doze-standby.html">Optimiing for Doze and App Standby</a></b></dt>
+  <dd>Learn how to test and optimize your app for the power-management features introduced in
+  Android 6.0 Marshmallow.</dd>
+
   <dt><b><a href="battery-monitoring.html">Monitoring the Battery Level and Charging State</a></b></dt>
   <dd>Learn how to alter your app's update rate by determining, and monitoring, the current battery
 level and changes in charging state.</dd>
diff --git a/docs/html/training/permissions/best-practices.jd b/docs/html/training/permissions/best-practices.jd
new file mode 100644
index 0000000..46521cb
--- /dev/null
+++ b/docs/html/training/permissions/best-practices.jd
@@ -0,0 +1,245 @@
+page.title=Permissions Best Practices
+page.tags=permissions
+helpoutsWidget=true
+
+@jd:body
+
+<div id="tb-wrapper">
+  <div id="tb">
+
+<h2>In this document</h2>
+<ul>
+  <li><a href="#perms-vs-intents">Consider Using an Intent</a></li>
+
+  <li><a href="#dont-overwhelm">Don't Overwhelm the User</a></li>
+
+  <li><a href="#explain">Explain Why You Need Permissions</a></li>
+
+  <li><a href="#testing">Test for Both Permissions Models</a></li>
+
+</ul>
+
+<h2>You should also read</h2>
+  <ul>
+    <li><a href="{@docRoot}training/basics/intents/index.html">Interacting
+      with Other Apps</a></li>
+  </ul>
+
+</div>
+</div>
+
+
+<p>
+It's easy for an app to overwhelm a user with permission requests. If a user
+finds the app frustrating to use, or the user is worried about what the app
+might be doing with the user's information, they may avoid using the app or
+uninstall it entirely. The following best practices can help you avoid such
+bad user experiences.
+</p>
+
+<h2 id="perms-vs-intents">Consider Using an Intent</h2>
+
+<p>
+  In many cases, you can choose between two ways for your app to perform a
+  task. You can have your app ask for permission to perform the operation
+  itself. Alternatively, you can have the app use an <em>intent</em> to have
+  another app perform the task.
+</p>
+
+<p>
+  For example, suppose your app needs to be able to take pictures with the
+  device camera. Your app can request the {@link
+  android.Manifest.permission#CAMERA CAMERA} permission, which allows your app
+  to access the camera directly. Your app would then use the camera APIs to
+  control the camera and take a picture. This approach gives your app full
+  control over the photography process, and lets you incorporate the camera UI
+  into your app.
+</p>
+
+<p>
+  However, if you don't need such complete control, you can use an {@link
+  android.provider.MediaStore#ACTION_IMAGE_CAPTURE ACTION_IMAGE_CAPTURE} intent
+  to request an image. When you send the intent, the system prompts the user to
+  choose a camera app (if there isn't already a default camera app).
+  The user takes a picture with the selected camera app, and that app returns
+  the picture to your app's {@link
+  android.app.Activity#onActivityResult onActivityResult()} method.
+</p>
+
+<p>
+  Similarly, if you need to make a phone call, access the user's contacts, and
+  so on, you can do that by creating an appropriate intent, or you can request
+  the permission and access the appropriate objects directly. There are
+  advantages and disadvantages to each approach.
+</p>
+
+<p>
+  If you use permissions:
+</p>
+
+<ul>
+  <li>Your app has full control over the user experience when you perform the
+  operation. However, such broad control adds to the complexity of your task,
+  since you need to design an appropriate UI.
+  </li>
+
+  <li>The user is prompted to give permission once, either at run time or at
+  install time (depending on the user's Android version). After that, your app
+  can perform the operation without requiring additional interaction from the
+  user. However, if the user doesn't grant the permission (or revokes it later
+  on), your app becomes unable to perform the operation at all.
+  </li>
+</ul>
+
+<p>
+  If you use an intent:
+</p>
+
+<ul>
+  <li>You do not have to design the UI for the operation. The app that handles
+  the intent provides the UI. However, this means you have
+  no control over the user experience. The user could be interacting with an
+  app you've never seen.
+  </li>
+
+  <li>If the user does not have a default app for the operation, the system
+  prompts the user to choose an app. If the user does not designate a default
+  handler, they may have to go
+  through an extra dialog every time they perform the operation.
+  </li>
+</ul>
+
+<h2 id="ask-neccessary">Only Ask for Permissions You Need</h2>
+
+<p>
+  Every time you ask for a permission, you force the user to make a decision.
+  You should minimize the number of times you make these requests. If the user
+  is running Android 6.0 (API level 23) or later, every time the user tries
+  some new app feature that requires a permission, the app has to interrupt the
+  user's work with a permission request. If the user is running an earlier
+  version of Android, the user has to grant every one of the app's permissions
+  when installing the app; if the list is too long or seems inappropriate, the
+  user may decide not to install your app at all. For these reasons, you should
+  minimize the number of permissions your app needs.
+</p>
+
+<p>
+  Quite often your app can avoid requesting a permission by using an
+  <em>intent</em> instead. If a feature is not a core part of your app's
+  functionality, you should consider handing the work over to another app, as
+  described in <a href="#perms-vs-intents">Consider Using An Intent</a>.
+</p>
+
+<h2 id="dont-overwhelm">Don't Overwhelm the User</h2>
+
+<p>
+  If the user is running Android 6.0 (API level 23) or later, the user has to
+  grant your app its permissions while they are running the app. If you
+  confront the user with a lot of requests for permissions at once, you may
+  overwhelm the user and cause them to quit your app. Instead, you should ask
+  for permissions as you need them.
+</p>
+
+<p>
+  In some cases, one or more permissions might be absolutely essential to your
+  app. It might make sense to ask for all of those permissions as soon as the
+  app launches. For example, if you make a photography app, the app would need
+  access to the device camera. When the user launches the app for the first
+  time, they won't be surprised to be asked for permission to use the camera.
+  But if the same app also had a feature to share photos with the user's
+  contacts, you probably should <em>not</em> ask for the {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} permission at first
+  launch. Instead, wait until the user tries to use the "sharing" feature and
+  ask for the permission then.
+</p>
+
+<p>
+  If your app provides a tutorial, it may make sense to request the app's
+  essential permissions at the end of the tutorial sequence.
+</p>
+
+<h2 id="explain">Explain Why You Need Permissions</h2>
+
+<p>
+  The permissions dialog shown by the system when you call
+  {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()} says what permission your app wants, but doesn't say
+  why. In some cases, the user may find that puzzling. It's a good idea to
+  explain to the user why your app wants the permissions before calling
+  {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}.
+</p>
+
+<p>
+  For example, a photography app might want to use location services so it can
+  geotag the photos. A typical user might not understand that a photo can
+  contain location information, and would be puzzled why their photography app
+  wants to know the location. So in this case, it's a good idea for the app to
+  tell the user about this feature <em>before</em> calling
+  {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}.
+</p>
+
+<p>
+  One way to inform the user is to incorporate these requests into an app
+  tutorial. The tutorial can show each of the app's features in turn, and as it
+  does this, it can explain what permissions are needed. For example, the
+  photography app's tutorial could demonstrate its "share photos with your
+  contacts" feature, then tell the user that they need to give permission for
+  the app to see the user's contacts. The app could then call {@link
+  android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()} to ask the user for that access. Of course, not every
+  user is going to follow the tutorial, so you still need to check for and
+  request permissions during the app's normal operation.
+</p>
+
+<h2 id="testing">Test for Both Permissions Models</h2>
+
+<p>
+  Beginning with Android 6.0 (API level 23), users grant and revoke app
+  permissions at run time, instead of doing so when they install the app. As a
+  result, you'll have to test your app under a wider range of conditions. Prior
+  to Android 6.0, you could reasonably assume that if your app is running at
+  all, it has all the permissions it declares in the app manifest. Under the
+  new permissions model, you can no longer make that assumption.
+</p>
+
+<p>
+  The following tips will help you identify permissions-related code problems
+  on devices running API level 23 or higher:
+</p>
+
+<ul>
+  <li>Identify your app’s current permissions and the related code paths.
+  </li>
+
+  <li>Test user flows across permission-protected services and data.
+  </li>
+
+  <li>Test with various combinations of granted or revoked permissions. For
+  example, a camera app might list {@link android.Manifest.permission#CAMERA
+  CAMERA}, {@link android.Manifest.permission#READ_CONTACTS READ_CONTACTS}, and
+  {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}
+  in its manifest. You should test the app with each of these permissions
+  turned on and off, to make sure the app can handle all permission
+  configurations gracefully.
+  </li>
+
+  <li>Use the <a href="{@docRoot}tools/help/adb.html">adb</a> tool to manage
+  permssions from the command line:
+    <ul>
+      <li>List permissions and status by group:
+
+        <pre class="no-pretty-print">$ adb shell pm list permissions -d -g</pre>
+      </li>
+
+      <li>Grant or revoke one or more permissions:
+
+        <pre class="no-pretty-print">$ adb shell pm [grant|revoke] &lt;permission-name&gt; ...</pre>
+      </li>
+    </ul>
+  </li>
+
+  <li>Analyze your app for services that use permissions.
+  </li>
+</ul>
diff --git a/docs/html/training/permissions/declaring.jd b/docs/html/training/permissions/declaring.jd
new file mode 100644
index 0000000..ae96f81
--- /dev/null
+++ b/docs/html/training/permissions/declaring.jd
@@ -0,0 +1,115 @@
+page.title=Declaring Permissions
+helpoutsWidget=true
+
+@jd:body
+
+<div id="tb-wrapper">
+  <div id="tb">
+  <h2>This lesson teaches you to</h2>
+  <ul>
+    <li>
+      <a href="#perm-needed">Determine What Permissions Your App Needs</a>
+    </li>
+    <li>
+      <a href="#perm-add">Add Permissions to the Manifest</a>
+    </li>
+  </ul>
+
+<!--
+    <h2>Dependencies and Prerequisites</h2>
+    <ul>
+      <li></li>
+    </ul>
+-->
+
+<h2>You should also read</h2>
+  <ul>
+    <li><a href="{@docRoot}guide/topics/security/permissions.html#permissions">
+      Using Permissions</a></li>  <ul>
+    <li><a href="{@docRoot}guide/topics/security/permissions.html#normal-dangerous">
+      Normal and Dangerous Permissions</a></li>
+  </ul>
+</div>
+</div>
+
+<p>
+  Every Android app runs in a limited-access sandbox. If an app needs to use
+  resources or information outside of its own sandbox, the app has to request
+  the appropriate <i>permission.</i> You declare that your app needs a
+  permission by listing the permission in the <a href=
+  "{@docRoot}guide/topics/manifest/manifest-intro.html">App Manifest</a>.
+</p>
+
+<p>
+  Depending on how sensitive the permission is, the system might grant the
+  permission automatically, or the device user might have to grant
+  the request. For example, if your app requests permission to turn on the
+  device's flashlight, the system grants that permission automatically. But
+  if your app needs to read the user's contacts, the system asks the user
+  to approve that permission. Depending on the platform version, the user
+  grants the permission either when they install the app (on Android 5.1 and
+  lower) or while running the app (on Android 6.0 and higher).
+</p>
+
+<h2 id="perm-needed">Determine What Permissions Your App Needs</h2>
+
+<p>
+  As you develop your app, you should note when your app is using capabilities
+  that require a permission. Typically, an app is going to need permissions
+  whenever it uses information or resources that the app doesn't create, or
+  performs actions that affect the behavior of the device or other apps. For
+  example, if an app needs to access the internet, use the device camera, or
+  turn Wi-Fi on or off, the app needs the appropriate permission. For a list of
+  system permissions, see <a href=
+  "{@docRoot}guide/topics/security/permissions.html#normal-dangerous">Normal
+  and Dangerous Permissions</a>.
+</p>
+
+<p>
+  Your app only needs permissions for actions that it performs directly. Your
+  app does not need permission if it is requesting that another app perform the
+  task or provide the information. For example, if your app needs to read the
+  user's address book, the app needs the {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} permission. But if
+  your app uses an <em>intent</em> to request information from the user's
+  Contacts app, your app does not need any permissions, but the
+  Contacts app <em>does</em> need to have that permission. For more
+  information, see <a href="best-practices.html#perms-vs-intents">Consider
+  Using an Intent</a>.
+</p>
+
+<h2 id="perm-add">Add Permissions to the Manifest</h2>
+
+<p>
+  To declare that your app needs a permission, put a <a href=
+  "{@docRoot}guide/topics/manifest/uses-permission-element.html"
+  ><code>&lt;uses-permission&gt;</code></a>
+  element in your <a href=
+  "{@docRoot}guide/topics/manifest/manifest-intro.html">app manifest</a>, as a
+  child of the top-level <a href=
+  "{@docRoot}guide/topics/manifest/manifest-element.html"><code>&lt;manifest&gt;</code></a>
+  element. For example, an app that needs to send SMS messages would have this
+  line in the manifest:
+</p>
+
+<pre>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.example.snazzyapp"&gt;
+
+    <strong>&lt;uses-permission android:name="android.permission.SEND_SMS"/&gt;</strong>
+    <!-- other permissions go here -->
+
+    &lt;application ...&gt;
+        ...
+    &lt;/application&gt;
+
+&lt;/manifest&gt;</pre>
+
+<p>
+  The system's behavior after you declare a permission depends on how sensitive
+  the permission is. If the permission does not affect user privacy, the system
+  grants the permission automatically. If the permission might grant access to
+  sensitive user information, the system asks the user to approve the request.
+  For more information about the different kinds of permissions, see
+  <a href="{@docRoot}guide/topics/security/permissions.html#normal-dangerous">Normal
+  and Dangerous Permissions</a>.
+</p>
diff --git a/docs/html/training/permissions/index.jd b/docs/html/training/permissions/index.jd
new file mode 100644
index 0000000..d1e7f21
--- /dev/null
+++ b/docs/html/training/permissions/index.jd
@@ -0,0 +1,76 @@
+page.title=Working with System Permissions
+page.tags=permissions
+helpoutsWidget=true
+
+@jd:body
+
+<div id="tb-wrapper">
+
+  <div id="tb">
+<!--
+    <h2>Dependencies and Prerequisites</h2>
+    <ul>
+      <li></li>
+    </ul>
+-->
+<h2>You should also read</h2>
+  <ul>
+    <li><a href="{@docRoot}guide/topics/security/permissions.html">
+      System Permissions</a></li>
+    <li><a href="{@docRoot}training/basics/intents/index.html">
+      Interacting with other apps</a></li>
+  </ul>
+  </div>
+</div>
+
+<a class="notice-designers wide"
+  href="https://www.google.com/design/spec/patterns/permissions.html">
+  <div>
+    <h3>Design Patterns</h3>
+    <p>Permissions</p>
+  </div>
+</a>
+
+<p>
+  To protect the system's integrity and the user's privacy, Android runs each
+  app in a limited access sandbox. If the app wants to use resources or
+  information outside of its sandbox, the app has to explicitly request
+  permission. Depending on the type of permission the app requests, the system
+  may grant the permission automatically, or the system may ask the user to
+  grant the permission.
+</p>
+
+<p>
+  This class shows you how to declare and request permissions for your app.
+</p>
+
+<h2>Lessons</h2>
+
+<dl>
+  <dt>
+    <a href="declaring.html">Declaring Permissions</a>
+  </dt>
+
+  <dd>
+    Learn how to declare the permissions you need in your app manifest.
+  </dd>
+
+  <dt>
+    <a href="requesting.html">Requesting Permissions at Run Time</a>
+  </dt>
+
+  <dd>
+    Learn how to request permissions from the user while the app is running.
+    This lesson only applies to apps on devices running Android 6.0 (API level
+    23) and higher.
+  </dd>
+
+  <dt>
+    <a href="best-practices.html">Permissions Best Practices</a>
+  </dt>
+
+  <dd>
+    Guidelines for creating the best user experience in requesting and using
+    permissions.
+  </dd>
+</dl>
diff --git a/docs/html/training/permissions/requesting.jd b/docs/html/training/permissions/requesting.jd
new file mode 100644
index 0000000..8c4a930
--- /dev/null
+++ b/docs/html/training/permissions/requesting.jd
@@ -0,0 +1,364 @@
+page.title=Requesting Permissions at Run Time
+page.tags="runtime permissions"
+helpoutsWidget=true
+
+@jd:body
+
+<div id="tb-wrapper">
+  <div id="tb">
+  <h2>This lesson teaches you to</h2>
+
+  <ul>
+    <li>
+      <a href="#perm-check">Check For Permissions</a>
+    </li>
+    <li>
+      <a href="#perm-request">Request Permissions</a>
+    </li>
+  </ul>
+
+  <h2>Dependencies and Prerequisites</h2>
+
+  <ul>
+    <li>Android 6.0 (API level 23)
+    </li>
+  </ul>
+
+  <h2>You should also read</h2>
+
+  <ul>
+    <li>
+      <a href=
+      "{@docRoot}guide/topics/security/permissions.html#normal-dangerous">Normal
+      and Dangerous Permissions</a>
+    </li>
+  </ul>
+</div>
+</div>
+
+<p>
+  Beginning in Android 6.0 (API level 23), users grant
+  permissions to apps while the app is running, not when they install the app.
+  This approach streamlines the app
+  install process, since the user does not need to grant permissions when they
+  install or update the app. It also gives the user more control over the app's
+  functionality; for example, a user could choose to give a camera app access
+  to the camera but not to the device location. The user can revoke the
+  permissions at any time, by going to the app's Settings screen.
+</p>
+
+<p>
+  System permissions are divided into two categories, <em>normal</em> and
+  <em>dangerous:</em>
+</p>
+
+<ul>
+  <li>Normal permissions do not directly risk the user's privacy. If your app
+  lists a normal permission in its manifest, the system grants the permission
+  automatically.
+  </li>
+
+  <li>Dangerous permissions can give the app access to the user's confidential
+  data. If your app lists a normal permission in its manifest, the system
+  grants the permission automatically. If you list a dangerous permission, the
+  user has to explicitly give approval to your app.
+  </li>
+</ul>
+
+<p>
+  For more information, see <a href=
+  "{@docRoot}guide/topics/security/permissions.html#normal-dangerous">Normal
+  and Dangerous Permissions</a>.
+</p>
+
+<p>
+  On all versions of Android, your app needs to declare both the normal and the
+  dangerous permissions it needs in its app manifest, as described in <a href=
+  "declaring.html">Declaring Permissions</a>. However, the <em>effect</em> of
+  that declaration is different depending on the system version and your
+  app's target SDK level:
+</p>
+
+<ul>
+  <li>If the device is running Android 5.1 or lower, or your app's target SDK
+  is 22 or lower: If you list a dangerous permission in your manifest, the user
+  has to grant the permission when they install the app; if they do not grant
+  the permission, the system does not install the app at all.
+  </li>
+
+  <li>If the device is running Android 6.0 or higher, and your app's target SDK
+  is 23 or higher: The app has to list the permissions in the manifest,
+  <em>and</em> it must request each dangerous permission it needs while the app
+  is running. The user can grant or deny each permission, and the app can
+  continue to run with limited capabilities even if the user denies a
+  permission request.
+  </li>
+</ul>
+
+<p class="note">
+  <strong>Note:</strong> This lesson describes how you implement permissions
+  requests on apps that target API level
+  23 or higher, <em>and</em> are running on a device that's running Android 6.0
+  (API level 23) or higher. If the device or the app's
+  <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+  ><code>targetSdkVersion</code></a>
+  is 22 or lower, the system prompts the user to grant all dangerous
+  permissions when they install or update the app.
+</p>
+
+<p>
+  This lesson describes how to use the Android <a href=
+  "{@docRoot}tools/support-library/index.html">Support Library</a> to check
+  for, and request, permissions. The Android framework provides similar methods
+  as of Android 6.0 (API level 23). However, using the support library is
+  simpler, since your app doesn't need to check which version of Android it's
+  running on before calling the methods.
+</p>
+
+<h2 id="perm-check">Check For Permissions</h2>
+
+<p>
+  If your app needs a dangerous permission, you must check whether you have
+  that permission every time you perform an operation that requires that
+  permission. The user is always free to revoke the permission, so even if the
+  app used the camera yesterday, it can't assume it still has that permission
+  today.
+</p>
+
+<p>
+  To check if you have a permission, call the {@link
+  android.support.v4.content.ContextCompat#checkSelfPermission
+  ContextCompat.checkSelfPermission()} method. For example, this snippet shows how to
+  check if the activity has permission to write to the calendar:
+</p>
+
+<pre>// Assume thisActivity is the current activity
+int permissionCheck = ContextCompat.checkSelfPermission(thisActivity,
+        Manifest.permission.WRITE_CALENDAR);</pre>
+
+<p>
+  If the app has the permission, the method returns {@link
+  android.content.pm.PackageManager#PERMISSION_GRANTED
+  PackageManager.PERMISSION_GRANTED}, and the app can proceed with the
+  operation. If the app does not have the permission, the method returns {@link
+  android.content.pm.PackageManager#PERMISSION_DENIED PERMISSION_DENIED}, and
+  the app has to explicitly ask the user for permission.
+</p>
+
+<h2 id="perm-request">Request Permissions</h2>
+
+<p>
+  If your app needs a dangerous permission that was listed in the app manifest,
+  it must ask the user to grant the permission. Android provides several
+  methods you can use to request a permission. Calling these methods brings up a
+  standard Android dialog, which you cannot customize.
+</p>
+<h3 id="explain">Explain why the app needs permissions</h3>
+
+<div class="figure" style="width:220px" id="fig-perms-dialog">
+  <img src="{@docRoot}images/training/permissions/request_permission_dialog.png"
+      srcset="{@docRoot}images/training/permissions/request_permission_dialog.png 1x,
+      {@docRoot}images/training/permissions/request_permission_dialog_2x.png 2x"
+      alt="" width="220" />
+  <p class="img-caption">
+    <strong>Figure 1.</strong> System dialog prompting the user to grant or deny
+    a permission.
+  </p>
+</div>
+
+<p>
+  In some circumstances, you might want to help the user understand why your
+  app needs a permission. For example, if a user launches a photography app,
+  the user probably won't be surprised that the app asks for permission to use
+  the camera, but the user might not understand why the app wants access to the
+  user's location or contacts. Before you request a permission, you should
+  consider providing an explanation to the user. Keep in mind that you don't
+  want to overwhelm the user with explanations; if you provide too many
+  explanations, the user might find the app frustrating and remove it.
+</p>
+
+<p>
+  One approach you might use is to provide an explanation only if the user has
+  already turned down that permission request. If a user keeps trying to use
+  functionality that requires a permission, but keeps turning down the
+  permission request, that probably shows that the user doesn't understand why
+  the app needs the permission to provide that functionality. In a situation
+  like that, it's probably a good idea to show an explanation.
+</p>
+
+<p>
+  To help find situations where the user might need an explanation, Android
+  provides a utiltity method, {@link
+  android.support.v4.app.ActivityCompat#shouldShowRequestPermissionRationale
+  shouldShowRequestPermissionRationale()}. This method returns <code>true</code> if the app
+  has requested this permission previously and the user denied the request.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> If the user turned down the permission request in the
+  past and chose the <strong>Don't ask again</strong> option in the permission
+  request system dialog, this method returns <code>false</code>. The method
+  also returns <code>false</code> if a device policy prohibits the app from
+  having that permission.
+</p>
+
+<h3 id="make-the-request">Request the permissions you need</h3>
+
+<p>
+  If your app doesn't already have the permission it needs, the app must call
+  one of the {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()} methods to request the appropriate
+  permissions. Your app passes the permissions it wants, and also
+  an integer <em>request code</em> that you specify to identify this permission
+  request. This method functions asynchronously: it
+  returns right away, and after the user responds to the dialog box, the system
+  calls the app's callback method with the results, passing the same request
+  code that the app passed to
+  {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}.
+</p>
+
+<p>
+  The following code checks if the app has permission to read the user's
+  contacts, and requests the permission if necessary:
+</p>
+
+<pre>// Here, thisActivity is the current activity
+if (ContextCompat.checkSelfPermission(thisActivity,
+                Manifest.permission.READ_CONTACTS)
+        != PackageManager.PERMISSION_GRANTED) {
+
+    // Should we show an explanation?
+    if (ActivityCompat.shouldShowRequestPermissionRationale(thisActivity,
+            Manifest.permission.READ_CONTACTS)) {
+
+        // Show an expanation to the user *asynchronously* -- don't block
+        // this thread waiting for the user's response! After the user
+        // sees the explanation, try again to request the permission.
+
+    } else {
+
+        // No explanation needed, we can request the permission.
+
+        ActivityCompat.requestPermissions(thisActivity,
+                new String[]{Manifest.permission.READ_CONTACTS},
+                MY_PERMISSIONS_REQUEST_READ_CONTACTS);
+
+        // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
+        // app-defined int constant. The callback method gets the
+        // result of the request.
+    }
+}</pre>
+
+<p class="note">
+  <strong>Note:</strong> When your app calls {@link
+  android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}, the system shows a standard dialog box to the user.
+  Your app <em>cannot</em> configure or alter that dialog box. If you need to
+  provide any information or explanation to the user, you should do that before
+  you call {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}, as described in <a href="#explain">Explain why the app
+  needs permissions</a>.
+</p>
+
+<h3 id="handle-response">Handle the permissions request response
+</h3>
+
+<p>
+  When your app requests permissions, the system presents a dialog box to the
+  user. When the user responds, the system invokes your app's {@link
+  android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult
+  onRequestPermissionsResult()} method, passing it the user response. Your app
+  has to override that method to find out whether the permission was granted.
+  The callback is passed the same request code you passed to
+  {@link android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}. For example, if an app requests {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} access it might have
+  the following callback method:
+</p>
+
+<pre>&#64;Override
+public void onRequestPermissionsResult(int requestCode,
+        String permissions[], int[] grantResults) {
+    switch (requestCode) {
+        case MY_PERMISSIONS_REQUEST_READ_CONTACTS: {
+            // If request is cancelled, the result arrays are empty.
+            if (grantResults.length > 0
+                &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+
+                // permission was granted, yay! Do the
+                // contacts-related task you need to do.
+
+            } else {
+
+                // permission denied, boo! Disable the
+                // functionality that depends on this permission.
+            }
+            return;
+        }
+
+        // other 'case' lines to check for other
+        // permissions this app might request
+    }
+}</pre>
+
+<p>
+  The dialog box shown by the system describes the <a href=
+  "{@docRoot}guide/topics/security/permissions.html#perm-groups">permission
+  group</a> your app needs access to; it does not list the specific permission.
+  For example, if you request the {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} permission, the
+  system dialog box just says your app needs access to the device's contacts.
+  The user only needs to grant permission once for each permission group. If
+  your app requests any other permissions in that group (that are listed in
+  your app manifest), the system automatically grants them. When you request
+  the permission, the system calls your {@link
+  android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult
+  onRequestPermissionsResult()} callback method and passes {@link
+  android.content.pm.PackageManager#PERMISSION_GRANTED PERMISSION_GRANTED}, the
+  same way it would if the user had explicitly granted your request through the
+  system dialog box.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> Your app still needs to explicitly request every
+  permission it needs, even if the user has already granted another permission
+  in the same group. In addition, the grouping of permissions into groups may
+  change in future Android releases. Your code should not rely
+  on the assumption that particular permissions are or are not in the
+  same group.
+</p>
+
+<p>
+  For example, suppose you list both {@link
+  android.Manifest.permission#READ_CONTACTS READ_CONTACTS} and {@link
+  android.Manifest.permission#WRITE_CONTACTS WRITE_CONTACTS} in your app
+  manifest. If you request
+  {@link android.Manifest.permission#READ_CONTACTS READ_CONTACTS} and the user
+  grants the permission, and you then request {@link
+  android.Manifest.permission#WRITE_CONTACTS WRITE_CONTACTS}, the system
+  immediately grants you that permission without interacting with the user.
+</p>
+
+<p>
+  If the user denies a permission request, your app should take appropriate
+  action. For example, your app might show a dialog explaining why it could not
+  perform the user's requested action that needs that permission.
+</p>
+
+<p>
+  When the system asks the user to grant a permission, the user has the option
+  of telling the system not to ask for that permission again. In that case, any
+  time an app uses {@link
+  android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()} to ask for that permission again, the system
+  immediately denies the request. The system calls your {@link
+  android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult
+  onRequestPermissionsResult()} callback method and passes {@link
+  android.content.pm.PackageManager#PERMISSION_DENIED PERMISSION_DENIED}, the
+  same way it would if the user had explicitly rejected your request again.
+  This means that when you call {@link
+  android.support.v4.app.ActivityCompat#requestPermissions
+  requestPermissions()}, you cannot assume that any direct interaction with the
+  user has taken place.
+</p>
diff --git a/docs/html/preview/testing/performance.jd b/docs/html/training/testing/performance.jd
similarity index 98%
rename from docs/html/preview/testing/performance.jd
rename to docs/html/training/testing/performance.jd
index 6f0a5f1..2b968b3 100644
--- a/docs/html/preview/testing/performance.jd
+++ b/docs/html/training/testing/performance.jd
@@ -1,12 +1,13 @@
-page.title=Testing Display Performance
+page.title=Testing Display Performance
+page.article=true
 page.image=images/cards/card-test-performance_2x.png
 page.keywords=performance, fps, tools
 
 @jd:body
 
 
-<div id="qv-wrapper">
-  <div id="qv">
+<div id="tb-wrapper">
+  <div id="tb">
     <h2>In this document</h2>
       <ol>
         <li><a href="#measure">Measuring UI Performance</a>
@@ -243,7 +244,7 @@
       </li>
 
       <li>To learn more about Choreographer, check out the <a href=
-      "https://developers.google.com/events/io/sessions/325418001">For Butter or Worse</a>
+      "https://www.youtube.com/watch?v=Q8m9sHdyXnE">For Butter or Worse</a>
       video.
       </li>
     </ul>
@@ -357,7 +358,7 @@
   in the data.
 </p>
 
-<img src="{@docRoot}preview/images/perf-test-framestats.png">
+<img src="{@docRoot}images/performance-testing/perf-test-framestats.png">
 
 
 <h3 id="timing-dump">Simple frame timing dump</h3>
@@ -377,7 +378,7 @@
   were spending their time.
 </p>
 
-<img src="{@docRoot}preview/images/perf-test-frame-latency.png">
+<img src="{@docRoot}images/performance-testing/perf-test-frame-latency.png">
 
 <p>
   The result of running gfxinfo, copying the output, pasting it into a spreadsheet
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 002fb09..41f03a7 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -281,6 +281,31 @@
         </ul>
       </li>
 
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>training/permissions/index.html"
+             description=
+             "How to declare that your app needs access to features and
+             resources outside of its 'sandbox', and how to request those
+             privileges at runtime."
+            >Working with System Permissions</a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>training/permissions/declaring.html">
+            Declaring Permissions
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/requesting.html">
+            Requesting Permissions at Run Time
+          </a>
+          </li>
+          <li><a href="<?cs var:toroot ?>training/permissions/best-practices.html">
+            Best Practices for Runtime Permissions
+          </a>
+          </li>
+        </ul>
+      </li>
+
     </ul>
   </li><!-- end getting started -->
     <li class="nav-section">
@@ -1826,6 +1851,9 @@
             </a>
         </div>
         <ul>
+          <li><a href="<?cs var:toroot ?>training/monitoring-device-state/doze-standby.html"
+            >Optimizing for Doze and App Standby</a>
+          </li>
           <li><a href="<?cs var:toroot ?>training/monitoring-device-state/battery-monitoring.html"
             zh-cn-lang="监控电池电量和充电状态"
             ja-lang="電池残量と充電状態の監視"
@@ -2021,6 +2049,12 @@
         </ul>
       </li>
     </ul>
+    <ul>
+      <li><a href="<?cs var:toroot ?>training/testing/performance.html"
+      description="How to automate UI performance testing.">
+            <span class="en">Testing Display Performance</span>
+            </a></li>
+    <ul>
   </li>
   <!-- End best Testing -->
 
diff --git a/docs/image_sources/training/permissions/request_permission_dialog_original.png b/docs/image_sources/training/permissions/request_permission_dialog_original.png
new file mode 100644
index 0000000..49bff5b
--- /dev/null
+++ b/docs/image_sources/training/permissions/request_permission_dialog_original.png
Binary files differ