Merge "Frameworks/base: Add compiled-classes" into nyc-dev
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 7d084dc..0bcee86 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -18,10 +18,10 @@
 
 package com.android.commands.am;
 
-import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.RESIZE_MODE_SYSTEM;
 import static android.app.ActivityManager.RESIZE_MODE_USER;
-import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
+import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
+import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
 
 import android.app.ActivityManager;
 import android.app.ActivityManager.StackInfo;
@@ -484,7 +484,7 @@
         mSamplingInterval = 0;
         mAutoStop = false;
         mUserId = defUser;
-        mStackId = FULLSCREEN_WORKSPACE_STACK_ID;
+        mStackId = INVALID_STACK_ID;
 
         return Intent.parseCommandArgs(mArgs, new Intent.CommandOptionHandler() {
             @Override
@@ -622,7 +622,7 @@
             int res;
             final long startTime = SystemClock.uptimeMillis();
             ActivityOptions options = null;
-            if (mStackId != FULLSCREEN_WORKSPACE_STACK_ID) {
+            if (mStackId != INVALID_STACK_ID) {
                 options = ActivityOptions.makeBasic();
                 options.setLaunchStackId(mStackId);
             }
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index 49235ae..de38f3d 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -19,10 +19,14 @@
             frameborder="0" allowfullscreen=""
             style="float: right;"></iframe>
         -->
+        <a href="{@docRoot}sdk/index.html">
         <img class="dac-hero-image" src="{@docRoot}images/tools/studio/studio-feature-instant-run_2x.png" />
+        </a>
       </div>
       <div class="col-1of2 col-pull-1of2">
-        <h1 class="dac-hero-title">Android Studio 2.0,<br>now available!</h1>
+        <h1 class="dac-hero-title">
+            <a style="color:inherit" href="{@docRoot}sdk/index.html">
+            Android Studio 2.0,<br>now available!</a></h1>
         <p class="dac-hero-description">
         The latest version of Android Studio is the biggest update yet.
         It includes new features like <strong>Instant Run</strong>, which
diff --git a/docs/html/images/training/ctl-config.png b/docs/html/images/training/ctl-config.png
new file mode 100644
index 0000000..82f63c8
--- /dev/null
+++ b/docs/html/images/training/ctl-config.png
Binary files differ
diff --git a/docs/html/images/training/testartifactcombined.png b/docs/html/images/training/testartifactcombined.png
new file mode 100644
index 0000000..a3b5e81
--- /dev/null
+++ b/docs/html/images/training/testartifactcombined.png
Binary files differ
diff --git a/docs/html/images/training/testartifactseparate.png b/docs/html/images/training/testartifactseparate.png
new file mode 100644
index 0000000..b12b70c
--- /dev/null
+++ b/docs/html/images/training/testartifactseparate.png
Binary files differ
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 863d235..3decdf0 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -1782,7 +1782,7 @@
     "title": "",
     "resources": [
     "https://medium.com/google-developers/how-often-should-you-update-android-studio-db25785c488e#.8blbql35x",
-    "http://android-developers.blogspot.com/2016/02/android-studio-20-beta.html",
+    "http://android-developers.blogspot.com/2016/04/android-studio-2-0.html",
     "https://medium.com/google-developers/writing-more-code-by-writing-less-code-with-android-studio-live-templates-244f648d17c7#.hczcm02du",
     ]
   },
diff --git a/docs/html/ndk/guides/cpp-support.jd b/docs/html/ndk/guides/cpp-support.jd
index 21df6af..a825922 100644
--- a/docs/html/ndk/guides/cpp-support.jd
+++ b/docs/html/ndk/guides/cpp-support.jd
@@ -170,23 +170,23 @@
 named {@code libgnustl_shared.so}.</p>
 
 
-<h3 id="cs">libC++ runtime:</h3>
+<h3 id="cs">libc++ runtime:</h3>
 <p>This runtime is an Android port of <a href="http://libcxx.llvm.org/">LLVM libc++</a>. Its
 shared library file is named {@code libc++_shared.so}.</p>
 
 <p>By default, this runtime compiles with {@code -std=c++11}. As with GNU {@code libstdc++}, you
-need to explicitly turns on exceptions or RTTI support. For information on how to do this, see
+need to explicitly turn on exceptions or RTTI support. For information on how to do this, see
 <a href="#xp">C++ Exceptions</a> and <a href="#rt">RTTI</a>.</p>
 
-<p>The NDK provides prebuilt static and shared libraries for {@code libc++} compiled by Clang 3.4,
-but you can force the NDK to rebuild {@code libc++} from sources by adding the following line to
-your {@code Application.mk} file, or setting it in your environment prior to building: </p>
+<p>The NDK provides prebuilt static and shared libraries for {@code libc++}, but you can force the
+NDK to rebuild {@code libc++} from sources by adding the following line to your
+{@code Application.mk} file, or setting it in your environment prior to building: </p>
 
 <pre>
 LIBCXX_FORCE_REBUILD := true
 </pre>
 
-<h4>atomic support</h4>
+<h4>Atomic support</h4>
 
 <p>If you include {@code <atomic>}, it's likely that you also need {@code libatomic}.
 If you are using {@code ndk-build}, add the following line:</p>
@@ -201,10 +201,6 @@
 -latomic
 </pre>
 
-<p class="note"><strong>Note: </strong>{@code -latomic} is only available for GCC 4.8.
-Because Clang 3.5 and Clang 3.6 use GCC 4.8's headers and libraries, as well as its
-{@code as} and {@code ld} options, those versions of Clang also get {@code -latomic}.</p>
-
 
 <h4>Compatibility</h4>
 
@@ -217,14 +213,6 @@
 newlocale() WARNING: Trying to set locale to en_US.UTF-8 other than "", "C" or "POSIX"
 </pre>
 
-<p>We do not recommend using {@code libc++} with GCC 4.6 because of GCC 4.6's limited c++11
-support.</p>
-
-<p>For information on {@code libc++} tests that fail to compile, {@code black_list*} in
-{@code $NDK/tests/device/test-libc++-shared-full/jni/Android.mk}. For information about tests
-that fail to run correctly, see {@code $NDK/tests/device/test-libc++-shared-full/BROKEN_RUN}.
-{@code $NDK}, here, is the your NDK installation's root directory.</p>
-
 
 <h2 id="ic">Important Considerations</h2>
 
diff --git a/docs/html/preview/_book.yaml b/docs/html/preview/_book.yaml
index e4f1aba..9f53866 100644
--- a/docs/html/preview/_book.yaml
+++ b/docs/html/preview/_book.yaml
@@ -70,6 +70,8 @@
     path: /preview/j8-jack.html
   - title: Android for Work Updates
     path: /preview/features/afw.html
+  - title: Scoped Directory Access
+    path: /preview/features/scoped-folder-access.html
 
 - title: Samples
   path: /preview/samples.html
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index 478f068..c2421eb 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -34,6 +34,7 @@
         <li><a href="#default_trusted_ca">Default Trusted CA</a></li>
         <li><a href="apk_signature_v2">APK signature scheme v2</a></li>
         <li><a href="#scoped_directory_access">Scoped directory access</a></li>
+        <li><a href="#launcher_shortcuts">Launcher shortcuts</a></li>
       </ol>
 </div>
 </div>
@@ -696,8 +697,57 @@
 <a href="{@docRoot}preview/features/scoped-folder-access.html">Scoped
 Directory Access</a> developer documentation.</p>
 
+<h2 id="launcher_shortcuts">
+  Launcher shortcuts
+</h2>
 
+<p>
+  Android N allows apps to define action-specific shortcuts which can be
+  displayed in the launcher. These <em>launcher shortcuts</em> let your users
+  quickly start common or recommended tasks within your app. Each shortcut
+  contains an <a href=
+  "{@docRoot}guide/components/intents-filters.html">intent</a>, which links the
+  shortcut to a specific action in your app. Examples of these actions include:
+</p>
 
+<ul>
+  <li>Navigating users to a particular location in a mapping app.
+  </li>
 
+  <li>Sending messages to a friend in a communication app.
+  </li>
 
+  <li>Playing the next episode of a TV show in a media app.
+  </li>
 
+  <li>Loading the last save point in a gaming app.
+  </li>
+</ul>
+
+<p>
+  Your app can create up to five <em>dynamic shortcuts</em>. When users perform
+  a gesture over your app's launcher icon, these shortcuts appear. By dragging
+  the shortcuts onto the launcher, users can make persistent copies of the
+  shortcuts, called <em>pinned shortcuts</em>. Users can create an unlimited
+  number of pinned shortcuts for each app.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> Although other apps can't access your shortcut data,
+  the launcher <strong>does</strong> have access to this data. Therefore, the
+  shortcuts you create should conceal sensitive user information.
+</p>
+
+<p>
+  You can use this command to view your app's shortcuts:
+</p>
+
+<pre class="no-pretty-print">
+$ adb shell dumpsys shortcut
+</pre>
+<p>
+  To update all shortcuts and to delete dynamic shortcuts, use the appropriate
+  methods that the Launcher Shortcut API provides. For more details about this
+  API, see <code>android.content.pm.ShortcutManager</code> in the downloadable
+  <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
+</p>
diff --git a/docs/html/preview/features/background-optimization.jd b/docs/html/preview/features/background-optimization.jd
index e415bd3..79ba5c8 100644
--- a/docs/html/preview/features/background-optimization.jd
+++ b/docs/html/preview/features/background-optimization.jd
@@ -112,7 +112,7 @@
 <p class="note">
   <strong>Note:</strong> A {@link android.content.BroadcastReceiver} registered with
   {@link android.content.Context#registerReceiver Context.registerReceiver()}
-  continues to receive these broadcasts while the app is in the foreground.
+  continues to receive these broadcasts while the app is running.
 </p>
 
 <h3 id="sched-jobs">
@@ -269,7 +269,7 @@
           MY_BACKGROUND_JOB,
           new ComponentName(context, MediaContentJob.class));
   builder.addTriggerContentUri(
-          new JobInfo.TriggerContentUri(MEDIA_URI,
+          new JobInfo.TriggerContentUri(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
           JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS));
   js.schedule(builder.build());
 }
diff --git a/docs/html/preview/features/direct-boot.jd b/docs/html/preview/features/direct-boot.jd
index aefa4dc..d1530d7 100644
--- a/docs/html/preview/features/direct-boot.jd
+++ b/docs/html/preview/features/direct-boot.jd
@@ -58,7 +58,7 @@
 can run during Direct Boot mode or access device encrypted
 storage. Apps register with the system by marking components as
 <i>encryption aware</i>. To mark your component as encryption aware, set the
-<code>android:encryptionAware</code> attribute to true in your manifest.<p>
+<code>android:directBootAware</code> attribute to true in your manifest.<p>
 
 <p>Encryption aware components can register to receive a
 <code>LOCKED_BOOT_COMPLETED</code> broadcast message from the
@@ -72,7 +72,7 @@
 
 <pre>
 &lt;receiever
-  android:encryptionAware="true" &gt;
+  android:directBootAware="true" &gt;
   ...
   &lt;intent-filter&gt;
     &lt;action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" /&gt;
@@ -87,13 +87,13 @@
 
 <p>To access device encrypted storage, create a second
 {@link android.content.Context} instance by calling
-<code>Context.createDeviceEncryptedStorageContext()</code>. All storage API
+<code>Context.createDeviceProtectedStorageContext()</code>. All storage API
 calls made using this context access the device encrypted storage. The
 following example accesses the device encrypted storage and opens an existing
 app data file:</p>
 
 <pre>
-Context directBootContext = Context.createDeviceEncryptedStorageContext();
+Context directBootContext = appContext.createDeviceProtectedStorageContext();
 // Access appDataFilename that lives in device encrypted storage
 FileInputStream inStream = directBootContext.openFileInput(appDataFilename);
 // Use inStream to read content...
@@ -125,8 +125,8 @@
 
 <p>If a user updates their device to use Direct Boot mode, you might have
 existing data that needs to get migrated to device encrypted storage. Use
-<code>Context.migrateSharedPreferencesFrom()</code> and
-<code>Context.migrateDatabaseFrom()</code> to migrate preference and database
+<code>Context.moveSharedPreferencesFrom()</code> and
+<code>Context.moveDatabaseFrom()</code> to migrate preference and database
 data between credential encrypted storage and device encrypted storage.</p>
 
 <p>Use your best judgment when deciding what data to migrate from credential
diff --git a/docs/html/preview/features/picture-in-picture.jd b/docs/html/preview/features/picture-in-picture.jd
index 106ad8b..893f8c1 100644
--- a/docs/html/preview/features/picture-in-picture.jd
+++ b/docs/html/preview/features/picture-in-picture.jd
@@ -99,15 +99,15 @@
 <h2 id="pip_button">Switching Your Activity to Picture-in-picture</h2>
 
 When you need to switch your activity into PIP mode, call
-<code>Activity.enterPictureInPicture()</code>. The following example switches
-to PIP mode when the user selects a dedicated PIP button on a media control
-bar:</p>
+<code>Activity.enterPictureInPictureMode()</code>. The following example
+switches to PIP mode when the user selects a dedicated PIP button on a media
+control bar:</p>
 
 <pre>
 &#64;Override
 public void onActionClicked(Action action) {
     if (action.getId() == R.id.lb_control_picture_in_picture) {
-        getActivity().enterPictureInPicture();
+        getActivity().enterPictureInPictureMode();
         return;
     }
     ...
@@ -129,14 +129,14 @@
 <p>When your activity enters PIP mode, your activity should only show video
 playback. Remove UI elements before your activity enters PIP,
 and restore these elements when your activity becomes full-screen again.
-Override <code>Activity.onPictureInPictureChanged()</code> or
-<code>Fragment.onPictureInPictureChanged()</code> and enable or
+Override <code>Activity.onPictureInPictureModeChanged()</code> or
+<code>Fragment.onPictureInPictureModeChanged()</code> and enable or
 disable your UI elements as needed, for example:</p>
 
 <pre>
 &#64;Override
-public void onPictureInPictureChanged(boolean inPictureInPicture) {
-    if (inPictureInPicture) {
+public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
+    if (isInPictureInPictureMode) {
         // Hide the controls in picture-in-picture mode.
         ...
     } else {
@@ -159,8 +159,8 @@
 <pre>
 &#64;Override
 public void onPause() {
-    // If called due to PIP, do not pause playback
-    if (inPictureInPicture()) {
+    // If called while in PIP mode, do not pause playback
+    if (isInPictureInPictureMode()) {
         // Continue playback
         ...
     }
diff --git a/docs/html/preview/features/scoped-folder-access.jd b/docs/html/preview/features/scoped-folder-access.jd
index 932d8a9..814692d 100644
--- a/docs/html/preview/features/scoped-folder-access.jd
+++ b/docs/html/preview/features/scoped-folder-access.jd
@@ -44,6 +44,14 @@
 all available volumes, including removable media volumes, use
 <code>StorageManager.getVolumesList()</code>.</p>
 
+<p>
+On secondary volumes, such as external SD cards, pass in null when calling
+<code>StorageVolume.createAccessIntent()</code> to request access to the entire
+volume, instead of a specific directory.
+<code>StorageVolume.createAccessIntent()</code> returns null if you pass in
+null to the primary volume, or if you pass in an invalid directory name.
+</p>
+
 <p>The following code snippet is an example of how to open the
 <code>Pictures</code> directory in the primary shared storage:</p>
 
@@ -122,4 +130,15 @@
 
 <p>If the user denies access to an external directory, do not immediately
 request access again. Repeatedly insisting on access results in a poor user
-experience.</p>
+experience. If a request is denied by the user, and the app requests access
+again, the UI displays a <b>Don't ask again</b> checkbox:</p>
+
+<img src="{@docRoot}preview/images/scoped-folder-access-dont-ask.png"
+srcset="{@docRoot}preview/images/scoped-folder-access-dont-ask.png 1x,
+{@docRoot}preview/images/scoped-folder-access-dont-ask_2x.png 2x" />
+<p class="img-caption"><strong>Figure 1.</strong> An application making a
+second request for access to removable media.</p>
+
+<p>If the user selects <b>Don't ask again</b> and denies the request, all
+future requests for the given directory from your app will be automatically
+denied, and no request UI will be presented to the user.</p>
\ No newline at end of file
diff --git a/docs/html/preview/images/scoped-folder-access-dont-ask.png b/docs/html/preview/images/scoped-folder-access-dont-ask.png
new file mode 100644
index 0000000..5c505d9
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-dont-ask.png
Binary files differ
diff --git a/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png b/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png
new file mode 100644
index 0000000..612b69f
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-dont-ask_2x.png
Binary files differ
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index f96bf1f..cf38f70 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -17,7 +17,7 @@
     <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html">
       Support and Release Notes</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"
@@ -82,12 +82,15 @@
 
         <li><a href="<?cs var:toroot ?>preview/features/icu4j-framework.html"
         >ICU4J Support</a></li>
-        
+
         <li><a href="<?cs var:toroot ?>preview/j8-jack.html"
         >Java 8 Language Features</a></li>
 
         <li><a href="<?cs var:toroot ?>preview/features/afw.html"
         >Android for Work Updates</a></li>
+
+        <li><a href="<?cs var:toroot ?>preview/features/scoped-folder-access.html"
+        >Scoped Directory Access</a></li>
       </ul>
   </li>
 
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
index bc40ebd..2793d59 100644
--- a/docs/html/preview/setup-sdk.jd
+++ b/docs/html/preview/setup-sdk.jd
@@ -15,7 +15,7 @@
       <li><a href="#docs-dl">Reference documentation</a>
     </ol>
   </li>
-  <li><a href="#java8">Get the Java 8 JDK and JRE</a></li>
+  <li><a href="#java8">Get the Java 8 JDK</a></li>
   <li><a href="#create-update">Update or Create a Project</a></li>
   <li><a href="#next">Next Steps</a></li>
 </ol>
@@ -55,7 +55,7 @@
 
 <p>To download Android Studio 2.1 as a separate installation, follow these
 steps (or if you want to receive Android Studio 2.1 as an update to your
-existing installation, skip to step 4):</p>
+existing installation, skip to step 6):</p>
 
 <ol>
   <li>Edit the name of your
@@ -67,6 +67,16 @@
   </li>
   <li>Unzip the package and move the Android Studio 2.1 contents to the
     appropriate location for applications on your system, then launch it.</li>
+  <li>In the setup wizard, click <strong>Next</strong> a couple times to
+  reach the SDK Components Setup screen. Here,
+  you must set a different path for the <strong>Android SDK Location</strong>.
+  It can be any directory you want, but it must not be the default path, which
+  is the same directory used by your original version of Android Studio (unless
+  you changed that one yourself). The SDK location for Android Studio 2.1
+  must be different because the N Preview SDK packages are not compatible with
+  versions of Android Studio lower than 2.1.</p>
+  </li>
+  <li>Continue with the setup wizard until you reach the Android Studio IDE.</li>
   <li>Open the Settings dialog
     (<strong>File &gt; Settings</strong> on Windows/Linux, or
     <strong>Android Studio &gt; Preferences</strong> on Mac). In the left
@@ -140,13 +150,11 @@
 
 
 
-<h2 id="java8">Get the Java 8 JDK and JRE</h2>
+<h2 id="java8">Get the Java 8 JDK</h2>
 
-<p>To compile your app against the Android N platform, you need to use
-the Java 8 Developer Kit (JDK 8), and in order to use some tools with Android
-Studio 2.1, you need to install the Java 8 Runtime Environment (JRE 8). So, if
-you don't have the latest version of each already, download JDK 8 and JRE 8
-now.</p>
+<p>To compile your app against the Android N platform and use some tools with
+Android Studio 2.1, you need to install the Java 8 Developer Kit (JDK 8). So, if
+you don't already have the latest version, download JDK 8 now.</p>
 
 <p>Then set the JDK version in Android Studio as follows:</p>
 
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 923a6d7..ddc6e14 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -484,13 +484,15 @@
 <div class="col-2of6">
 <h4>Windows</h4>
 <ul>
-<li>Microsoft&reg;  Windows&reg;  7/8/10 (32 or 64-bit)</li>
+<li>Microsoft&reg;  Windows&reg;  7/8/10 (32- or 64-bit)</li>
 <li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum (500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image). 4 GB Recommended.</li>
+<li>2 GB of available disk space minimum,<br>4 GB Recommended
+(500 MB for IDE + 1.5 GB for
+Android SDK and emulator system image)</li>
 <li>1280 x 800  minimum screen resolution</li>
 <li>Java Development Kit (JDK) 8</li>
-<li>Optional for accelerated emulator: Intel® processor with support for Intel®
+<li>For accelerated emulator: 64-bit operating system and
+Intel® processor with support for Intel®
 VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality</li>
 </ul>
 </div>
@@ -500,8 +502,9 @@
 <ul>
 <li>Mac&reg;  OS X&reg;  10.8.5 or higher, up to 10.11.4 (El Capitan)</li>
 <li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum (500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image). 4 GB Recommended.</li>
+<li>2 GB of available disk space minimum,<br>4 GB Recommended
+(500 MB for IDE + 1.5 GB for
+Android SDK and emulator system image)</li>
 <li>1280 x 800 minimum screen resolution</li>
 <li>Java Development Kit (JDK) 6</li>
 </ul>
@@ -513,12 +516,17 @@
 <li>GNOME or KDE desktop
 <p><i>Tested on Ubuntu®  12.04, Precise Pangolin (64-bit distribution
 capable of running 32-bit applications)</i></li>
+<li>64-bit distribution capable of running 32-bit applications</li>
 <li>GNU C Library (glibc) 2.11 or later</li>
 <li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum (500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image). 4 GB Recommended.</li>
+<li>2 GB of available disk space minimum,<br>4 GB Recommended
+(500 MB for IDE + 1.5 GB for
+Android SDK and emulator system image)</li>
 <li>1280 x 800 minimum screen resolution</li>
 <li>Java Development Kit (JDK) 8</li>
+<li>For accelerated emulator: Intel® processor with support for Intel®
+VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality,
+or AMD processor with support for AMD Virtualization™ (AMD-V™)</li>
 </ul>
 </div>
 
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
index f776c9a..e4d860b 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -5,21 +5,29 @@
 
 @jd:body
 
+<style>
+.instruction-select {
+  float:right;
+  background: #f7f7f7;
+  padding: 15px;
+  margin: -15px 0 20px 40px;
+}
+</style>
 
-<div style="float:right;margin:0 0 20px 20px;border:1px solid #ccc;padding:10px">
+<div class="instruction-select">
 <p><strong>Instructions for</strong></p>
 <select id="instructions-option" onchange="showInstructions(this.value)" style="padding:4px">
   <option value="windows">Windows</option>
   <option value="mac">Mac</option>
   <option value="linux">Linux</option>
-</select> 
+</select>
 </div>
 
 <p>Setting up Android Studio takes just a few clicks.</p>
 
 <p>While the <a href="{@docRoot}sdk/index.html">Android Studio download</a>
-completes, make sure you have JDK 8 or higher installed. To check which version
-you have, open a command line and type <code>javac -version</code>. If the JDK
+completes, verify which version of the JDK you have:
+open a command line and type <code>javac -version</code>. If the JDK
 is not available or the version is lower than 1.8, download the <a href=
 "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
 class="external-link">Java SE Development Kit 8</a>.</p>
@@ -38,7 +46,7 @@
     <p>Select <strong>Start menu > Computer > System Properties >
     Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment
     Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to
-    your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p>
+    your JDK folder, for example <code>C:\Program Files\Java\jdk1.8.0_77</code>.</p>
   </p>
   </li>
 </ol>
@@ -50,8 +58,8 @@
   <source src="https://storage.googleapis.com/androiddevelopers/videos/studio-install-windows.mp4" type="video/mp4">
 </video>
 
-<p>As new tools and other APIs become available, Android Studio will tell you
-with a pop-up, or you can check yourself by clicking <strong>Help &gt;
+<p>As new tools and other APIs become available, Android Studio tells you
+with a pop-up, or you can check for updates by clicking <strong>Help &gt;
 Check for Update</strong>.</p>
 
 
@@ -64,6 +72,10 @@
 
 <div id="system-mac" style="display:none">
 
+<p>There are, however, known stability issues in Android Studio on Mac
+when using JDK 1.8. Until these issues are resolved, you can improve stability
+by downgrading your JDK to an older version (but no lower than JDK 1.6).</p>
+
 <p>To install Android Studio on your Mac, proceed as follows:</p>
 
 <ol>
@@ -72,9 +84,8 @@
     Android Studio.</li>
   <li>Select whether you want to import previous Android Studio settings,
     then click <strong>OK</strong>.</li>
-  <li>The Android Studio Setup Wizard will guide you though the rest of the
-    setup procedures in just a few clicks,
-    which includes downloading various Android SDK components
+  <li>The Android Studio Setup Wizard guides you though the rest of the
+    setup, which includes downloading Android SDK components
     that are required for development.</li>
 </ol>
 
@@ -86,9 +97,9 @@
 </video>
 
 <p>
-As new tools and other APIs become available, Android Studio will tell you
-with a pop-up, or you can check yourself by clicking <strong>Android Studio &gt;
-Check for Updates</strong>.</p>
+As new tools and other APIs become available, Android Studio tells you
+with a pop-up, or you can check for updates by clicking <strong>Android Studio
+&gt; Check for Updates</strong>.</p>
 
 </div>
 <!-- end mac -->
@@ -116,13 +127,21 @@
   </li>
   <li>Select whether you want to import previous Android Studio settings
     or not, then click <strong>OK</strong>.</li>
-  <li>The Android Studio Setup Wizard will guide you though the rest of the
-    setup procedures in just a few clicks,
-    which includes downloading various Android SDK components
+  <li>The Android Studio Setup Wizard guides you though the rest of the
+    setup, which includes downloading Android SDK components
     that are required for development.</li>
   </li>
 </ol>
 
+<div class="note">
+<p><strong>Note:</strong>
+If you are running a 64-bit version of Ubuntu, you need to install some 32-bit
+libraries with the following command:</p>
+<pre>sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6</pre>
+<p>If you are running 64-bit Fedora, the command is:</p>
+<pre>sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686</pre>
+</div>
+
 <p>That's it!
 The following video shows each step of the recommended setup procedure.</p>
 
@@ -130,16 +149,16 @@
   <source src="https://storage.googleapis.com/androiddevelopers/videos/studio-install-linux.mp4" type="video/mp4">
 </video>
 
-<p>As new tools and other APIs become available, Android Studio will tell you
-with a pop-up, or you can check yourself by clicking <strong>Help &gt;
+<p>As new tools and other APIs become available, Android Studio tells you
+with a pop-up, or you can check for updates by clicking <strong>Help &gt;
 Check for Update</strong>.</p>
 
-  <p class="note"><strong>Note:</strong> To support 32-bit apps
-  on a 64-bit machine, you will need to install the ia32-libs,
-  lib32ncurses5-dev, and lib32stdc++6 packages.</p>
-
 </div><!-- end linux -->
 
+<p class="note"><strong>Note:</strong>
+If you want to develop apps with the N Preview SDK, you must use
+the preview version of Android Studio 2.1. For more information, see the
+<a href="{@docRoot}preview/setup-sdk.html">N Preview setup guide</a>.</p>
 
 
 
diff --git a/docs/html/sdk/sdk_vars.cs b/docs/html/sdk/sdk_vars.cs
index 449935e..9f220d7 100644
--- a/docs/html/sdk/sdk_vars.cs
+++ b/docs/html/sdk/sdk_vars.cs
@@ -1,27 +1,27 @@
 <?cs
-set:studio.version='1.5.1.0' ?><?cs
-set:studio.release.date='April 4, 2016' ?><?cs
+set:studio.version='2.0.0.20' ?><?cs
+set:studio.release.date='April 7, 2016' ?><?cs
 
 
-set:studio.linux_bundle_download='android-studio-ide-141.2456560-linux.zip' ?><?cs
-set:studio.linux_bundle_bytes='380943097' ?><?cs
-set:studio.linux_bundle_checksum='b8460a2197abe26979d88e3b01b3c8bfd80a37db' ?><?cs
+set:studio.linux_bundle_download='android-studio-ide-143.2739321-linux.zip' ?><?cs
+set:studio.linux_bundle_bytes='292106971' ?><?cs
+set:studio.linux_bundle_checksum='b64070ee4ec4868e9dd942b56f76864634cb0c67' ?><?cs
 
-set:studio.mac_bundle_download='android-studio-ide-141.2456560-mac.dmg' ?><?cs
-set:studio.mac_bundle_bytes='367456698' ?><?cs
-set:studio.mac_bundle_checksum='d0807423985757195ad5ae4717d580deeba1dbd8' ?><?cs
+set:studio.mac_bundle_download='android-studio-ide-143.2739321-mac.dmg' ?><?cs
+set:studio.mac_bundle_bytes='292574501' ?><?cs
+set:studio.mac_bundle_checksum='0f3d53a08815c00912c13738abc79e82207b20ed' ?><?cs
 
-set:studio.win_bundle_download='android-studio-ide-141.2456560-windows.zip' ?><?cs
-set:studio.win_bundle_bytes='375635150' ?><?cs
-set:studio.win_bundle_checksum='64882fb967f960f2142de239200104cdc9b4c75b' ?><?cs
+set:studio.win_bundle_download='android-studio-ide-143.2739321-windows.zip' ?><?cs
+set:studio.win_bundle_bytes='294612422' ?><?cs
+set:studio.win_bundle_checksum='705c00f52b715d6a845c97979ced6f9b1b3f11c6' ?><?cs
 
-set:studio.win_bundle_exe_download='android-studio-bundle-141.2456560-windows.exe' ?><?cs
-set:studio.win_bundle_exe_bytes='1209163328' ?><?cs
-set:studio.win_bundle_exe_checksum='6ffe608b1dd39041a578019eb3fedb5ee62ba545' ?><?cs
+set:studio.win_bundle_exe_download='android-studio-bundle-143.2739321-windows.exe' ?><?cs
+set:studio.win_bundle_exe_bytes='1223633080' ?><?cs
+set:studio.win_bundle_exe_checksum='c556debf40de6b5d6f6d65d169a64398e3380183' ?><?cs
 
-set:studio.win_notools_exe_download='android-studio-ide-141.2456560-windows.exe' ?><?cs
-set:studio.win_notools_exe_bytes='351419656' ?><?cs
-set:studio.win_notools_exe_checksum='8d016b90bf04ebac6ce548b1976b0c8a4f46b5f9' ?><?cs
+set:studio.win_notools_exe_download='android-studio-ide-143.2739321-windows.exe' ?><?cs
+set:studio.win_notools_exe_bytes='277789224' ?><?cs
+set:studio.win_notools_exe_checksum='3e8c25bd7b7f3aa326f7b2a349c4d67c550d13ac' ?><?cs
 
 
 set:sdk.linux_download='android-sdk_r24.4.1-linux.tgz' ?><?cs
diff --git a/docs/html/tools/building/building-studio.jd b/docs/html/tools/building/building-studio.jd
index 6827c57..8da70c0 100644
--- a/docs/html/tools/building/building-studio.jd
+++ b/docs/html/tools/building/building-studio.jd
@@ -593,7 +593,7 @@
 android {
   ...
   dexOptions {
-    maxProcessCount 8
+    maxProcessCount 4
     javaMaxHeapSize "2g"
   }
 }
diff --git a/docs/html/tools/data-binding/guide.jd b/docs/html/tools/data-binding/guide.jd
index b57fba7..8bbd833 100644
--- a/docs/html/tools/data-binding/guide.jd
+++ b/docs/html/tools/data-binding/guide.jd
@@ -1655,13 +1655,31 @@
 <h3 id="studio_support">Android Studio Support for Data Binding</h3>
 
 <p>
-Android Studio supports syntax highlighting of data binding expressions, and flags any expression
-language syntax errors in the editor.
-</p>
+Android Studio supports many of the code editing features for data binding code.
+For example, it supports the following features for data binding expressions:</p>
+<ul>
+<li>Syntax highlighting</li>
+<li>Flagging of expression language syntax errors</li>
+<li>XML code completion</li>
+<li>References, including <a class="external-link"
+href="https://www.jetbrains.com/help/idea/2016.1/navigation-in-source-code.html?origin=old_help">
+navigation</a> (such as navigate to a declaration) and
+<a class="external-link"
+href="https://www.jetbrains.com/help/idea/2016.1/viewing-inline-documentation.html?origin=old_help">
+quick documentation</a></li>
+</ul>
+
+<p class="note"><strong>Note:</strong> Arrays and a
+<a href="https://docs.oracle.com/javase/tutorial/java/generics/types.html"
+class="external-link">generic type</a>, such as the {@link
+android.databinding.Observable} class, might display
+errors when there are no errors.</p>
+
 <p>
-The Preview pane displays default values for data binding expressions if provided. In the following
-example excerpt of an element from a layout XML file, the Preview pane displays the
-{@code PLACEHOLDER} default text value in the <code>TextView</code>.
+The Preview pane displays default values for data binding expressions if
+provided. In the following
+example excerpt of an element from a layout XML file, the Preview pane displays
+the {@code PLACEHOLDER} default text value in the <code>TextView</code>.
 </p>
 
 <pre>
@@ -1671,8 +1689,11 @@
 </pre>
 
 <p>
-If you need to display a default value during the design phase of your project, you
-can also use tools attributes instead of default expression values, as described in
-<a class="external-link" href="http://tools.android.com/tips/layout-designtime-attributes">
+If you need to display a default value during the design phase of your project,
+you can also use tools attributes instead of default expression values, as
+described in
+<a class="external-link"
+href="http://tools.android.com/tips/layout-designtime-attributes">
 Designtime Layout Attributes</a>.
-</p>
\ No newline at end of file
+</p>
+
diff --git a/docs/html/tools/devices/emulator.jd b/docs/html/tools/devices/emulator.jd
index d9a38f7..319286e 100644
--- a/docs/html/tools/devices/emulator.jd
+++ b/docs/html/tools/devices/emulator.jd
@@ -94,21 +94,6 @@
 For more information, see
 <a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.</p>
 
-<h3 id="manifest">Manifest settings</h3>
-
-<p>For your app to use certain emulator device features, you need to specify
-in the manifest that your app will use them. For example, an Android Wear watch
-requires the following <code>&lt;uses-feature&gt;</code> setting:</p>
-
-<pre>
-&lt;uses-feature android:name="android.hardware.type.watch" /&gt;
-</pre>
-
-<p>There are also settings for camera, location, audio, microphone, phone,
-networking, TV, touchscreen, and more. For more information, see
-<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
-&lt;uses-feature&gt;</a>.</p>
-
 <h3 id="system">System images</h3>
 
 <p>The Android Emulator runs a full
diff --git a/docs/html/tools/revisions/gradle-plugin.jd b/docs/html/tools/revisions/gradle-plugin.jd
index 6a35cab..9d688d8 100644
--- a/docs/html/tools/revisions/gradle-plugin.jd
+++ b/docs/html/tools/revisions/gradle-plugin.jd
@@ -132,7 +132,7 @@
 <div class="toggle-content opened">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-content-img"
-      alt=""/>Android Plugin for Gradle, Revision 2.0.0</a> <em>(March 2016)</em>
+      alt=""/>Android Plugin for Gradle, Revision 2.0.0</a> <em>(April 2016)</em>
   </p>
 
   <div class="toggle-content-toggleme">
diff --git a/docs/html/tools/revisions/studio.jd b/docs/html/tools/revisions/studio.jd
index a65c164..b65531f 100755
--- a/docs/html/tools/revisions/studio.jd
+++ b/docs/html/tools/revisions/studio.jd
@@ -19,11 +19,21 @@
 everything you need to begin developing Android apps:</p>
 
 <ul>
-<li>IntelliJ IDE + Android Studio plugin</li>
-<li>Android SDK Tools</li>
-<li>Android Platform-tools</li>
-<li>A version of the Android platform</li>
-<li>A version of the Android system image for the emulator</li>
+  <li>IntelliJ IDE + Android Studio plugin
+  </li>
+
+  <li>Android SDK Tools
+  </li>
+
+  <li>Android Platform-tools
+  </li>
+
+  <li>A version of the Android platform
+  </li>
+
+  <li>Android Emulator with an Android system image including Google Play
+  Services
+  </li>
 </ul>
 
 <p>For an introduction to Android Studio, read the
@@ -39,9 +49,209 @@
 <p>The sections below provide notes about successive releases of
 Android Studio, as denoted by revision number. </p>
 
-<div class="toggle-content opened">
+<div class="toggle-content open">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-content-img"
+      alt=""/>Android Studio v2.0.0</a> <em>(April 2016)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <p class="note">
+      <strong>Note:</strong> If you are developing for the N Developer Preview, you
+      should use Android Studio 2.1 Preview. Android Studio 2.0 does not support
+      all the features required to target the N Preview. To learn more, read about
+      how to properly <a href="{@docRoot}preview/setup-sdk.html">set up your
+      developer environment</a> for the N Preview.
+    </p>
+
+    <p>
+      <strong>Instant Run</strong>:
+    </p>
+
+    <ul>
+      <li>Android Studio now deploys clean builds faster than ever before.
+      Additionally, pushing incremental code changes to the emulator or a physical
+      device is now almost instantaneous. Review your updates without redeploying a
+      new debug build or, in many cases, without restarting the app.
+      </li>
+
+      <li>Instant Run supports pushing the following changes to a running app:
+        <ul>
+          <li>Changes to the implementation of an existing instance method or
+          static method
+          </li>
+
+          <li>Changes to an existing app resource
+          </li>
+
+          <li>Changes to structural code, such as a method signature or a static
+          field (requires a target device running API level 21 or higher).
+          </li>
+        </ul>
+      </li>
+
+      <li>Read the documentation to learn more <a href=
+      "{@docRoot}tools/building/building-studio.html#instant-run">about Instant
+      Run</a>.
+        <p class="note">
+          <strong>Note:</strong> Instant Run is supported only when you deploy the
+          debug build variant, use <a href=
+          "{@docRoot}tools/revisions/gradle-plugin.html#revisions">Android Plugin for
+          Gradle version 2.0.0</a> or higher, and configure your app's module-level
+          <code>build.gradle</code> file for <code>minSdkVersion 15</code> or higher.
+          For the best performance, configure your app for <code>minSdkVersion
+          21</code> or higher.
+        </p>
+      </li>
+    </ul>
+
+<p><strong>New additions to Lint:</strong></p>
+  <ul>
+    <li>Inspection of {@code switch} statements using {@link
+    android.support.annotation.IntDef @IntDef} annotated integers to make sure
+    all constants are handled. To quickly add any missing statements, use the the
+    intention action drop-down menu and select <b>Add Missing @IntDef
+    Constants</b>.
+    </li>
+
+    <li>Flags for incorrect attempts to use string interpolation to insert
+    version numbers in the {@code build.gradle} file.
+    </li>
+
+    <li>Flags for anonymous classes that extend the {@link android.app.Fragment
+    Fragment} class.
+    </li>
+
+    <li>Flags for native code in unsafe locations, such as the {@code res/} and {@code
+    asset/} folders. This flag encourages storing native code in the {@code libs/}
+    folder, which is then securely packaged into the application’s {@code
+    data/app-lib/} folder at install time. <a class="external-link" href=
+    "https://android-review.googlesource.com/#/c/169950/">AOSP: #169950</a>
+    </li>
+
+    <li>Flags for unsafe calls to {@link java.lang.Runtime#load(java.lang.String)
+    Runtime.load()} and {@link java.lang.System#load(java.lang.String)
+    System.load()} calls. <a class="external-link" href=
+    "https://android-review.googlesource.com/#/c/179980/">AOSP: #179980</a>
+    </li>
+
+    <li>Find and remove any unused resources by selecting <b>Refactor &gt; Remove
+    Unused Resources</b> from the menu bar. Unused resource detection now
+    supports resources only referenced by unused resources, references in raw
+    files such as {@code .html} image references, and {@code tools:keep} and
+    {@code tools:discard} attributes used by the Gradle resource shrinker, while
+    considering inactive source sets (such as resources used in other build
+    flavors) and properly handling static field imports.
+    </li>
+
+    <li>Checks that implicit API references are supported on all platforms
+    targeted by {@code minSdkVersion}.
+    </li>
+
+    <li>Flags improper usage of {@link android.support.v7.widget.RecyclerView}
+    and {@link android.os.Parcelable}.
+    </li>
+
+    <li>{@link android.support.annotation.IntDef @IntDef}, {@link
+    android.support.annotation.IntRange @IntRange}, and {@link
+    android.support.annotation.Size @Size} inspections are now also checked for
+    {@code int} arrays and varargs.
+    </li>
+  </ul>
+
+<p><strong>Additional Improvements</strong>:</p>
+    <ul>
+      <li>Optimized for Android Emulator 2.0, which is faster than ever before,
+      supports a wider range of virtual devices, and features a drastically
+      improved UI. To learn more about the new emulator, read the <a href=
+      "{@docRoot}tools/sdk/tools-notes.html#notes">SDK Tools release notes</a>.
+      </li>
+
+      <li>Improvements to the <a href=
+      "{@docRoot}tools/devices/managing-avds.html">Android Virtual Device
+      Manager</a>:
+        <ul>
+          <li>System images are now categorized under the following tabs:
+          <em>Recommended</em>, <em>x86</em>, and <em>Other</em>.
+          </li>
+
+          <li>Under advanced settings, you can enable multi-core support and
+          specify the number of cores the emulator can use.
+          </li>
+
+          <li>Under advanced settings, you can determine how graphics are rendered
+          on the emulator by selecting one of the following options:
+            <ul>
+              <li>
+                <strong>Hardware:</strong> use you computer's graphics card for
+                faster rendering.
+              </li>
+
+              <li>
+                <strong>Software:</strong> use software-based rendering.
+              </li>
+
+              <li>
+                <strong>Auto:</strong> let the emulator decide the best option. This
+                is the default setting.
+              </li>
+            </ul>
+          </li>
+        </ul>
+      </li>
+
+      <li>Improved AAPT packaging times by specifying deploy target before the app
+      is built. This allows Android Studio to efficiently package only the
+      resources required by the specified device.
+      </li>
+
+      <li>Added Cloud Test Lab integration to provide on-demand app testing with
+      the convenience and scalability of a cloud service. Learn more about how you
+      can <a href="{@docRoot}training/testing/start/index.html#run-ctl">use Cloud
+      Test Lab with Android Studio</a>.
+      </li>
+
+      <li>Added a preview of the new <a class="external-link" href=
+      "//tools.android.com/tech-docs/gpu-profiler">GPU Debugger</a>. For graphics
+      intensive applications, you can now visually step through your OpenGL ES code
+      to optimize your app or game.
+      </li>
+
+      <li>Added support for Google App Indexing integration and testing. Add deep
+      links, app indexing, and search functionality to your apps to help drive more
+      traffic to your app, discover which app content is used most, and attract new
+      users. Test and validate your URL links in your app all within Android
+      Studio. Learn more about implementing and testing <a href=
+      "{@docRoot}tools/help/app-link-indexing.html">Deep Link and App Indexing
+      APIs</a>.
+      </li>
+
+      <li>Upgrades from the latest IntelliJ 15 release, including improved code
+      analysis and performance. See <a class="external-link" href=
+      "https://www.jetbrains.com/idea/whatsnew">What's New in IntelliJ</a> for a
+      complete description of the new features and enhancements.
+      </li>
+
+      <li>XML editor auto-complete now adds quotations marks when completing
+      attributes. To check if this option is enabled, open the <b>Setting</b> or
+      <b>Preferences</b> dialogue, navigate to <b>Editor &gt; General &gt; Smart
+      Keys</b>, and check the box next to <b>Add quotes for attribute value on
+      attribute completion</b>. <a class="external-link" href=
+      "//b.android.com/195113">Issue: 195113</a>
+      </li>
+
+      <li>The XML editor now supports code completion for <a href=
+      "{@docRoot}tools/data-binding/guide.html#layout_details">data binding</a>
+      expressions.
+      </li>
+    </ul>
+  </div>
+</div>
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
       alt=""/>Android Studio v1.5.1</a> <em>(December 2015)</em>
   </p>
   <div class="toggle-content-toggleme">
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 1625716..1ff2391 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -18,28 +18,108 @@
 the SDK Tools, as denoted by revision number. To determine what revision of the SDK
 Tools you are using, refer to the "Installed Packages" listing in the Android SDK Manager. </p>
 
-<p>For a summary of all known issues in SDK Tools, see <a
-href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
+<p>
+  For a summary of all known issues in SDK Tools, visit <a class=
+  "external-link" href="http://tools.android.com/knownissues">the Android Tools
+  Project Site</a>.
+</p>
 
 <div class="toggle-content opened">
-  <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-content-img"
-      alt=""/>SDK Platform-tools, Revision 23.1.0</a> <em>(December 2015)</em>
+  <p>
+    <a href="#" onclick="return toggleContent(this)"><img src=
+    "{@docRoot}assets/images/styles/disclosure_up.png" class=
+    "toggle-content-img" alt="">SDK Tools, Revision 25.0.0</a>
+    <em>(April 2016)</em>
   </p>
 
   <div class="toggle-content-toggleme">
-
     <dl>
-        <dt>General Notes:</dt>
-    <dd>
-      <ul>
-        <li>Changed Linux requirements for Android SDK Platform-tools revision 23.1.0 and later:
-          it now requires 64-bit Linux.</li>
-      </ul>
-    </dd>
+      <dt>
+        <strong>Android Emulator 2.0</strong>:
+      </dt>
 
+      <dd>
+        <ul>
+          <li>Performance improvements:
+          </li>
+            <ul>
+              <li>Emulator now uses CPU acceleration on x86 emulator system images by
+              default.
+              </li>
 
+              <li>Added <a href="{@docRoot}training/articles/smp.html">SMP</a> support
+              to take advantage of host multi-core architecture when emulating Android
+              6.0 (API level 23) or higher, resulting in much better performance and
+              speed than the physical counterpart. Also with SMP support, you can test
+              apps that specifically target multi-core Android devices.
+              </li>
 
+              <li>Improved data and APK push-pull protocol between the the <a href=
+              "{@docRoot}tools/help/adb.html">Android Debug Bridge</a> and devices
+              running Android 5.0 (API level 21) or higher. See speed improvements up
+              to five times faster than using a physical device.
+              </li>
+            </ul>
+
+          <li>Extended UI controls and a floating toolbar provide easy access to features
+          previously available only through the command line, such as taking screen
+          captures, adjusting the battery level, rotating the screen, and managing
+          virtual calls.
+          </li>
+
+          <li>Upload KML and GPX files to play back a set of custom location points.
+          </li>
+
+          <li>Dynamically resize the emulator by dragging a corner or zoom into the
+          emulator window.
+          </li>
+
+          <li>Install APKs or add media files to the emulator’s internal SD card by
+          dragging and dropping files into the emulator window.
+          </li>
+
+          <li>Simulate multi-touch input. While interacting with the emulator screen,
+          enter multi-touch mode by holding down the <strong>Ctrl</strong> key on
+          Windown/Linux, or <strong>Command</strong> key on Mac OSX.
+          </li>
+
+          <li>The Android Emulator works best with Android Studio 2.0. To find out more
+          about what's included in the newest version of the official Android IDE,
+          <a href="{@docRoot}tools/revisions/studio.html#Revisions">read the release
+          notes</a>.
+          </li>
+
+          <li>Read the documentation to find out more about <a href=
+          "{@docRoot}tools/devices/emulator.html">using the Android Emulator</a>.
+          </li>
+        </ul>
+      </dd>
+    </dl>
+  </div>
+</div>
+
+<div class="toggle-content closed">
+  <p>
+    <a href="#" onclick="return toggleContent(this)"><img src=
+    "{@docRoot}assets/images/styles/disclosure_down.png" class=
+    "toggle-content-img" alt="">SDK Platform-tools, Revision 23.1.0</a>
+    <em>(December 2015)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+    <dl>
+      <dt>
+        General Notes:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Changed Linux requirements for Android SDK Platform-tools
+          revision 23.1.0 and later: it now requires 64-bit Linux.
+          </li>
+        </ul>
+      </dd>
+    </dl>
   </div>
 </div>
 
diff --git a/docs/html/tools/studio/code-tools.jd b/docs/html/tools/studio/code-tools.jd
index 4033bfc..aeae77d 100644
--- a/docs/html/tools/studio/code-tools.jd
+++ b/docs/html/tools/studio/code-tools.jd
@@ -17,10 +17,12 @@
       by allowing you to more clearly define method parameter requirements.
     </dd>
 
-  <dt><a href="{@docRoot}tools/help/app-link-indexing.html">Deep Link and App Indexing</a></dt>
-    <dd>These features help you add deep links, app indexing, and search functionality to your
-      apps. These features can make it easier to find content in an installed app, drive more
-      traffic to your app, discover which app content users view the most, and attract new users.
+  <dt><a href="{@docRoot}tools/help/app-link-indexing.html">URL and App Indexing
+  Support</a></dt>
+    <dd>Android Studio helps you add support for URLs, app indexing, and search
+    functionality to your apps. These features can help to drive more traffic
+    to your app, discover which app content is used most, make it easier for
+    users to find content in an installed app, and attract new users.
     </dd>
 
 </dl>
diff --git a/docs/html/tools/support-library/index.jd b/docs/html/tools/support-library/index.jd
index 1152eac4..3afd7ac 100644
--- a/docs/html/tools/support-library/index.jd
+++ b/docs/html/tools/support-library/index.jd
@@ -36,8 +36,8 @@
 
 <p>Including the Support Libraries in your Android project is considered a best practice for
   application developers, depending on the range of platform versions your app is targeting
-  and the APIs that it uses. Using the features the libraries provide can help you improve the look of your
-  application, increase performance and broaden the reach of your application to more users.
+  and the APIs that it uses. Using the features the libraries provide can help you improve the look
+  of your application, increase performance and broaden the reach of your application to more users.
   If you use the Android
   <a href="{@docRoot}tools/projects/templates.html">code template</a> tools, you will notice that
   all the Android application templates include one or more of the Support Libraries by default.</p>
@@ -59,9 +59,225 @@
 <p>This section provides details about the Support Library package releases.</p>
 
 <div class="toggle-content opened">
-  <p id="rev23-2-1">
+  <p id="rev23-3-0">
     <a href="#" onclick="return toggleContent(this)"><img src=
     "{@docRoot}assets/images/styles/disclosure_up.png" class="toggle-content-img"
+    alt="">Android Support Library, revision 23.3.0</a> <em>(April
+    2016)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+    <dl>
+      <dt>
+        Changes for <a href=
+        "{@docRoot}tools/support-library/features.html#v4">v4 Support
+        Library</a>:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Added <code>AppLaunchChecker</code> to help track how your app
+          has been launched by the user in the past.
+          <code>hasStartedFromLauncher()</code> lets you know if the user has
+          launched your app from the home screen before, or if it has only
+          been started by other means (for example, to view specific web
+          URLs).
+          </li>
+
+          <li>Fixed a memory leak in
+          <code>MediaBrowserServiceCompat.mConnections</code>. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=205220">Issue
+          205220</a>)
+          </li>
+
+          <li>Fixed issue where {@link android.support.v4.view.ViewPager}
+          does not account for page margins when flipping page. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203816">Issue
+          203816</a>)
+          </li>
+          <li>{@link android.support.v4.app.Fragment#onRequestPermissionsResult
+            Fragment.onRequestPermissionsResult()} is now delivered to child
+            fragments.
+          </li>
+        </ul>
+      </dd>
+
+
+      <dt>
+        Changes for <a href=
+        "{@docRoot}tools/support-library/features.html#v7-appcompat">v7
+        appcompat library</a>:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Fixed an issue in {@link
+          android.support.v7.widget.AppCompatSpinner} that could cause
+          multiple popups to appear. (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=205052">Issue
+          205052</a>)
+          </li>
+
+          <li>Fixed an issue with how borderless buttons were colored.
+          (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=202967">Issue
+          202967</a>)
+          </li>
+
+          <li>Fixed a compatibility issue between {@link
+          android.support.v7.app.AppCompatDialogFragment } and {@link
+          android.support.v7.app.AlertDialog}. (<a class="external-link"
+            href="https://code.google.com/p/android/issues/detail?id=204805">Issue
+            204805</a>)
+          </li>
+
+          <li>Reverted changes to <code>TintResources</code> that were causing
+            memory and configuration issues.  (<a class="external-link"
+            href="https://code.google.com/p/android/issues/detail?id=205236">Issue
+            205236</a>)</li>
+        </ul>
+      </dd>
+
+
+      <dt>
+        Changes for <a href=
+        "{@docRoot}tools/support-library/features.html#v7-mediarouter">v7
+        mediarouter library</a>:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Fixed {@link android.support.v7.app.MediaRouteControllerDialog}
+          volume slider’s behavior. (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=202299">Issue
+          202299</a>)
+          </li>
+        </ul>
+      </dd>
+
+
+      <dt>
+        Changes for <a href="features.html#v7-preference">v7 Preference</a>
+        library:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Fixed issue where {@link
+          android.support.v7.preference.PreferenceFragmentCompat} would crash
+          if <code>dividerHeight</code> is specified. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=204778">Issue
+          204778</a>)
+          </li>
+        </ul>
+      </dd>
+
+
+      <dt>
+        Changes for <a href=
+        "{@docRoot}tools/support-library/features.html#v7-recyclerview">v7
+        recyclerview library</a>:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Fixed a bug where {@link
+          android.support.v7.widget.RecyclerView} would not invoke scroll
+          callbacks if the range of visible items shrank. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=200987">Issue
+          200987</a>)
+          </li>
+
+          <li>Fixed a bug where {@link
+          android.support.v7.widget.RecyclerView} would freeze if it was in
+          linear layout, was weighted, and contained images. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203276">Issue
+          203276</a>)
+          </li>
+
+          <li>Fixed a crash in {@link
+          android.support.v7.widget.OrientationHelper#getStartAfterPadding
+          OrientationHelper.getStartAfterPadding()}. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=180521">Issue
+          180521</a>)
+          </li>
+
+          <li>Fixed a crash with usages of
+          <code>android:nestedScrollingEnabled</code>. (<a class=
+          "external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=197932">Issue
+          197932</a>)
+          </li>
+        </ul>
+      </dd>
+
+
+      <dt>
+        Changes for <a href=
+        "{@docRoot}tools/support-library/features.html#design">Design Support
+        Library</a>:
+      </dt>
+
+      <dd>
+        <ul>
+          <li>Fixed a bug where a hidden bottom sheet would handle touch
+          events. (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203654">Issue
+          203654</a>)
+          </li>
+
+          <li>Fixed a layout issue with <code>BottomSheetBehavior</code> when
+          <code>fitsSystemWindows</code> is true. (<a class="external-link"
+          href=
+          "https://code.google.com/p/android/issues/detail?id=203057">Issue
+          203057</a>)
+          </li>
+
+          <li>Fixed an accessibility issue with {@link
+          android.support.design.widget.Snackbar}. (<a class="external-link"
+          href=
+          "https://code.google.com/p/android/issues/detail?id=182145">Issue
+          182145</a>)
+          </li>
+
+          <li>Fixed a crash on {@link android.support.design.widget.Snackbar}
+          swipe. (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203924">Issue
+          203924</a>)
+          </li>
+
+          <li>Fixed a bug in {@link
+          android.support.design.widget.AppBarLayout} with
+          <code>enterAlways</code>. (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203661">Issue
+          203661</a>)
+          </li>
+
+          <li>Fixed a bug where {@link
+          android.support.design.widget.TextInputLayout} unnecessarily clears
+          {@link android.widget.EditText} object's background color filter.
+          (<a class="external-link" href=
+          "https://code.google.com/p/android/issues/detail?id=203357">Issue
+          203357</a>)
+          </li>
+        </ul>
+      </dd>
+
+    </dl>
+  </div>
+</div>
+<!-- end of collapsible section: 23.3.0 -->
+
+<div class="toggle-content closed">
+  <p id="rev23-2-1">
+    <a href="#" onclick="return toggleContent(this)"><img src=
+    "{@docRoot}assets/images/styles/disclosure_down.png" class="toggle-content-img"
     alt="">Android Support Library, revision 23.2.1</a> <em>(March
     2016)</em>
   </p>
@@ -361,7 +577,7 @@
     </dl>
   </div>
 </div>
-<!-- end of collapsible section -->
+<!-- end of collapsible section: 23.2.1 -->
 
 <div class="toggle-content closed">
   <p id="rev23-2-0">
@@ -718,7 +934,7 @@
     </dl>
   </div>
 </div>
-<!-- end of collapsible section -->
+<!-- end of collapsible section: 23.2.0 -->
 
 <div class="toggle-content closed">
   <p id="rev23-1-1"><a href="#" onclick="return toggleContent(this)">
diff --git a/docs/html/training/monitoring-device-state/doze-standby.jd b/docs/html/training/monitoring-device-state/doze-standby.jd
index 11e81c1..9250288 100644
--- a/docs/html/training/monitoring-device-state/doze-standby.jd
+++ b/docs/html/training/monitoring-device-state/doze-standby.jd
@@ -205,13 +205,14 @@
   you can set alarms that will fire even if the device is in Doze.
 </p>
 
-<p class="note"><strong>Note:</strong> Neither
-{@link
+<p class="note">
+  <strong>Note:</strong> Neither {@link
   android.app.AlarmManager#setAndAllowWhileIdle(int, long,
   android.app.PendingIntent) setAndAllowWhileIdle()} nor {@link
   android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
-  android.app.PendingIntent) setExactAndAllowWhileIdle()} can fire alarms more than once per 15
-minutes per app.</p>
+  android.app.PendingIntent) setExactAndAllowWhileIdle()} can fire alarms more
+  than once per 9 minutes, per app.
+</p>
 
 <p>
   The Doze restriction on network access is also likely to affect your app,
