Merge "Clarified how to regenerate debug.keystore" into mnc-mr-docs
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/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>