Merge "docs: Updated "From Google Play" ad promo text." into mnc-mr-docs
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index eb52c13..478f068 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -476,8 +476,8 @@
<h2 id="android_for_work">Android for Work</h2>
<p>Android for Work adds many new features and APIs for devices running Android N.
-Some highlights are below — for a complete list of Android for Work updates
-related to Android N, please see Android for Work Changes.</p>
+Some highlights are below — for a complete list of changes, see
+<a href="{@docRoot}preview/features/afw.html">Android for Work Updates</a>.</p>
<h3 id="work_profile_security_challenge">Work profile security challenge </h3>
diff --git a/docs/html/preview/features/picture-in-picture.jd b/docs/html/preview/features/picture-in-picture.jd
index e0fb0bb..106ad8b 100644
--- a/docs/html/preview/features/picture-in-picture.jd
+++ b/docs/html/preview/features/picture-in-picture.jd
@@ -17,6 +17,8 @@
</li>
<li><a href="#continuing_playback">Continuing Video Playback While in
Picture-in-picture</a></li>
+ <li><a href="#single_playback">Using a Single Playback Activity for
+Picture-in-picture</a></li>
<li><a href="#best">Best Practices</a></li>
</ol>
@@ -170,6 +172,31 @@
<p>When your activity switches out of PIP mode back to full-screen mode, the
system resumes your activity and calls your <code>onResume()</code> method.</p>
+<h2 id="single_playback">Using a Single Playback Activity for
+Picture-in-picture</h2>
+
+<p>In your app, a user might select a new video when browsing for content on
+the main screen, while a video playback activity is in PIP mode. Play the new
+video in the existing playback activity in full screen mode, instead of
+launching a new activity that might confuse the user.</p>
+
+<p>To ensure a single activity is used for video playback requests and
+switched into or out of PIP mode as needed, set the activity's
+<code>android:launchMode</code> to <code>singleTask</code> in your manifest:
+</p>
+
+<pre>
+<activity android:name="VideoActivity"
+ ...
+ android:supportsPictureInPicture="true"
+ android:launchMode="singleTask"
+ ...
+</pre>
+
+<p>In your activity, override {@link android.app.Activity#onNewIntent
+Activity.onNewIntent()} and handle the new video, stopping any existing video
+playback if needed.</p>
+
<h2 id="best">Best Practices</h2>
<p>PIP is intended for activities that play full-screen video. When switching