diff --git a/docs/html/training/testing/start/index.jd b/docs/html/training/testing/start/index.jd
index 74617b0..707ba9d 100644
--- a/docs/html/training/testing/start/index.jd
+++ b/docs/html/training/testing/start/index.jd
@@ -249,6 +249,7 @@
 }
 </pre>
 
+
 <p>
   To use JUnit 4 test classes, make sure to specify <a href=
   "{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">{@code
@@ -265,9 +266,39 @@
 }
 </pre>
 
-<h2 id="build">
-  Build and Run Your Tests
-</h2>
+<h3 id="testartifacts">Work With Test Artifacts</h3>
+<p>Android Studio has two types of test artifacts: Android Instrumentation Tests
+and Unit Tests. Previously, you could work with just one test artifact at a
+time. Now, both test artifacts are enabled.
+The advantage of enabling both test artifacts is that any changes you make to
+the underlying code affect
+them both. For example, if you rename a class that both test artifacts access,
+both will know about the class name refactoring.</p>
+
+<p>The figure shows what your project looks like with both test
+artifacts enabled. Notice the shading of both test artifacts.</p>
+
+<!-- Commenting out for now, but leaving it in case we need to add it back.
+<img src="{@docRoot}images/training/testartifactseparate.png" style="float:left;width:250px;margin-right:20px" /> -->
+<img src="{@docRoot}images/training/testartifactcombined.png" style="float:left;width:250px" />
+<!-- Commenting out for now, but leaving it in case we need to add it back.
+<p>
+By default, both test artifacts are enabled in Android Studio. To enable just
+one, deselect <strong>Enable all test artifacts</strong> in your preferences:
+</p>
+
+<ol>
+<li>Select
+<strong>Android Studio</strong> > <strong>Preferences</strong> > <strong>Build,
+Execution, Deployment</strong> > <strong>Build Tools</strong> >
+<strong>Gradle</strong> > <strong>Experimental</strong>.</li>
+<li>Deselect the test artifacts option.</li>
+<li>Click <strong>OK</strong>.</li>
+</ol>
+-->
+
+<h2 id="build">Build and Run Your Tests</h2>
+
 
 <p>
   Android Studio provides all the tools you need to build, run, and analyze
