docs: Migrating PIP preview docs into regular DAC docs

For Android N release, migrating and updating PIP preview docs
into regular DAC TV docs. Updating TOCs and redirects as well.

Bug: 26487936
Change-Id: I00a57cc0bfff6929cdba56ce00a6a5e9a292e345
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index 2b94718..837b222 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -1207,4 +1207,6 @@
 - from: /preview/features/key-attestation.html
   to: /training/articles/security-key-attestation.html
 - from: /preview/features/security-config.html
-  to: /training/articles/security-config.html
\ No newline at end of file
+  to: /training/articles/security-config.html
+- from: /preview/features/picture-in-picture.html
+  to: /training/tv/playback/picture-in-picture.html
diff --git a/docs/html/preview/images/pip-active.png b/docs/html/images/android-7.0/pip-active.png
similarity index 100%
rename from docs/html/preview/images/pip-active.png
rename to docs/html/images/android-7.0/pip-active.png
Binary files differ
diff --git a/docs/html/preview/images/pip-button.png b/docs/html/images/android-7.0/pip-button.png
similarity index 100%
rename from docs/html/preview/images/pip-button.png
rename to docs/html/images/android-7.0/pip-button.png
Binary files differ
diff --git a/docs/html/training/_book.yaml b/docs/html/training/_book.yaml
index 0e2083a..6142dba 100644
--- a/docs/html/training/_book.yaml
+++ b/docs/html/training/_book.yaml
@@ -695,6 +695,8 @@
       path: /training/tv/playback/guided-step.html
     - title: Enabling Background Playback
       path: /training/tv/playback/options.html
+    - title: Adding Picture-in-picture
+      path: /training/tv/playback/picture-in-picture.html
   - title: Helping Users Find Content on TV
     path: /training/tv/discovery/index.html
     path_attributes:
diff --git a/docs/html/preview/features/picture-in-picture.jd b/docs/html/training/tv/playback/picture-in-picture.jd
similarity index 87%
rename from docs/html/preview/features/picture-in-picture.jd
rename to docs/html/training/tv/playback/picture-in-picture.jd
index 03a1768..e48ae48 100644
--- a/docs/html/preview/features/picture-in-picture.jd
+++ b/docs/html/training/tv/playback/picture-in-picture.jd
@@ -1,11 +1,14 @@
-page.title=Picture-in-picture
+page.title=Adding Picture-in-picture
 page.keywords=preview,sdk,PIP,Picture-in-picture
 page.tags=androidn
+helpoutsWidget=true
+
+trainingnavtop=true
 
 @jd:body
 
-<div id="qv-wrapper">
-<div id="qv">
+<div id="tb-wrapper">
+<div id="tb">
 
 <h2>In this document</h2>
 <ol>
@@ -31,12 +34,12 @@
 </div>
 </div>
 
-<p>In Android N, Android TV users can now watch a video
-in a pinned window in a corner of the screen when navigating within
-apps. Picture-in-picture (PIP) mode lets apps run a video
+<p>In Android 7.0, Android TV users can now watch a video
+in a pinned window in a corner of the screen when navigating within or
+between apps. Picture-in-picture (PIP) mode lets apps run a video
 activity in the pinned window while another activity continues in the
-background. The PIP window lets users multitask while using your app, which
-helps users be more productive.</p>
+background. The PIP window lets users multitask while using Android TV,
+which helps users be more productive.</p>
 
 <p>Your app can decide when to trigger PIP mode. Here are some examples of
 when to enter PIP mode:</p>
@@ -57,14 +60,14 @@
 PIP menu that lets them toggle the PIP window to full-screen, or close the PIP
 window, by holding down the <b>Home</b> button on the remote. If another
 video starts playing on the main screen, the PIP window is automatically
-closed. Users can also close the PIP window through Recents.</p>
+closed.</p>
 
-<img src="{@docRoot}preview/images/pip-active.png" />
+<img src="{@docRoot}images/android-7.0/pip-active.png" />
 <p class="img-caption"><strong>Figure 1.</strong> A Picture-in-picture
 video visible in a corner of the screen while the user browses content
 on the main screen.</p>
 
-<p>PIP leverages the multi-window APIs available in Android N to
+<p>PIP leverages the multi-window APIs available in Android 7.0 to
 provide the pinned video overlay window. To add PIP to your app, you need to
 register your activities that support PIP, switch your activity to PIP mode as
 needed, and make sure UI elements are hidden and video playback continues when
@@ -99,7 +102,8 @@
 <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.enterPictureInPictureMode()</code>. The following example
+{@link android.app.Activity#enterPictureInPictureMode
+enterPictureInPictureMode()}. The following example
 switches to PIP mode when the user selects a dedicated PIP button on a media
 control bar:</p>
 
@@ -116,12 +120,13 @@
 <p>Adding a PIP button to your media control bar lets your user easily switch
 to PIP mode while controlling video playback.</p>
 
-<img src="{@docRoot}preview/images/pip-button.png" />
+<img src="{@docRoot}images/android-7.0/pip-button.png" />
 <p class="img-caption"><strong>Figure 1.</strong> A Picture-in-picture
 button on a media control bar.</p>
 
-<p>Android N includes a new
-<code>PlaybackControlsRow.PictureInPictureAction</code> class which defines
+<p>Android 7.0 includes a
+{@link android.support.v17.leanback.widget.PlaybackControlsRow.PictureInPictureAction
+PlaybackControlsRow.PictureInPictureAction} class which defines
 control bar PIP actions and uses the PIP icon.</p>
 
 <h2 id="handling_ui">Handling UI During Picture-in-picture</h2>
@@ -129,8 +134,10 @@
 <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.onPictureInPictureModeChanged()</code> or
-<code>Fragment.onPictureInPictureModeChanged()</code> and enable or
+Override {@link android.app.Activity#onPictureInPictureModeChanged
+Activity.onPictureInPictureModeChanged()} or
+{@link android.app.Fragment#onPictureInPictureModeChanged
+Fragment.onPictureInPictureModeChanged()} and enable or
 disable your UI elements as needed, for example:</p>
 
 <pre>
@@ -154,7 +161,7 @@
 onPause()} method. Video playback should not be paused and should continue
 playing if the activity is paused due to PIP mode.</p>
 
-<p>In Android N, you should pause and resume video playback when the system
+<p>In Android 7.0, you should pause and resume video playback when the system
 calls your activity's {@link android.app.Activity#onStop onStop()} and
 {@link android.app.Activity#onStart onStart()}. By doing this, you can avoid
 having to check if your app is in PIP mode in
@@ -204,7 +211,7 @@
 </pre>
 
 <p>In your activity, override {@link android.app.Activity#onNewIntent
-Activity.onNewIntent()} and handle the new video, stopping any existing video
+onNewIntent()} and handle the new video, stopping any existing video
 playback if needed.</p>
 
 <h2 id="best">Best Practices</h2>