@@ -293,13 +324,17 @@
 </p>
 
 <ol>
+
   <li>In the <em>Project</em> window, right click on the project and
   synchronize your project.
   </li>
 
-  <li>Open the <em>Build Variants</em> window by clicking the left-hand tab,
-  then change the test artifact to <em>Unit Tests</em>.
-  </li>
+  <!--
+<li>If you enabled one test artifact only, open the
+<strong>Build Variants</strong> window by clicking the left-hand tab, then
+change the test artifact to <em>Unit Tests</em>.
+</li>
+-->
 
   <li>In the <em>Project</em> window, navigate to your unit test class or
   method, then right-click it and select <strong>Run</strong> <img src=
@@ -313,6 +348,7 @@
       </li>
     </ul>
   </li>
+
 </ol>
 
 <p>
@@ -330,10 +366,13 @@
   To run your instrumented tests:
 </p>
 
-<ol>
-  <li>Open the <em>Build Variants</em> window by clicking the left-hand tab,
-  then set the test artifact to <em>Android Instrumentation Tests</em>.
-  </li>
+<ul>
+  <!--
+<li>If you enabled one test artifact only, open the
+<strong>Build Variants</strong> window by clicking the left-hand tab, then set
+the test artifact to <em>Android Instrumentation Tests</em>.
+</li>
+-->
 
   <li>In the <em>Project</em> window, navigate to your instrumented test class
   or method, then right-click and run it using the Android Test configuration.
@@ -342,7 +381,7 @@
   "{@docRoot}images/tools/as-run.png" alt="" style=
   "vertical-align:bottom;margin:0;">.
   </li>
-</ol>
+</ul>
 
 <p>
   The <a href="{@docRoot}tools/building/plugin-for-gradle.html">Android Plugin
@@ -402,6 +441,7 @@
   </li>
 </ol>
 
+
 <h4 id="configure-matrix">
 Configure a test matrix and run a test
 </h4>
@@ -479,38 +519,40 @@
   </li>
 </ol>
 
+<img src="{@docRoot}images/training/ctl-config.png" alt="">
+<p class="img-caption">
+  <strong>Figure 1.</strong> Creating a test configuration for Cloud Test
+  Lab.
+</p>
+
 <h4 id="ctl-results">
   Analyzing test results
 </h4>
 
 <p>
   When Cloud Test Lab completes running your tests, the <em>Run</em> window will
-  open to show the results, as shown in figure 1. You may need to click
+  open to show the results, as shown in figure 2. You may need to click
   <strong>Show Passed</strong> <img src="{@docRoot}images/tools/as-ok.png" alt=
   "" style="vertical-align:bottom;margin:0;"> to see all your executed tests.
 </p>
 
-<p>
-  <img src="{@docRoot}images/training/ctl-test-results.png" alt="">
-</p>
+<img src="{@docRoot}images/training/ctl-test-results.png" alt="">
 
 <p class="img-caption">
-  <strong>Figure 1.</strong> Viewing the results of instrumented tests using
+  <strong>Figure 2.</strong> Viewing the results of instrumented tests using
   Cloud Test Lab.
 </p>
 
 <p>
   You can also analyze your tests on the web by following the link displayed at
   the beginning of the test execution log in the <em>Run</em> window, as shown
-  in figure 2.
+  in figure 3.
 </p>
 
-<p>
-  <img src="{@docRoot}images/training/ctl-exec-log.png" alt="">
-</p>
+<img src="{@docRoot}images/training/ctl-exec-log.png" alt="">
 
 <p class="img-caption">
-  <strong>Figure 2.</strong> Click the link to view detailed test results on
+  <strong>Figure 3.</strong> Click the link to view detailed test results on
   the web.
 </p>
 
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 80bf803..cf415ff 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2758,6 +2758,13 @@
             }
             win.setWindowScale(win.mRequestedWidth, win.mRequestedHeight);
 
+            if (win.mAttrs.surfaceInsets.left != 0
+                    || win.mAttrs.surfaceInsets.top != 0
+                    || win.mAttrs.surfaceInsets.right != 0
+                    || win.mAttrs.surfaceInsets.bottom != 0) {
+                winAnimator.setOpaqueLocked(false);
+            }
+
             boolean imMayMove = (flagChanges & (FLAG_ALT_FOCUSABLE_IM | FLAG_NOT_FOCUSABLE)) != 0;
             final boolean isDefaultDisplay = win.isDefaultDisplay();
             boolean focusMayChange = isDefaultDisplay && (win.mViewVisibility != viewVisibility